Keeping track of versions between development and production buildoutsΒΆ

Tags: plone, buildout

At Zest software, we're always refining our buildout strategy. For stable buildouts, you need to make it easy to do the right thing. And you need some mechanisms in place to keep the complexity manageable. The reality is that there are quite a lot of eggs involved in a typical plone project.

Two blog posts that outline what we're doing now:

  • Splitting the buildout two ways about having stable/unstable.cfg for product configuration and devel/preview/production for server/instance configuration. Preview.cfg and production.cfg both extend stable.cfg; devel.cfg extends unstable.cfg. This keeps concerns separate.
  • My brother Maurits' entry on creating repeatable buildouts which was mostly about pinning eggs in versions and how to do that reliably.

I was bothered by the long list of pinned versions in our buildout's [versions] part. Which are versions we picked ourselves and which are "just" currently used versions? To make the difference easier to spot, all you have to do is to make a small subdivision with comments. A quick "diff" will tell you what the difference between development and production is when you do that. Note that we've also started to pin versions in development.

In the unstable/development configuration:

 [versions]
 # Pin versions that we want to pin to a specific version
 SQLAlchemy = 0.4.5
 plone.recipe.plone = 3.1.1
 # Not specifically pinned versions.
 # List compiled 2008-07-07 by Reinout.
 # Remove this list and run buildout with '-n', afterwards run:
 # bin/buildout -vvvvv |sed -ne 's/^Picked: //p' | sort | uniq
 Products.CMFSquidTool = 1.5
 Products.CacheSetup = 1.2
 Products.PageCacheManager = 1.2
 Products.PolicyHTTPCacheManager = 1.2
 .....

In the stable configuration:

 [versions]
 # Current version numbers of our own products
 ren.app = 0.8
 ren.model = 0.8
 ren.theme = 0.8
 # Copied from the current unstable.cfg: specific pins.
 SQLAlchemy = 0.4.5
 plone.recipe.plone = 3.1.1
 # Copied from unstable.cfg: buildout-generated list.
 Products.CMFSquidTool = 1.5
 Products.CacheSetup = 1.2
 Products.PageCacheManager = 1.2
 Products.PolicyHTTPCacheManager = 1.2
 ...

This way, it is easy to spot what has to be copied where and which items you have to update yourself. In case you develop with the latest versions and only want to pin it in production, unstable/development would be just:

 [versions]
 # Pin versions that we want to pin to a specific version
 SQLAlchemy = 0.4.5
 plone.recipe.plone = 3.1.1

and stable/production:

 [versions]
 # Current version numbers of our own products
 ren.app = 0.8
 ren.model = 0.8
 ren.theme = 0.8
 # Copied from the current unstable.cfg: specific pins.
 SQLAlchemy = 0.4.5
 plone.recipe.plone = 3.1.1
 # Not specifically pinned versions.
 # Generate pin list by running the following command in development:
 # bin/buildout -vvvvv |sed -ne 's/^Picked: //p' | sort | uniq
 Products.CMFSquidTool = 1.5
 Products.CacheSetup = 1.2
 Products.PageCacheManager = 1.2
 Products.PolicyHTTPCacheManager = 1.2
 .....

I hope this gives some ideas to adapt it to your own situation!

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):