Created
May 21, 2012 15:30
-
-
Save jk0/2762925 to your computer and use it in GitHub Desktop.
Boot a DevStack instance through the BOSH OpenStack CPI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os = openstack | |
flavor = os.flavors.find { |f| f.name == "m1.tiny" } | |
image = os.images.find { |i| i.name == "cirros-0.3.0-x86_64-uec" } | |
# Boot instance using Fog | |
# server = os.servers.create(:name => agent_id, :image_ref => image.id, :flavor_ref => flavor.id) | |
server = cpi.create_vm("cpi-test", image.name, { "instance_type" => flavor.name }, {"default" => { "type" => "dynamic" }}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment