public
Last active — forked from ryanb/chef_solo_bootstrap.sh

Bootstrap Chef Solo. Usage: `curl -L https://gist.github.com/mhutter/2349875/raw/chef_solo_bootstrap.sh | bash`

  • Download Gist
chef_solo_bootstrap.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/env bash
# Tested for Ubuntu 12.04
# usage: `curl -L https://gist.github.com/mhutter/2349875/raw/chef_solo_bootstrap.sh | bash`
 
# check for root permissions
[[ "$(id -u)" -ne "0" ]] && echo 'must be root!' && exit 1
 
echo -n 'Refreshing APT-Repos... '
apt-get update -qq && echo 'done!'
 
echo 'Install some dependencies... '
apt-get install -yq ruby1.9.3 build-essential
 
echo 'Install chef...'
gem install chef --no-ri --no-rdoc
mkdir -p /var/chef/cache
 
echo "done! Version:"
chef-solo -v

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.