-
-
Save tigris/2554941 to your computer and use it in GitHub Desktop.
Bootstrap Chef Solo + Git
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
#!/usr/bin/env bash | |
GITHUB_USER="tigris" | |
GITHUB_PROJECT=... | |
GIT_BRANCH="master" | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libreadline-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
make install | |
gem install chef ruby-shadow --no-ri --no-rdoc | |
mkdir -p /var/chef/cache | |
apt-get -y install git | |
cd /tmp | |
git clone https://[email protected]/$GITHUB_USER/$GITHUB_PROJECT | |
cd $GITHUB_PROJECT | |
[[ $GIT_BRANCH = "master" ]] || git checkout -t origin/$GIT_BRANCH | |
chef-solo -c /tmp/$GITHUB_PROJECT/config/chef/solo.rb -j /tmp/$GITHUB_PROJECT/config/chef/node.json -l debug -o 'recipe[main]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment