= BRICCS Trac system = This is a page for discussing the Trac issue tracking system. == Current Deployment == The Trac system is being delivered from the new http://trac.lcbru.le.ac.uk/ site, which is provided from LAMP-51 (a new LAMP v2 instance, not the same as the old server, below, which was LAMP v1). The trac 'environment' is /local/lcbru-trac and the deploy directory is /local/trac-deploy. It makes some limited use of the Genshi templating system, in /local/trac-deploy/templates Once again, deployment was complicated. This time, we didn't have to use a virtualenv virtual environment for python, because LAMP v2 expects python modules to be installed in /local/python (as well as in the base library paths) and that can be written to by normal users. So all the pre-requisites and Trac itself can be installed with "easy_install --install-dir=/local/python PACKAGENAME" but then you need to supplement the wsgi in /local/trac-deploy/cgi-bin/trac.wsgi with: {{{ import site site.addsitedir('/local/python') }}} But - and it is a big but - the apache server runs as 'wwwrun' and the libraries have been installed with the user permissions of whichever user installed them. So as well as following the instructions in the !TracInstall guide to ensure the /local/lcbru-trac directory structure is all read-and-writeable by wwwrun, and that the /local/trac-deploy/log is writeable and the /local/trac-deploy/cgi-bin files are readable and executable, you ALSO have to ensure that sub-directories below /local/python are also readable and executable, because by default they give wwwrun only read access. Errors such as "Trac[main] ERROR: can't retrieve session: !TracError: Cannot load Python bindings for PostgreSQL" are an indication that the permissions are wrong. Assuming, of course, that the bindings are actually installed, which you can check by running the python interpreter and trying "import psycopg2". == Previous Deployment == The Trac system is being delivered from the new http://lcbru-trac.rcs.le.ac.uk/ site, which is provided from LAMP-51. The trac 'environment' is /local/lcbru-trac and the deploy directory is /local/trac-deploy. It makes some limited use of the Genshi templating system, in /local/trac-deploy/templates Partly because we have to use a virtualenv to install python, partly for permission issues, the deployment on SuSE with restricted permissions (i.e. a UOL LAMP server) is not easy. What made the difference in the end was to get the wsgi to run with the same virtualenv as I had used to install trac from the command line, by inserting the following two lines in the /local/trac-deploy/cgi-bin/trac.wsgi : {{{ activate_this = os.path.expanduser("/local/python/virtualenv/bin/activate_this.py") execfile(activate_this, dict(__file__=activate_this)) }}} == Previous Previous Deployment == Trac was previously deployed on briccs-7, a VM hosted on briccs-1.rcs.le.ac.uk Trac was at that time running on CentOS 5 - which required python 2.4 for system integrity (yum, among other things, depends upon it). But the latest version of Trac (1.0.1) depends upon python 2.5 or above. EPEL repositories enable the installation of later versions of python, so we have installed python 2.5 but the fun is only beginning. Apache uses mod_wsgi to deliver Trac - and mod_wsgi as a binary package for CentOS uses the default python (in our case, 2.4, which means Trac does not work). To get mod_wsgi to work with the correct version of python, it must be recompiled from source code. == Access controls == The current system is configured to require password for all write access preventing external users from editing our wiki pages. However, public viewing of the trac wiki is possible, which means we are able to share things on the wiki with people outside the core BRICCS development team. Based on experience with AstroGrid, the ability to point from people outside the project at pages on our wiki was extremely useful for facilitating discussion and getting advice and ideas from people outside the project. == Password database == The current system uses a simple htacces password file to handle user authentication. Add passwords to the password file (crypt encrypted by default) by: [root@briccs-7 trac]# htpasswd /var/local/briccs/trac/conf/briccs.htpasswd firstname.surname There is a Trac module for storing passwords in a database, which should makes managing user accounts and passwords a lot easier. We should consider whether we need to install this before we issue passwords to the hospital staff. Depends how many people need write access.