Tuesday, May 29, 2012

Installing your own gratia webpage

In the OSG, we use a technology called Gratia for our accounting.  Every single job and data transfer on the OSG is accounted for in the database.  Of course, this is a lot of data, ~500,000 jobs and 1.2M transfers just today.  Therefore, we have a simple web interface to visualize this data.

Here's the quick instructions of how I setup my own version of it:

  1. Install a newer version of python-cherrypy from rpmforge.  EPEL version is not new enough.
    rpm -Uvh http://rpms.arrfab.net/rpmforge/packages/python-cherrypy/python-cherrypy-3.1.2-1.el5.rf.noarch.rpm 
  2. Install the OSG repos.
  3. Install the Metrics RPM:
    yum install OSG-Measurements-Metrics-Web -y
  4. Copy /etc/DBParam.xml.rpmnew to /etc/DBParam.xml
    cp /etc/DBParam.xml.rpmnew /etc/DBParam.xml 
  5. Now, you can edit DBParam.xml file to point to your own gratia databases.  For example, at Nebraska, we have an instance that points to our own Nebraska gratia server.  This way we can see only local usage.  To use the OSG's, you will need to use the readonly account.  Replace all of the ******'s with 'reader'.  In VIM, you can do:
  6. The website relies on a set of static graphs that are updated every few hours.  They have to be saved and served by the systems http server.  So install the http server:
    yum -y install httpd
  7. Make the directory for the static graphs to be saved into:
    mkdir -p /var/www/html/gratiastatic
  8. Configure the static graph generator to put the images in this directory, and to generate the images from the gratia instance.  You will need to change both the Source and Dest.  The configuration is in /etc/osg_graphs.conf:
  9. Change the static graphs location in the DBParam.xml:
    <staticfilehostname value=""> </staticfilehostname>
  10. Start the services:
    service httpd start
    service GratiaWeb start
Then, you should have a functioning gratia web instance.

Running private instance of gratia web

Monday, May 21, 2012

In NY for CHEP

Hanging out in Times Square
I'm in New York this week for CHEP 2012.  I'll be writing about my experiences here.  Stay Tuned.