Been hearing a lot about Capistrano over the last year and a bit. From their site: "It is designed with repeatability in mind, letting you easily and reliably automate tasks that used to require login after login and a small army of custom shell scripts."
It sounds kinda appealing, and there's a good bit of interest around it, so last night I set it up and played with it a little bit. The niftiest feature is definitely "cap shell": it'll connect to all my servers and I can run commands on all my servers in parallel. Which is pretty cool ... but now I'm trying to come up with use cases for it.
1) Deployment. That seems to be the main reason why anyone would use Capistrano, and I can see the appeal there. Unfortunately we've more or less nailed down the mechanics of deployment, so while it can help fine-tune some of our setup, it really won't make a huge impact. (The best thing about our deployment scripts is the ability to rate-control the deployment, so I can say "restart services on 5 webs at a time". And as soon as one finishes, the next one will start, all the way until we're done. Doesn't look like Capistrano has that feature, unfortunately.)
2) Configuration management. Beyond the deployment recipes, I've seen a lot of recipes that relate to server setup, configuration management, etc. But I'd rather use a real configuration management system for that, like cfengine or puppet or chef. They make sure that any changes I specify are applied to the server no matter what; even if the server was down when I initially made that change, or if the server is newly-provisioned, etc. Capistrano forces you into being conscious of those changes, or else you'll forget to apply them to a server before you put it back into rotation.
So the two main use cases for Capistrano seem to be things that we don't have problems with or that we've solved in (IMO) a more robust way. Which leaves me looking for other uses, and the only other one I've found so far has been:
3) Log watching. Tailing or grepping logs on all your servers from the cap shell, doing distributed log watching. Kinda interesting but we already have centralized logs, which eliminates much of any need to watch the logs on individual hosts (unless we're actually specifically examining that individual host). So even that use case isn't applicable in our environment.
So I'm stuck. It seems like a really useful tool ... but I'm hard-pressed to see how it'd be helpful in our environment. Admittedly I've only been thinking about this problem for the last 18 hours (12 of which were spent sleeping), so maybe I'll have some revelations over the next few days. And in the meantime I'll keep reading up and maybe I'll find some clever tricks that someone's come up with.
Comments