Migrating to Plone 3
The much anticipated Plone 3 was released earlier this year, which means migration to Plone 3 needs top happen. As with earlier releases of the platform the urge to immediately upgrade is a powerful thing to resist. Having learned from my last upgrade – where I did it when I was traveling around in Belgium figuring – oh come on this will be easy…d’oh!
This time around I’m a bit older and a little bit, if not wiser, then more paranoid. 🙂
Migrating to Plone 3 can be quite a challenge. The biggest issue is the database – ZODB is a great solution and works – but lets face it: most developers and techies are clueless about OO databases. This presents a distinct challenge for upgrading Plone since most issues that are serious problems will occur in the database. I’ve learned a decent way to upgrade Plone and although the true experts are on the plone freenode chat space or on plone.org, I have a bit of advice for the average Plone guy that I think will help out now that I’ve managed to get a Plone 3 install upgraded and actually working. So if you’re interested in this read on…if not there always my humor section…
The first thing I would encourage you to do is read my instructions on installing an industrial strength server. If you have not done this and have used the plone installer then the first thing you should do is install a new zope/plone serer with my instructions and then copy your current products and database over to the new instance and make sure everything works ok.
The next thing I encourage you do to do is “RTFM” – the Plone guys and gals make good documentation. READ IT! Its right therein the zip archive.
The second “pre-req” is that if you do not know how to use subversion (svn) then forget it…you must learn svn or you will never survive this…really…no kidding…http://subversion.tigris.org/
Migrating to Plone 3: Getting Going…
The golden rule for doing anything with Plone is: backup everything. Don’t mess around…don’t think it won’t happen to “me”…it will…believe it.
I’ve found the easiest way to backup everything is to shutdown your instance and just copy everything manually…twice. By everything I mean python, zope, and plone.
I’ve found this basic procedure the way to go when upgrading:
- Check plone.org for all your extra products to see if there are versions for plone 3…if there are no versions then well forget it and go have a beer or two…or three…
- Seriously – install a clean plone instance and test your products to see if they will install clean. If they do then you are good, if not hen you are indeed at a dead stop.
- Continuing on….copy “everything” to another location for backup and then do it again for a working copy to test with.
- Make sure your working copy starts up ok and then go into ZMI and run a database upgrade if necessary, do a complete catalog rebuild, and a complete archetypes reindex, do a CMF to AT types conversion, and then do a catalog rebuild again. If this does not work – stop and figure out why and fix it before even bothering to try an upgrade.
- Plone 3 requires python 2.4.4 and Zope 2.10.4 at a minimum. If you are not at these levels then upgrade them and repeat step four again. you should also look at some of the key supporting products like PIL to make sure you are at the latest supported levels.
- If you are using a custom skin – switch to the original plain Plone skin.
- At this point take another couple of backups…I always do two…one archive and one working copy.
- With your current server running uninstall all your “extra” products. This will not delete your data objects in ZODB – only allow your server to restart if there are problems with products after you upgrade.
- Download Plone 3 for “all platforms” and create a Plone instance. Bouce the server and make sure it starts up reliably. Poke around it it to eb sure everything is working ok.
- Stop your new Plone 3 server and copy your database file and indexes from the old plone site over into your new instance. Bounce your Zope server – make sure you are running in debug mode when it restarts by editing the conf file.
- If the Zope server does not start carefully examine the stack trace and look for a product that is the culprit. In other words you should be running this from a command line…no silly Win32 GUIs! If you can’t figure it out then goto the plone chat-room and ask for help.
- Copy over – one at a time – each “extra” product and bounce the Plone isntance. Check the stack trace carefully and look for issues. Run in debug mode!
- Once all your products are copies over, go into ZMI and try the portal upgrade – look for the red exclamation marks in ZMI under your site. Do the database upgrade. Then try an archetypes reindex…make sure to check all the boxes. Then do another catalog complete rebuild.
- Go to your Plone site and see what happens. Poke around and see if the basics are working.
- Once you have all that clean try re-installing each add-on product…one at a time. After each install bounce your zope server. Then do an archetype index and catalog rebuild.
- If you see any errors then stop and examine the stack trace to try and identify a specific product. If you can identify a product then go and look at the svn repo for the product and see if there is a recent update for 3.0 that you can get. If not then depending on the error try an archetypes schema update for those objects. Sometimes this works.
That’s about it. I’ve had mixed luck with upgrades, however most of my problems are related to products that are not working before I try the upgrade or I didn’t follow my own advice. D’oh. I can’t say what I’ve gone thru will work 100% and I can’t say that I don’t bang my head on the wall, floor, etc., but hopefully this will give you at least a sense of how I do this kind of thing in the “real world”.
Feel free to post comments/questions. I’ve been able to get a couple of plone sites moved up to version 3, but have also met with a lot of trouble. Its a big upgrade so there’s bound to be trouble and brain crampage along the way. That’s what makes it “fun”, right?