source: main/waeup.uniben/branches/0.1/README-zeo.txt @ 17414

Last change on this file since 17414 was 8035, checked in by Henrik Bettermann, 13 years ago

Add and adjust configuration files.

File size: 4.5 KB
Line 
1Deploying waeup.uniben as ZEO-install
2*************************************
3
4Each ZEO install consists of at least one ZEO server and normally two
5or more ZEO clients. While the ZEO server is meant to manage the ZODB
6database for clients, the clients connect to the outside world, listen
7for request and do the real dataprocessing.
8
9We prepared a `buildout` configuration that sets up one server
10configuration and two client configs. This configuration is in
11``buildout-zeo.cfg``.
12
13Generating the ZEO setup
14========================
15
16To install waeup.uniben ZEO-based you can run `buildout` with the given
17(or your own) configuration file like this::
18
19  $ ./bin/buildout -c buildout-zeo.cfg
20
21This should generate all scripts necessary to run servers, clients,
22etc.
23
24Starting ZEO servers and clients
25================================
26
27First start the server::
28
29  $ ./bin/zeo_server start
30
31Clients can be started by doing::
32
33  $ ./bin/zeo_client1 start
34  $ ./bin/zeo_client2 start
35
36This will start both clients in daemon mode.
37
38Instead of ``start`` you can, as usually, start an instance in
39foreground (``fg``), etc. You know the drill.
40
41Manually starting ZEO clients
42-----------------------------
43
44This is normally not neccessary.
45
46``zeo_clientN`` scripts are basically wrappers around calls to
47``bin/paster``. You can bypass this wrapper and start a client
48'manually' like this::
49
50  $ ./bin/paster serve --pid-file var/zeo1.pid --daemon \
51        pars/etc/zeo1.ini
52
53It is important to give a pid-file as paster otherwise can not start
54different clients (they would all refer to the same pid file
55`paster.pid` and refuse to start after the first client was started).
56
57
58Setup (paramters, ports, etc.)
59==============================
60
61By default the server will listen on port 8100 for requests from
62localhost (not: from the outside world).
63
64You can change ZEO server settings in the ``[zeo_server]`` section
65of ``buildout-zeo.conf``. Run `buildout` afterwards.
66
67The clients will listen on port 8081 and 8082. You can change settings
68in ``etc/zeo1.ini.in`` and ``etc/zeo2.ini.in`` respectively. Run
69buildout after any change.
70
71If you want to change the paster wrapper for any zeo client, you can
72edit ``etc/zeo1.conf`` and/or ``etc/zeo2.conf``. Run buildout
73afterwards.
74
75Creating new clients
76====================
77
78You want more clients to be created by buildout? Easy. Three steps are
79neccessary.
80
811. Create config files in etc/
82------------------------------
83
84Each client needs two configuration files:
85
86  - ``etc/zeoN.conf``
87       configuring the paster wrapper
88
89  - ``etc/zeoN.ini``
90       configuring the runtime config, ports, etc.
91
92Just copy over these files from the already existing zeo1/zeo2 files
93and replace ``zeo1`` or ``zeo2`` with your new name.
94
952. Update buildout-zeo.cfg
96--------------------------
97
98Here, inside ``buildourt-zeo.cfg`` also three steps are needed.
99
100* 2.1. Create new .ini and .conf entries
101
102  The .conf and .ini files in etc/ are only templates that have to be
103  generated in their really used final location. In buildout-zeo.cfg
104  you can care for this by creating a new ``[zeoN_ini]`` and
105  ``[zeoN_conf]`` option (replacing ``N`` with a number, of course).
106
107  Just copy over existing entries and replace the mentions of ``zeo1``
108  or ``zeo2`` by your ``zeoN``.
109
110* 2.2. Create a new ``zeo_clientN`` entry
111
112  Then you have to create an entry that will generate the
113  ``zeo_clientN`` script. Again, just copy over an existing
114  ``[zeo_client1]`` entry and replace ``1`` withg your client number.
115
116* 2.3. Register the new sections in ``[buildout]`` section
117
118  When done with the above: add the new section in ``[buildout]``::
119
120    [buildout]
121      ...
122      <old entries...>
123      ...
124      zope_conf_zeo_5
125      zeo5_ini
126      zeo_client5
127
128  depending on how you named your new sections.
129
1303. Rerun ``buildout``
131---------------------
132
133When adding or removing client/server instances, make sure to stop all
134running servers/clients before rerunning buildout.
135
136To activate the new setup, rerun buildout::
137
138  $ bin/buildout -c buildout-zeo.cfg
139
140This should generate any new clients and remove older ones or just
141update configuration files.
142
143
144Considerations
145==============
146
147There are some things in the current buildout-zeo.cfg we might do not
148want. It extends the regular ``buildout.cfg`` so that we do not have
149to repeat most sections but the ``parts`` in ``[buildout]`` have to be
150listed.
151
152We need, however, not everything with a ZEO-deploy that is listed in a
153default buildout. We might do not need docs, no profiling, etc. Also a
154regular non-ZEO kofactl might not make to much sense. Therefore all
155this might be subject to changes.
156
Note: See TracBrowser for help on using the repository browser.