Installing a Silva ZEO cluster

  1. Choose where to install the cluster:
    PREFIX=$HOME/silva-cluster
    SRC=$PREFIX/src
    CLUSTER=$PREFIX/silva
    INST1=$CLUSTER/instance-1
    INST2=$CLUSTER/instance-2
    ZEO_SERVER=$CLUSTER/zeo-server
    SHARED_PRODUCTS=$CLUSTER/products
    mkdir -p $SRC $CLUSTER $SHARED_PRODUCTS
    
  2. Download and install Python 2.3:
    cd $SRC
    wget http://www.python.org/ftp/python/2.3.6/Python-2.3.6.tgz
    tar xzfv Python-2.3.6.tgz
    cd Python-2.3.6
    ./configure --prefix=$PREFIX
    make install
    
  3. Download and install libxml2:
    cd $SRC
    wget ftp://ftp.xmlsoft.org/libxml2/libxml2-2.6.27.tar.gz
    tar xzfv libxml2-2.6.27.tar.gz
    cd libxml2-2.6.27
    ./configure --prefix=$PREFIX --with-python=$PREFIX/bin/python
    make install
    
  4. Download and install libxslt2:
    cd $SRC
    wget ftp://ftp.xmlsoft.org/libxml2/libxslt-1.1.19.tar.gz
    tar xzfv libxslt-1.1.19.tar.gz
    cd libxslt-1.1.19
    ./configure --prefix=$PREFIX \
                --with-libxml-prefix=$PREFIX \
                --with-python=$PREFIX/bin/python
    make install
    
  5. Download and install Python Imaging Library:
    cd $SRC
    wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
    tar xzfv Imaging-1.1.6.tar.gz
    cd Imaging-1.1.6
    $PREFIX/bin/python setup.py install --home=$PREFIX
    
  6. Download and install Zope 2.8:
    cd $SRC
    wget http://www.zope.org/Products/Zope/2.8.9.1/Zope-2.8.9.1-final.tgz
    tar xzfv Zope-2.8.9.1-final.tgz
    cd Zope-2.8.9.1-final
    ./configure --prefix=$PREFIX --with-python=$PREFIX/bin/python
    make install
    
  7. Create two Zope instances. These will be the ZEO clients. They share one Products directory:
    UNAME_PWD=mgr:mgrpw
    for CLIENT in $INST1 $INST2; do
        $PREFIX/bin/mkzopeinstance.py --dir $CLIENT --user $UNAME_PWD;
        rm -rf $CLIENT/Products
        ln -s $SHARED_PRODUCTS $CLIENT/Products
    done
    
  8. Create the ZEO server:
    $PREFIX/bin/mkzeoinstance.py $ZEO_SERVER
    
  9. Download and install Silva Products:
    mkdir $SRC/Silva-1.5.10-all
    cd $SRC/Silva-1.5.10-all
    wget http://www.infrae.com/download/Silva/1.5.10/Silva-1.5.10-all.tgz
    tar xzfv Silva-1.5.10-all.tgz
    ln -s $PWD/* $SHARED_PRODUCTS/
    
  10. Configure both the clients and the server.
    • Visit both $INST1/etc/zope.conf and $INST2/etc/zope.conf. In both of them:
      1. Remove the # comments from the example of the 'zeo-client-name' directive, so that it is active.
      2. Remove the # comments from the 'zodb_db main' section under 'ZEO client storage:'. Remove (or comment out) the existing 'zodb_db main' section.
    • In $INST2/etc/zope.conf remove the # comments from the example of the 'port-base' directive. Now $INST2 will serve on port 9080.
  11. Install your favourite load balancer. As an example, we're going to install the Python Redirector load balancer:
    cd $SRC
    wget http://surfnet.dl.sourceforge.net/sourceforge/pythondirector/pydirector-1.0.0.tar.gz
    tar xzfv pydirector-1.0.0.tar.gz
    cd pydirector-1.0.0
    $PREFIX/bin/python setup.py install
    
  12. Configure the load balancer by creating a file called $PREFIX/etc/pydir.xml. Look at the example in $SRC/pydirector-1.0.0/doc/configure.txt and adjust it so that the load balancer points to localhost:8080 and localhost:9080.

    Look at the load balancer's documentation for more configuration options.

  13. Start all services:
    $ZEO_SERVER/bin/zeoctl start
    $INST1/bin/zopectl start
    $INST2/bin/zopectl start
    $PREFIX/bin/pydir.py $PREFIX/etc/pydir.xml
    

Some rights reserved OSI Certification Mark

Scroll to top of page To table of contents for the site: acc-m Search the site: acc-f To site index: acc-i Find content in the site: acc-f No link