I’ve always been interested in software deployment. The part of the process that’s not really writing code, and you don’t really want to think about it but it has to get done… over and over. Sometimes it’s a real pain, and over the years I’ve seen and lived across the spectrum of deployment systems. Big hulking behemoths to frail collections of scp scripts.
Amazon definitely wins for the most engineered and weighty solutions. I didn’t spend an awful lot of time using it during my time there, but I will say this… when it works, it works. When it doesn’t, it hurts. Being my first look at a real deployment system, I have a special place for it in my programming heart. It’s got it’s flaws, but at the end of the day I often come back to it as my basis for comparison.
I recently got a Capistrano deploy to work for a small rails install I’ve been toying with. It took a while to tweak configs and settings here and there, but overall I enjoyed the flow and feeling of it all. Although, I may have config’d myself into a corner to taylor my install to the host that I’m using. I feel like there’s some more that I could do, given a better understanding and some doc reading. (In fact, I just did a quick search and deployed to my brain the docs about deploying to different stages.) Overall I was happy how easy it was to get started; an enjoyable experience but I don’t know if I’ll have too much to do with it in the future.
In the java world, I’m really liking the looks of SmartFrog. I haven’t had a real chance to get down and dirty with it yet. The learning curve feels a bit steep (maybe that’s just me), but it seems to be full featured and ‘abundantly engineered’ (aka complicated). There’s some cool points for being able to launch a VM, deploy software to it, run tests, and tear down the VM automatically. There’s also some other neat components: EC2 deploys, hadoop integration, an XMPP server (for intermachine communication as well as telling you your toast deploy is done), The problem is that it comes with having to learn a component description language to get it to do anything useful.
What makes a good deployment system to me? Here are a few thoughts off the top of my head:
- Point and shoot – as agonistic of the target machine as possible. I want to think as little as possible during the deployment process. Whether that’s order of operations, which packages go to what hosts, what side effects the deploy will have, etc. I also want to have the ability to easily and arbitrarily set and change what hosts get what packages. The quick provisioning of a spare development machine to serve as a test, for instance. A nice interface, whether web or command-line goes a long way.
- Idempotent (with easy clean-up). When I click deploy, I want to know that any running processes are nicely cleaned up, files aren’t left scattered about the target host, and then the next time I click deploy the process is just as smooth as the first time. The first time anyone uses the deployment system it’s usually to install “TestPackage123″ somewhere, multiple times, just to see it work. I shouldn’t need to feel nervous by sending out a deploy and wondering if the right magic incantation was or was not used. Rollbacks and removing deployed packages should be as quick and easy as getting them there in the first place. I’ve had development machines collect stale versions of software because it wasn’t immediately intuitive (or sometime possible) to undeploy short of rm -rf.
- State of the Union. There’s some level of reporting that is useful. Knowing what versions of what packages are on what machines at a glance is helpful. Questions that get asked like “Is staging up to date??” ”Which server is running X?” ”Who deployed Y to Z?” can and should be answered by a machine. Save human beings for the hard questions like.. ”Who’s bright idea was it to put the master db, search server, website, and batch processing system on the same machine?”
Certainly not an exhaustive list, or a very revolutionary one at that. Common sense really, but sometimes that is left at the door when it comes to deployments. My questions for you, the reader, are: What nice features have you seen in software deployment? What feature has been missing from your life? What other deployment systems are out there and deserve credit for being good or notoriously bad?
Someday I’ll get around to writing a followup part 2 to this deployment rant (with a little more meat on the bones perhaps), and maybe even before 2010 is over and done with. And with that, I end this post. Remember to be excellent to each other and party on dudes.
Edit: I can’t believe I forgot the coolest deployment story I’ve read: Continuous Deployment! Look for more about it in part 2!