Skip to content

Instantly share code, notes, and snippets.

@atomic-penguin
Created June 13, 2012 20:15
Show Gist options
  • Save atomic-penguin/2926248 to your computer and use it in GitHub Desktop.
Save atomic-penguin/2926248 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ ! -x /usr/bin/chef-solo ]; then
echo "ERROR: chef-solo not found"
echo "Try the chef-full package, http://opscode.com/chef/install"
exit 1
fi
BOOTSTRAP_TARBALL="http://osl.marshall.edu/chef/gitlab-bootstrap.tar.gz"
# Create chef-solo log and cookbook cache directory
echo "Creating chef-solo log and cookbook cache directory"
mkdir ~/solo ~/cookbooks
# Create chef-solo configuration file
echo "Creating chef-solo configuration file"
cat <<EOF1>chef-solo.rb
file_cache_path "#{ENV['HOME']}/solo"
cookbook_path ["#{ENV['HOME']}/cookbooks"]
EOF1
# Create chef-solo gitlab configuration file
echo "Creating chef-solo gitlab run file"
cat <<EOF2>gitlab.json
{ "run_list": ["recipe[gitlab]"] }
EOF2
# Begin chef-solo run against remote bootstrap package
echo "Beginning chef-solo run against remote bootstrap package"
/usr/bin/chef-solo -c chef-solo.rb -j gitlab.json -r $BOOTSTRAP_TARBALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment