Move a Plone site to zc.buildout

14 June 2008 10:56

I've been foolish enough to say I'll do some maintenance work on a site I created a while back. Since deployment is, as ever, a nightmare, and some impressive work has been done to use zc.buildout with Plone, I decided to try it.

In the end, it wasn't too bad. After copying the ZODB from the existing tarball-based site, I got some errors because the products were not found at Product.ProductName...., so the ZODB unpickling failed. I fixed this by moving the products from parts/productdistros to products. Unfortunately plone.recipe.distros has no option for putting things there directly.

[buildout]
parts = plone zope2 zmysqlda patch_zmysqlda productdistros instance
eggs = elementtree
develop =

[plone]
recipe = plone.recipe.plone

[zope2]
recipe = plone.recipe.zope2install
url = ${plone:zope2-url}

[zmysqlda]
recipe = cns.recipe.zmysqlda
target = ${buildout:directory}/products

[patch_zmysqlda]
recipe = plone.recipe.command
command = patch --quiet -p1 -d ${buildout:directory}/products/ZMySQLDA < patches/zmysqlda-imagefile.patch

[productdistros]
recipe = plone.recipe.distros
urls =
    http://plone.org/products/sqlpasplugin/releases/1.0/SQLPASPlugin-1.0.tar.gz
    http://plone.org/products/cachefu/releases/1.1.1/CacheFu-1.1.1.tgz
nested-packages =
    CacheFu-1.1.1.tgz

[instance]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = admin:admin
http-port = 8080
debug-mode = on
verbose-security = on
eggs =
    ${buildout:eggs}
    ${plone:eggs}
    Products.Ploneboard
    MySQL-Python
zcml =

products =
    ${plone:products}
    ${buildout:directory}/products

Leave a comment