Chad Smith
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    Cloud-init 18.4-5 standard instance-data.json fields and cloud-id examples ============================================================ For more info, see [docs on instance-data.json format](https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html#format-of-instance-data-json) Below is a table with the high-level view of cloud_name, platform and subplatform standardized fields on various clouds: | Cloud | cloud-id | cloud_name | platform | subplatform | cloud-id --long | | ------| -------- | ---------- | -------- | ----------- | ---------------- | | [Amazon](#EC2)| aws | aws | ec2 | metadata (http://169.254.169.254) | aws-gov\<tab\>us-gov-east-1 | | [Microsoft](#Azure) | azure | azure | azure | config-disk (/dev/sr0) | azure\<tab\>None | | [Google](#GCE)| gce | gce | gce | metadata (http://metadata.google.internal/computeMetadata/v1/) | gce\<tab\>us-central1| | [OpenStack](#OpenStack)| openstack | openstack | openstack | metadata (http://169.254.169.254 | openstack\<tab\>None | | [LXD](#LXD)| lxd | unknown | lxd | seed-dir (/var/lib/cloud/seed/nocloud-net)| lxd\<tab\>None | | [Rackspace](#Rackspace-on-metal) | nocloud | configdrive | configdrive | config-disk (/dev/xvdd) | configdrive\<tab\>None | EC2 --- ``` ubuntu@ip-10-41-41-18:~$ cloud-id aws ``` ``` ubuntu@ip-10-41-41-18:~$ cloud-id --long aws us-east-2 ``` ``` ubuntu@ip-10-41-41-18:~$ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": "us-east-2b", "availability_zone": "us-east-2b", "cloud-name": "aws", "cloud_id": "aws", "cloud_name": "aws", "instance-id": "i-0a1288816f44720fa", "instance_id": "i-0a1288816f44720fa", "local-hostname": "ip-10-41-41-18", "local_hostname": "ip-10-41-41-18", "platform": "ec2", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB cloud-init-integration" ], "region": "us-east-2", "subplatform": "metadata (http://169.254.169.254)" } ubuntu@ip-10-41-41-18:~$ cloud-init query --format '{{cloud_name}}|{{availability_zone}}' aws|us-east-2b ``` ``` $ cat /run/cloud-init/instance-data. { "base64_encoded_keys": [], "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "_metadata_api_version": "2016-09-02", "dynamic": { "instance-identity": { "document": { "accountId": "437526006925", "architecture": "x86_64", "availabilityZone": "us-east-2b", "billingProducts": null, "devpayProductCodes": null, "imageId": "ami-079638aae7046bdd2", "instanceId": "i-075f088c72ad3271c", "instanceType": "t2.micro", "kernelId": null, "marketplaceProductCodes": null, "pendingTime": "2018-10-05T20:10:43Z", "privateIp": "10.41.41.95", "ramdiskId": null, "region": "us-east-2", "version": "2017-09-30" }, "pkcs7": [ "MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEggHbewog", "ICJkZXZwYXlQcm9kdWN0Q29kZXMiIDogbnVsbCwKICAibWFya2V0cGxhY2VQcm9kdWN0Q29kZXMi", "IDogbnVsbCwKICAicHJpdmF0ZUlwIiA6ICIxMC40MS40MS45NSIsCiAgInZlcnNpb24iIDogIjIw", "MTctMDktMzAiLAogICJpbnN0YW5jZUlkIiA6ICJpLTA3NWYwODhjNzJhZDMyNzFjIiwKICAiYmls", "bGluZ1Byb2R1Y3RzIiA6IG51bGwsCiAgImluc3RhbmNlVHlwZSIgOiAidDIubWljcm8iLAogICJh", "Y2NvdW50SWQiIDogIjQzNzUyNjAwNjkyNSIsCiAgImF2YWlsYWJpbGl0eVpvbmUiIDogInVzLWVh", "c3QtMmIiLAogICJrZXJuZWxJZCIgOiBudWxsLAogICJyYW1kaXNrSWQiIDogbnVsbCwKICAiYXJj", "aGl0ZWN0dXJlIiA6ICJ4ODZfNjQiLAogICJpbWFnZUlkIiA6ICJhbWktMDc5NjM4YWFlNzA0NmJk", "ZDIiLAogICJwZW5kaW5nVGltZSIgOiAiMjAxOC0xMC0wNVQyMDoxMDo0M1oiLAogICJyZWdpb24i", "IDogInVzLWVhc3QtMiIKfQAAAAAAADGCARcwggETAgEBMGkwXDELMAkGA1UEBhMCVVMxGTAXBgNV", "BAgTEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcTB1NlYXR0bGUxIDAeBgNVBAoTF0FtYXpvbiBX", "ZWIgU2VydmljZXMgTExDAgkAlrpI2eVeGmcwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkq", "hkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE4MTAwNTIwMTA0OFowIwYJKoZIhvcNAQkEMRYEFK0k", "Tz6n1A8/zU1AzFj0riNQORw2MAkGByqGSM44BAMELjAsAhRNrr174y98grPBVXUforN/6wZp8AIU", "JLZBkrB2GJA8A4WJ1okq++jSrBIAAAAAAAA=" ], "rsa2048": [ "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABIIB", "23sKICAiZGV2cGF5UHJvZHVjdENvZGVzIiA6IG51bGwsCiAgIm1hcmtldHBsYWNlUHJvZHVjdENv", "ZGVzIiA6IG51bGwsCiAgInByaXZhdGVJcCIgOiAiMTAuNDEuNDEuOTUiLAogICJ2ZXJzaW9uIiA6", "ICIyMDE3LTA5LTMwIiwKICAiaW5zdGFuY2VJZCIgOiAiaS0wNzVmMDg4YzcyYWQzMjcxYyIsCiAg", "ImJpbGxpbmdQcm9kdWN0cyIgOiBudWxsLAogICJpbnN0YW5jZVR5cGUiIDogInQyLm1pY3JvIiwK", "ICAiYWNjb3VudElkIiA6ICI0Mzc1MjYwMDY5MjUiLAogICJhdmFpbGFiaWxpdHlab25lIiA6ICJ1", "cy1lYXN0LTJiIiwKICAia2VybmVsSWQiIDogbnVsbCwKICAicmFtZGlza0lkIiA6IG51bGwsCiAg", "ImFyY2hpdGVjdHVyZSIgOiAieDg2XzY0IiwKICAiaW1hZ2VJZCIgOiAiYW1pLTA3OTYzOGFhZTcw", "NDZiZGQyIiwKICAicGVuZGluZ1RpbWUiIDogIjIwMTgtMTAtMDVUMjA6MTA6NDNaIiwKICAicmVn", "aW9uIiA6ICJ1cy1lYXN0LTIiCn0AAAAAAAAxggH/MIIB+wIBATBpMFwxCzAJBgNVBAYTAlVTMRkw", "FwYDVQQIExBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHEwdTZWF0dGxlMSAwHgYDVQQKExdBbWF6", "b24gV2ViIFNlcnZpY2VzIExMQwIJAM07oeX4xevdMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcN", "AQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTgxMDA1MjAxMDQ4WjAvBgkqhkiG9w0B", "CQQxIgQgkYz0pZk3zJKBi4KP4egeOKJl/UYwu5UdE7id74pmPwMwDQYJKoZIhvcNAQEBBQAEggEA", "dC3uIGGNul1OC1mJKSH3XoBWsYH20J/xhIdftYBoXHGf2BSFsrs9ZscXd2rKAKea4pSPOZEYMXgz", "lPuT7W0WU89N3ZKviy/ReMSRjmI/jJmsY1lea6mlgcsJXreBXFMYucZvyeWGHdnCjamoKWXkmZlM", "mSB1gshWy8Y7DzoKviYPQZi5aI54XK2Upt4kGme1tH1NI2Cq+hM4K+adxTbNhS3uzvWaWzMklUuU", "QHX2GMmjAVRVc8vnA8IAsBCJJp+gFgYzi09IK+cwNgCFFPADoG6jbMHHf4sLB3MUGpiA+G9JlCnM", "fmkjI2pNRB8spc0k4UG4egqLrqCz67WuK38tjwAAAAAAAA==" ], "signature": [ "Tsw6h+V3WnxrNVSXBYIOs1V4j95YR1mLPPH45XnhX0/Ei3waJqf7/7EEKGYP1Cr4PTYEULtZ7Mvf", "+xJpM50Ivs2bdF7o0c4vnplRWe3f06NI9pv50dr110j/wNzP4MZ1pLhJCqubQOaaBTF3LFutgRrt", "r4B0mN3p7EcqD8G+ll0=" ] } }, "meta-data": { "ami-id": "ami-079638aae7046bdd2", "ami-launch-index": "0", "ami-manifest-path": "(unknown)", "block-device-mapping": { "ami": "/dev/sda1", "ephemeral0": "sdb", "ephemeral1": "sdc", "root": "/dev/sda1" }, "hostname": "ip-10-41-41-95.us-east-2.compute.internal", "instance-action": "none", "instance-id": "i-075f088c72ad3271c", "instance-type": "t2.micro", "local-hostname": "ip-10-41-41-95.us-east-2.compute.internal", "local-ipv4": "10.41.41.95", "mac": "06:74:8f:39:cd:a6", "metrics": { "vhostmd": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" }, "network": { "interfaces": { "macs": { "06:74:8f:39:cd:a6": { "device-number": "0", "interface-id": "eni-052058bbd7831eaae", "ipv4-associations": { "18.218.221.122": "10.41.41.95" }, "local-hostname": "ip-10-41-41-95.us-east-2.compute.internal", "local-ipv4s": "10.41.41.95", "mac": "06:74:8f:39:cd:a6", "owner-id": "437526006925", "public-hostname": "ec2-18-218-221-122.us-east-2.compute.amazonaws.com", "public-ipv4s": "18.218.221.122", "security-group-ids": "sg-828247e9", "security-groups": "Cloud-init integration test secgroup", "subnet-id": "subnet-282f3053", "subnet-ipv4-cidr-block": "10.41.41.0/24", "subnet-ipv6-cidr-blocks": "2600:1f16:b80:ad00::/64", "vpc-id": "vpc-252ef24d", "vpc-ipv4-cidr-block": "10.41.0.0/16", "vpc-ipv4-cidr-blocks": "10.41.0.0/16", "vpc-ipv6-cidr-blocks": "2600:1f16:b80:ad00::/56" } } } }, "placement": { "availability-zone": "us-east-2b" }, "profile": "default-hvm", "public-hostname": "ec2-18-218-221-122.us-east-2.compute.amazonaws.com", "public-ipv4": "18.218.221.122", "public-keys": { "cloud-init-integration": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB cloud-init-integration" ] }, "reservation-id": "r-0594a20e31f6cfe46", "security-groups": "Cloud-init integration test secgroup", "services": { "domain": "amazonaws.com", "partition": "aws" } } }, "sensitive_keys": [], "v1": { "_beta_keys": [ "subplatform" ], "availability-zone": "us-east-2b", "availability_zone": "us-east-2b", "cloud-name": "aws", "cloud_name": "aws", "instance-id": "i-075f088c72ad3271c", "instance_id": "i-075f088c72ad3271c", "local-hostname": "ip-10-41-41-95", "local_hostname": "ip-10-41-41-95", "platform": "ec2", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB cloud-init-integration" ], "region": "us-east-2", "subplatform": "metadata (http://169.254.169.254)" } } ``` Oracle ------ ``` ubuntu@SRU-worked:~$ cloud-id oracle ``` ``` $ cloud-id --long oracle None ``` ``` $ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": "phx-ad-3", "availability_zone": "phx-ad-3", "cloud-name": "oracle", "cloud_id": "oracle", "cloud_name": "oracle", "distro": "ubuntu", "distro_release": "focal", "distro_version": "20.04", "instance-id": "ocid1.instance.oc1.phx.anyhqljtniwq6sycgdae2ghoufzfh6gpa47iay6uwtbhrpkut7xzlt2lswta", "instance_id": "ocid1.instance.oc1.phx.anyhqljtniwq6sycgdae2ghoufzfh6gpa47iay6uwtbhrpkut7xzlt2lswta", "kernel_release": "5.4.0-1019-oracle", "local-hostname": "instance-20200807-1107", "local_hostname": "instance-20200807-1107", "machine": "x86_64", "platform": "oracle", "public_ssh_keys": [], "python_version": "3.8.2", "region": null, "subplatform": "metadata (http://169.254.169.254/openstack/)", "system_platform": "Linux-5.4.0-1019-oracle-x86_64-with-glibc2.29", "variant": "ubuntu" } ``` ``` $ cloud-init query -a { "_beta_keys": [ "subplatform" ], "availability_zone": "phx-ad-3", "base64_encoded_keys": [ "ds/2013-10-17/user_data" ], "cloud_name": "oracle", "distro": "ubuntu", "distro_release": "focal", "distro_version": "20.04", "ds": { "2013_10_17": { "meta_data": { "availability_zone": "phx-ad-3", "files": [], "hostname": "instance-20200807-1107", "launch_index": 0, "meta": {}, "name": "instance-20200807-1107", "public_keys": {}, "uuid": "ocid1.instance.oc1.phx.anyhqljtniwq6sycgdae2ghoufzfh6gpa47iay6uwtbhrpkut7xzlt2lswta" }, "system_uuid": "aa333d34-4329-4fec-856e-d07ce9d96564", "user_data": "I2Nsb3VkLWNvbmZpZwpzc2hfaW1wb3J0X2lkOiBbY2hhZC5zbWl0aF0=" }, "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init." }, "instance_id": "ocid1.instance.oc1.phx.anyhqljtniwq6sycgdae2ghoufzfh6gpa47iay6uwtbhrpkut7xzlt2lswta", "kernel_release": "5.4.0-1019-oracle", "local_hostname": "instance-20200807-1107", "machine": "x86_64", "merged_cfg": { "_doc": "Merged cloud-init system config from /etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d/", "_log": [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log',)\n", "[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n" ], "cloud_config_modules": [ "emit_upstart", "snap", "ssh-import-id", "locale", "set-passwords", "grub-dpkg", "apt-pipelining", "apt-configure", "ubuntu-advantage", "ntp", "timezone", "disable-ec2-metadata", "runcmd", "byobu" ], "cloud_final_modules": [ "package-update-upgrade-install", "fan", "landscape", "lxd", "ubuntu-drivers", "puppet", "chef", "mcollective", "salt-minion", "rightscale_userdata", "scripts-vendor", "scripts-per-once", "scripts-per-boot", "scripts-per-instance", "scripts-user", "ssh-authkey-fingerprints", "keys-to-console", "phone-home", "final-message", "power-state-change" ], "cloud_init_modules": [ "migrator", "seed_random", "bootcmd", "write-files", "growpart", "resizefs", "disk_setup", "mounts", "set_hostname", "update_hostname", "update_etc_hosts", "ca-certs", "rsyslog", "users-groups", "ssh" ], "datasource_list": [ "Oracle", "None" ], "def_log_file": "/var/log/cloud-init.log", "disable_root": true, "log_cfgs": [ [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log',)\n" ] ], "manage_etc_hosts": "localhost", "network": { "config": "disabled" }, "output": { "all": "| tee -a /var/log/cloud-init-output.log" }, "preserve_hostname": false, "syslog_fix_perms": [ "syslog:adm", "root:adm", "root:wheel", "root:root" ], "users": [ "default", { "name": "opc", "ssh_redirect_user": true } ], "vendor_data": { "enabled": true, "prefix": [] } }, "platform": "oracle", "public_ssh_keys": [], "python_version": "3.8.2", "region": null, "sensitive_keys": [ "merged_cfg" ], "subplatform": "metadata (http://169.254.169.254/openstack/)", "sys_info": { "dist": [ "ubuntu", "20.04", "focal" ], "platform": "Linux-5.4.0-1019-oracle-x86_64-with-glibc2.29", "python": "3.8.2", "release": "5.4.0-1019-oracle", "system": "Linux", "uname": [ "Linux", "ubuntu", "5.4.0-1019-oracle", "#19-Ubuntu SMP Tue Jun 23 16:56:52 UTC 2020", "x86_64", "x86_64" ], "variant": "ubuntu" }, "system_platform": "Linux-5.4.0-1019-oracle-x86_64-with-glibc2.29", "userdata": "#cloud-config\nssh_import_id: [chad.smith]", "v1": { "_beta_keys": [ "subplatform" ], "availability_zone": "phx-ad-3", "cloud_name": "oracle", "distro": "ubuntu", "distro_release": "focal", "distro_version": "20.04", "instance_id": "ocid1.instance.oc1.phx.anyhqljtniwq6sycgdae2ghoufzfh6gpa47iay6uwtbhrpkut7xzlt2lswta", "kernel_release": "5.4.0-1019-oracle", "local_hostname": "instance-20200807-1107", "machine": "x86_64", "platform": "oracle", "public_ssh_keys": [], "python_version": "3.8.2", "region": null, "subplatform": "metadata (http://169.254.169.254/openstack/)", "system_platform": "Linux-5.4.0-1019-oracle-x86_64-with-glibc2.29", "variant": "ubuntu" }, "variant": "ubuntu", "vendordata": "" } ``` Azure ----- ``` ubuntu@SRU-worked:~$ cloud-id azure ``` ``` ubuntu@SRU-worked:~$ cloud-id --long azure None ``` ``` ubuntu@SRU-worked:~$ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": null, "availability_zone": null, "cloud-name": "azure", "cloud_id": "azure", "cloud_name": "azure", "instance-id": "e3869cac-8566-914b-bc23-09965b253ac1", "instance_id": "e3869cac-8566-914b-bc23-09965b253ac1", "local-hostname": "my-c2", "local_hostname": "my-c2", "platform": "azure", "public_ssh_keys": [], "region": null, "subplatform": "config-disk (/dev/sr0)" } ``` ``` ubuntu@SRU-worked:~$ cloud-init query --format '{{cloud_name}}|{{availability_zone}}' azure|None ``` ``` ubuntu@SRU-worked:~$ sudo cloud-init query --all { "_beta_keys": [ "subplatform" ], "availability-zone": "0", "availability_zone": "0", "base64_encoded_keys": [], "cloud-name": "azure", "cloud_id": "azure", "cloud_name": "azure", "distro": "ubuntu", "distro_release": "focal", "distro_version": "20.04", "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "meta_data": { "disable_password": true, "imds": { "compute": { "azEnvironment": "AzurePublicCloud", "customData": "", "evictionPolicy": "", "extendedLocation": { "name": "", "type": "" }, "isHostCompatibilityLayerVm": "false", "licenseType": "", "location": "centralus", "name": "adsfsadf", "offer": "0001-com-ubuntu-server-focal", "osProfile": { "adminUsername": "ubuntu", "computerName": "adsfsadf", "disablePasswordAuthentication": "true" }, "osType": "Linux", "placementGroupId": "", "plan": { "name": "", "product": "", "publisher": "" }, "platformFaultDomain": "0", "platformUpdateDomain": "0", "priority": "", "provider": "Microsoft.Compute", "publicKeys": [ { "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB csmith@fringe", "path": "/home/ubuntu/.ssh/authorized_keys" } ], "publisher": "canonical", "resourceGroupName": "adsfasdf_group", "resourceId": "/subscriptions/12aad61c-6de4-4e53-a6c6-5aff52a83777/resourceGroups/adsfasdf_group/providers/Microsoft.Compute/virtualMachines/adsfsadf", "securityProfile": { "secureBootEnabled": "false", "virtualTpmEnabled": "false" }, "sku": "20_04-lts-gen2", "storageProfile": { "dataDisks": [], "imageReference": { "id": "", "offer": "0001-com-ubuntu-server-focal", "publisher": "canonical", "sku": "20_04-lts-gen2", "version": "latest" }, "osDisk": { "caching": "ReadWrite", "createOption": "FromImage", "diffDiskSettings": { "option": "" }, "diskSizeGB": "30", "encryptionSettings": { "enabled": "false" }, "image": { "uri": "" }, "managedDisk": { "id": "/subscriptions/12aad61c-6de4-4e53-a6c6-5aff52a83777/resourceGroups/adsfasdf_group/providers/Microsoft.Compute/disks/adsfsadf_OsDisk_1_28d32acb4727471e96a4939027020a30", "storageAccountType": "Premium_LRS" }, "name": "adsfsadf_OsDisk_1_28d32acb4727471e96a4939027020a30", "osType": "Linux", "vhd": { "uri": "" }, "writeAcceleratorEnabled": "false" }, "resourceDisk": { "size": "7168" } }, "subscriptionId": "12aad61c-6de4-4e53-a6c6-5aff52a83777", "tags": "", "tagsList": [], "userData": "", "version": "20.04.202303280", "virtualMachineScaleSet": { "id": "" }, "vmId": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "vmScaleSetName": "", "vmSize": "Standard_DS1_v2", "zone": "" }, "extended": { "compute": { "hasCustomData": false, "ppsType": "None" } }, "network": { "interface": [ { "ipv4": { "ipAddress": [ { "privateIpAddress": "10.1.0.4", "publicIpAddress": "" } ], "subnet": [ { "address": "10.1.0.0", "prefix": "24" } ] }, "ipv6": { "ipAddress": [] }, "macAddress": "6045BD2FCA0A" } ] } }, "instance-id": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "local-hostname": "adsfsadf", "random_seed": "T0VNMGQAAAABUFZSVFVBTE1JQ1JPU0ZUAQAAAE1TRlQBAAAA6lU4nzD8GTBzn0RBGcMWbgUTtkSj27w3jDxy57TLZgp6ZBIM09rfCMrPMdBvOTw+q1/3lhTEVEmCwx2o92+rMQ==" } }, "instance-id": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "instance_id": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "kernel_release": "5.15.0-1035-azure", "local-hostname": "adsfsadf", "local_hostname": "adsfsadf", "machine": "x86_64", "merged_cfg": { "_doc": "Merged cloud-init system config from /etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d/", "_log": [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n", "[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n" ], "cloud_config_modules": [ "wireguard", "snap", "ubuntu_autoinstall", "ssh-import-id", "keyboard", "locale", "set-passwords", "grub-dpkg", "apt-pipelining", "apt-configure", "ubuntu-advantage", "ntp", "timezone", "disable-ec2-metadata", "runcmd", "byobu" ], "cloud_final_modules": [ "package-update-upgrade-install", "fan", "landscape", "lxd", "ubuntu-drivers", "write-files-deferred", "puppet", "chef", "ansible", "mcollective", "salt-minion", "reset_rmc", "refresh_rmc_and_interface", "rightscale_userdata", "scripts-vendor", "scripts-per-once", "scripts-per-boot", "scripts-per-instance", "scripts-user", "ssh-authkey-fingerprints", "keys-to-console", "install-hotplug", "phone-home", "final-message", "power-state-change" ], "cloud_init_modules": [ "migrator", "seed_random", "bootcmd", "write-files", "growpart", "resizefs", "disk_setup", "mounts", "set_hostname", "update_hostname", "update_etc_hosts", "ca-certs", "rsyslog", "users-groups", "ssh" ], "datasource_list": [ "Azure", "None" ], "def_log_file": "/var/log/cloud-init.log", "disable_root": true, "log_cfgs": [ [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n" ] ], "output": { "all": "| tee -a /var/log/cloud-init-output.log" }, "preserve_hostname": false, "reporting": { "logging": { "type": "log" }, "telemetry": { "type": "hyperv" } }, "syslog_fix_perms": [ "syslog:adm", "root:adm", "root:wheel", "root:root" ], "users": [ "default" ], "vendor_data": { "enabled": true, "prefix": [] }, "vendor_data2": { "enabled": true, "prefix": [] } }, "platform": "azure", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB csmith@fringe" ], "python_version": "3.8.10", "region": "centralus", "sensitive_keys": [ "merged_cfg" ], "subplatform": "config-disk (/dev/sr0)", "sys_info": { "dist": [ "ubuntu", "20.04", "focal" ], "platform": "Linux-5.15.0-1035-azure-x86_64-with-glibc2.29", "python": "3.8.10", "release": "5.15.0-1035-azure", "system": "Linux", "uname": [ "Linux", "ubuntu", "5.15.0-1035-azure", "#42~20.04.1-Ubuntu SMP Wed Mar 1 19:17:41 UTC 2023", "x86_64", "x86_64" ], "variant": "ubuntu" }, "system_platform": "Linux-5.15.0-1035-azure-x86_64-with-glibc2.29", "userdata": "", "v1": { "_beta_keys": [ "subplatform" ], "availability-zone": "0", "availability_zone": "0", "cloud-name": "azure", "cloud_id": "azure", "cloud_name": "azure", "distro": "ubuntu", "distro_release": "focal", "distro_version": "20.04", "instance-id": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "instance_id": "410a7967-9dbd-4c26-a081-9fe479ab86f3", "kernel_release": "5.15.0-1035-azure", "local-hostname": "adsfsadf", "local_hostname": "adsfsadf", "machine": "x86_64", "platform": "azure", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB csmith@fringe" ], "python_version": "3.8.10", "region": "centralus", "subplatform": "config-disk (/dev/sr0)", "system_platform": "Linux-5.15.0-1035-azure-x86_64-with-glibc2.29", "variant": "ubuntu" }, "variant": "ubuntu", "vendordata": "" } ``` GCE --- ``` ubuntu@SRU-worked:~$ cloud-id gce ``` ``` ubuntu@SRU-worked:~$ cloud-id --long gce us-central1 ``` ``` ubuntu@SRU-worked:~$ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": "us-central1-b", "availability_zone": "us-central1-b", "cloud-name": "gce", "cloud_id": "gce", "cloud_name": "gce", "instance-id": "9223263823091403792", "instance_id": "9223263823091403792", "local-hostname": "cosmic-sru-test", "local_hostname": "cosmic-sru-test", "platform": "gce", "public_ssh_keys": [], "region": "us-central1", "subplatform": "metadata (http://metadata.google.internal/computeMetadata/v1/)" } ``` ``` ubuntu@SRU-worked:~$ cloud-init query --format '{{cloud_name}}|{{availability_zone}}' gce|us-central1-b ``` ``` ubuntu@SRU-worked:~$ cloud-init query --all { "_beta_keys": [ "subplatform" ], "availability_zone": "us-central1-b", "base64_encoded_keys": [], "cloud_name": "gce", "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "meta_data": { "availability_zone": "us-central1-b", "instance_data": "{\"user-data\":\"## template: jinja\\n#cloud-config\\n{% set HN = 'oss-' ~ v1.cloud_name ~ '-' ~ v1.region ~ '-' ~ range(1,100) | random %}\\npuppet:\\n conf:\\n agent:\\n server: \\\"puppetmaster.blackboxsw.com\\\"\\n certname: \\\"{{ HN }}.ci\\\"\\nhostname: {{ HN }}.ci\\nruncmd:\\n - 'mkdir -p /etc/facter/facts.d/' # Add custom cloud-init facts to facter\\n - 'INSTANCE_JSON=`cat /run/cloud-init/instance-data.json`'\\n - 'echo {\\\\\\\"cloud\\\\\\\": $INSTANCE_JSON} > /etc/facter/facts.d/cloud-init.json'\\nssh_import_id: chad.smith\\n\"}", "instance_id": "2465196069185052347", "local_hostname": "cosmic-puppet.c.cloud-init-testing.internal", "project_data": "{\"google-compute-default-region\":\"us-west1\",\"google-compute-default-zone\":\"us-west1-b\",\"ssh-keys\":\"chad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAHwLTRUY5YN74SKLMHM8I1CwCZP6WCYQlawULeeWPruTHCXCRx6qhOPXI0PMv52hF91e2Z3YKwSC7NH8WT5Y7akWD47wJvBdRoq9Yq2gUUfJYv2t3zkUco727ZNz9vmGh8sCdB3GutSRm+/KYwOhUGPvgYAo+gLlltlxTQVtEfeWPk246V40w/uXpdl9DoRebCra8TGMXmyIX/w8D71OpofLKfUZgpbqnTGuc4MMDYFjB7XehN4VvYmwKdaoTumyJq6HPlfxmEvqzbL+9z62ur03h2TGtcptJVhewFFLnA/e1y5xKUOFZ6M+H/v6pzm9hq9Q4nrMPQdnF3Nf9iWBGXU= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2018-10-18T17:11:51+0000\\\"}\\nchad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNkX7RMNJrQ9nZb5REJCkwP08IxAzexZrAKwqPWtT9JHxLEpwoINQsBeAhVROSRSAM4b96qaATq8o3YLOsQURhc= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2018-10-18T17:11:48+0000\\\"}\\nchad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCT/tVyWY3NyVhgIDQUEYQjbKqfTaWTTczqqy+H45McnRhNlS1gHingCH65+TRQdEV003I5whLy7j7x8CWL2F/wJTfG0j8Ccodlyqc1mXjM8hggf/b7wt/IexTcyICjcAUQddN9FDrTbXqruXwQxzXqxR2WBFqm4EtCXgES6hagOAP1SQxOh660qr5Q4CpqIdParBXKAx7abZO/VvGjf7qB3J/zMJcpVLPslnOktAL5BDsGYcqo3pqMYZKiJd9J+lFUn1dKpjpv5MgK+FN6lhOKYwIDfgMjEyQNnL1Kq1mnpoW76f9oIhqzGuPMQiBrCAzE7NJKzp0Pu8BW9eG/Fx0F google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2018-10-18T17:09:49+0000\\\"}\\nchad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOJ/yJ2Q9Zeay+D8dkNEmBgp2AvX4Bq82DeMLuTc5/0/Aa3lIikTdqa8KDCUWaVfPbRUYCXaf56Dm4XRqZUZ3vE= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2018-10-18T17:09:46+0000\\\"}\\npowersj:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXW9Gg5H7ehjdSc6qDzwNtgCy94XYHhEYlXZMO2+FJrH3wfHGiMfCwOHxcOMt2QiXItULthdeQWS9QjBSSjVRXf6731igFrqPFyS9qBlOQ5D29C4HBXFnQggGVpBNJ82IRJv7szbbe/vpgLBP4kttUza9Dr4e1YM1ln4PRnjfXea6T0m+m1ixNb5432pTXlqYOnNOxSIm1gHgMLxPuDrJvQERDKrSiKSjIdyC9Jd8t2e1tkNLY0stmckVRbhShmcJvlyofHWbc2Ca1mmtP7MlS1VQnfLkvU1IrFwkmaQmaggX6WR6coRJ6XFXdWcq/AI2K6GjSnl1dnnCxE8VCEXBlXgFzad+PMSG4yiL5j8Oo1ZVpkTdgBnw4okGqTYCXyZg6X00As9IBNQfZMFlQXlIo4FiWgj3CO5QHQOyOX6FuEumaU13GnERrSSdp9tCs1Qm3/DG2RSCQBWTfcgMcStIvKqvJ3IjFn0vGLvI3Ampnq9q1SHwmmzAPSdzcMA76HyMUA5VWaBvWHlUxzIM6unxZASnwvuCzpywSEB5J2OF+p6H+cStJwQ32XwmOG8pLp1srlVWpqZI58Du/lzrkPqONphoZx0LDV86w7RUz1ksDzAdcm0tvmNRFMN1a0frDs506oA3aWK0oDk4Nmvk8sXGTYYw3iQSkOvDUUlIsqdaO+w== powersj@x1\\nroot:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfo1zNS6W5YrRG7f9E/rA36tGmyQRoF8AKi78fjYjoWucIQVlK+qpHIRcIprJvZNiFl79CQ61uDBwOl9Fp4riRTM5Fe6ogEoXw/6WlaDql8k/q42TW3bBLtusDOpCTlAO7B5ageocvCxT2Cnbs+DdvSbjTjZACfZcNqr5HFwSLoTSRwZM5afE6PyvDYz0odREOASsG8rsOpd6uwpwUZwgrEgI7MC/GbtaWZyAd01u263FcoNvo5SM9dAnoe8tG/TlwPKDBApybhkeraLfQnfHJvyLVwSv9T7UokFuXbORAthwtVgXhgDykKdQnRwUQ4KdJqZbxa75Wyrl/ws6xrEMN root@publishing\\nsmoser:ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies-canonical\\n\",\"sshKeys\":\"chad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNqMv+yV3qUQiDNF9Ykqwd/J06lQnIN67fGIB5Cukvin+3I8wXQwOtB+TmqJGUDlIwoeK6L3cc9VLxl8ujJ+Dg4= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2017-09-21T19:49:16+0000\\\"}\\nchad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAGc4eocDyJDifmxxETICup2XiAU9cDRp9oYXETvEMy5bLr3/W+hQDQ00rqUQgKffFgohucqwYqv0lJ6LVJ+w/9aDViVN9c8wKzBwXFWAaDKYBizaHtxwwb+WegJCj5GvTJVZ6GvL7AV1p+b7DbKoUvEjuREt7w64ocmVZO84/k56OrnafqcGk3FS7ZJ6peUHflc81bp/IvtkOKwMyd2TCk5FX0sT6cV9GI+itMuGrDrN33+q3Y8Rdo6wz6PTl0kutdD3WRpfK5e5b5Y048ssveyoThfOwcxERTtmRZTksKAOn0lCtw/7M3cYEZPDgjtClLj1d/hyKLzbUPbqbilEdAc= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2017-09-21T19:49:16+0000\\\"}\\nchad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNqMv+yV3qUQiDNF9Ykqwd/J06lQnIN67fGIB5Cukvin+3I8wXQwOtB+TmqJGUDlIwoeK6L3cc9VLxl8ujJ+Dg4= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2017-09-21T19:48:16+0000\\\"}\\nchad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAGc4eocDyJDifmxxETICup2XiAU9cDRp9oYXETvEMy5bLr3/W+hQDQ00rqUQgKffFgohucqwYqv0lJ6LVJ+w/9aDViVN9c8wKzBwXFWAaDKYBizaHtxwwb+WegJCj5GvTJVZ6GvL7AV1p+b7DbKoUvEjuREt7w64ocmVZO84/k56OrnafqcGk3FS7ZJ6peUHflc81bp/IvtkOKwMyd2TCk5FX0sT6cV9GI+itMuGrDrN33+q3Y8Rdo6wz6PTl0kutdD3WRpfK5e5b5Y048ssveyoThfOwcxERTtmRZTksKAOn0lCtw/7M3cYEZPDgjtClLj1d/hyKLzbUPbqbilEdAc= google-ssh {\\\"userName\\\":\\\"chad.smith@canonical.com\\\",\\\"expireOn\\\":\\\"2017-09-21T19:48:16+0000\\\"}\\nrharper:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5ZqTCxWN7+0qe/JbK0/4wSXuFo2Hw0E00VaicVKM7RMCYTMmbDWalKrpqFLrxFLFty9QakrhT4RCcHOaiQ3ZFXsrfiUCfwZx+2cnU9jCqxWjJJpo1ehZWiZpBa1/dspLU3uahA0O2q4ZN/sx9zUAbccL0DvfZQ5sXci2Wp0fQo+krwb/ACqrthZvTDg58p3yoSS0PgbHolWKMcOFNtcXGVJxFqkSKjdia1o/BbEudsPoKiy3E6MNVrTXZXIaYfEKASkcorMWza2T8N0Tl5q3hZQS967vTsPruc/2Jp/e0jkAcDnfagKgPbJn+vvDIZHRAIpo3kgUS04u5flz58763 rharper@foudres\\n\"}", "public_keys_data": [ "chad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAHwLTRUY5YN74SKLMHM8I1CwCZP6WCYQlawULeeWPruTHCXCRx6qhOPXI0PMv52hF91e2Z3YKwSC7NH8WT5Y7akWD47wJvBdRoq9Yq2gUUfJYv2t3zkUco727ZNz9vmGh8sCdB3GutSRm+/KYwOhUGPvgYAo+gLlltlxTQVtEfeWPk246V40w/uXpdl9DoRebCra8TGMXmyIX/w8D71OpofLKfUZgpbqnTGuc4MMDYFjB7XehN4VvYmwKdaoTumyJq6HPlfxmEvqzbL+9z62ur03h2TGtcptJVhewFFLnA/e1y5xKUOFZ6M+H/v6pzm9hq9Q4nrMPQdnF3Nf9iWBGXU= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2018-10-18T17:11:51+0000\"}", "chad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNkX7RMNJrQ9nZb5REJCkwP08IxAzexZrAKwqPWtT9JHxLEpwoINQsBeAhVROSRSAM4b96qaATq8o3YLOsQURhc= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2018-10-18T17:11:48+0000\"}", "chad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCT/tVyWY3NyVhgIDQUEYQjbKqfTaWTTczqqy+H45McnRhNlS1gHingCH65+TRQdEV003I5whLy7j7x8CWL2F/wJTfG0j8Ccodlyqc1mXjM8hggf/b7wt/IexTcyICjcAUQddN9FDrTbXqruXwQxzXqxR2WBFqm4EtCXgES6hagOAP1SQxOh660qr5Q4CpqIdParBXKAx7abZO/VvGjf7qB3J/zMJcpVLPslnOktAL5BDsGYcqo3pqMYZKiJd9J+lFUn1dKpjpv5MgK+FN6lhOKYwIDfgMjEyQNnL1Kq1mnpoW76f9oIhqzGuPMQiBrCAzE7NJKzp0Pu8BW9eG/Fx0F google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2018-10-18T17:09:49+0000\"}", "chad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOJ/yJ2Q9Zeay+D8dkNEmBgp2AvX4Bq82DeMLuTc5/0/Aa3lIikTdqa8KDCUWaVfPbRUYCXaf56Dm4XRqZUZ3vE= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2018-10-18T17:09:46+0000\"}", "powersj:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXW9Gg5H7ehjdSc6qDzwNtgCy94XYHhEYlXZMO2+FJrH3wfHGiMfCwOHxcOMt2QiXItULthdeQWS9QjBSSjVRXf6731igFrqPFyS9qBlOQ5D29C4HBXFnQggGVpBNJ82IRJv7szbbe/vpgLBP4kttUza9Dr4e1YM1ln4PRnjfXea6T0m+m1ixNb5432pTXlqYOnNOxSIm1gHgMLxPuDrJvQERDKrSiKSjIdyC9Jd8t2e1tkNLY0stmckVRbhShmcJvlyofHWbc2Ca1mmtP7MlS1VQnfLkvU1IrFwkmaQmaggX6WR6coRJ6XFXdWcq/AI2K6GjSnl1dnnCxE8VCEXBlXgFzad+PMSG4yiL5j8Oo1ZVpkTdgBnw4okGqTYCXyZg6X00As9IBNQfZMFlQXlIo4FiWgj3CO5QHQOyOX6FuEumaU13GnERrSSdp9tCs1Qm3/DG2RSCQBWTfcgMcStIvKqvJ3IjFn0vGLvI3Ampnq9q1SHwmmzAPSdzcMA76HyMUA5VWaBvWHlUxzIM6unxZASnwvuCzpywSEB5J2OF+p6H+cStJwQ32XwmOG8pLp1srlVWpqZI58Du/lzrkPqONphoZx0LDV86w7RUz1ksDzAdcm0tvmNRFMN1a0frDs506oA3aWK0oDk4Nmvk8sXGTYYw3iQSkOvDUUlIsqdaO+w== powersj@x1", "root:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfo1zNS6W5YrRG7f9E/rA36tGmyQRoF8AKi78fjYjoWucIQVlK+qpHIRcIprJvZNiFl79CQ61uDBwOl9Fp4riRTM5Fe6ogEoXw/6WlaDql8k/q42TW3bBLtusDOpCTlAO7B5ageocvCxT2Cnbs+DdvSbjTjZACfZcNqr5HFwSLoTSRwZM5afE6PyvDYz0odREOASsG8rsOpd6uwpwUZwgrEgI7MC/GbtaWZyAd01u263FcoNvo5SM9dAnoe8tG/TlwPKDBApybhkeraLfQnfHJvyLVwSv9T7UokFuXbORAthwtVgXhgDykKdQnRwUQ4KdJqZbxa75Wyrl/ws6xrEMN root@publishing", "smoser:ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies-canonical", "", "chad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNqMv+yV3qUQiDNF9Ykqwd/J06lQnIN67fGIB5Cukvin+3I8wXQwOtB+TmqJGUDlIwoeK6L3cc9VLxl8ujJ+Dg4= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2017-09-21T19:49:16+0000\"}", "chad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAGc4eocDyJDifmxxETICup2XiAU9cDRp9oYXETvEMy5bLr3/W+hQDQ00rqUQgKffFgohucqwYqv0lJ6LVJ+w/9aDViVN9c8wKzBwXFWAaDKYBizaHtxwwb+WegJCj5GvTJVZ6GvL7AV1p+b7DbKoUvEjuREt7w64ocmVZO84/k56OrnafqcGk3FS7ZJ6peUHflc81bp/IvtkOKwMyd2TCk5FX0sT6cV9GI+itMuGrDrN33+q3Y8Rdo6wz6PTl0kutdD3WRpfK5e5b5Y048ssveyoThfOwcxERTtmRZTksKAOn0lCtw/7M3cYEZPDgjtClLj1d/hyKLzbUPbqbilEdAc= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2017-09-21T19:49:16+0000\"}", "chad_smith:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNqMv+yV3qUQiDNF9Ykqwd/J06lQnIN67fGIB5Cukvin+3I8wXQwOtB+TmqJGUDlIwoeK6L3cc9VLxl8ujJ+Dg4= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2017-09-21T19:48:16+0000\"}", "chad_smith:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAGc4eocDyJDifmxxETICup2XiAU9cDRp9oYXETvEMy5bLr3/W+hQDQ00rqUQgKffFgohucqwYqv0lJ6LVJ+w/9aDViVN9c8wKzBwXFWAaDKYBizaHtxwwb+WegJCj5GvTJVZ6GvL7AV1p+b7DbKoUvEjuREt7w64ocmVZO84/k56OrnafqcGk3FS7ZJ6peUHflc81bp/IvtkOKwMyd2TCk5FX0sT6cV9GI+itMuGrDrN33+q3Y8Rdo6wz6PTl0kutdD3WRpfK5e5b5Y048ssveyoThfOwcxERTtmRZTksKAOn0lCtw/7M3cYEZPDgjtClLj1d/hyKLzbUPbqbilEdAc= google-ssh {\"userName\":\"chad.smith@canonical.com\",\"expireOn\":\"2017-09-21T19:48:16+0000\"}", "rharper:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5ZqTCxWN7+0qe/JbK0/4wSXuFo2Hw0E00VaicVKM7RMCYTMmbDWalKrpqFLrxFLFty9QakrhT4RCcHOaiQ3ZFXsrfiUCfwZx+2cnU9jCqxWjJJpo1ehZWiZpBa1/dspLU3uahA0O2q4ZN/sx9zUAbccL0DvfZQ5sXci2Wp0fQo+krwb/ACqrthZvTDg58p3yoSS0PgbHolWKMcOFNtcXGVJxFqkSKjdia1o/BbEudsPoKiy3E6MNVrTXZXIaYfEKASkcorMWza2T8N0Tl5q3hZQS967vTsPruc/2Jp/e0jkAcDnfagKgPbJn+vvDIZHRAIpo3kgUS04u5flz58763 rharper@foudres" ] } }, "instance_id": "2465196069185052347", "local_hostname": "cosmic-puppet", "platform": "gce", "public_ssh_keys": [], "region": "us-central1", "sensitive_keys": [], "subplatform": "metadata (http://metadata.google.internal/computeMetadata/v1/)", "userdata": "<redacted for non-root user> file:/var/lib/cloud/instance/user-data.txt", "v1": { "_beta_keys": [ "subplatform" ], "availability_zone": "us-central1-b", "cloud_name": "gce", "instance_id": "2465196069185052347", "local_hostname": "cosmic-puppet", "platform": "gce", "public_ssh_keys": [], "region": "us-central1", "subplatform": "metadata (http://metadata.google.internal/computeMetadata/v1/)" }, "vendordata": "<redacted for non-root user> file:/var/lib/cloud/instance/vendor-data.txt" } ``` OpenStack --------- ``` $ cloud-id openstack ``` ``` $ cloud-id --long openstack None ``` ``` $ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": "nova", "availability_zone": "nova", "cloud-name": "openstack", "cloud_id": "openstack", "cloud_name": "openstack", "instance-id": "05835d41-6d20-4dd2-85a4-de2fe696ced4", "instance_id": "05835d41-6d20-4dd2-85a4-de2fe696ced4", "local-hostname": "test-cosmic", "local_hostname": "test-cosmic", "platform": "openstack", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeJ7e0INdC10Ly1ufyBovZkFjKz9pfgfpGvPkcvU64eUlIKytQvb3PvK03jSJvq8fWXeE0fl6kJBzP/WjZcZFQVcWUKxSSCTOkpMlrMtKzUtR0uBa+yC03ehoWx/M21tmE67aAEzoc0ktdkieoU+wyvHJL8KmfPmd2fVhj2ns3O9J7aZq3Ryfa49xfD/rckt4QHKqhyKIWKVg/bIzN+rY7XYHUXKJBXptE8ymx2bDGshvVjEcZuECjzUIk/m2p2q6BnErY0uLep0cI+ThVHbtufCoudm9MiVpP+EMQEJw7m+VGcdb3043He0o+kcl3ZlNq5i1O2yzPysY/kwHdhsTr ubuntu@blackboxsw-bastion\n" ], "region": null, "subplatform": "metadata (http://169.254.169.254)" } ``` ``` $ cloud-init query --format '{{cloud_name}}|{{availability_zone}}' openstack|nova ``` ``` $ cat /run/cloud-init/instance-data.json { "base64_encoded_keys": [ "ds/meta_data/random_seed" ], "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "ec2_metadata": { "ami-id": "ami-000000fb", "ami-launch-index": "0", "ami-manifest-path": "FIXME", "block-device-mapping": { "ami": "vda", "ephemeral0": "/dev/vdb", "root": "/dev/vda" }, "hostname": "test-cosmic.novalocal", "instance-action": "none", "instance-id": "i-00034a7b", "instance-type": "m1.small", "local-hostname": "test-cosmic.novalocal", "local-ipv4": "10.5.0.5", "placement": { "availability-zone": "nova" }, "public-hostname": "test-cosmic.novalocal", "public-ipv4": "", "public-keys": { "mykey": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeJ7e0INdC10Ly1ufyBovZkFjKz9pfgfpGvPkcvU64eUlIKytQvb3PvK03jSJvq8fWXeE0fl6kJBzP/WjZcZFQVcWUKxSSCTOkpMlrMtKzUtR0uBa+yC03ehoWx/M21tmE67aAEzoc0ktdkieoU+wyvHJL8KmfPmd2fVhj2ns3O9J7aZq3Ryfa49xfD/rckt4QHKqhyKIWKVg/bIzN+rY7XYHUXKJBXptE8ymx2bDGshvVjEcZuECjzUIk/m2p2q6BnErY0uLep0cI+ThVHbtufCoudm9MiVpP+EMQEJw7m+VGcdb3043He0o+kcl3ZlNq5i1O2yzPysY/kwHdhsTr ubuntu@blackboxsw-bastion" ] }, "reservation-id": "r-9uavni01", "security-groups": "" }, "meta_data": { "availability_zone": "nova", "devices": [], "hostname": "test-cosmic.novalocal", "instance-id": "05835d41-6d20-4dd2-85a4-de2fe696ced4", "keys": [ { "data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeJ7e0INdC10Ly1ufyBovZkFjKz9pfgfpGvPkcvU64eUlIKytQvb3PvK03jSJvq8fWXeE0fl6kJBzP/WjZcZFQVcWUKxSSCTOkpMlrMtKzUtR0uBa+yC03ehoWx/M21tmE67aAEzoc0ktdkieoU+wyvHJL8KmfPmd2fVhj2ns3O9J7aZq3Ryfa49xfD/rckt4QHKqhyKIWKVg/bIzN+rY7XYHUXKJBXptE8ymx2bDGshvVjEcZuECjzUIk/m2p2q6BnErY0uLep0cI+ThVHbtufCoudm9MiVpP+EMQEJw7m+VGcdb3043He0o+kcl3ZlNq5i1O2yzPysY/kwHdhsTr ubuntu@blackboxsw-bastion\n", "name": "mykey", "type": "ssh" } ], "launch_index": 0, "local-hostname": "test-cosmic.novalocal", "name": "test-cosmic", "project_id": "3354f8a4ec5e4fbd827a6999c311f5d1", "public_keys": { "mykey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeJ7e0INdC10Ly1ufyBovZkFjKz9pfgfpGvPkcvU64eUlIKytQvb3PvK03jSJvq8fWXeE0fl6kJBzP/WjZcZFQVcWUKxSSCTOkpMlrMtKzUtR0uBa+yC03ehoWx/M21tmE67aAEzoc0ktdkieoU+wyvHJL8KmfPmd2fVhj2ns3O9J7aZq3Ryfa49xfD/rckt4QHKqhyKIWKVg/bIzN+rY7XYHUXKJBXptE8ymx2bDGshvVjEcZuECjzUIk/m2p2q6BnErY0uLep0cI+ThVHbtufCoudm9MiVpP+EMQEJw7m+VGcdb3043He0o+kcl3ZlNq5i1O2yzPysY/kwHdhsTr ubuntu@blackboxsw-bastion\n" }, "random_seed": "+cVIXGiek1mA+Mx9MYAaYnCk2U7cHByOEX/+wj7ZVdp1YOdO9waKq50RInHRAjR6/jB1OWhB9atHm0WROwkrYwgB14cw6xE8TgjApAq7U0E11NAFa0s9rUIzwumlx9RHoeUxnrXgg7KUXpMY6F2g1dok+EW9MKvBrDpAr3nxhDvrBeiCMxAhlQlIzPGG/8I/Bych8/7iJguqnMgQw5i7ZRXucI0cCBN91EFox2yMguT/oW7bup8HQ1GCVzuPLofqYkdsZtwKk5THOW9rnA28xDK1SqUMt2+UihAOzo5Ajy9M2Gj8GKOnWtr82jBayTqORFpUFn+5PUrr428McIYMTfXoY8KHkt0AUUrSYy86+US2wThbm2cosWqvCQzsVZ0gH14gkaGPAX47dALnTPhCnBITL7zyqUlfrlgCkh59Mo8yEEhsPVEFJJEe9Isif/Q+4c/RcYqA6oZqb370DJLTH9hiNh+QSfE50+YUQGTFbsLtWK9hmCl/jBgnxr6pKPR5Y5FrhBwtBgUjXiUiMiJbXQYZz4Xlo12nkgTe8KybbVLQT5+LlXBau7zGshd2nRYQq+HIBYeJq1B7zp6FM3nBA5OM5tSC2p7ISTmkrTBg8Jeg1iZwCZHXbYLJP9hu/yTpY7egaEqh0imQxvUL3ezj/ifj6H8sWWk9DZdZrnPt39E=", "uuid": "05835d41-6d20-4dd2-85a4-de2fe696ced4" }, "network_json": { "links": [ { "ethernet_mac_address": "fa:16:3e:9c:af:2f", "id": "tap7b60635c-73", "mtu": 8958, "type": "ovs", "vif_id": "7b60635c-732c-47fb-b09b-0006e0870fec" } ], "networks": [ { "id": "network0", "link": "tap7b60635c-73", "network_id": "243d8067-501d-454b-bd96-28c929b6202d", "type": "ipv4_dhcp" } ], "services": [] } }, "sensitive_keys": [], "v1": { "_beta_keys": [ "subplatform" ], "availability-zone": "nova", "availability_zone": "nova", "cloud-name": "openstack", "cloud_name": "openstack", "instance-id": "05835d41-6d20-4dd2-85a4-de2fe696ced4", "instance_id": "05835d41-6d20-4dd2-85a4-de2fe696ced4", "local-hostname": "test-cosmic", "local_hostname": "test-cosmic", "platform": "openstack", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeJ7e0INdC10Ly1ufyBovZkFjKz9pfgfpGvPkcvU64eUlIKytQvb3PvK03jSJvq8fWXeE0fl6kJBzP/WjZcZFQVcWUKxSSCTOkpMlrMtKzUtR0uBa+yC03ehoWx/M21tmE67aAEzoc0ktdkieoU+wyvHJL8KmfPmd2fVhj2ns3O9J7aZq3Ryfa49xfD/rckt4QHKqhyKIWKVg/bIzN+rY7XYHUXKJBXptE8ymx2bDGshvVjEcZuECjzUIk/m2p2q6BnErY0uLep0cI+ThVHbtufCoudm9MiVpP+EMQEJw7m+VGcdb3043He0o+kcl3ZlNq5i1O2yzPysY/kwHdhsTr ubuntu@blackboxsw-bastion\n" ], "region": null, "subplatform": "metadata (http://169.254.169.254)" } } ``` LXD --- ``` root@c2:~# cloud-id lxd ``` ``` root@c2:~# cloud-id --long lxd None ``` ``` root@c2:~# cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": null, "availability_zone": null, "cloud-name": "unknown", "cloud_id": "lxd", "cloud_name": "unknown", "instance-id": "c2", "instance_id": "c2", "local-hostname": "c2", "local_hostname": "c2", "platform": "lxd", "public_ssh_keys": [], "region": null, "subplatform": "seed-dir (/var/lib/cloud/seed/nocloud-net)" } ``` ``` root@c2:~# cloud-init query --format '{{cloud_name}}|{{availability_zone}}' unknown|None ``` Rackspace on-metal ------------------ ``` $ cloud-id configdrive ``` ``` $ cloud-id --long configdrive None ``` ``` $ cloud-id --json { "_beta_keys": [ "subplatform" ], "availability-zone": "nova", "availability_zone": "nova", "cloud_id": "configdrive", "cloud-name": "configdrive", "cloud_name": "configdrive", "instance-id": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c", "instance_id": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c", "local-hostname": "cfgdrv-1", "local_hostname": "cfgdrv-1", "platform": "configdrive", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies\n" ], "region": null, "subplatform": "config-disk (/dev/xvdd)" } ``` ``` $ cat /run/cloud-init/instance-data.json { "base64_encoded_keys": [ "ds/meta_data/random_seed" ], "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "ec2_metadata": { "ami-id": "ami-000010d9", "ami-launch-index": 0, "ami-manifest-path": "FIXME", "block-device-mapping": { "ami": "xvda", "root": "/dev/xvda", "swap": "/dev/xvdc" }, "hostname": "cfgdrv-1", "instance-action": "none", "instance-id": "i-000bc631", "instance-type": "512MB Standard Instance", "local-hostname": "cfgdrv-1", "local-ipv4": "162.209.78.18", "placement": { "availability-zone": "nova" }, "public-hostname": "cfgdrv-1", "public-ipv4": "", "public-keys": { "0": { "_name": "0=brickies", "openssh-key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies\n" } }, "reservation-id": "r-gat6agi5", "security-groups": [ "default" ] }, "meta_data": { "admin_pass": "9WsMXPmHbYSrppt4voCFQRL6", "availability_zone": "nova", "hostname": "cfgdrv-1", "instance-id": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c", "keys": [ { "data": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies\n", "name": "brickies", "type": "ssh" } ], "launch_index": 0, "local-hostname": "cfgdrv-1", "name": "cfgdrv-1", "project_id": "523301", "public_keys": { "brickies": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies\n" }, "random_seed": "BA5NOMUMHrGFpCXTVEMw+fF9uomXpM2FWMEs42BBJ17GRSnAVixTrG+GWEL5+N7bYWRAZfmiSr366QJWoE9bcQit0kDE2/8vFu44CdBOXM3jGawDo4Du4SRA5KMinp+Zn/phEEoqKOltYLEoWQbMaNChbAlCiC8r03wcZgknhndP5LiyGa7KDh5s7OHpGL70yhZrU5742nHqpgsv1t7TFZ+9KORBEVRo74rhR3ngfbP7Qp3gQDKFYb7A3fReQf31oQ4ZSBsa5QRYM63G/YQHIph6ssCxcFjnqivFl4GImMS3rdWdjuybiOWRy31u8Aw/gva9qCfT0IVtnRRswtX9tdFqh+k+7H80G8BCjyUsI7pE4hxxi3ZTZyIR+6QmkB3I37CAGhxIzSg3JhYbO1o/neiYpD0QiH51cU6KbNh8G/cKwmFaxRRyUkpFdxna3Mil1uFt/RetSpPp1arFNl2uiFsPskIvCB+MBjIpG74GT0BV1+Aqt4uf/qZcEaZMrBNiKMHnFQham9U+aE8O9VLO6vHMHV8SK5B8BC1u4bXLlVxXtuCXrdrsKRU0vMi3fZtkoP/GGXT8Xz1pkHU9udlEi0WkFES/FV2taRUd75/xIotKqFKHxVHsO5CXca8Nlu7LJr0be5d88LFzvCjHae0fG1sgYLjJHsLhzK/cp/v/I0k=", "uuid": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c" }, "network_json": { "links": [ { "ethernet_mac_address": "BC:76:4E:04:49:50", "id": "tap605b8c2f-25", "mtu": 1500, "type": null, "vif_id": "605b8c2f-25ec-48d8-842e-cd4dc73860e3" }, { "ethernet_mac_address": "BC:76:4E:04:4E:53", "id": "tapf7d2cfab-a7", "mtu": 1500, "type": null, "vif_id": "f7d2cfab-a739-49a7-abfd-f6e26c0a07f3" } ], "networks": [ { "id": "network0", "ip_address": "162.209.78.18", "link": "tap605b8c2f-25", "netmask": "255.255.255.0", "network_id": "00000000-0000-0000-0000-000000000000", "routes": [ { "gateway": "162.209.78.1", "netmask": "0.0.0.0", "network": "0.0.0.0" } ], "type": "ipv4" }, { "id": "network1", "ip_address": "2001:4800:7813:516:be76:4eff:fe04:4950", "link": "tap605b8c2f-25", "netmask": "ffff:ffff:ffff:ffff::", "network_id": "00000000-0000-0000-0000-000000000000", "routes": [ { "gateway": "fe80::def", "netmask": "::", "network": "::" } ], "type": "ipv6" }, { "id": "network2", "ip_address": "10.183.0.36", "link": "tapf7d2cfab-a7", "netmask": "255.255.128.0", "network_id": "11111111-1111-1111-1111-111111111111", "routes": [ { "gateway": "10.183.0.1", "netmask": "255.240.0.0", "network": "10.208.0.0" }, { "gateway": "10.183.0.1", "netmask": "255.240.0.0", "network": "10.176.0.0" } ], "type": "ipv4" } ], "services": [ { "address": "72.3.128.240", "type": "nameserver" }, { "address": "72.3.128.241", "type": "nameserver" } ] } }, "sensitive_keys": [], "v1": { "_beta_keys": [ "subplatform" ], "availability-zone": "nova", "availability_zone": "nova", "cloud-name": "configdrive", "cloud_name": "configdrive", "instance-id": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c", "instance_id": "38b9f0ee-2a36-4f58-8a5c-f1dd6b9cf39c", "local-hostname": "cfgdrv-1", "local_hostname": "cfgdrv-1", "platform": "configdrive", "public_ssh_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies\n" ], "region": null, "subplatform": "config-disk (/dev/xvdd)" } } ``` Vultr ----- ``` $ cloud-id vultr $ cloud-init query --all { "_beta_keys": [ "subplatform" ], "availability-zone": null, "availability_zone": null, "base64_encoded_keys": [], "cloud-name": "vultr", "cloud_id": "vultr", "cloud_name": "vultr", "combined_cloud_config": { "_doc": "Aggregated cloud-config created by merging merged_system_cfg (/etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d), metadata, vendordata and userdata. The combined_cloud_config represents the aggregated desired configuration acted upon by cloud-init.", "_log": [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n", "[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n" ], "apt": { "preserve_sources_list": true }, "chpasswd": { "expire": false, "users": [ { "name": "root", "password": "<" } ] }, "cloud_config_modules": [ "snap", "ssh-import-id", "keyboard", "locale", "set-passwords", "grub-dpkg", "apt-pipelining", "apt-configure", "ubuntu-advantage", "ntp", "timezone", "disable-ec2-metadata", "runcmd", "byobu" ], "cloud_final_modules": [ "package-update-upgrade-install", "fan", "landscape", "lxd", "ubuntu-drivers", "write-files-deferred", "puppet", "chef", "ansible", "mcollective", "salt-minion", "scripts-vendor", "scripts-per-once", "scripts-per-boot", "scripts-per-instance", "scripts-user", "ssh-authkey-fingerprints", "keys-to-console", "install-hotplug", "phone-home", "final-message", "power-state-change" ], "cloud_init_modules": [ "migrator", "seed_random", "bootcmd", "write-files", "growpart", "resizefs", "disk_setup", "mounts", "set_hostname", "update_hostname", "update_etc_hosts", "ca-certs", "rsyslog", "users-groups", "ssh" ], "datasource_list": [ "vultr", "None" ], "def_log_file": "/var/log/cloud-init.log", "disable_root": false, "features": { "ALLOW_EC2_MIRRORS_ON_NON_AWS_INSTANCE_TYPES": false, "APT_DEB822_SOURCE_LIST_FILE": false, "ERROR_ON_USER_DATA_FAILURE": true, "EXPIRE_APPLIES_TO_HASHED_USERS": true, "NETPLAN_CONFIG_ROOT_READ_ONLY": true, "NOCLOUD_SEED_URL_APPEND_FORWARD_SLASH": true }, "log_cfgs": [ [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n" ] ], "manage_etc_hosts": true, "manual_cache_clean": true, "mount_default_fields": [ null, null, "auto", "defaults,nofail", "0", "2" ], "output": { "all": "| tee -a /var/log/cloud-init-output.log" }, "package_upgrade": false, "power_state": { "condition": "test -f /tmp/.vultr_reboot_required", "message": "Rebooting machine because a reboot was deemed required for configuration.", "mode": "reboot" }, "preserve_hostname": false, "resize_rootfs_tmp": "/dev", "ssh_pwauth": true, "syslog_fix_perms": [ "syslog:adm", "root:adm", "root:wheel", "root:root" ], "system_info": { "distro": "ubuntu", "network": { "renderers": [ "netplan", "eni", "sysconfig" ] }, "ntp_client": "auto", "paths": { "cloud_dir": "/var/lib/cloud/", "templates_dir": "/etc/cloud/templates/", "upstart_dir": "/etc/init/" }, "ssh_svcname": "ssh" }, "updates": { "network": { "when": [ "boot", "boot-legacy", "boot-new-instance", "hotplug" ] } }, "users": [ { "gecos": "Linux User", "groups": "linuxuser", "lock_passwd": true, "name": "linuxuser", "primary_group": "linuxuser", "shell": "/bin/bash", "sudo": null } ], "vendor_data": { "enabled": true, "prefix": [] }, "vendor_data2": { "enabled": true, "prefix": [] } }, "distro": "ubuntu", "distro_release": "mantic", "distro_version": "23.10", "ds": { "_doc": "EXPERIMENTAL: The structure and format of content scoped under the 'ds' key may change in subsequent releases of cloud-init.", "meta_data": { "bgp": { "ipv4": { "my-address": "", "my-asn": "", "peer-address": "", "peer-asn": "" }, "ipv6": { "my-address": "", "my-asn": "", "peer-address": "", "peer-asn": "" } }, "cloud_interfaces": { "config": [ { "mac_address": "56:00:04:d3:f9:20", "name": "enp1s0", "subnets": [ { "control": "auto", "dns_nameservers": [ "108.61.10.10", "2001:19f0:300:1704::6" ], "type": "dhcp" }, { "control": "auto", "type": "ipv6_slaac" } ], "type": "physical" } ], "version": 1 }, "hostname": "test-mantic", "instance-id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "instance-v2-id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "instanceid": "72801277", "interfaces": [ { "ipv4": { "additional": [], "address": "45.63.111.183", "gateway": "45.63.110.1", "netmask": "255.255.254.0", "routes": [ { "netmask": 32, "network": "169.254.169.254" } ] }, "ipv6": { "additional": [], "address": "2001:19f0:9000:21df:5400:04ff:fed3:f920", "network": "2001:19f0:9000:21df::", "prefix": "64" }, "mac": "56:00:04:d3:f9:20", "network-type": "public" } ], "local-hostname": "test-mantic", "nvidia-driver": [], "public-keys": [ "ssh-rsa <REDACTED>" ], "region": "us", "startup-script": "echo No configured startup script", "tags": [], "user-data": "", "vendor-data": [ "#!/bin/bash\n\nif [[ -f /swapfile || -f /var/lib/vultr/states/.swapfile ]]; then\n\texit 0\nfi\n\nrootfs_device=\"\"\nrootfs_size=0\nrootfs_size_gb=0\n\n# Ensure the rootfs device is found, can have its size read, that it is at least 1GiB in size\n# and if it is greater than 10GiB, create a swapfile of rootfs_gb * 100, up to 8GiB\n# 1073741824 = 1GiB\n# 1048576 = 1MiB\nif rootfs_device=\"$(findmnt --noheadings --output=source --raw --notruncate /)\" &&\n\t[[ -n \"${rootfs_device}\" ]] &&\n\trootfs_size=$(blockdev --getsize64 \"${rootfs_device}\") &&\n\t((rootfs_size > 1073741824)) &&\n\trootfs_size_gb=$((rootfs_size / 1024 / 1024 / 1024)) &&\n\t((rootfs_size_gb >= 10)); then\n\n\tswap_size=$((rootfs_size_gb * 100))\n\n\tif ((rootfs_size_gb > 80)); then\n\t\tswap_size=8192\n\tfi\n\n\tdd if=/dev/zero of=/swapfile bs=1048576 count=\"${swap_size}\"\n\tchmod 600 /swapfile\n\tmkswap /swapfile\n\tswapon /swapfile\n\tprintf '%s\\n' \"/swapfile swap swap defaults 0 0\" >> /etc/fstab\n\n\tmkdir -p /var/lib/vultr/states/\n\ttouch /var/lib/vultr/states/.swapfile\nfi\n", "#cloud-config\n{\"package_upgrade\":false,\"disable_root\":false,\"manage_etc_hosts\":true,\"ssh_pwauth\":true,\"users\":[{\"name\":\"linuxuser\",\"gecos\":\"Linux User\",\"primary_group\":\"linuxuser\",\"groups\":\"linuxuser\",\"lock_passwd\":true,\"sudo\":null,\"shell\":\"/bin/bash\"}],\"chpasswd\":{\"users\":[{\"name\":\"root\",\"password\":\"<REDACTED>"}],\"expire\":false},\"power_state\":{\"mode\":\"reboot\",\"message\":\"Rebooting machine because a reboot was deemed required for configuration.\",\"condition\":\"test -f /tmp/.vultr_reboot_required\"}}", "#!/bin/bash\n\ncpu_count=0\nif command -v ethtool > /dev/null 2>&1; then\n\tcpu_count=$(nproc --all)\n\t((cpu_count <= 63)) || cpu_count=63 # limit interfaces to a maximum of 63 queues\nelse\n\ttee --append /var/log/cloudinit_networking.log <<< \"Failed to find ethtool, cannot configure multi-queue!\"\nfi\n\n# if /usr/lib/sysctl.d does not exist, use /etc/sysctl.d\nsysctl_dir=\"/usr/lib/sysctl.d\"\n[[ -d \"${sysctl_dir}\" ]] || sysctl_dir=\"/etc/sysctl.d\"\n\nsysctl_file=\"${sysctl_dir}/90-vultr.conf\"\n# if sysctl_file exists, make sure we unset immutable attr\n[[ ! -f \"${sysctl_file}\" ]] || chattr -i \"${sysctl_file}\"\n\ncat > \"${sysctl_file}\" << ENDSYSCTL\n# Do not modify this file unless you know how to remove the file lock and the consequences\n# thereof. Support will not be offered for network performance if this file is removed.\n\nnet.core.default_qdisc=fq\nnet.ipv4.tcp_congestion_control=bbr\nnet.ipv4.tcp_rmem=4096 87380 33554432\nnet.ipv4.tcp_wmem=4096 87380 33554432\nnet.ipv4.conf.all.arp_filter=1\n\n# Accept IPv6 advertisements when forwarding is enabled\nENDSYSCTL\n\nfor interface in /sys/class/net/*; do\n\t[[ ! \"${interface}\" =~ ^\\/sys\\/class\\/net\\/lo$ ]] || continue\n\tiface=\"${interface##*/}\" # /sys/class/net/eth0 -> eth0\n\n\t# if cpu_count has been set to > 0, we can configure multi-queue\n\t((cpu_count == 0)) || ethtool -L \"${iface}\" combined \"${cpu_count}\"\n\n\tprintf 'net.ipv6.conf.%s.accept_ra=2\\n' \"${iface}\" >> \"${sysctl_file}\"\ndone\n\n# make sure immutable attr is set\nchattr +i \"${sysctl_file}\"\n\n# -e|--ignore, --p|--load\nsysctl -e -p \"${sysctl_file}\"\n\nexit 0\n", "#!/bin/bash\n\nif grep -qs '^ubuntu.*N5MKTl' /etc/shadow > /dev/null 2>&1; then\n chpasswd -e <<< \"ubuntu:*\"\nfi\n\nexit 0\n", "#!/bin/bash\n\nsed -i -e 's/^ListenAddress 127.0.0.1//g' /etc/ssh/sshd_config\nif [[ ! -f /var/lib/vultr/states/.reboot ]]; then\n\tcommand -v systemctl > /dev/null 2>&1 ||\n\t\t{\n\t\t\trc-service sshd reload\n\t\t\texit 0\n\t\t}\n\n\tsystemctl reload sshd\n\nfi\n", "#!/bin/bash\n\nif [[ -f /var/lib/vultr/states/.reboot ]]; then\n\trm -f /var/lib/vultr/states/.reboot\n\n\t# Not all Linux distros have 'shutdown', such as Alpine\n\tcommand -v shutdown > /dev/null 2>&1 ||\n\t\t{\n\t\t\treboot\n\t\t\texit 0\n\t\t}\n\n\tshutdown -r 1\n\texit 0\nfi\n" ] } }, "features": { "ALLOW_EC2_MIRRORS_ON_NON_AWS_INSTANCE_TYPES": false, "APT_DEB822_SOURCE_LIST_FILE": false, "ERROR_ON_USER_DATA_FAILURE": true, "EXPIRE_APPLIES_TO_HASHED_USERS": true, "NETPLAN_CONFIG_ROOT_READ_ONLY": true, "NOCLOUD_SEED_URL_APPEND_FORWARD_SLASH": true }, "instance-id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "instance_id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "kernel_release": "6.5.0-26-generic", "local-hostname": "test-mantic", "local_hostname": "test-mantic", "machine": "x86_64", "merged_cfg": { "_doc": "DEPRECATED: Use merged_system_cfg. Will be dropped from 24.1", "_log": [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n", "[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n" ], "apt": { "preserve_sources_list": true }, "cloud_config_modules": [ "snap", "ssh-import-id", "keyboard", "locale", "set-passwords", "grub-dpkg", "apt-pipelining", "apt-configure", "ubuntu-advantage", "ntp", "timezone", "disable-ec2-metadata", "runcmd", "byobu" ], "cloud_final_modules": [ "package-update-upgrade-install", "fan", "landscape", "lxd", "ubuntu-drivers", "write-files-deferred", "puppet", "chef", "ansible", "mcollective", "salt-minion", "scripts-vendor", "scripts-per-once", "scripts-per-boot", "scripts-per-instance", "scripts-user", "ssh-authkey-fingerprints", "keys-to-console", "install-hotplug", "phone-home", "final-message", "power-state-change" ], "cloud_init_modules": [ "migrator", "seed_random", "bootcmd", "write-files", "growpart", "resizefs", "disk_setup", "mounts", "set_hostname", "update_hostname", "update_etc_hosts", "ca-certs", "rsyslog", "users-groups", "ssh" ], "datasource_list": [ "vultr", "None" ], "def_log_file": "/var/log/cloud-init.log", "disable_root": false, "log_cfgs": [ [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n" ] ], "manual_cache_clean": true, "mount_default_fields": [ null, null, "auto", "defaults,nofail", "0", "2" ], "output": { "all": "| tee -a /var/log/cloud-init-output.log" }, "preserve_hostname": false, "resize_rootfs_tmp": "/dev", "ssh_pwauth": 1, "syslog_fix_perms": [ "syslog:adm", "root:adm", "root:wheel", "root:root" ], "updates": { "network": { "when": [ "boot", "boot-legacy", "boot-new-instance", "hotplug" ] } }, "vendor_data": { "enabled": true, "prefix": [] }, "vendor_data2": { "enabled": true, "prefix": [] } }, "merged_system_cfg": { "_doc": "Merged cloud-init system config from /etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d/", "_log": [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n", "[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n" ], "apt": { "preserve_sources_list": true }, "cloud_config_modules": [ "snap", "ssh-import-id", "keyboard", "locale", "set-passwords", "grub-dpkg", "apt-pipelining", "apt-configure", "ubuntu-advantage", "ntp", "timezone", "disable-ec2-metadata", "runcmd", "byobu" ], "cloud_final_modules": [ "package-update-upgrade-install", "fan", "landscape", "lxd", "ubuntu-drivers", "write-files-deferred", "puppet", "chef", "ansible", "mcollective", "salt-minion", "scripts-vendor", "scripts-per-once", "scripts-per-boot", "scripts-per-instance", "scripts-user", "ssh-authkey-fingerprints", "keys-to-console", "install-hotplug", "phone-home", "final-message", "power-state-change" ], "cloud_init_modules": [ "migrator", "seed_random", "bootcmd", "write-files", "growpart", "resizefs", "disk_setup", "mounts", "set_hostname", "update_hostname", "update_etc_hosts", "ca-certs", "rsyslog", "users-groups", "ssh" ], "datasource_list": [ "vultr", "None" ], "def_log_file": "/var/log/cloud-init.log", "disable_root": false, "log_cfgs": [ [ "[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n", "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n" ] ], "manual_cache_clean": true, "mount_default_fields": [ null, null, "auto", "defaults,nofail", "0", "2" ], "output": { "all": "| tee -a /var/log/cloud-init-output.log" }, "preserve_hostname": false, "resize_rootfs_tmp": "/dev", "ssh_pwauth": 1, "syslog_fix_perms": [ "syslog:adm", "root:adm", "root:wheel", "root:root" ], "updates": { "network": { "when": [ "boot", "boot-legacy", "boot-new-instance", "hotplug" ] } }, "vendor_data": { "enabled": true, "prefix": [] }, "vendor_data2": { "enabled": true, "prefix": [] } }, "platform": "vultr", "public_ssh_keys": [ "ssh-rsa <REDACTED<" ], "python_version": "3.11.6", "region": "us", "sensitive_keys": [ "ds/meta_data/startup-script", "ds/meta_data/user-data", "ds/meta_data/vendor-data", "merged_cfg", "merged_system_cfg" ], "subplatform": "unknown", "sys_info": { "dist": [ "ubuntu", "23.10", "mantic" ], "platform": "Linux-6.5.0-26-generic-x86_64-with-glibc2.38", "python": "3.11.6", "release": "6.5.0-26-generic", "system": "Linux", "uname": [ "Linux", "test-mantic", "6.5.0-26-generic", "#26-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 5 21:19:28 UTC 2024", "x86_64", "x86_64" ], "variant": "ubuntu" }, "system_info": { "distro": "ubuntu", "network": { "renderers": [ "netplan", "eni", "sysconfig" ] }, "ntp_client": "auto", "paths": { "cloud_dir": "/var/lib/cloud/", "templates_dir": "/etc/cloud/templates/", "upstart_dir": "/etc/init/" }, "ssh_svcname": "ssh" }, "system_platform": "Linux-6.5.0-26-generic-x86_64-with-glibc2.38", "userdata": "", "v1": { "_beta_keys": [ "subplatform" ], "availability-zone": null, "availability_zone": null, "cloud-name": "vultr", "cloud_id": "vultr", "cloud_name": "vultr", "distro": "ubuntu", "distro_release": "mantic", "distro_version": "23.10", "instance-id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "instance_id": "1c45721e-d2a0-41e0-b87d-42557a367e2c", "kernel_release": "6.5.0-26-generic", "local-hostname": "test-mantic", "local_hostname": "test-mantic", "machine": "x86_64", "platform": "vultr", "public_ssh_keys": [ "ssh-rsa <REDACTED>" ], "python_version": "3.11.6", "region": "us", "subplatform": "unknown", "system_platform": "Linux-6.5.0-26-generic-x86_64-with-glibc2.38", "variant": "ubuntu" }, "variant": "ubuntu", "vendordata": "[\n \"#!/bin/bash\\n\\nif [[ -f /swapfile || -f /var/lib/vultr/states/.swapfile ]]; then\\n\\texit 0\\nfi\\n\\nrootfs_device=\\\"\\\"\\nrootfs_size=0\\nrootfs_size_gb=0\\n\\n# Ensure the rootfs device is found, can have its size read, that it is at least 1GiB in size\\n# and if it is greater than 10GiB, create a swapfile of rootfs_gb * 100, up to 8GiB\\n# 1073741824 = 1GiB\\n# 1048576 = 1MiB\\nif rootfs_device=\\\"$(findmnt --noheadings --output=source --raw --notruncate /)\\\" &&\\n\\t[[ -n \\\"${rootfs_device}\\\" ]] &&\\n\\trootfs_size=$(blockdev --getsize64 \\\"${rootfs_device}\\\") &&\\n\\t((rootfs_size > 1073741824)) &&\\n\\trootfs_size_gb=$((rootfs_size / 1024 / 1024 / 1024)) &&\\n\\t((rootfs_size_gb >= 10)); then\\n\\n\\tswap_size=$((rootfs_size_gb * 100))\\n\\n\\tif ((rootfs_size_gb > 80)); then\\n\\t\\tswap_size=8192\\n\\tfi\\n\\n\\tdd if=/dev/zero of=/swapfile bs=1048576 count=\\\"${swap_size}\\\"\\n\\tchmod 600 /swapfile\\n\\tmkswap /swapfile\\n\\tswapon /swapfile\\n\\tprintf '%s\\\\n' \\\"/swapfile swap swap defaults 0 0\\\" >> /etc/fstab\\n\\n\\tmkdir -p /var/lib/vultr/states/\\n\\ttouch /var/lib/vultr/states/.swapfile\\nfi\\n\",\n \"#cloud-config\\n{\\\"package_upgrade\\\":false,\\\"disable_root\\\":false,\\\"manage_etc_hosts\\\":true,\\\"ssh_pwauth\\\":true,\\\"users\\\":[{\\\"name\\\":\\\"linuxuser\\\",\\\"gecos\\\":\\\"Linux User\\\",\\\"primary_group\\\":\\\"linuxuser\\\",\\\"groups\\\":\\\"linuxuser\\\",\\\"lock_passwd\\\":true,\\\"sudo\\\":null,\\\"shell\\\":\\\"/bin/bash\\\"}],\\\"chpasswd\\\":{\\\"users\\\":[{\\\"name\\\":\\\"root\\\",\\\"password\\\":\\\"<REDACTED>\\\"}],\\\"expire\\\":false},\\\"power_state\\\":{\\\"mode\\\":\\\"reboot\\\",\\\"message\\\":\\\"Rebooting machine because a reboot was deemed required for configuration.\\\",\\\"condition\\\":\\\"test -f /tmp/.vultr_reboot_required\\\"}}\",\n \"#!/bin/bash\\n\\ncpu_count=0\\nif command -v ethtool > /dev/null 2>&1; then\\n\\tcpu_count=$(nproc --all)\\n\\t((cpu_count <= 63)) || cpu_count=63 # limit interfaces to a maximum of 63 queues\\nelse\\n\\ttee --append /var/log/cloudinit_networking.log <<< \\\"Failed to find ethtool, cannot configure multi-queue!\\\"\\nfi\\n\\n# if /usr/lib/sysctl.d does not exist, use /etc/sysctl.d\\nsysctl_dir=\\\"/usr/lib/sysctl.d\\\"\\n[[ -d \\\"${sysctl_dir}\\\" ]] || sysctl_dir=\\\"/etc/sysctl.d\\\"\\n\\nsysctl_file=\\\"${sysctl_dir}/90-vultr.conf\\\"\\n# if sysctl_file exists, make sure we unset immutable attr\\n[[ ! -f \\\"${sysctl_file}\\\" ]] || chattr -i \\\"${sysctl_file}\\\"\\n\\ncat > \\\"${sysctl_file}\\\" << ENDSYSCTL\\n# Do not modify this file unless you know how to remove the file lock and the consequences\\n# thereof. Support will not be offered for network performance if this file is removed.\\n\\nnet.core.default_qdisc=fq\\nnet.ipv4.tcp_congestion_control=bbr\\nnet.ipv4.tcp_rmem=4096 87380 33554432\\nnet.ipv4.tcp_wmem=4096 87380 33554432\\nnet.ipv4.conf.all.arp_filter=1\\n\\n# Accept IPv6 advertisements when forwarding is enabled\\nENDSYSCTL\\n\\nfor interface in /sys/class/net/*; do\\n\\t[[ ! \\\"${interface}\\\" =~ ^\\\\/sys\\\\/class\\\\/net\\\\/lo$ ]] || continue\\n\\tiface=\\\"${interface##*/}\\\" # /sys/class/net/eth0 -> eth0\\n\\n\\t# if cpu_count has been set to > 0, we can configure multi-queue\\n\\t((cpu_count == 0)) || ethtool -L \\\"${iface}\\\" combined \\\"${cpu_count}\\\"\\n\\n\\tprintf 'net.ipv6.conf.%s.accept_ra=2\\\\n' \\\"${iface}\\\" >> \\\"${sysctl_file}\\\"\\ndone\\n\\n# make sure immutable attr is set\\nchattr +i \\\"${sysctl_file}\\\"\\n\\n# -e|--ignore, --p|--load\\nsysctl -e -p \\\"${sysctl_file}\\\"\\n\\nexit 0\\n\",\n \"#!/bin/bash\\n\\nif grep -qs '^ubuntu.*N5MKTl' /etc/shadow > /dev/null 2>&1; then\\n chpasswd -e <<< \\\"ubuntu:*\\\"\\nfi\\n\\nexit 0\\n\",\n \"#!/bin/bash\\n\\nsed -i -e 's/^ListenAddress 127.0.0.1//g' /etc/ssh/sshd_config\\nif [[ ! -f /var/lib/vultr/states/.reboot ]]; then\\n\\tcommand -v systemctl > /dev/null 2>&1 ||\\n\\t\\t{\\n\\t\\t\\trc-service sshd reload\\n\\t\\t\\texit 0\\n\\t\\t}\\n\\n\\tsystemctl reload sshd\\n\\nfi\\n\",\n \"#!/bin/bash\\n\\nif [[ -f /var/lib/vultr/states/.reboot ]]; then\\n\\trm -f /var/lib/vultr/states/.reboot\\n\\n\\t# Not all Linux distros have 'shutdown', such as Alpine\\n\\tcommand -v shutdown > /dev/null 2>&1 ||\\n\\t\\t{\\n\\t\\t\\treboot\\n\\t\\t\\texit 0\\n\\t\\t}\\n\\n\\tshutdown -r 1\\n\\texit 0\\nfi\\n\"\n]" } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully