Monday, April 16, 2007


How annoying is it to deploy an application? How prone to errors due to the sheer repetitiveness of the common deployment? Buildouts to the rescue! What is a buildout? It's a automated set of steps for creating a deployment environment. This could mean one little application, or it could be several and they would setup to talk to each other. zc.buildout came out sometime last year and I've had my eye on it since then. I'd wanted to do Jim Fulton's tutorial on it at Pycon this year but wasn't able to schedule it in! I've had the opportunity in the last couple weeks to start using a bit more and I really appreciate the conceptual basis for this framework. The idea that a deployment consists of parts is something you can explain to anyone, for example. A web app needs a webserver, some kind of storage backend, the application code and some preexisting data: parts=apache mysql application-data application or full Zope-based solution: parts=apache zope zeo plone mywebsite mywebsite-data What I've noticed so far is that for a particular application even though someone might have already wrote a recipe for it actually getting it configured the way you want usually requires extending that recipe slightly. If the recipe was written with this in mind its easy enough to extend. I did have a bit of problems extending some of the plone.recipe.* recipes because they were old style classes and so I couldn't use super() to extend the default behaviour. Easy to fix though!

ZOPE / ZEO buildout recipe with multiple database support

I created a branch that adds the ability to configure multiple databases in your configuration files which I needed for a project, so this should be a fairly decent example for anyone else needed to something similar. See the jbb666-multiple-dbs branch for zeo instance and the corresponding branch for the zope recipe. For a lot of the Zope recipes the config knobs that need to be exposed will be determined and you won't need to touch the underlying recipe except in well exceptional circumstances.

No comments: