www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

Frankinstall Tweaking Ruby Mongrels

with one comment

What a fun few days! I repor­ted earlier I was in the midst of Ruby on Rails. The small pro­ject is com­ing along fine. Even though I could quickly build in Python or PHP, its time to learn and immerse myself in a new lan­guage — and more import­antly, a new platform.

This plat­form is more than just code: it is also the con­cepts of ver­sion man­age­ment, agile devel­op­ment, fast deploy­ment and easy roll back.

So the configuration:

Debian-sarge: from a new base install. Added to this is sub­ver­sion for ver­sion man­age­ment, post­gr­esql for data­base stor­age. Tweaks are required to get this part work­ing and ready for Ruby on Rails.

As Debian has a strict policy for “stable” pack­ages that can be installed into their stable OS, you have to munge /etc/apt/sources.list to point to serv­ers con­tain­ing “test­ing” or “unstable” pack­ages. This causes heartache as there are all sorts of bits-and-pieces on these serv­ers that may con­flict. So frankin­stall time.

What is “frankin­stall”. I am sure the lin­guistic source is from “franken­stall” or “franken­stein”. Basic­ally, you down­load the sources, ./configure && make && make install your­self. The res­ult is a half-package man­aged deploy­ment, half source com­piled and installed — leav­ing the admin­is­trator to mas­ter the sys­tem. Thank­fully, 18 years of Unix means that this seems the best, anyway.

Then comes the myriad of con­fig­ur­a­tion files:

As I planned to deploy behind Mon­grel and Apache; I had to upgrade to Apache 2.2 (to get proxy_balancer), Ruby 1.8.5 (to get the latest Mon­grel 0.3.13.4 with Mongrel_cluster 0.2.1) and Cap­istrano for remote deploy­ment. Apart from the source, the best resource for all this text file tweak­ing is at Coda Hale’s site, with some extra double-cross check­ing from Rimuhosting’s wiki.

As I have split our Debian server’s IP into dif­fer­ent parts for secur­ity, some extra work was required on the application’s deploy­ment under Apache (essen­tially, get­ting Vir­tu­al­Hosts cor­rect) and ensur­ing that the /log/ dir­ect­ory was cor­rectly linked to the cur­rent release in the applic­a­tion deployment.

In the end, our Debian server now is a source-code repos­it­ory and applic­a­tion deploy­ment plat­form — with a mongrel_cluster for mul­tiple users behind safe and secure Apache.

So why do all this?

Today Liam is using Gary’s Mod to build a cus­tom envir­on­ment in Half Life 2. Dif­fer­ent gen­er­a­tion, dif­fer­ent tweak­ing I guess.

Written by Nick Hodge

December 23rd, 2006 at 1:35 pm