Created
January 29, 2011 12:57
-
-
Save jamesu/801807 to your computer and use it in GitHub Desktop.
How to use fog for Amazon ECS, irb edition
This file contains hidden or 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
require 'fog' | |
connection = Fog::Compute.new( :provider => 'AWS', :aws_secret_access_key => '', :aws_access_key_id => '') | |
server = connection.servers.create(:image_id => "ami-76f0061f", :key_name => 'YourKey', :flavor_id => 't1.micro') | |
server.reload # see how we are doing | |
server.ready? # true when ready | |
server.ssh("ls /") # works if we can connect of course |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment