Skip to content

Instantly share code, notes, and snippets.

@tom-code
Created October 13, 2017 19:42
Show Gist options
  • Save tom-code/2304830a0531237d150a2eb6ae052321 to your computer and use it in GitHub Desktop.
Save tom-code/2304830a0531237d150a2eb6ae052321 to your computer and use it in GitHub Desktop.
create openstack configdrive for cloud-init
truncate -s 1M cloudconfig.img
/usr/sbin/mkfs.vfat -n config-2 cloudconfig.img
mmd -i cloudconfig.img ::openstack
mmd -i cloudconfig.img ::openstack/latest
mcopy -i cloudconfig.img meta_data.json network_data.json ::openstack/latest
{
"admin_pass": "Amgkg8aehSeZ",
"availability_zone": "nova",
"hostname": "XXXy",
"launch_index": 0,
"name": "XXXy",
"project_id": "b884b287309140b495821eb8f0f9e30d",
"uuid": "f8b406c4-7da1-4d20-8c44-a93dc42308e2"
}
{
"networks": [
{ "network_id": "99c7f06a-02ab-4519-894e-81dde1761ee5",
"type": "ipv4",
"netmask": "255.255.255.0",
"link": "ens3",
"routes": [
{ "netmask": "0.0.0.0",
"network": "0.0.0.0",
"gateway": "1.1.1.1"}],
"ip_address": "1.1.1.2",
"id": "network0"}],
"links": [
{ "ethernet_mac_address": "52:54:00:12:34:56",
"mtu": null,
"type": "phy",
"id": "ens3",
"vif_id": "60b0567b-edf7-4af6-8d46-49eb885282eb"}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment