Skip to content

Instantly share code, notes, and snippets.

@wolfeidau
Created September 1, 2012 00:03
Show Gist options
  • Select an option

  • Save wolfeidau/3561480 to your computer and use it in GitHub Desktop.

Select an option

Save wolfeidau/3561480 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Bootstrap script for installing chef on smartos in a ZONE.
#
# NOTE: This is a nondeterministic method of installing chef and should be used for dev / test systems.
#
if [ ! -f /opt/local/bin/chef-solo ]; then
if [ -e /tmp/rubygems ]; then
rm -rf /tmp/rubygems
fi
mkdir /tmp/rubygems
cd /tmp/rubygems
pkgin install ruby193 scmgit-base scmgit-docs gmake ruby193-yajl-1.1.0
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
tar -xzf rubygems-1.8.24.tgz
cd rubygems-1.8.24
ruby setup.rb --no-format-executable
gem install --no-ri --no-rdoc chef
else
echo 'Chef solo is already installed.'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment