Last active
December 21, 2015 12:29
-
-
Save suda/6306450 to your computer and use it in GitHub Desktop.
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 | |
# Modified install.sh file from http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/ | |
# This runs as root on the server | |
chef_binary=/usr/local/bin/chef-solo | |
# Are we on a vanilla system? | |
if ! test -f "$chef_binary"; then | |
export DEBIAN_FRONTEND=noninteractive | |
# Upgrade headlessly (this is only safe-ish on vanilla systems) | |
aptitude update && | |
apt-get -o Dpkg::Options::="--force-confnew" \ | |
--force-yes -fuy dist-upgrade && | |
# Install Ruby, Chef and Berkshelf | |
aptitude install -y ruby1.9.1 ruby1.9.1-dev make libxslt-dev libxml2-dev git && | |
sudo gem1.9.1 install --no-rdoc --no-ri chef --version 11.16.0 && | |
sudo gem1.9.1 install --no-rdoc --no-ri berkshelf --version 2.0.8 && | |
# Required for setting user's password | |
sudo gem1.9.1 install --no-rdoc --no-ri ruby-shadow | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment