Created
December 30, 2013 07:12
-
-
Save icco/8178811 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env ruby | |
require 'fog' | |
connection = Fog::Compute.new({ :provider => "DigitalOcean" }) | |
p connection.servers | |
server = connection.servers.bootstrap({ | |
:name => 'fuck', | |
:image_id => 1505447, | |
:size_id => 33, | |
:region_id => 4, | |
:flavor_id => 66, | |
:public_key_path => File.expand_path('~/.ssh/id_rsa.pub'), | |
:private_key_path => File.expand_path('~/.ssh/id_rsa'), | |
}) | |
server.wait_for { ready? } | |
connection.servers.each {|s| s.destroy } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@icco This saved my life, couldn't figure out how to get the bootstrap command working in fog for DigitalOcean! 😄