xmlblog (owner)

Fork Of

gist: 132506 by retr0h Ubuntu Chef Bootstrapper

Revisions

gist: 170804 Download_button fork
public
Description:
Ubuntu Chef Bootstrapper
Public Clone URL: git://gist.github.com/170804.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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 vim
 
  ### bootstrap with ruby+deps.
  apt-get install -y ruby ruby1.8-dev rubygems libopenssl-ruby1.8 libsqlite3-ruby irb build-essential syslog-ng
 
  ### 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/xmlblog/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