
When it comes to managing co.mments, simple is definitely better. Four things I worry about:
- Deploying new code.
- Monitoring the service.
- Database backup.
- Other odd tasks.
Capistrano takes care of deployment. I run the test cases, push new code to SVN, and reload it on the server with a simple rake deploy. If you’re not using Capistrano, you’re working too hard.
For monitoring, I use Nagios. It’s a pain to configure initially, but once you get it running, it’s bullet proof. Special thanks to Barry for helping me set it up (and so many other admin tips).
Database backup is same replicate and upload to separate server.
Which brings me to odd tasks. There’s quite a few of these. Retrieving logs, cleaning up sessions, monitoring vital statistics, restarting stuck background processes. They’re all easy to do with Ruby, in fact Ruby is a wonderful scripting language with a lot of one-line solutions to common problems.
There’s two options for running these odd tasks. Using SSH to execute commands remotely, which works great from any machine. And using rake remote:exec (Capistrano), which essentially does the same thing but with better packaging.
And now we have Heartbeat.
Developed for Rails Day 2006 by the Highgroove Studios team, Heartbeat is Nagios meet Capistrano remote:exec, managed from a friendly Web UI. It’s a breeze to setup, intuitive to use, and … who said management tools can’t be sexy and fun?
And it’s running rake on the server, so besides test cases and migrations, you can write as complex tasks as you want to and plug directly to your Rails app.
Best thing, you can use it from the Highgroove Heartbeat server. Or you can grab it fresh from SVN and run it on your server. It’s open service and open source.
Here’s Derek Haynes’s announcement post. Check out what they’re doing at Highgroove, I’m sensing a lot of good stuff coming up.