Connect to your OnMetal Server through cloud-init


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

#cloud-config
write_files:
- 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-compute-v1 --image b59fc7a5-de35-4fd3-87f8-c5f2e390f1ad --user-data cloud-config.yml --key-name pquerna
pq-cloud-init-test

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: http://cloudinit.readthedocs.org/en/latest/.



Was this content helpful?




© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER