Last active
August 29, 2015 14:00
-
-
Save usmanbashir/11255288 to your computer and use it in GitHub Desktop.
Bootstrap Ruby & Chef Solo for Ubuntu
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
#!/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