Example of two clients and a zeo server with a pip installation of Plone 6

Is there an example how to configure two clients accessing a zeo server with a pip installation of Plone 6?
Can this be done with cookiecutter-zope-instance?

In other words, how to get a similar configuration in a pip installation of Plone 6 as if we do install it like the following?

sudo ./install.sh \
    zeocluster \
    --with-python=/usr/bin/python3 \
    --password=admin \
    --clients=2 \
    --instance=zeocluster \
    --daemon-user=plone_daemon \
    --owner=buildout_user \
    --group=plone_group \

Example How To Create a ZEO Cluster with Plone 6 and pip

Example to install Plone with

  • two Plone-clients
  • reading from and storing data in a ZEO-server
  • with files and images stored a shared blobstorage.

Prepare Environment

mkdir -p zeoexample/blobstorage
cd zeoexample
python3.9 -m venv venv
source venv/bin/activate
python -m pip install -U pip

Install the packages needed

python -m pip install Plone zeo zope.mkzeoinstance "cookiecutter==2.1.1" -c https://dist.plone.org/release/6.0.0b1/constraints.txt

Configure and start a ZEO Server

Run mkzeoinstance zeo localhost:8100.
This creates a folder zeo with all in place to start the ZEO-server on the given host and port.

Test-start the server zeo/bin/runzeo to look for error messages (and then stop it with Ctrl-C).

Start the server as a daemon with zeo/bin/zeoctl start.

Later you can stop the server with zeo/bin/zeoctl stop.

Configure Plone and ZEO

Create two configurations for cookiecutter-zope-instance.
The only difference is target and the wsgi_listen port.

File instance01.yml:

    wsgi_listen: 'localhost:8081'
    target: 'instance01'

    initial_user_name: 'admin'
    initial_user_password: 'admin'

    db_storage: zeo
    db_zeo_server: 'localhost:8100'
    db_blobs_location: 'FULL_PATH_TO/blobstorage/'

File instance02.yml:

    wsgi_listen: 'localhost:8082'
    target: 'instance02'

    [insert same as in instance01.yml]

Run cookiecutter to generate the more complex Zope (and so Plone) configuration.

cookiecutter -f --no-input --config-file instance01.yml https://github.com/plone/cookiecutter-zope-instance
cookiecutter -f --no-input --config-file instance02.yml https://github.com/plone/cookiecutter-zope-instance

Running Plone

Start a Plone client instance with runwsgi instance01/etc/zope.ini and the second one with runwsgi instance02/etc/zope.ini.


@jensens: Thank you very much! zope.mkzeoinstance was the missing link.

Is this a common use case? If so, this would be a nice addition to the docs. I'm not sure where it should go, perhaps here?

Indeed, at least the bit of installing a zeo-server (zope.mkzeoinstance) together with the cookiecutter configuration for using the zeo-server in a Plone client is missing.