Provision and deploy to an Ubuntu/God/Apache/Passenger stack using Capistrano
Ruby
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 12 commits ahead, 14 commits behind winton:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
templates
.gitignore
MIT-LICENSE
README.markdown
Rakefile
changelog.markdown
ubistrano.gemspec

README.markdown

Ubistrano

Provision and deploy to an Ubuntu/God/Apache/Passenger stack using Capistrano.

Goals

  • Provision a solid Ubuntu Hardy application server in one command (cap ubuntu)
  • Deploy PHP, Rails, and Sinatra apps
  • Be descriptive about what is going on and allow the user to opt out
  • Simplify the deploy.rb file

The stack

  • Apache
  • Git
  • MySQL
  • MySQLTuner
  • Perl
  • PHP
  • Postfix (relay)
  • Ruby
  • RubyGems
  • Passenger (mod_rails)
  • God
  • Rails
  • Sinatra
  • Sphinx

Getting started

Install gem

gem install AppTower-ubistrano

Capify your project

capify .

Edit config/deploy.rb

set :ubistrano, {
  :application => :my_app,
  :platform    => :rails,  # :php, :rails, :sinatra
  :repository  => 'git@github.com:user/my-app.git',

  :ec2 => {
    :access_key => '',
    :secret_key => ''
  },

  :production => {
    :domains => [ 'myapp.com', 'www.myapp.com' ],
    :ssl     => [ 'myapp.com' ],
    :host    => '127.0.0.1'
  },

  :staging => {
    :domains => [ 'staging.myapp.com' ],
    :host    => '127.0.0.1'
  }
}

require 'ubistrano'

Ubistrano uses the same Capistrano options you've come to love, but provides defaults and a few extra options as well.

Feel free to add standard options like :user to the stage groups.

Set up your Ubuntu Hardy server

From your app directory

cap ubuntu

Example output

=================================================================================
Let's set up an Ubuntu server! (Tested with 8.04 LTS Hardy)

With each task, Ubistrano will describe what it is doing, and wait for a yes/no.

=================================================================================
Have you already created the user defined in deploy.rb? (y/n)

Deploy your app

All apps should have a public directory.

First deploy

cap deploy:first

Subsequent deploys

cap deploy

Deploy to staging

Use any capistrano task, but replace cap with cap staging.

Example

cap staging deploy:first