SA3 Task Tracker and Patch/Task Watcher Documentation
THE SECTION IS UNDER CONSTRUCTION
Description
The SA3 Task Tracker and the Patch/Task Watcher are two projects used to have information on-the-fly about the tasks assigned at each SA3 partner and the Patch/Task state assigned in SA3. Those tools are useful to have a global view of the progress in the SA3 and to monitor at glance the currently state. Those projects are a set of scripts, built in PHP.
Those tools read information from a local dump of Savannah DB and they create reports/graphs.
The purpose of this document is to provide an installation method of those tools, and to provide information about the scripts-system so it will be possible to modify or to improve the script.
Server currently in Production |
lxbra1902 |
How to install / setup
The SA3 Task Tracker and Patch/Task Watcher are tools in PHP that gather data information from a local mysql copy of the savannah DB, created in a computer host. The local mysql DB is updated, from a dump of the Savannah DB, each hour (the updating can be scheduled).
The procedure to configure properly a computer host to run those scripts is the following:
Step 1 |
*Packages Needed:* |
yum install mysql mysql-server php cvs php-pear php-mysql php-gd rpm-build
Jpgraph Tool in production right now
1.26:
cd $HOME
wget http://hem.bredband.net/jpgraph/jpgraph-1.26.tar.gz
tar zxvf jpgraph-1.26.tar.gz -C /var/www/
Here the jpgraph repository updated at time of writing:
- For php version 4: Here
- For php version 5 (>=5.1.x): Here
Step 2 |
Download CVS and Set Folders |
#cd $HOME
#export CVSROOT=:ext:<username>@glite.cvs.cern.ch:/cvs/jra1mw/
#export CVS_RSH=ssh
#mkdir /home/cvs/
#cd /home/cvs/
#cvs checkout org.glite.savannah.viewer
#mkdir /cronjob/
#cp org.glite.savannah.viewer/cron-utils/cert/* /cronjob/
#mkdir -p /storage/gLite/Savannah/web/
#cp -r org.glite.savannah.viewer/web/TaskTracker /storage/gLite/Savannah/web/
#cp -r org.glite.savannah.viewer/web/TaskWatcher /storage/gLite/Savannah/web/
#cp -r org.glite.savannah.viewer/web/external /storage/gLite/Savannah/web/
Step 3 |
PHP and HTTPD Configuration |
Edit
php.ini and change the following values:
- max_execution_time = 360
- max_input_time = 360
- memory_limit = 200M
Edit
httpd.conf and change the following values:
DocumentRoot to "/storage"
ServerName <your_server_hostname>
<Directory "/storage">
... Default Values are ok
</Directory>
Add this block after the first one..
<Directory "/storage/gLite/Savannah">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Create MySQL DB:
#service mysqld start
#mysqladmin -u root password "password"
#Setup a root password
#mysql -u root -p
#mysql>CREATE DATABASE savannah;
#mysql>GRANT ALL PRIVILEGES ON savannah.* TO 'savannah-writer'@'localhost' IDENTIFIED BY 'check the password for this in the file /cronjob/upload-savannah-db.sh';
#mysql>GRANT SELECT ON savannah.* TO 'savannah'@'localhost' IDENTIFIED BY 'check the password for this in the !WatchDog php file that is in the /cronjob folder';
#mysql>quit
Fill the DB manually for the first time by running:
#./cronjob/upload-savannah-db.sh
#Set the execute permission if needed
In this way you can test if everything is properly configured.
The cron jobs are used to schedule the start of a script.
The main cronjob configuration file is in:
/etc/crontab
It's necessary setup the following script:
- uplodad-savannah-db.sh #Used to update the local Savannah DB
The line to be added in the
crontab file:
- 01 * * * * root /cronjob/upload-savannah-db.sh
The script is scheduled the first minute of each hour.
Remember to set the correct execute permission for the file.
Step 6 |
Install fonts for jpgraph |
Install the tool
Microsoft Fonts, needed by jpgraph:
Option 1: Fast way
- Use yum or download the rpm from the web for msttcorefonts (and all its dependencies)
Option 2: Slow way
Option 3: Another way
- Build the cabextract rpm:
- rpmbuild -bb /usr/src/redhat/SPECS/cabextract.spec
- If everything went well just do:
- rpm -ivh /usr/src/redhat/RPMS/i386/cabextract-1.2-1.i386.rpm
- Build the msttcorefonts rpm:
- rpmbuild -bb msttcorefonts-2.0-1.spec
- and:
- rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
- mkdir -p /usr/X11R6/lib/X11/fonts/truetype/
- cp /usr/share/fonts/msttcorefonts/* /usr/X11R6/lib/X11/fonts/truetype/
Step 7 |
Configure Task Tracker tool |
It is necessary to configure properly the Task Tracker. Set the file
config.php with the following parameters:
- ../TaskTracker/config.php:
$db_host='localhost';
$db_user='savannah'; # or your user DB created
$db_passwd='savannah'; # or your password DB created for your user
$db_name='savannah'; # or your DB name
$savannah_project_name='egee-sa3';
$USE_GOCDB="no";
$DISPLAY_TREE="yes";
$USE_COMPLETE_PERCENTAGE="no";
$activityName="SA3";
$text_align="left";
$table_align=$text_align;
$header="cert/header.php";
$main="cert/mainWithoutTag.html";
$footer='cert/footer.php';
$web_prefix="../";
$jpgraph_location="/storage/gLite/Savannah/web/external/jpgraph/";
$time_measure="Days";
$executionPlan = array(3905 => "https://edms.cern.ch/file/910440/1/grnet.doc",
3917 => "https://edms.cern.ch/file/910440/1/ifae.doc",
3906 => "https://edms.cern.ch/file/910440/1/infn.doc",
3913 => "https://edms.cern.ch/file/910440/1/tcd.doc",
3914 => "https://edms.cern.ch/file/910440/1/ucy.doc");
.
.
.
$ban["task"]["Summary"]='"%[TTExclude]:%"';
Now test it:
Step 8 |
Configure Patch/Task Watcher tool |
It is necessary to configure properly the Patch/Task Watcher. Set the file
config.php with the following parameters:
- ../TaskWatcher/config.php:
.
$db_host='localhost';
$db_user='savannah'; # or your user DB created
$db_passwd='savannah'; # or your password DB created for your user
$db_name='savannah'; # or your DB name
.
.
$task_project_name='egee-sa3';
$patch_project_name='jra1mdw';
$bug_project_name='';
.
.
define('EGEE3_STARTDATE', mktime(0, 0, 0, 6, 1, 2008));
$title = "Task Watcher";
$activityName="SA3";
$text_align="center";
$table_align=$text_align;
$header="cert/header.html";
$footer='cert/footer.html';
.
.
$ban["patch"]["Status"]='"With Provider"';
$ban["task"]["Summary"]='"%[TTExclude]:%"';
.
.
$patchColor["State"]["In PreProduction"]="silver";
$patchColor["State"]["In PPS deployment test"]="silver";
.
.
$title_color["Immediate"]="rgb(255, 0, 0);";
$title_color["High"] = "rgb(255, 102, 0);";
$title_color["Normal"] = "rgb(0, 0, 153);";
$title_color["Low"] = "rgb(0, 153, 0);";
$title_color["Onhold"] = "rgb(102, 102, 102);";
Now test it:
Info |
Start Stop DB and HTTPD |
To start/stop MySQL daemon:
- /etc/init.d/mysqld
- service mysqld start #start the service
- service mysqld stop #stop the service
To start/stop httpd daemon:
- /etc/init.d/httpd
- service httpd start # start the service
- service httpd stop #stop the service
If you need other information, please contact:
lorenzo_DOT_sbolgi[AT]cern_DOT_ch
Task Tracker Structure
Patch/Task Watcher Structure
Details
Link
- CVS link:
- SA3 cron-utils: Here
- SA3 Task Tracker Project: Here
- SA3 Patch/Task Watcher Project: Here
--
LorenzoSbolgi - 30 Apr 2009