========================
Deploying gocept.zeoraid
========================

ZEORAID can be deployed in different custom ways. In this guide we explain the
deployment for two variants: with and without `zc.buildout`.

Both setups assume that ZEORAID will be run on a separate server using ZEO and
will be connected to two other servers running ZEO with a file storage behind.

Variant 1: Classical deployment
===============================

- Setup three servers with ZEO as you would normally: one for ZEORAID, two for
  the actual FileStorages.

- On the ZEORAID server, install the `gocept.zeoraid` package using
  `distutils` or `setuptool` so that the ZEO server can access it.

- Configure your `zeo.conf` file for ZEORAID by defining a storage like this::

  %import gocept.zeoraid
  <raidstorage 1>
      <zeoclient 1>
          server backend1:8100
          storage 1
      </zeoclient>
      <zeoclient 2>
          server backend2:8100
          storage 1
      </zeoclient>
  </raidstorage>

- Start the backend ZEO servers, then the ZEORAID server as any other ZEO
  server.

- Start your frontend services, connected to the ZEORAID server.

Any maintenance (log rotation, packing, ...) can be done as you do for any other ZEO
server.


Variant 2: Using zc.buildout
============================

Please familiarize yourself with the `zc.zodbrecipes:server` recipe for
configuring general ZEO servers using `zc.buildout`.

- Instead of `zc.zodbrecipes:server`, use `gocept.zeoraid:server` as the
  recipe.

- All configuration options are identical to `zc.zodbrecipes:server`.

- When running `buildout`, each configured `raidstorage` will get a
  RAID management generated to control the specific raid storage.

Any maintenance (log rotration, packing, ...) can be done as you do for any
other ZEO server using `zc.zodbrecipes:server`.
