Accessing Ec2 Metadata Service
$ curl -ksSL http://169.254.169.254/latest/meta-data
ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
instance-action
instance-id
instance-type
local-hostname
local-ipv4
placement/
public-hostname
public-ipv4
public-keys/
reservation-id
Accessing OpenStack Metadata Service
$ curl -ksSL http://169.254.169.254/openstack/latest
meta_data.json
password
vendor_data.json
network_data.json
vendor_data2.json
$ curl -ksSL http://169.254.169.254/openstack/latest/network_data.json | jq
{
"services": [
{
"type": "dns",
"address": "10.20.30.40"
},
{
"type": "dns",
"address": "10.20.30.50"
}
],
"networks": [
{
"network_id": "50720000-199e-4b12-b114-964ca4846105",
"link": "t12ab331a44-7f",
"type": "ipv4_dhcp",
"id": "network0"
}
],
"links": [
{
"ethernet_mac_address": "fa:16:3e:71:99:ff",
"mtu": 1446,
"type": "ovs",
"id": "tapab241aaa-7f",
"vif_id": "ab241aaa-7f85-438f-94f7-3cc7d0f6deaa"
}
]
}
Accessing Configuration Drive
$ mount -v $(blkid -t LABEL="config-2" -odevice) $(mktemp -d)
mount: /dev/sr0 is write-protected, mounting read-only
mount: /dev/sr0 mounted on /tmp/tmp.r8VsCzN0ey.
$ find /tmp/tmp.r8VsCzN0ey
/tmp/tmp.r8VsCzN0ey
/tmp/tmp.r8VsCzN0ey/ec2
/tmp/tmp.r8VsCzN0ey/ec2/2009-04-04
/tmp/tmp.r8VsCzN0ey/ec2/2009-04-04/meta-data.json
/tmp/tmp.r8VsCzN0ey/ec2/latest
/tmp/tmp.r8VsCzN0ey/ec2/latest/meta-data.json
/tmp/tmp.r8VsCzN0ey/openstack
/tmp/tmp.r8VsCzN0ey/openstack/2012-08-10
/tmp/tmp.r8VsCzN0ey/openstack/2012-08-10/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2013-04-04
/tmp/tmp.r8VsCzN0ey/openstack/2013-04-04/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2013-10-17
/tmp/tmp.r8VsCzN0ey/openstack/2013-10-17/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2013-10-17/vendor_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2015-10-15
/tmp/tmp.r8VsCzN0ey/openstack/2015-10-15/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2015-10-15/network_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2015-10-15/vendor_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-06-30
/tmp/tmp.r8VsCzN0ey/openstack/2016-06-30/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-06-30/network_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-06-30/vendor_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-10-06
/tmp/tmp.r8VsCzN0ey/openstack/2016-10-06/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-10-06/network_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-10-06/vendor_data.json
/tmp/tmp.r8VsCzN0ey/openstack/2016-10-06/vendor_data2.json
/tmp/tmp.r8VsCzN0ey/openstack/latest
/tmp/tmp.r8VsCzN0ey/openstack/latest/meta_data.json
/tmp/tmp.r8VsCzN0ey/openstack/latest/network_data.json
/tmp/tmp.r8VsCzN0ey/openstack/latest/vendor_data.json
/tmp/tmp.r8VsCzN0ey/openstack/latest/vendor_data2.json