Using Capistrano's disable_web on Site5

Posted by theBlatherskite Mon, 16 Apr 2007 05:16:00 GMT

I’ve been playing around with capistrano lately, and I think I’ve fallen in love. It was merely a convenience until that ill-fated deployment – that moment when, with panicked error messages scrolling across my screen and equally panicked (if less verbose) thoughts filling my head, a decisive cap rollback restored the calm.

Most recently, however, I discovered the cap disable_web and cap enable_web commands. These let you, with one command, push a helpful static ‘maintenance’ page out to the users while you do, well, maintenance. With a little customization, the page can be downright professional (at least, I like to think my implementation of it was).

Read more...

Posted in ,  | Tags , , ,  | 3 comments

Setting environment for script/runner

Posted by theBlatherskite Wed, 04 Apr 2007 00:16:00 GMT

Looking for a way to set the rails environment for your script/runner cron jobs? I wasn’t, until yesterday at 6:30 PM when I updated my rails gem. Suddenly

/script/runnner -e production System.some_method

(which had been working fine) started throwing errors, which meant I had to endure cron yelling at me periodically until I found a fix. It was surprisingly difficult to locate information about such a simple issue, but I finally came across somebody with the info I needed.

The new, functioning form:

RAILS_ENV=production ./script/runner System.some_method

As a side note, is also works for setting the environment in script/console and, presumably, wherever else you’d need it.

Posted in ,  | Tags , , ,  | no comments

Pounding Mongrel Light(tpd)ly

Posted by theBlatherskite Mon, 20 Nov 2006 22:27:00 GMT

As witnessed by my recent(ish) articles on installing and optimizing FreeBSD, I’ve been spending my spare bits of time developing a production server for our internal environment. There’s been quite a push within the rails community away from Apache+FCGI, and when it came time to look at the server application I decided to jump in and see what other options are out there.

My eventual deployment decisions: lighttpd to serve static files, a mongrel cluster taking care of business on the rails side, and the pound load-balancer sitting up front managing customer service (and, for bonus points, reverse-proxing to allow the mongrels to serve content over https).

Note that this is by no means the only possible choice. A little research into what other rubyists have been doing reveals a number of other options that would also be worth exploring (for example, Coda Hale and Jonathan Weiss seem to prefer apache feeding the mongrel pack).

Read more...

Posted in ,  | Tags , , , ,  | 2 comments | no trackbacks

Typo 4.0.1 Installation on Site5

Posted by theBlatherskite Thu, 10 Aug 2006 07:39:00 GMT

Hello, world! In celebration of finally getting Typo installed on the Site5 servers, my first post will be a guide to others attempting the same process. Since this is such a basic subject, I'll assume very little knowledge on your part -- if it's insultingly little, you might wanna skip this one and find another posting. [Note: this walkthrough is specific to websites hosted by Site5. If you're trying to install Typo elsewhere, Dev411 may be a good place to start] Read more...

Posted in  | Tags , , ,  | no comments | no trackbacks