Created
June 13, 2012 20:15
-
-
Save atomic-penguin/2926248 to your computer and use it in GitHub Desktop.
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
#!/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