Last active
December 11, 2015 03:59
-
-
Save spulec/4541878 to your computer and use it in GitHub Desktop.
chef machine base setup
This file contains hidden or 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
if [ ! -f /usr/local/bin/chef-client ]; then | |
# Become up to date | |
apt-get update | |
# Get our basics | |
apt-get install -y -q ruby1.9.1 ruby1.9.1-dev build-essential wget | |
fi | |
gem install ohai --no-rdoc --no-ri | |
gem install right_aws --no-ri --no-rdoc | |
gem install chef --no-rdoc --no-ri --version '10.16.4' | |
mkdir -p /etc/chef/ohai/hints && touch /etc/chef/ohai/hints/ec2.json | |
if [ ! -f /usr/bin/chef-client ]; then | |
ln -s /usr/local/bin/chef-client /usr/bin | |
fi | |
ENV=`cat /etc/chef/env.txt` | |
mkdir -p /var/log/chef | |
touch /var/log/chef/client.log | |
chef-client -j /etc/chef/first-boot.json -l debug -L /var/log/chef/client.log -E $ENV | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment