Skip to content

Instantly share code, notes, and snippets.

@tjh
Created September 23, 2010 18:05
Show Gist options
  • Save tjh/594066 to your computer and use it in GitHub Desktop.
Save tjh/594066 to your computer and use it in GitHub Desktop.
#
# EC2 / Chef command cheat sheet
#
# Uses cookbooks and templates from:
# http://github.com/tjh/chef-repo
# Fire up a new instance on EC2
# - Super-fast large instance
# - Uses a template that uses RVM/REE for the system ruby (optional)
knife ec2 server create "role[hydra]" --image ami-4234de2b --ssh-user ubuntu --flavor c1.xlarge --availability-zone us-east-1c --ssh-key chef --template-file bootstrap/ubuntu10.04-rvm-ree.erb
# Bootstrap an existing EC2 instance
#
# This should happen automatically when doing a 'knife ec2 server create', but I found that
# it often timed out. This appears to be a known issue. Future versions of chef will wait
# 30s instead of 10s before attempting to connect
knife bootstrap ec2-174-129-92-244.compute-1.amazonaws.com -r "role[hydra]" --ssh-user ubuntu -t bootstrap/ubuntu10.04-rvm-ree.erb --sudo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment