Install Gratia Web

1 About this Document

Here we describe how to install and configure the Gratia-Web server. Gratia Web is a web server that displays the accounting information collected in the Gratia Databases. An OSG instance of Gratia Web is available here.

2 Requirements

2.1 Host and OS

  • A host to install the Gratia Web server.
  • OS is Red Hat Enterprise Linux 6, 7, and variants (see details...). Currently most of our testing has been done on Scientific Linux 6.
  • Root access.
  • Read access to a Gratia database (MySQL)

2.2 Networking

For more details on overall Firewall configuration, please see our Firewall documentation.

HTTP tcp 8100 choice-yes   Default http port for the Gratia Web server

3 Installation Procedure

3.1 Install the Repositories

HELP NOTE
If you are working on RHEL-5 you will need to install also the rpmforge repository to include a newer version of python-cherrypy that is required.

3.2 Install the Gratia Web package (osg-measurements-metrics-web)

As root install the package osg-measurements-metrics-web enabling the osg-development repo.

[root@gratiaweb ~]$ yum install osg-measurements-metrics-web --enablerepo=osg-development

3.3 Configure the database connection to be used by Gratia Web

Copy the DBParam.xml.rpmnew file that contains an skeleton of the database connection configuration for GratiaWeb:

[root@gratiaweb ~]$ cp /etc/DBParam.xml.rpmnew /etc/DBParam.xml

Edit /etc/DBParam.xml updating the user/password fields with a user with read access to the database.

4 Services

Gratia Web works with one web server and a cron job that generate static graphics for the home page of the web server. The default location of the static graphs crontab is /etc/cron.d/GratiaStaticGraphs.cron

4.1 Starting and Enabling Services

To start the Gratia Web web server execute as root the following command:
[root@gratiaweb ~]$ service GratiaWeb start

4.2 Stopping and Disabling Services

To stop the Gratia Web web server execute as root the following command:
[root@gratiaweb ~]$ service GratiaWeb stop

5 Validation of Service Operation

On a browser visit the following URLs (replacing host with localhost or the hostname of your server):

  • http://host:8100/gratia
  • http://host:8100/gratia/xml
  • http://host:8100/gratia/xml/facility_transfer_volume

6 Advanced Topic - Adding queries to GratiaWeb (OPTIONAL)

Check the following documentation about queries in GratiaWeb: Adding/Modifying Queries to GratiaWeb

7 Troubleshooting

7.1 Useful Configuration and Log Files

Service/Process Configuration File Description
gratia_web /etc/DBParam.xml Configuration for the database connection parameters.

Service/Process Log File Description
gratia_web /var/log/GratiaWeb-access.log Records of all HTTP requests received.
  /var/log/GratiaWeb-error.log Records errors produced while handling HTTP requests.
  /var/log/GratiaWeb.out Records all the stdout and stderr from the service.

8 Comments

-- JuanFelipeMosqueraMorales - 15 Jan 2015

Topic revision: r12 - 06 Dec 2016 - 18:12:42 - KyleGross
Hello, TWikiGuest!
Register

 
TWIKI.NET

TWiki | Report Bugs | Privacy Policy

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..