Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created March 4, 2013 20:22
Show Gist options
  • Save proffalken/5085293 to your computer and use it in GitHub Desktop.
Save proffalken/5085293 to your computer and use it in GitHub Desktop.
Connecting to HPCS and setting hostname via cloud-init
ud = "#cloud-config\nfqdn: " + server_fqdn + "\nhostname: " + hostname + "\nmanage_etc_hosts: true"
# get the image
image_details = self.get_image(image,region)
new_server = self.cx[region].servers.create(hostname,flavor=flavor,image=image_details,key_name=key_name,userdata=ud)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment