Server Stories

Got a whole bunch of work done on my new box this evening.  Still lots to do, but well on my way.  Pluggable on-box backups for MySQL, pluggable S3 backups for arbitrary files, a WordPress MU skeleton, a few Tomcats, base HTTPD config, even a ColdFusion instance.  Unfortunately, the majority of my stuff runs on either or, which means moving those domains is an all-or-nothing arrangement.  It'll be a while before those move, but I did move one site (a nearly codeless Magnolia-managed site) over to the new box, so it's not a complete deadweight.

The WordPress stuff is going to be the biggest mess, I think.  I've been running a home-grown multiblogging app based on WordPress for the past several years and I'm doing away with it.  It's built with Ant and while you treat it as a single copy of the code, in reality you end up with a separate WordPress installation for each blog (with appropriate customizations, themes, etc.).  It gets the job done, but it's rather of cumbersome in various ways (no shared users, can't serve from a working copy, complex directory structure, etc.), so I'm going to bite the bullet and "upgrade" to MU.  Should make my life enormously easier in the long run, but in the short term I'm going to have to do some pretty invasive surgery to some plugins I cut corners on when I wrote them originally.  Also going to have to figure out how to migrate all the data into the slightly different MU schema.

Second to that will be Pic of the Day, simply because it has so many moving pieces, but I've done a lot of organizational work on it over the past year so it'll be a lot easier now than it would have been last summer when I was considering migrating to a new box.  I was hoping to switch to Railo to get it in an isolated JVM, but there are some issues preventing that, both with Railo and my code.  I don't have the RAM to run multiple copies of ColdFusion, nor the money to buy more, so it'll stay on a shared instance for now.  Fortunately, despite the fact that it's constantly churning it's gears, most of it can be taken offline for a day or three with no user-visible effect.  The user-visible portion of the app is a very narrow slice of the whole picture.

Finally, I'm trying really hard to ditch JRun for Tomcat everywhere.  The JRun connector is truly amazing in how it lets you virtualize your webroot, so it's not easy.  However, now that I've got Apache 2.2, I can bring mod_proxy_ajp and mod_rewrite to bear and hopefully get equivalent functionality.  I'm willing to sacrifice little bit of filesystem cleanliness for having a single web container for all my sites, but not much.  Fortunately, that's something I should be able to continuously refine and optimize over time, even after stuff is live.

I'm hoping to be all moved over within the month.  Long time, I know, but there's a lot of stuff to do, and this is  a "free time" project.  With the inability to effectively test and migrate individual pieces, I have to be really careful and that always takes longer.  Wish me luck!

5 responses to “Server Stories”

  1. Greg L

    barneyb: Setting up multiple sites under one context is actually very easy to do, and no need for mod_proxy_ajp and mod_rewrite. I have documented (but not posted anywhere…not much of a blogger) step-by-step instructions for setting up Apache 2.2.x/Tomat 6.x/Railo 3.1.x in an environment that supports running multiple sites under a single instance of Railo. And you still get the server and application level admin pages. If you're interested, ping me and I can email them to you (documented in notepad!)

    I also keep all of my sites under a c:\websites dir, so they're not even located under tomcat. It's sweet!

  2. Jamie Krug

    Hey Barney, good stuff. I'm in the middle of just about the same kind of migration. I'm moving from a Windows/IIS/CF VPS ($189/mo) to a Linux/Apache/Railo VPS ($30/mo) — nice savings and likely better performance! I was initially looking at running JBoss behind Apache for Railo, just because, but I don't need it so I'll likely go with the lighter weight Tomcat as well. I like your mod_proxy_ajp/mod_rewrite ideas, which I caught on Sean Corfield's blog comments I believe, but it is still tricky to get that nice shared instance JRun style setup. I'm really curious to hear how you solve that one.

    I figured out a few tricks to control some directory locations for stuff generated by Railo, as well as sharing a Railo Server Admin, when deploying the Railo JARs on JBoss (or Tomcat), but it's a bit invasive in that it generates a lot of unwanted files and directories in every other JBoss EAR/WAR directory:

    I'm hoping Tomcat with simplify things slightly. Sean Corfield also mentioned that he would blog about this type of configuration with Tomcat soon. I'll procrastinate slightly longer, in case one of you guys has something to share :) But I'll let you know if I get lucky and find a "eureka!" configuration.


  3. Gringa

    @barneyb: I would be interested in the documentation of your Railo setup. Could you post it here or forward?

  4. Gringa

    Correction: The last comment was meant for Greg L. BarneyB, if you have the documentation, I'm still interested. :-)

    @GregL: I would be interested in the documentation of your Railo setup. Could you post it here or forward?

  5. Jamie Krug

    @GregL: I too am interested in your docs on your Railo setup. I don't see a URL or e-mail address for you in your comment here, otherwise I'd e-mail you directly. You can contact me directly via –Thanks!