7.2 Automated application deployment

Automated application deployment is a simple solution to all of these problems. With a tool like Capistrano http://manuals.rubyonrails.com/read/book/17 you can write a simple deployment script that will log into the server(s), check out the latest (or specified), version of your code, make backups of each deployment for emergency rollbacks, and restart your server or execute any other commands you need it to (tests for example). If updating the site fails it will automatically go back to the last version. The short amount of time you'll spend writing the deployment script will pay for itself in spades by giving you confidence that all of the rules mentioned above have been addressed and by making it all happen with one reliable command.

As of this writing Capistrano seems to be the leader in the field of webapp deployment tools. But all of the docs on it are currently Rails specific, even though you could use it for deploying anything remotely. Rails developers should definitely be using it. Everyone else should either spend the time to translate the Railsisms in it's docs to something aprropriate or be ransacking it for ideas to make a new build system.

When considering using, or building, an automated deployment system you should keep a few things in mind:

K. Rhodes 2007-05-18