Setting Up A Zope Mount With Buildout
I've been working this afternoon to update our plone offering and I've got to say that I love the buildout system. I can how you could combine it with something like puppet for some very funky foo.
Anyway, one of things I needed to do today was build a second mountpoint.
For those of you who don't know, Plone is slightly different to most other Content Management Systems. It's built on top of the Zope Application Server and Zope has it's DB format. This means that everything in an instance is held as an object within the one file (most routinely called the Data.fs). This Data.fs file is "mounted" at the Zope Internal / point and is where all of the system information as well as the site itself is held.
You can create as many mountpoints (and as many [blah].fs files) as you like, which I'm finding quite handy in dealing with backups and seperation of client data.
In the old system it was quite easy to setup a new mountpoint, just edit the zope.conf file and restart the system. However the new buildout system means that you shouldn't be touching the final zope.conf at all. Instead all of your config foo goes into the buildout.cfg and it's supplementals. So I've had to hunt down how to setup new mount for a default zeo (plone_hosting) buildout. Anyway, after a bit of hunting around I found the right magic.
The following is a very basic snippet. It doesn't go into the detailed work you can do with the mounts but it should demonstrate the basic idea.
If you're using as I am, the plone_hosting paster recipe then in your base.cfg find the instance1 section. At the very end of that paste the following in (making changes where necessary)
zodb-cache-size = 4000
zeo-client-cache-size = 100MB
zope-conf-additional =
<zodb_db [NEWMOUNTNAME]>
mount-point /[NEWMOUNTNAME]
<filestorage 2>
path [PATHTOPLONEINSTANCE]/var/filestorage/NEWMOUNTNAME].fs
</filestorage>
</zodb_db>
Pretty simple when it comes down to it. Also remember, no spaces or special characters, just clutters things up.










Comments
Buildout recipe
There is also a recipe that can help you set up mount points:
http://pypi.python.org/pypi/collective.recipe.filestorage