Skip to content

Instantly share code, notes, and snippets.

@andrewle
Created July 30, 2012 00:47
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 andrewle/3203001 to your computer and use it in GitHub Desktop.
Save andrewle/3203001 to your computer and use it in GitHub Desktop.
Bootstrap chef on a bare Debian/Ubuntu Server
#!/bin/bash
# Bootstrap chef-solo on a server
# Install Ruby
sudo apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl
# Install RubyGems instead of using the system version
cd /tmp
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
cd rubygems-1.8.10
sudo ruby setup.rb --no-format-executable
# Install Chef
sudo gem install chef --no-ri --no-rdoc
sudo mkdir -p /etc/chef
sudo bash -c "cat > /etc/chef/solo.rb" <<'EOF'
file_cache_path "/var/cache/chef-solo"
cookbook_path "/var/cache/chef-solo/cookbooks"
EOF
sudo mkdir -p /var/cache/chef
sudo mkdir -p /var/cache/chef/cookbooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment