deploy-gitorious
deploy-gitorious copied to clipboard
Fabric deployment script for gitorious
Credits
Big thank you to Christian Johansen for such a great install walkthru. http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server
Gitorious Fabric Author
Ryan Phillips
License
Apache License
Tested On
- Ubuntu Server 10.04
- EC2 - Ubuntu 10.04 - http://alestic.com/
Install Fabric
virtualenv --distribute --no-site-packages env
pip install -E env -r requirements.txt
source env/bin/activate
Prerequisites
- An ssh key pushed to a server for a user
- The user on the server must have NOPASSWD: ALL set in the /etc/sudoers file to ignore the password prompt for sudo.
Setting up SITE_NAME and SITE_EMAIL
edit fabfile.py change the SITE_NAME to a reasonable FQDN. In addition, make sure to setup your email address in SITE_EMAIL.
Setup database.yml
The database.yml file needs to know your database password. The fab deploy
command will prompt you for a password. Make sure both of these passwords
match.
Run the deploy
fab -H hostname -u user deploy
Connecting to your running gitorious
1a. Setup DNS, or 1b. edit /etc/hosts and add the IP and FQDN to your hosts file 2. Browse to the FQDN
Email setup
Google for a howto on setting up email. Gitorious is setup to use a sendmail compatible server... Postfix works.
Setting up your first user
make sure email is setup first on your server ssh to the server cd /var/www/[SITE_NAME]/gitorious env RAILS_ENV=production ruby script/create_admin ENV RAILS_ENV=production script/console
user = User.first user.login = "username" # Change to your desired username user.activate user.accept_terms user.save