evemds (eve Metadata Server) is a lightweight cloud-init metadata server designed to provide minimal cloud-init configuration for virtual machines. It's built specifically for the evectl project.
- Serves cloud-init metadata, user-data, and vendor-data
- Configurable SSH key distribution based on hostname
- Fallback configuration for unknown hosts
The server uses a YAML configuration file (hosts_config.yaml
) to manage SSH keys and instance assignments.
hosts:
dbserver.example.com:
ssh_keys:
- "ssh-rsa AAAAB3NzaC1yc2E... [email protected]"
- "ssh-rsa AAAAB3N5aD1eaFE... [email protected]"
fallback.evectl:
ssh_keys:
- "ssh-rsa AAAAB3NzaNyRRk...eRzRCyip3oM="
The fallback.evectl
entry is used when the requesting hostname is not explicitly listed.
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Configure
hosts_config.yaml
with your SSH keys and hostnames - Run the server:
uvicorn main:app --host 0.0.0.0 --port 8000
A sample systemd service file (evemds.service
) is provided, pre-configured for the evectl install script.
GET /{hostname}/user-data
: Returns cloud-init user-data configurationGET /{hostname}/meta-data
: Returns cloud-init meta-data configurationGET /{hostname}/vendor-data
: Returns empty vendor-data
Contributions are welcome! Please feel free to submit a Pull Request.
Please see the file called LICENSE
.