About "Capistrano: Automating Application Deployment"
Warning: Portions of this book may remain relevant, but almost all of it is obsolete and should not be used as a reference for versions of Capistrano after about 1.3. It will no longer be maintained: please refer to the Capistrano web site instead, at http://www.capify.org.
Application deployment is one of those things that becomes more and more complicated as the scale of your application increases. With just a single box running your database and your application, it’s quite simple. But when you start putting your database on a different server, and then separating your web servers from your app servers, and eventually splitting your database into master and slave servers… It can get to where you almost don’t want to deploy your application any more.
Capistrano is a standalone utility that can also integrate nicely with Rails. You simply provide Capistrano with a deployment “recipe” that describes your various servers and their roles, and voila! You magically have single-command deployment. It even allows you to roll a bad version out of production and revert back to the previous release.
It should be stated that the concepts that Capistrano uses and encourages are not specific to Rails, or even Ruby. They are common-sense practices that are applicable to a variety of environments. In fact, you’ll find that there is very little that is Rails-specific about Capistrano, aside from the fact that it is in Rails that it found its genesis. No matter where you are or what environment you are using, Capistrano can probably help ease your deployment pains.
Of course, we hope you’re using Ruby on Rails…
Contents
- Introduction
- Quick Start
- Getting started
- Installing Capistrano
- Deployment Recipe
- Setup
- Apache Configuration
- Deploying
- Rolling back a release
- A More Complicated Example
- Recipes
- Standard Tasks
- Overview
- cleanup
- cold_deploy
- deploy
- diff_from_last_deploy
- disable_web
- enable_web
- invoke
- migrate
- restart
- rollback
- rollback_code
- setup
- show_tasks
- spinner
- symlink
- update_code
- Creating Tasks
- Extending Capistrano