How to change your Unified Installer install from standalone to zeo

I thought I'd add this here until it can be added to the docs...

If you used the unified installer with the "standalone" option (which creates a bin/instance) but later you wished you'd specified the "zeo" option (which creates in the bin directory the client1, client2, and zeoserver executables):

  • edit buildout.cfg

  • in the parts variable add client1, client2, and zeoserver. Should look like this:

parts =
    instance
    repozo
    backup
    zopepy
    unifiedinstaller
    zeoserver
    client1
    client2
  • after your "[instance]" part, add:
[zeoserver]
<= zeoserver_base
recipe = plone.recipe.zeoserver
zeo-address = 127.0.0.1:8100
[client1]
<= client_base
recipe = plone.recipe.zope2instance
zeo-address = ${zeoserver:zeo-address}
http-address = 8080
[client2]
<= client_base
recipe = plone.recipe.zope2instance
zeo-address = ${zeoserver:zeo-address}
http-address = 8081
  • save buildout.cfg
  • run bin/buildout

You should see new executables zeoserver, client1, and client2 in your bin directory.

1 Like

The funny bit is that you now have the choice of going back to running a single bin/instance process whenever you like (it's easier to develop with). In my case I needed to have the Plone site respond using one client while I had another client run a script that connected to the first client (via XML-RPC).

If you put this in the docs, it would be nice if you described the reasons / pros of using ZEO (especially if nothing is changed in front of Plone...

OK.

The only pro for having the ZEO setup in my case was to let me use two clients simultaneously (one listening to requests, the other issuing requests via XML-RPC).

...and yes I realize that's weird... I could have just read the database directly with a single client, but I wanted to reuse code I had for reading contents off a remote site).