Skip to content

Instantly share code, notes, and snippets.

@reedlaw
Forked from ryanb/chef_solo_bootstrap.sh
Created May 9, 2012 06:37
Show Gist options
  • Save reedlaw/2642445 to your computer and use it in GitHub Desktop.
Save reedlaw/2642445 to your computer and use it in GitHub Desktop.
Bootstrap Chef Solo
#!/usr/bin/env bash
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-p194.tar.gz
tar xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
make install
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
gem install chef
mkdir /etc/chef
cat <<EOF >/etc/chef/solo.rb
file_cache_path "/var/chef"
cookbook_path "/var/chef/cookbooks"
json_attribs "/vagrant/chef/node.json"
EOF
mkdir /var/chef
ln -s /vagrant/chef/cookbooks/ /var/chef/cookbooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment