ZEO installation
ZEO is an optional but important component of Zope Object Database, the ZODB.
A standard Zope installation only uses a FileStorage, which is a direct and exclusive access of the application to the database stored on a local file; this exclusive access implies that no other process can share database access while the application is running.
ZEO allows to go beyond this limitation, by providing a database server to host a ZODB; each Zope server is then connected to the ZEO server locally or remotely, and only keeps a cache of data (which can be persistent) to reduce database server access. This configuration allows:
- to define configurations with several Zope servers, which is crucial to support a good scalability.
- to have a better support for SMP and multi-cores architectures; even on a single machine, you can deploy a ZEO server and several Zope servers (to typically have one server for each core) so that several servers can run simultaneously on different cores.
- to get access to database while application is running from specific environments, for example a development station, to be able to analyze data without having to duplicate them or to stop the application.
Creating a ZEO environment
ZEO server can (and have to!) dispose of it's own execution environment, like a Zope server. So the process to create such an environment is completely identical to the one described in previous VirtualEnv topic (but to avoid a mix between the several environments, I will highly suggest you to start from a new fresh terminal):
Installing Buildout
Buildout is a development tool, as well as a utility used to create and deploy applications and environments, which uses recipes provided as Python packages; it's going to be used to setup our ZEO server easily.
You will find all informations about Buildout with the link displayed in the bottom of this page.
Buildout configuration
We now have to modify Buildout configuration, in *buildout.cfg*, before launching the build; most options are described in "zc.zodbrecipes" web page:
Current release of this receipe doesn't automatically create the directories which should receive configuration files; it's necessary to create them manually before launching the build:
Starting ZEO server
In a few minutes, you have a new ZEO server with all it's configuration files and a set of scripts to integrate ZEO into the whole system; these scripts actually include:
- a starting script (in etc/init.d)
- a logs rotation script (in etc/logrotate.d)
- a database packing script (in etc/cron.d).
WARNING: any modification made in one of these files will be lost if the buildout is re-launched !
A symbolic link is enough to integrate these scripts in your system.
Before starting the server, you should also:
- create a zeoadm user
- define zeoadm user as owner of working directories log and var
Internet links
-
zc.buildout
All informations about Buildout tool

