Skip to content

Instantly share code, notes, and snippets.

@sid137
Created March 14, 2010 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sid137/331679 to your computer and use it in GitHub Desktop.
Save sid137/331679 to your computer and use it in GitHub Desktop.
#!/bin/bash -x
#run installer with
# wget tiny.cc/chefconfig; bash -x install.sh role
# role is a json file that describes a roles or runlist to execute.
# download files to /tmp directory
export REPO=/tmp/chef-repo
# either run role supplied as argument, or test.json as default
role=${1:-test.json}
aptitude update -f -y
# Configure locale settings for english, UTF8
aptitude install locales -f -y
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && /usr/sbin/locale-gen
# install git from distribution repositories
aptitude install git-core -f -y
# Download CChef cookbooks and configuration recipes
rm -rf $REPO
git clone git://github.com/sid137/chef-repo.git $REPO
# Install core compilation files, ruby, rubygems, and chef
$REPO/scripts/aptitude-hold.sh
$REPO/scripts/install-core.sh
$REPO/scripts/install-ruby.sh
$REPO/scripts/install-rubygems.sh
$REPO/scripts/install-chef.sh
# Run server setup with chef-solo
cd $REPO/chef-solo/
./solo $role.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment