Skip to content

Instantly share code, notes, and snippets.

@usmanbashir
Last active August 29, 2015 14:00
Show Gist options
  • Save usmanbashir/11255288 to your computer and use it in GitHub Desktop.
Save usmanbashir/11255288 to your computer and use it in GitHub Desktop.
Bootstrap Ruby & Chef Solo for Ubuntu
#!/usr/bin/env bash
if which chef-solo; then
echo "Chef already seems to be installed on the system.";
else
# Resynchronize the package index.
apt-get -y update
# Install build essential packages.
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl
# Install Ruby from the package manger,
# as building it from source is too slow.
apt-get -y install ruby ruby-dev
# Install bundler as it's a dependency for Chef.
gem install bundler --no-ri --no-rdoc
# Install Chef.
gem install chef ruby-shadow --no-ri --no-rdoc
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment