preliminary metadata server
This is a preliminary implementation of a metadata server. I have not yet looked into how to expose it at 169.254.169.254
.
There are a couple of new things here:
- Another HTTP server with a separately configurable bind address. There is a piece of middleware that will run before each request that looks up the libvirt domain that made the request, and add it to the request context.
- Support for connecting to a vault server.
- Endpoint
/vault/inject-app-role
causes an AppRole to be generated and injected into the VM via the qemu-guest-agent. - Endpoint
/cloud-init/user-data
returns the domain's "description" field. It is intended to be read by cloud-init. - Endpoint
/cloud-init/meta-data
returns the domain's hostname and UUID. It is intended to be read by cloud-init. - The instance creation XML now includes the qemu command line arguments so that cloud-init will connect to the metadata server. Requires setting
CloudInitSeed
config option to the full URL of the metadata server at path/cloud-init
.