Skip to content

Instantly share code, notes, and snippets.

@loe
Forked from retr0h/gist:132506
Created August 22, 2009 00:08
Show Gist options
  • Save loe/172526 to your computer and use it in GitHub Desktop.
Save loe/172526 to your computer and use it in GitHub Desktop.
#!/bin/sh
trap "exit 2" 1 2 3 13 15
OPTS="--no-rdoc --no-ri"
if [ -f "/etc/lsb-release" ]; then
### bootstrap with git.
apt-get update -y && apt-get upgrade -y --force-yes && apt-get install -y git-core
### bootstrap with ruby+deps.
apt-get install -y ruby ruby1.8-dev rubygems libopenssl-ruby1.8 libsqlite3-ruby irb build-essential
### upgrade rubygems, debian's version is old.
gem source -a http://gems.rubyforge.org && gem source -a http://gems.github.com && gem source -a http://gems.opscode.com && \
gem install rubygems-update --version=1.3.4 ${OPTS} && /var/lib/gems/1.8/bin/update_rubygems
### download the chef-solo repo.
cd /tmp && git clone git://github.com/loe/chef_solo_os.git && cd /tmp/chef_solo_os
### Run chef solo.
gem install chef ohai ${OPTS} && \
chef-solo -l debug -c config/solo.rb -j config/dna.json
else
echo "[ERROR] OS unsupported."
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment