Skip to content

Instantly share code, notes, and snippets.

@dizz
Created October 8, 2012 08:55
Show Gist options
  • Save dizz/3851509 to your computer and use it in GitHub Desktop.
Save dizz/3851509 to your computer and use it in GitHub Desktop.
Simple Fog.io script
require 'rubygems'
require 'fog'
conn = Fog::Compute.new({
:provider => :openstack,
:openstack_api_key => "admin",
:openstack_username => "admin",
:openstack_auth_url => "http://aio.cloudcomplab.ch:5000/v2.0/tokens"
})
# need to supply customisation script
conn.servers.create(:flavor_ref=>'1', :image_ref=>'d52a624a-d781-449c-bd32-788532c6bf82', :name=>'vm1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment