Last active
December 13, 2015 22:28
-
-
Save jedi4ever/4984336 to your computer and use it in GitHub Desktop.
Example chef install script - veewee
This file contains 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
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 |
This file contains 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
$ 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