Objective
Project Services is an integration of software and doman knowledge. Data Management & Warehousing has an approach to building data warehouses. This approach includes a number of templates and white papers including approaches to architecture, governance and documentation.
In order to run a project using this approach it is useful to have a change control system, a task and issue tracking system, a wiki, etc. This document describes how to build the software aspects of the solution
Installed Software Solution
The objective is to build a system using the following packages:
Server
Client
Installed Software
The Data Management & Warehousing system used the following software
- CentOS 4.5 fully up-to-date
- Additional RPMs from http://dag.wieers.com/rpm/
- subversion-perl-1.4.4-0.1.el4.rf
- subversion-1.4.4-0.1.el4.rf
- subversion-devel-1.4.4-0.1.el4.rf
- python-clearsilver-0.10.4-2.el4.rf
- clearsilver-devel-0.10.4-2.el4.rf
- clearsilver-0.10.4-2.el4.rf
- perl-ClearSilver-0.10.4-2.el4.rf
- python-clearsilver-0.10.4-2.el4.rf
- Source code downloads
- trac-0.10.4.tar.gz
- viewvc-1.0.4.tar.gz
- user_manage.tar.gz
Naming conventions used
Wherever there is a name or path that needs to be set it is written in uppercase and should be substitued appropriately
CMS_PAGE: A location of a CMS managed page e.g. http://www.datamgmt.com/?PAGE=&47
DISK_ROOT: A location not visible to the webserver e.g. /hosting/datamgmt.com/projects
DOMAIN: The domain e.g. datamgmt.com
IPADDRESS: The IP Address e.g. 10.10.10.10
PORT: The IP port e.g. 80
SUBDOMAIN: The subdomain where the projects are hosted e.g. projects.datamgmt.com
WEB_ROOT: A location visible to the webserver e.g. /hosting/datamgmt.com/website/projects
Text prefixed with a hash '#' it is a unix command to be typed.
Text in italics should be edited into the appropriate file
To set up an additional project
the steps in red text need to be repeated for the new project.
Mail Alias
Create a e-mail alias for the project administrators that can be used in the configuration and directed as appropriate e.g.
projects-admin@DOMAIN
Create the Subversion Repository
# mkdir -p DISK_ROOT/PROJECT/svn/
# svnadmin create --fs-type fsfs DISK_ROOT/PROJECT/svn/
Install ViewVC
# mkdir DISK_ROOT/cgi-bin
# cp /usr/local/viewvc-1.0.4/bin/cgi/viewvc.cgi DISK_ROOT/cgi-bin
Then update the /usr/local/viewvc-1.0.4/viewvc.conf file with the following lines:
#cvs_roots
svn_roots = PROJECT: DISK_ROOT/PROJECT/svn
default_root = svn
address = <a href="mailto:projects-admin@DOMAIN">Projects Administration</a>
Install user_manage
# cp user_manage WEB_ROOT/cgi-bin
Edit the user_manage script as follows:
$CONFIG_FILE = 'DISK_ROOT/etc/realms.conf';
# mkdir DISK_ROOT/etc
Create and edit the file DISK_ROOT/etc/realms.conf:
<Realm projects.datamgmt.com/PROJECT>
Users DISK_ROOT/PROJECT/etc/passwd.http
Groups DISK_ROOT/PROJECT/etc/group.http
Type Text
</Realm>
# cd DISK_ROOT/PROJECT/etc
# htpasswd -cb passwd.http USERNAME PASSWORD
Create and edit the file DISK_ROOT/PROJECT/etc/group.http
administrators: USERNAME
users: USERNAME
Configure Trac
# mkdir DISK_ROOT/tmp
# chown apache.apache DISK_ROOT/tmp
# chmod 775 DISK_ROOT/tmp
# trac-admin DISK_ROOT/PROJECT/trac initenv
Accept default values except
Project Name [My Project]> PROJECT
Path to repository [/path/to/repos]> DISK_ROOT/PROJECT/svn
Edit the configuration file DISK_ROOT/PROJECT/trac/conf/trac.ini
[header_logo]
link = http://SUBDOMAIN
src = /img/yourlogo.png
[notification]
always_notify_owner = true
always_notify_reporter = true
smtp_default_domain = DOMAIN
smtp_from = projects-admin@DOMAIN
smtp_replyto = projects-admin@DOMAIN
smtp_enabled = true
[project]
descr = PROJECT
name = PROJECT
url = http://SUBDOMAIN/PROJECT/trac
[trac]
base_url = http://SUBDOMAIN/PROJECT/trac
Configure .htaccess files
Add the following .htaccess files
Redirect the DOMAIN homepage to the main website Content Management System page for requests (This rule re-directs requests / and index.html requests)
Create and edit WEB_ROOT/.htaccess
RewriteEngine on
RewriteRule ^$ CMS_PAGE
RewriteRule ^index.html$ CMS_PAGE
Redirect the DOMAIN/PROJECT homepage to the Trac homepage
(This rule re-directs requests / and and index.html requests)
Create and edit WEB_ROOT/PROJECT/.htaccess
RewriteEngine on
RewriteRule ^$ http://DOMAIN/PROJECT/trac
RewriteRule ^index.html$ http://DOMAIN/PROJECT/trac
Set up Trac security
# trac-admin DISK_ROOT/PROJECT/trac permission list
# trac-admin DISK_ROOT/PROJECT/trac permission add USERNAME user
# trac-admin DISK_ROOT/PROJECT/trac permission add USERNAME admin
# trac-admin DISK_ROOT/PROJECT/trac permission add user TICKET_CREATE TICKET_MODIFY WIKI_CREATE WIKI_MODIFY
# trac-admin DISK_ROOT/PROJECT/trac permission add admin CONFIG_VIEW MILESTONE_ADMIN REPORT_ADMIN ROADMAP_ADMIN TICKET_ADMIN TRAC_ADMIN WIKI_ADMIN
# trac-admin DISK_ROOT/PROJECT/trac permission remove anonymous TICKET_CREATE TICKET_MODIFY WIKI_CREATE WIKI_MODIFY
Modify other permissions to suit individual requirements
Modifications to the httpd.conf file
<VirtualHost IPADDRESS:PORT>
ServerAdmin projects-admin@DOMAIN
DocumentRoot WEB_ROOT
ServerName SUBDOMAIN
ErrorLog WEB_ROOT/logs/errors.log
CustomLog WEB_ROOT/logs/access.log combined env=!DontLog
ScriptAlias /cgi-bin WEB_ROOT/cgi-bin
<Directory WEB_ROOT>
AllowOverride All
</Directory>
<Directory WEB_ROOT/cgi-bin>
Options ExecCGI FollowSymLinks
</Directory>
<Directory WEB_ROOT/PROJECT>
AuthType Basic
AuthName "SUBDOMAIN/PROJECT"
AuthUserFile DISK_ROOT/PROJECT/etc/passwd.http
AuthGroupFile DISK_ROOT/PROJECT/etc/group.http
Require valid-user
AllowOverride All
</Directory>
<Location /PROJECT/trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv DISK_ROOT/PROJECT/trac
PythonOption TracUriRoot /PROJECT/trac
SetEnv PYTHON_EGG_CACHE DISK_ROOT/tmp
</Location>
<Location /PROJECT/repository>
DAV svn
SVNParentPath DISK_ROOT
</Location>
</VirtualHost>
Completing the installation and testing
After all of the above is done the web server needs to be restarted
# apachectl stop
# apachectl start
http://SUBDOMAIN
This should take you to the CMS page that acts as an introduction to all the projects
http://SUBDOMAIN/cgi-bin/user_manage?realm=SUBDOMAIN/PROJECT
This should take you to the user management page of the sub-domain and project.
http://SUBDOMAIN/PROJECT
This should take you to the wiki page that acts as the front page of the individual project
http://SUBDOMAIN/PROJECT/cgi-bin/viewvc.cgi
This should take you to the ViewVC page the views the source code repository
Other useful utilities
There are a number of useful plugins:
http://trac-hacks.org/wiki
Tip: Create a directory (e.g. /tmp/trac_plugins) and carry out the work from there.
Tip: Install the plugins globally using the --prefix=/usr (see below)
Tip: If you are installing a second project copy the trac.ini over after doing all the installs and then simply search and replace the project name instead of doing all the edits.
Tip: Once the ini admin module is installed much of the enabling etc. can be done from here.
Tip: Sometimes after installing a new plugin it does not appear. Try restarting the browser and webserver as stuff might be cached.
Tip: Sometimes the following line
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
can be added to the file /usr/lib/python2.3/site-packages/easy-install.pth causing a Server 500 error. This should be commented out
There are also another useful HowTo:
http://natmaster.com/articles/installing_trac_0.10.php
EZ Setup Utility
# wget http://peak.telecommunity.com/dist/ez_setup.py
# python ez_setup.py --prefix=/usr
General Plugin Installation
# svn co http://PLUGIN_SVN_URL
# cd PLUGIN/(0.10)
# python setup.py egg_info
# python setup.py bdist_egg
# cd dist
# easy_install --prefix=/usr *.egg
Edit DISK_ROOT/PROJECT/conf/trac.ini
[components]
PLUGIN.* = enabled
Implemented Plugins
Account Manager
ini Admin
Master Tickets
Also note that the following
patch must be applied before building
Nav Add
Rev Tree
Tried to install but have had issues so abandoned
SVN Authz Admin
Test Case Management
TracNav
Web Admin
Other useful plugins not installed
Timing and Estimation
Work Log
Issues
Sometimes after installing a plugin the server issues an error
Editing:
/usr/lib/python2.3/site-packages/easy-install.pth
and commenting out the line:
#import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
Appears to fix this
Created on 08/04/2007 12:05 PM by datamgmt
Updated on 10/25/2007 11:27 AM by datamgmt
|
|