Created
July 30, 2012 00:47
-
-
Save andrewle/3203001 to your computer and use it in GitHub Desktop.
Bootstrap chef on a bare Debian/Ubuntu Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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