Awesome
mdata-client
This repository contains metadata retrieval and manipulation tools for use within guests of the SmartOS hypervisor. These guests may be either SmartOS Zones or BHYVE / KVM virtual machines.
This repository is part of the TritonDataCenter project. See the contribution guidelines and general documentation at the main Triton project page.
Commands
There are four commands provided in this consolidation:
- mdata-list(8); list custom metadata keys in the metadata store
- mdata-get(8); get the value of a particular metadata key
- mdata-put(8); set the value of a particular metadata key
- mdata-delete(8); remove a metadata key
Manual pages for these tools are available in this repository, and are generally shipped with the OS (in the case of SmartOS) or in the package (e.g. for Ubuntu). They are also viewable on the web at the links above.
Protocol and Transport
The Triton SmartOS Metadata Protocol is documented online. The programs in this repository are clients that communicate using this protocol. The SmartOS (or TritonDataCenter) hypervisor provides a common set of supported base metadata keys for guests to consume, as well as the ability to support arbitrary additional user-provided metadata.
In a SmartOS container/zone guest, a UNIX domain socket is used to communicate
with the metadata server running in the hypervisor. In a KVM guest, such as a
Linux virtual machine, the client tools will make use of the second serial port
(e.g. ttyb
, or COM2
) to communicate with the hypervisor.
OS Support
The tools currently build and function on SmartOS and various Linux distributions. Support for other operating systems, such as *BSD or Windows, is absolutely welcome.
License
MIT (See LICENSE.)