This is a reiteration of Carlos de la Guardia's recent post on the subject.
You should probably be using Supervisor because:
- Starting and stopping Zope and ZEO separately is no fun.
- Using Supervisor is easy and fun.
Add a new section your buildout.cfg file:
parts =
...
supervisor
...
[supervisor]
recipe = zc.recipe.egg
egg = supervisor
Create a configuration file:
[inet_http_server] port=127.0.0.1:9999 #username=admin #password=admin [supervisord] logfile=%(here)s/../var/log/supervisord.log logfile_maxbytes=50MB logfile_backups=10 loglevel=info pidfile=%(here)s/../var/supervisord.pidnodaemon=false [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=http://127.0.0.1:9999 [program:zeo] command = %(here)s/../parts/zeo/bin/runzeo priority = 10 [program:zope] command = %(here)s/../parts/instance/bin/runzope priority = 20 redirect_stderr = true
Now run Buildout:
bin/buildout
and start Supervisor:
bin/supervisord
Then use supervisorctl to start and stop your Zope and ZEO at the same time:
bin/supervisorctl start all bin/supervisorctl stop all
Stop Supervisor with:
bin/supervisorctl shutdown
Thanks Chris McDonough of Agendaless Consulting and Mike Naberezny of Maintainable Software, plus contributors for creating and maintaining Supervisor.