AlmanacStack - The Community Almanac Build

The stack is a work in progress but the goal is to have a reliable replicatable way of building copies of an Almanac installation. We are using zc.buildout to do the configuration and build control

Build Quickstart

Examples assume your an in a virtualenv (though it is not required). You could substitute 'src' for anywhere you might want the build to be...

Prerequisites (Ubuntu package names):

  • subversion
  • gcc
  • g++
  • make
  • python2.5-dev
  • libpcre3-dev
  • libsqlite3-dev
  • libxml2-dev
  • libxslt1-dev
  • sun-java6-jre
$ cd src; svn co http://svn.opengeo.org/almanac/build/trunk/ AlmanacStack
$ cd AlmanacStack; python bootstrap.py; 
$ bin/buildout

Note: While the buildout is not playing nice with Subversion 1.5, run 'python setup.py develop' prior to bin/buildout.

For 64-bit systems, make sure to use Python 2.4, not 2.5, at this step.

things to remember with the build

See the readme: http://projects.opengeo.org/almanac/browser/build/trunk/README.txt

Starting the app

Supervisor

Start nginx, zope, and geoserver with supervisor

$ bin/supervisord -c etc/supervisor.conf

After the daemon has started you can use supervisorctl to start and stop and monitor.

$ bin/supervisorctl
$ supervisor> help
...(actions and docs)

Supervisor also has a web iface where you can see what's running, restart, tail etc: http://127.0.0.1:9999/

Browsing the App

  1. point your browser at http://localhost:8181
  2. Enter in admin / admin
  3. add an almanac application (lets say 'orton')
  4. browse to http://localhost:8181/++skin++almanac/orton

++skin++almanac is a special namespace for the orton ui. We'll use nginx to rewrite to make viewing through this skin transparent soon.

How it all integrates

Details on what is installed in the AlmanacStack.

Application Stack

Requests come into nginx. If they are to /resource/ they are statically served (images, css, html, js). If they come into any other address they are passed to zope.

Build configuration

The build is all run from the following file::

$ less buildout.cfg

lxml on osx

Building on leopard w/ python 2.5, found these instructions helpful: [Installing lxml on OS X Leopard http://tinyurl.com/5j4vkr].

In particular, this seemed to do the trick::

export CFLAGS=’-flat_namespace’

Reportlab Installation

If your build breaks trying to install reportlab, here are some things to check/try.

  • must use virtual env (is your virtualenv activated?)
  • hand installing this version of reportlab can allow the build to continue.
   $ wget http://svn.opengeo.org/dist/Reportlab-2.1.ve.tar.gz
   $ zcat Reportlab-2.1.ve.tar.gz | tar -xf -
   $ cd Reportlab-2.1.ve
   $ python setup.py install

Production Build

For notes on the live almanac, see the production build page.