Skip to content

Instantly share code, notes, and snippets.

@ulfmagnetics
Created March 15, 2012 00:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ulfmagnetics/2040692 to your computer and use it in GitHub Desktop.
Save ulfmagnetics/2040692 to your computer and use it in GitHub Desktop.
Chef on EC2
# -- assuming homebrew is up and running already
$ brew install ec2-api-tools
# -- get root X509 credentials from the AWS Security Credentials page
# -- place pk and cert pem files in $HOME/.ec2
# -- add the following into $HOME/.bash_profile:
# export REGION='us-west-1'
# export EC2_KEYPAIR="$HOME/.ssh/ec2-$REGION.pem"
# export EC2_HOME="`brew --prefix ec2-api-tools`/jars"
# export EC2_URL="https://ec2.$REGION.amazonaws.com"
# export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)"
# export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)"
# -- spin up an instance of our Chef Bootstrap 1.02 (ami-73550d36)
chef_ami=`ec2dim --region us-west-1 -o self |egrep 'Chef.*1.05' |cut -f2`
ec2run $chef_ami -t t1.micro -g ec2-prod-uswest1 -d "pinger-us-west-1" -k ec2-prod-uswest1
# -- bootstrap the node
knife bootstrap ec2-50-18-89-106.us-west-1.compute.amazonaws.com -N pinger-us-west-1.a.lumoslabs.com -i ~/.ssh/ec2-us-west-1.pem -x lumoslabs -d amazon-rvm-lumos --sudo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment