Personal tools
You are here: Home Leocornus Leocornus Buildout Config Repository. buildout to install and set up trac instance

buildout to install and set up trac instance

— filed under:

The easiest way to build and config the famous Trac Project.

Overall, trac build and install process is quite simple.

Minimium Trac Instance

Need the following things to make a minimium Trac instance:

  • build Trac using eggs, the simplest way will be generate a Python interpreter and include Trac in the eggs list. Then the buildout will generate both tracd and trac-amdin in bin folder.

  • load necessary plugins as develop eggs directly from trac-hacks.org. Here is a list of minimium plugins:

    http://trac-hacks.org/svn/xmlrpcplugin/trunk TracXMLRPC
    http://trac-hacks.org/svn/customfieldadminplugin/0.11 TracCustomFieldAdmin
    http://trac-hacks.org/svn/workfloweditorplugin/trunk WorkflowEditorPlugin
    
  • create trac project folder: ${buildout:directory}/var/trac

  • Initialize the trac folder by using trac-admin

  • create basic auth password file, this depends on Apache HTTPD's htpasswd:

    $ htpasswd -c var/trac/tracuser.htpasswd USER_NAME
    
  • load trac at Standalone mode:

    $ bin/tracd --port 8001 -s \
      --basic-auth="trac,/path/to/tracuser.htpasswd,hostname" \
      /path/to/trac/folder
    
  • Config the supervisord program to load trac standalone server.

  • Setup Email notification, it is very simple to setup sendmail for Trac. I experienced some interesting issue when using XMLRPC. There is a ticket talking about this: #10034.

details document about tracd: http://trac.edgewall.org/wiki/TracStandalone

Dependencies

Trying to figure out a list of things that is required for a Trac instance.

Mandatory dependencies:

  • Python >= 2.5 and < 3.0
  • Genshi >= 0.6
  • setuptools >= 0.6
  • Database: SQLite, MySQL, PostgreSQL
  • Corresponding Database Binding: PySqlite, MySQLdb, psycopg2

Optional:

  • Web Server
  • WSGI, uwsgi seems the best/final solution!

TracInstall page has details explaination about the dependenies.

bootstrap.py v2

We need the bootstrap.py version 2 for self compiled Python. The new bootstrap.py is here: http://downloads.buildout.org/2/bootstrap.py

What We Need

  • Python >= 2.5
  • supervisord manage tracd
  • git as the version control
  • Nginx Web server in front of tracd through uwsgi

This cook book is the one we need: http://trac.edgewall.org/wiki/CookBook/easyTrac

Trac and Nginx

This wiki page has very good explaination: http://trac.edgewall.org/wiki/TracNginxRecipe

Document Actions