Skip to content

Instantly share code, notes, and snippets.

@jamesu
Created January 29, 2011 12:57
Show Gist options
  • Save jamesu/801807 to your computer and use it in GitHub Desktop.
Save jamesu/801807 to your computer and use it in GitHub Desktop.
How to use fog for Amazon ECS, irb edition
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