Connect to your OnMetal Server through cloud-init

  • Last updated on: 2019-11-4
  • Authored by: Paul Querna

Cloud-init works out of the box with OnMetal servers. Therefore, you can create a cloud-config.yml file as follows:

- path: /hello-world
permissions: 755
content: |
#!/bin/bash -e
echo "hello world"

Next, run the following command with your SSH key name:

supernova iad boot --flavor onmetal-general2-medium --image b59fc7a5-de35-4fd3-87f8-c5f2e390f1ad --user-data cloud-config.yml --key-name pquerna

When the server starts, a /hello-world Bash script is present in your OnMetal instance.

Note: Many more examples of what cloud-init can do are available in the cloud-init’s documentation at:

Share this information: