An instance of trac provides a code browser and issue tracker for SOG and the SOG buildbot. A user id and password is required to access the SOG trac.
The web interface to the SOG trac is at http://bjossa.eos.ubc.ca:9000/.
Commit notification message that are generated by Mercurial when changes are pushed to the any of the 4 model repositories (SOG, SOG-code, SOG-initial, SOG-forcing), or the SOG-buildbot repository contain links to the changesets in the trac code browser. Changeset views in the code browser are highlighted to clearly show exactly what has been changed in each file in the changeset.
trac is deployed via a Python virtualenv on ocean. The tracd server runs on bjossa.
The following notes document the deployment of trac in Dec-2013 when it was migrated to new bjossa hardware.
Create a virtualenv and install trac and mercurial from PyPI:
$ cd /ocean/dlatorne/.virtualenvs/
$ virtualenv trac-1.0
$ source trac-1.0/bin/activate
(trac-1.0)$ pip install trac mercurial
Since the new bjossa hardware was being set up in parallel with the still-running old hardware, copy the trac data directory and upgrade it separately from the running instance data:
(trac-1.0)$ cd /ocean/dlatorne
(trac-1.0)$ mkdir trac-1.0
(trac-1.0)$ cp -pr trac/projects trac/users.htdigest trac-1.0/
(trac-1.0)$ cd trac-1.0/
(trac-1.0)$ trac-admin projects/SOG upgrade
(trac-1.0)$ trac-admin projects/SOG wiki upgrade
(trac-1.0)$ trac-admin projects/SOG-buildbot upgrade
(trac-1.0)$ trac-admin projects/SOG-buildbot wiki upgrade
Install the trac mercurial-plugin by cloning its repo into the new data directory and installing it from the clone into the virtualenv:
(trac-1.0)$ cd trac-1.0
(trac-1.0)$ hg clone http://hg.edgewall.org/trac/mercurial-plugin#1.0
(trac-1.0)$ cd mercurial-plugin
(trac-1.0)$ python setup.py install
Add a cron job to start the tracd server when the machine reboots:
MAIL=dlatornell@eos.ubc.ca
TRACD=/ocean/dlatorne/.virtualenvs/trac-0.12/bin/tracd
TRACD_PID=/ocean/dlatorne/trac/tracd.pid
TRAC_ENV=/ocean/dlatorne/trac/projects
TRAC_USERS=/ocean/dlatorne/trac/users.htdigest
@reboot $TRACD -d -p 9000 -e $TRAC_ENV --pidfile=$TRAC_PID --auth=*,$TRAC_USERS,SOG
Start the tracd server with:
(trac-1.0)$ tracd -d -p 9000 -e /ocean/dlatorne/trac/projects --pidfile=/ocean/dlatorne/trac/tracd.pid --auth=*,/ocean/dlatorne/trac/users.htdigest,SOG