Highgroove Studios and Slingshot Hosting's Deployment Tools

The tools here are designed to help you setup, install, and maintain Ruby on Rails applications, quickly, and easily.

How To Use it

Grab the Slingshot Library (slingshot.rb) and put it in your lib directory:

cd /path/to/your/app/lib
curl -O http://svn.slingshothosting.com:8080/deployment/trunk/slingshot.rb 

Capistrano-ize your application:

cap -A /path/to/your/app

Copy down apache2_2_mongrel_deploy.rb over your config/deploy.rb:

curl -O http://svn.slingshothosting.com:8080/deployment/trunk/apache2_2_mongrel_deploy.rb
mv apache2_2_mongrel_deploy.rb /path/to/your/app/config/deploy.rb

Customize the file to your heart's content. The most important changes being:

set :application,     'sample'
set :server_name,     'daytona.slingshothosting.com'
set :server_ip,       '1.2.3.4'
set :server_fqdn,     server_name
set :server_hostname, 'daytona'

set :repository,      "http://svn.slingshothosting.com:8080/#{application}"
set :deploy_to,       "/var/www/rails/#{application}"

set :deploy_to, "/var/www/apps/#{application}"

You can now run the following commands to fully setup your Rails application.

To completely setup and install the full ruby/rails/apache/mongrel stack:

cap slingshot_setup

*WARNING: This task is somewhat destructive and installs a lot of stuff. Dry-run or look through it before running.

At this point, you'll most likely need to reboot, especially if there's a kernel update pulled down. (try: cap invoke ACTION="reboot" or something similar!)

setup the rails app:

cap setup 

This setup task can be run multiple times and will most likely be done as you configure/tweak your application.

setup the mysql dbs:

cap mysql_setup

grab the latest version of code

cap update_code

create current symlink

cap symlink

migrate prod db

cap migrate

Now you cold run some tests like populating development db, db:test:clone and rake tests to ensure all is well

cold deploy:

cap cold_deploy

restart apache to take new settings:

cap restart_web

Bask in the glory of the goodness of Slingshot Hosting.....

Contributors: Charles Brian Quinn <cbq [at| highgroove.com>
Derek Haynes <derek.haynes [at| highgroove.com>
Andre Lewis <andre.lewis [at| gmail.com>
Neil Wilson <neil [at| aldur.co.uk> for the Capistrano Gem plugin

Visit the old TracStartPage.