Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Last active December 13, 2015 22:28
Show Gist options
  • Save jedi4ever/4984336 to your computer and use it in GitHub Desktop.
Save jedi4ever/4984336 to your computer and use it in GitHub Desktop.
Example chef install script - veewee
if [ -f .veewee_params ]
then
. .veewee_params
fi
if [ -z "$CHEF_INSTALLMETHOD" ]; then
export CHEF_INSTALLMETHOD="gems"
fi
# Installing chef
case $CHEF_INSTALLMETHOD in
"gems")
# Using gems
if [ -z "$CHEF_VERSION" ]; then
# Default to latest
gem install chef --no-ri --no-rdoc
else
gem install chef --no-ri --no-rdoc --version $CHEF_VERSION
fi
;;
"omnibus")
if [ -z "$CHEF_VERSION" ]; then
# Default to latest
wget -O - http://opscode.com/chef/install.sh | sudo bash -s
else
wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION
fi
*)
echo "not supported method for installing chef"
exit -1
;;
esac
$ export VEEWEE_CHEF_INSTALLMETHOD=omnibus
$ export VEEWEE_CHEF_VERSION=10.24.0
$ veewee vbox build ubuntu12
this creates a .veewee_params in $HOME
example:
export CHEF_INSTALLMETHOD='omnibus'
export CHEF_VERSION='10.24.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment