Skip to content

Instantly share code, notes, and snippets.

@karlentwistle
Forked from ryanb/chef_solo_bootstrap.sh
Last active December 14, 2015 04:38
Show Gist options
  • Save karlentwistle/5029263 to your computer and use it in GitHub Desktop.
Save karlentwistle/5029263 to your computer and use it in GitHub Desktop.
#curl -L https://gist.github.com/karlentwistle/5029263/raw/84faa6a15a9c521533e33135090c1214c457f08d/chef_solo_bootstrap.sh | bash
aptitude -y update
echo "Installing RVM and Ruby dependencies"
sudo apt-get install -y build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion git-core libgdbm-dev pkg-config libffi-dev
echo "Installing RVM system-wide"
bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'"
cat >> /etc/profile <<'EOF'
# Load RVM if it is installed,
# first try to load user install
# then try to load root install, if user install is not there.
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
. "$HOME/.rvm/scripts/rvm"
elif [ -s "/usr/local/rvm/scripts/rvm" ] ; then
. "/usr/local/rvm/scripts/rvm"
fi
EOF
source /etc/profile
rvm install 1.9.3
rvm --default use 1.9.3
gem install ruby-shadow --no-ri --no-rdoc
gem install chef --version '10.24.0' --no-ri --no-rdoc
mkdir /etc/chef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment