I think I’m in love with Capistrano. Not the sort of whimsical, existential love that you read about in poems or hear about in pop songs and is so weak and flippant that it diminishes rapidly over time. No, I’m talking about a real, hard, meaty love that oozes from the very fiber of your being. It’s the sort of love that a mother feels for her children or a lumberjack feels for his axe. Yes, Capistrano is my perfectly crafted tool and I love it so.
It’s not an altruistic love either but rather a selfish one, deeply rooted entirely in what Capistrano can do for me and how it can make my working life better. And oh my, how well it does that. No more needing to spend four hours putting live large updates to web sites. No more accidentally breaking sites by forgetting a file. No more sweaty palms and nervous laughter as files and databases are manually copied. No more screams of agony as you discover a previous updated was neglected from being input into version control.
For those of you that are unfamiliar with it, Capistrano is a tool for deploying web applications directly from source control to servers. It works with a variety of platforms but Ruby on Rails and GitHub are best. You set it up, you configure it, you develop locally, you use a single command to deploy straight from Git to a server. Hook up your RoR DB migrations and your laughing all the way to Happy Land.
Want to test out performance or show a client your work on a staging server? Cap staging deploy. Want to go live? Cap production deploy. Oh oh, made a mistake? Cap production deploy:rollback. Want to deploy a specific revision from three months ago onto the production server so you can test something or just because you feel like it? Cap -S revision=3f30b6de3c55a8347e5f3de3b43193591e6c7322 staging deploy.
God it’s beautiful.
I believe in human error. I don’t believe that elaborate manual processes work. People are lazy, people are forgetful, people have bad days and shouldn’t be relied upon. We live in a world where process that are complex and confusing can be automated and web deployment is no exception. It’s a potentially complicated and dangerous process yet one that can – and should be – be banished to nothing more than a footnote task, an afterthought, a final, minor step at the end of a long and exciting creation process. It shouldn’t be painful and it shouldn’t create problems. Ever.
So use Capistrano and change your workflow for the better. You won’t regret it.