Created
October 14, 2011 14:24
-
-
Save inz/1287257 to your computer and use it in GitHub Desktop.
Gitorious Installation using chef-solo
This file contains hidden or 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 | |
# | |
# Install gitorious using chef-solo | |
set -e | |
echo "Updating package cache..." | |
apt-get -qq update | |
echo "Setting gem command defaults.." | |
echo "gem: --no-rdoc --no-ri" > /etc/gemrc | |
echo "Installing required packages..." | |
apt-get -yqq install ruby ruby-dev libruby build-essential ssl-cert \ | |
libopenssl-ruby libxslt1-dev | |
apt-get -yqq install \ | |
git$($(apt-cache show git|grep git &>/dev/null) || echo "-core") | |
echo "Installing rubygems..." | |
cd /tmp | |
wget -q http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz | |
tar zxf rubygems-1.4.2.tgz | |
ruby rubygems-1.4.2/setup.rb --no-format-executable >/dev/null | |
echo "Installing chef..." | |
gem install chef >/dev/null | |
echo "Preparing chef configuration..." | |
mkdir -p /etc/chef /root/chef-solo | |
wget -q -O /etc/chef/solo.rb https://gist.github.com/raw/847256/00429fd14daf0040bc7ea0cdf9ffd0fb06e8434e/chef-gitorious-etc-solo.rb | |
wget -q -O /root/chef-solo/node.json https://gist.github.com/raw/847256/620872e21f66f02feb764399be40c408183cd1fd/chef-gitorious-node-debian.json | |
echo "Getting cookbooks..." | |
cd /root/chef-solo && rm -rf cookbooks | |
git clone -q git://github.com/inz/gitorious-cookbooks.git cookbooks | |
editor node.json | |
echo "Installing gitorious..." | |
chef-solo | |
echo "Installation completed successfully." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see https://github.com/inz/gitorious-cookbooks