Deployment with Capistrano
This session will show you how to automate the deployment process in a few easy steps using Capistrano.
Capistrano is a ruby gem and has been the defacto deployment for Ruby on Rails applications for a number of years. It provides a deployment toolset using 'convention over configuration' with a number of features:
- Automatic ssh into remote servers using public keys
- Deploy by pulling the source from a git or svn repo
- Keep an unlimited number of previous releases to allow rollbacks
- Create symlinks to persistent assets across releases (images files etc).
- Run migration scripts etc
Capistrano can be easily extended to provide custom behaviour. We have used this to create our own gem that helps us with some Drupal-specific features, such as running Drush commands to:
- Automatically backup the database before deploying
- Run update.php
- Clear caches