This is a package of tools in use in Skype for replication and failover. Also it includes a generic queuing mechanism PgQ and utility library for Python scripts.

Dependencies

Skytools modules use some other code to run, you need to install the following dependencies on the system where you want to build and run skytool applications.

Build dependencies

postgresql libpq-dev postgresql-server-dev
python python-dev

When building code from GIT:

git autoconf automake asciidoc xmlto

Runtime dependencies

python
psycopg2 or psycopg1
rsync

Building from source tarball

$ ./configure --prefix=...
$ make
$ make install

Building from GIT

## fetch git tree
$ git clone git://github.com/markokr/skytools-dev.git
## fetch libusual submodule
$ git submodule init
$ git submodule update
## generate ./configure script
$ make boot
## now build as usual (--with-asciidoc is required when building from GIT)
$ ./configure --prefix=... --with-asciidoc
$ make

Building a debian package

The main Makefile provides a target for building a .deb package suitable for installation. Following additional packages are needed to build the debian package:

devscripts yada

Then the build:

$ make deb83

You can build skytools for older PostgreSQL systems by choosing one of deb82, deb81 or deb80 targets.

The build should give you two debian package files to install, such as skytools_2.1.5_i386.deb and skytools-modules-8.2_2.1.5_i386.deb. See the Installation section for notes about where to install those packages.

Optional arguments to ./configure

The following configure options are available:

--prefix

Path prefix where to install skytools files (default: /usr/local)

--with-python

Name or full path of the Python executable to use. (default: python)

--with-pgconfig

Name or full path to pg_config (default: pg_config)

--with-asciidoc If asciidoc should be used to re-generate manpages. Required when building from GIT as the generated pages are not in repo.

Documentation

Skytools documentation consist of text files, some of them in the asciidoc format, from which you can produce man and html outputs:

$ cd doc
$ make man
$ make html

You need asciidoc and xmlto packages for this to work.

Installation

Skytools

You have to install skytools on the machines where you want to run it, obviously. The installation of the skytools provides PgQ, Londiste and walmgr.

Londiste

In the londiste case, as the replication process will run on only one machine (either provider, subscriber or a tier box), things are not that straight anymore.

But simple nonetheless: install PgQ on the machine where you want to run it, provider being the straightforward choice. Then install londiste only on the box from where you want to launch the replication process, a good default begin the subscriber box this time.

You can then install londiste on provider from the subscriber box with the londiste.py command line tool.

Usage

Please refer to the documentation.