Browse files

Added some more docs

  • Loading branch information...
1 parent 150f186 commit c95dd2f8ac922dce973ca6ee7843dfa09aa50717 @tlpinney tlpinney committed Mar 13, 2012
Showing with 11 additions and 5 deletions.
  1. +8 −4 deploy/README
  2. +3 −1 deploy/
@@ -19,14 +19,18 @@ knife ec2 server create -r 'role[webserver]' -I ami-7000f019 -f m1.small
# you can run this to get the servers you have running, as well as their ip addresses
knife ec2 server list
+# set it as a variable so you can reuse it
+export RTFDHOST=X.X.X.X
# if you ever want to start over from scratch you can destroy the instance by doing
knife ec2 delete i-xxxxxxx
# more work is needed for it to be integrated into knife
# ssh to the machine
-ssh -i ~/.ssh/rtfd.pem ubuntu@X.X.X.X
+ssh -i ~/.ssh/rtfd.pem ubuntu@$RTFDHOST
sudo su -
edit .ssh/authorized_keys
@@ -39,16 +43,16 @@ edit .ssh/authorized_keys
pip install fabric
# install chef on the ec2 server
-fab install_chef -H X.X.X.X -i ~/.ssh/rtfd.pem
+fab install_chef -H $RTFDHOST -i ~/.ssh/rtfd.pem
# sync the chef scripts to the server
# Make sure to have your key in ssh-agent for rsync to use
eval `ssh-agent`
ssh-add ~/.ssh/rtfd.pem
-fab sync_config -H X.X.X.X -i ~/.ssh/rtfd.pem
+fab sync_config -H $RTFDHOST -i ~/.ssh/rtfd.pem
# sync and run chef on the ec2 instance
-fab update -H X.X.X.X -i ~/.ssh/rtfd.pem
+fab update -H $RTFDHOST -i ~/.ssh/rtfd.pem
@@ -12,7 +12,9 @@
def install_chef():
sudo('apt-get update', pty=True)
sudo('apt-get install -y git-core libopenssl-ruby rubygems ruby ruby-dev', pty=True)
- sudo('gem install chef --no-ri --no-rdoc', pty=True)
+ #sudo('gem install chef --no-ri --no-rdoc', pty=True)
+ sudo('gem install chef --no-ri --no-rdoc -V 0.10.2', pty=True)
def sync_config():
local('rsync -av . %s@%s:/etc/chef' % (env.user, env.hosts[0]))

0 comments on commit c95dd2f

Please sign in to comment.