Skip to content

Instantly share code, notes, and snippets.

@jverdeyen
Forked from tinderfields/gist:2863348
Created June 5, 2012 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jverdeyen/2875173 to your computer and use it in GitHub Desktop.
Save jverdeyen/2875173 to your computer and use it in GitHub Desktop.
Shell: Install chef onto ubuntu 12.04
root@Ubuntu-1204-precise-64-minimal ~ #
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
gem install chef ruby-shadow --no-ri --no-rdoc
root@Ubuntu-1204-precise-64-minimal ~ # ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
root@Ubuntu-1204-precise-64-minimal ~ # chef-solo -v
Chef: 0.10.10
mkdir /var/chef
exit
# Add entry to .ssh/config
brew install ssh-copy-id
ssh-copy-id -i ~/.ssh/id_rsa.pub hetzner
# See
http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/
#CD to chef dir and
rsync -r . hetzner:/var/chef
ssh hetzner "chef-solo -c /var/chef/solo.rb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment