Capistrano 2.0: Flexible Automated Deployment System
The recently released version 2.0 expands its usefulness not just for Rails developers, but for general automation tasks as well. New features include:
- Namespaces. Tasks may be defined within namespaces, nested arbitrarily deep. No more worrying of task name collision.
- Deployment strategies. Besides Subversion checkout, you can now specify other deployment strategies: export, copy, tar/gzip, etc.
- Opt-in deployment tasks. Deployment tasks are now opt-in; you don't get them, unless you ask for them.
- Event framework. Define hooks into other libraries easily.
- capify script. Autogenerate a minimal Capfile, and not just for Rails.
- Scoped execution. Scope a single invocation to a specific host, set of hosts, or role.
gem install capistrano
Capify your app:
Several useful Capistrano-related resources: (most are written with Capistrano 1.x in mind, but the concepts still apply to 2.0)
- Deploy Any Project Using Capistrano 2
- Using Capistrano to Deploy Django Apps
(Proof of concept that you can use Capistrano 2 not just with Rails)
- Softies on Rails' Guide to Capistrano
- First Five Capistrano “Oh Crap! Oh No!” Tips
- Capistrano 2.0: Not Just for Rails
- Deploying with Capistrano to Amazon EC2
- Integrating Capistrano with Solaris SMF (Service Management Facility)
- Deploying with Capistrano on HostingRails.com
(a HostingRails-centric tutorial, but most of it may also apply to your web hosting provider)
- Using Command Line Parameters with Rake and Capistrano
- Capistrano Rubyforge Project
Jamis has written more information over at the official Rails blog.