Setting up a Buildout version of Plone 2.5.5
A quick guide to doing a Plone 2.5.5 instance with buildout. Who knows, this may be useful.
The reason I needed a buildout version of Plone 2.5.5 was to run quintagroup.transmogrifier - so that I could have more flexibility in migrating content or sections of content from Plone 2.5 to Plone 3. The instructions below are based on Mac and Ubuntu installations.
The quintagroup.transmogrifier instructions are here:
http://projects.quintagroup.com/products/wiki/quintagroup.transmogrifier
but getting to the point where you can actually start Zope and Plone is actually a little more complicated than indicated here.
Python 2.4
On Ubuntu it is easy enough to install Python 2.4 alongside your system Python - I got a python2.4 executable alongside the standard python executable in /usr/bin.
Somewhere along the line, you will need the python development headers so search for the 2.4 versions of those as well and install them at the same time. If you don't it all goes horribly wrong further down the line without telling you why.
I had a go at creating a Virtual Environment on Ubuntu, but the next section got so horribly fraught that I gave up and just used the Python 2.4 I had installed.
There are instructions somewhere on the web for installing Python 2.4 on your Mac - you have to use MacPorts or something. Again, I've never been particularly comfortable with this, so I thought I'd cheat. If you use the Plone Universal Installer of an early version of Plone 3, you get a version of Python 2.4 for free, and you can just stick an additional Plone 2.5 instance alongside any Plone 3 instances you have. Who knows if it trashes anything, so I wouldn't try it on anything precious.
Easy-Install, Setup Tools and ZopeSkel (a.k.a paster)
I found that you needed the very latest versions of setup tools and ZopeSkel. This is because bootstrap and buildout break without an up-to-date version of setup tools (which is really now a thing called distribute in disguise), and you need the latest plone2.5-buildout template from the latest ZopeSkel. You can do this with easy_install, so you need to check in bin to see whether you've got that. If not, google easy_install for the installation instructions and make sure you run it with the right version of Python (i.e. python2.4 on Ubuntu, on the python in [Plone 3 installation directory]/Python-2.4/bin/python on your Mac).
On Ubuntu I needed to do
- easy_install2.4 -U setuptools
- easy_install2.4 -U zopeskel
On my Mac
cd to your Plone3 installation directory then
- Python-2.4/bin/easy_install -U setuptools
- Python-2.4/bin/easy_install -U zopeskel
After that you should find zopeskel in bin as well. If you only see paster, then its probable you haven't got the latest version of zopeskel. It's the -U that gets the latest version.
Creating a 2.5 buildout
Well the next counter-intuitive thing is that you've probably read loads of documentation about paster commands and in fact paster is now called zopeskel. Actually zopeskel is a wrapper around paster to make it easier (but it's only easier if you read the documentation).
So running
- either zopeskel (on Ubuntu)
- or Python-2.4/bin/zopeskel (on Mac)
will give you all the templates you need.
- cd to the directory where you want to make your instance and run
- zopeskel plone25_buildout
next cd into the instance you've just created and run bootstrap.py. On a Mac, assuming you put your instance in your Plone 3 installation directory, alongside your Python directory, you'd do
- cd [my instance]
- ../Python-2.4/bin/python bootstrap.py
It's slightly easier on Ubuntu, just remember to run python2.4
Note that the resulting buildout.cfg ought to have this entry in it:
[versions]
# Version pins for new style products go here
plone.recipe.zope2instance = 3.6
If it doesn't then your zopeskel isn't up-to-date.
Running Buildout
It isn't over yet... I'm not sure if this is a distinct issue for quintagroup.transmogrifier requirements (which needs a more recent version of Marshall) or more general. However, you'll need to tweak your buildout to get it to run successfully.
Under productdistros in the buildout file.
First get Five 1.4 in your productdistros:
[productdistros]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/plone.recipe.distros
recipe = plone.recipe.distros
urls = http://codespeak.net/z3/five/release/Five-1.4.4.tgz
nested-packages =
version-suffix-packages =
Then add this:
[commands]
recipe = plone.recipe.command
command = cp ${productdistros:location}/Five/skel/site.zcml ${instance:location}/etc
Note, if you've had a sneaky go at running buildout already, before you got to this bit, you might actually need to delete the site.zcml file in ${instance:location}/etc for this to work. There's an explanation for why you need to do this here (I think, but it's in Portuguese):
http://python-blog.blogspot.com/2009/04/como-explodir-seu-buildout-com-plone-25.html
Anyway, once you get to this point the path is hopefully clear to follow the quintagroup.transmogrifier instructions to configure your buildout to install the required products for that. And the nice thing is that that actually works :-) so you can export your Plone 2.5 site content and import it to Plone 3
.
