Documentation

Cookbook: Setting up Trac

This recipe will install Trac: an
integrated SCM and Project Management solution that gets along very
well with Cherokee.

It is written in Python and can work with Cherokee either using HTTP
or SCGI protocols. The recipe will address the second scenario because
it is slightly more complex. Should you wish to run it via HTTP,
Cherokee would only have to relay the requests to Trac acting as an
HTTP reverse proxy and no other
configuration would be needed on that end.

Trac

The software requirements are Python-2.5, easy_install and
SQLite-3.3.4 or above. Flup is also required unless you want to use
the HTTP-proxy method, and SQLite can be replaced by PostreSQL or
MySQL if you wish to do so.

On Debian based Linux distributions, just a couple of commands issued
as root would suffice to provide the requirements and install Trac.

Cherokee

The configuration on Cherokee’s side is quite simple. In fact, the
configuration of Cherokee is so simple that you can find the
application in the Market and have it deployed within seconds. You
will be asked for the minimal information required, and everything
else will be handled for you.

By now, your Trac installation should be up and running. Try it out!

Complete Trac installation

If you used the Market, you can skip the rest of the document. It only
details what manual steps must be taken.

You will only need to know that you can spawn Trac as an SCGI process.

If the port was not reachable, the interpreter command would be
launched and the process would be reinstantiated. Note that, in the
definition of the information source, you will have to manually launch
the spawner if you use a Remote host as Information source
instead of a Local interpreter.

After doing this, we will just have to create a new rule managed by
the SCGI handler to access Trac. It can be created in a new virtual
server, trac.example.net for instance, or as a Directory rule for
a specific path such as /trac.

Rules

As you can see, we are opting for the first approach and will only
need two rules. The default will use the SCGI handler as detailed
above, associated to the previously created information source.

SCGI handler

The second one will be there to serve the few static files needed to
correctly display the Trac interface. Just create it as Directory
type rule for /chrome/common and set it to the Static files
handler and with a Document root that points to the appropriate
files: /usr/share/trac/htdocs/