.. :Author: Doug Latornell .. :License: Apache License, Version 2.0 .. .. .. Copyright 2010-2014 Doug Latornell and The University of British Columbia .. .. Licensed under the Apache License, Version 2.0 (the "License"); .. you may not use this file except in compliance with the License. .. You may obtain a copy of the License at .. .. http://www.apache.org/licenses/LICENSE-2.0 .. .. Unless required by applicable law or agreed to in writing, software .. distributed under the License is distributed on an "AS IS" BASIS, .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .. See the License for the specific language governing permissions and .. limitations under the License. .. _SOGtrac-section: SOG trac Code Browser and Issue Tracker ======================================= An instance of trac_ provides a code browser and issue tracker for SOG and the :ref:`SOG buildbot`. A user id and password is required to access the SOG trac. .. _trac: http://trac.edgewall.org/ 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 (:file:`SOG`, :file:`SOG-code`, :file:`SOG-initial`, :file:`SOG-forcing`), or the :file:`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. Deployment of trac on EOAS :kbd:`ocean` Cluster ----------------------------------------------- trac_ is deployed via a Python virtualenv_ on :kbd:`ocean`. The :program:`tracd` server runs on :kbd:`bjossa`. .. _virtualenv: https://pypi.python.org/pypi/virtualenv The following notes document the deployment of trac_ in Dec-2013 when it was migrated to new :kbd:`bjossa` hardware. Create a virtualenv_ and install trac_ and mercurial_ from PyPI_: .. code-block:: bash $ cd /ocean/dlatorne/.virtualenvs/ $ virtualenv trac-1.0 $ source trac-1.0/bin/activate (trac-1.0)$ pip install trac mercurial .. _mercurial: http://mercurial.selenic.com/ .. _PyPI: https://pypi.python.org/pypi Since the new :kbd:`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: .. code-block:: bash (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_: .. code-block:: bash (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 .. _mercurial-plugin: http://trac.edgewall.org/wiki/TracMercurial Add a :program:`cron` job to start the :program:`tracd` server when the machine reboots: .. code-block:: bash 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 :program:`tracd` server with: .. code-block:: bash (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 User Management --------------- The trac_ deployment uses Apache HTTP digest authentication. The password file is :file:`/ocean/dlatorne/trac/users.htdigest`. Add or change a user's password with: .. code-block:: bash (trac-1.0)$ htdigest users.htdigest SOG