Skip to content

Instantly share code, notes, and snippets.

@reedlaw
Created May 17, 2012 04:18
Show Gist options
  • Save reedlaw/2716305 to your computer and use it in GitHub Desktop.
Save reedlaw/2716305 to your computer and use it in GitHub Desktop.
Chef solo bootstrap from private repo
#!/usr/bin/env bash
apt-get install -y python-software-properties build-essential
apt-add-repository -y ppa:brightbox/ruby-ng
apt-get update
apt-get install -y ruby1.9.3
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
gem install chef
mkdir /etc/chef /var/chef
cat <<EOF >/etc/chef/solo.rb
file_cache_path "/var/chef"
cookbook_path "/var/chef/cookbooks"
json_attribs "/var/chef/node.json"
EOF
tar xvzf /tmp/chef-solo.tar.gz -C /var/chef
mv /tmp/node.json /var/chef/
chef-solo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment