GridSafeDocumentation/Installation/

Installation

The Tomcat Manager application can be used to install and start the war file.

After installing webacct for the first time you should connect with a web-browser to complete the configuration. By default the first user to register with the application is given the Admin role allowing them to access the built-in administration forms. Additional Admin users can be set up using one of the Update Users roles form or by editing the role_table database table. Once a user has been authorized in this way there is a button on the main page to allow them to toggle the Admin role on and off.

Buttons to access the administration forms should appear at the bottom of the main page while the user has Admin turned on.

The Create New DataBase Property and the Update a DataBase Property forms allow you to add/modify entries to the Properties database table. Entries in this table are taken as Java configuration properties. It is also possible to update this table directly using SQL however in this case changes may not take effect until the application is re-started.

Set up logging and error reporting

Webacct contains code to generate logfiles and report error messages. While it is not necessary to configure these it will help in the diagnosis of any problems with the application. Webacct uses the log4j logging package that is configured using Java configuration properties. For example:

# Set the location of the log file
logdir=/var/webacct

# Set the name of the log file.
log4j.appender.H.File=${logdir}/Webacct.log

# To set up the log file to roll daily 
log4j.logger.uk.ac=WARN, H
log4j.appender.H=org.apache.log4j.RollingFileAppender
log4j.appender.H.MaxFileSize=1024KB
log4j.appender.H.MaxBackupIndex=100
log4j.appender.H.layout=org.apache.log4j.PatternLayout

These properties can be set using the Properties forms.

It is also possible to report error messages via email. Again this is configured using Java Properties

# The domain name of a machine which allows forwarding of outgoing SMTP traffic
mail.smtp.host=mailhost

# Address for email info messages
info.email_notify_address=who@example.com
# address to use as the sender
info.email_from_address=webacct@example.com

# Address for email errors
error.email_notify_address=who@example.com
# address to use as the sender
error.email_from_address=webacct@example.com

Set up the Usage record tables and properties

The Create Accounting Table form allows you to create new tables to hold accounting data. Select the appropriate Parser for the type of accounting data you wish to store. The initial table structure will be determined by the choice of Parser though this can be modified later. The default table structure will use a single table with separate fields for the important accounting properties. Though this is sufficient for generating simple reports it will often be necessary to modify this default structure.

There is a link from the main page that lists all the current database tables and provides forms for modifying the structure of some tables.

Configure the Reports

The final configuration step is to configure the reports. Each report is defined by a report template XML file You can set a search path for these template files using the report-templates java property to a comma separated list of file locations. Relative paths reference locations withing the warfile though absolute paths can point anywhere on the server where tomcat is running.

The administration forms provide Update/create Report Listing buttons. These allow you to control which Report templates appear in the list of reports on the main page.

There are also buttons to Update/Create Schema/Style sheet/Report Template files. Any changes you make to one of these files is actually stored in the database rather than actually modifying the underlying files. This ensures that any local changes you make will be preserved if the software is upgraded to a new version and makes it easier to revert to the default values. The create form of these buttons also allow you to create entries that live only in the database.

 

Grid-SAFE was funded by JISC and is maintained, developed, and managed by EPCC at the University of Edinburgh