...
Based on the feedback that was received from the community at the CloudStack conference in Miami the config-drive implementation was extended to support the OpenStack config-drive implementation. This allows for easy integration with cloud-init and similar systems.
...
The following criteria are required for config drive in OpenStack:
Must be formatted with vfat (deprecated) or iso9660 filesystem
have a filesystem label of config-2
The files that will typically be present in the config drive are:
...
<mountdir>/openstack/version/: (only support version = latest, same approach as coreOS)
user_data
vendor_data.json
meta_data.json
network_data.json
...
This map structure will be created beside the original CloudStack map structure. The config drive will contain the following folders and files:
<mountdir>
/cloudstack
/metadata:
availability-zone.txt
instance-id.txt
service-offering.txt
cloud-identifier.txt
local-hostname.txt
vm-id.txt
public-keys
/password
vm_password.txt
vm_password_md5checksum (for windows VM’s)
/user_data
user_data.txt (note about _ characters below in text)
...
/openstack
/version
User_data ==hardlink to <mountdir>/cloudstack/user_data/user_data.txt
vendor_data.json
meta_data.json
network_data.json
...
We make a hard link to the user_data file in the cloudstack directory (soft link does not work in iso).
meta
files
network_config
public_keys: [{‘’data’’: “ssh-key value”, type: “ssh”, name: “name of key”}]
keys: [{‘’data’’: “ssh-key value”, type: “ssh”, name: “name of key”}]
hostname
name
launch_index
availability_zone
random_seed
project_id
devices
uuid
...
CloudStack config-drive supports the following:
availability-zone
hostname
name
uuid
keys
public-keys
I.e. we leave out the content we don’t support (list based on: https://github.com/openstack/nova/blob/39c6e442c628a881b4fce4d8b74e6b7d174f72f2/nova/api/metadata/base.py )
...
Vendor-Data is a way for a vendor to provide site specific information. This can be information on local mirrors, a local proxy, or a one-time registration code. It is found in the vendor_data.json file residing on ConfigDrive or the Neutron Metadata Service via 169.254.169.254/openstack/latest/vendor_data.json. By default, Cloud-Init executes the Vendor-Data on every boot. Currently, we don’t plan to support this.
...
Network-Data is network information found on ConfigDrive. It resides in the network_data.json file. Nova retrieves this info from Neutron. It includes fixed ip addresses, MAC addresses, port-id's, network-id's, subnet-id's, DNS name-servers, etc. Currently, we don’t plan to support this.
Is allowed to be empty {}
...
...
The current config-drive PR needs to be changed. We plan to create an extra OpenStack directory beside the original proposed CloudStack directory. We also need to change the label of the disk from config to config-2. The way the iso image is created needs to be adapted to make it align with the way OpenStack creates the iso img (provide extra params https://github.com/openstack/nova/blob/master/nova/virt/configdrive.py). A side effect is that underscores will be written to the iso image as underscores and not replaced with dashes (current behaviour). Because of this, we have to update the coreOS PR and the CloudStack documentation.
...