Created
March 15, 2012 00:27
-
-
Save ulfmagnetics/2040692 to your computer and use it in GitHub Desktop.
Chef on EC2
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
# -- 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