How to Setup a Patch Monitor

Index

Setup the Patch Monitor

Packages Needed:

  1. mysql-server
  2. mysql
  3. php
  4. cvs
  5. php-pear
  6. php-mysql
  7. php-gd
  8. rpm-build (for cabextract and msttcorefonts)
  9. jpgraph
  10. Scripts from org.glite.integration.savannah

Just with the default repositories from scientific linux 4 you can get all this packages.

yum install mysql-server mysql php cvs php-pear php-mysql rpm-build php-gd

Next get jpgraph from http://www.aditus.nu/jpgraph/jpdownload.php

For version 1.22-1:

cd $HOME

wget http://hem.bredband.net/jpgraph/jpgraph-1.22.1.tar.gz

tar zxvf jpgraph-1.22.1.tar.gz -C /var/www/

In future versions don't forget to change the directory in the web scripts of org.glite.integration.savannah, use sed or perl to change.

Here is a simple way
find . -type f -print | xargs perl -pi -e 's/jpgraph-1.22.1/jpgraph-<new-version>/g

Getting the web and cron scripts from org.glite.integration.savannah

cd $HOME

export CVSROOT=:ext:<username>@glite.cvs.cern.ch:/cvs/jra1mw/

export CVS_RSH=ssh

cvs checkout org.glite.integration.savannah

mkdir -p /home/glbuild/org.glite.integration.savannah/

mv org.glite.integration.savannah/cron-utils /home/glbuild/org.glite.integration.savannah/

mkdir -p /storage/gLite/Savannah

cp org.glite.integration.savannah/web/* /storage/gLite/Savannah/

Configuration of php.ini and httpd.conf


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>

Setup mysql database

/etc/init.d/mysqld start or service mysqld start (whatever suits your needs)

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 file upload-savannah-db.sh';
mysql>GRANT SELECT ON savannah.* TO 'savannah'@'localhost' IDENTIFIED BY 'check the password for this in any php file that is in the org.glite.integration.savannah/web directory';
mysql>quit

Fill the DB manually for the first time by running ./upload-savannah-db.sh, this way you can test if everything is properly configured.

Now setup the cron jobs:

0     *   *   *    *  /home/glbuild/org.glite.integration.savannah/cron-utils/upload-savannah-db.sh
0     8   *   *    *  /home/glbuild/org.glite.integration.savannah/cron-utils/run-savannah-watchdog.sh

Install 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
Follow this guide - > http://corefonts.sourceforge.net/ . If you had the same luck as me you need to compile cabextract from source.

Option 3: Another way
wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
wget http://www.cabextract.org.uk/cabextract-1.2-1.src.rpm  #RPM-based Linux distributions (Red Hat, SuSE, etc.)

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/

Test it: http://<your server>/gLite/Savannah/all.html

If you haven't done so, start the httpd daemon

service httpd start or /etc/init.d/httpd start 

The patch monitor should now be working.

Some tests...

http://<your server>/gLite/Savannah/patchHistory.php?area=none
http://<your server>/gLite/Savannah/patchHistory.php?area=cert

Notes on Security

The security context for the web service has to be set correctly, (Contact Louis Poncet for more information)

-- RicardoMendes - 06 May 2008

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2008-05-06 - RicardoMendes
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback