-
Notifications
You must be signed in to change notification settings - Fork 214
cloud-init support for KVM #1653
User story
The so called cloud images (like the ones provided by Canonical for Ubuntu) expect a YAML metadata to be provided for provisioning basic features like creating users / adding SSH keys / etc and is achived using cloud-init.
The provisioning is useful to be able to use an out-of-the-box image vs. having to bake one yourself with specific user/password and SSH key to be able to use it as a Rex Box.
For KVM boxes this cloud-init metadata can be provided as a cdrom device using an ISO image, which can be generated like so:
cloud-localds cidata.iso user-data.yaml
Describe the solution you would like
Have a $box->cloud_init() function which accepts a cloud-init user-data configuration in YAML format.
Also provide a minimal cloud-init configuration example to set up user rex with password box and enable passwordless sudo for that user.
The instance-data feature of cloud-init is to be ignored.
Additional context
My fork contains an implementation of the cloud-init functionality in the feature/cloud-init-kvm branch (relevant commit: arpadszasz@5017f5a)