**
** Setting up a rteval XML-RPC server
**

The XML-RPC server has the purpose of collecting information from
several rteval clients.  Each client will get a unique system ID which
then can be used to track how each system changes behavior on
different kernels.  All of the data in the summary.xml produced by the
rteval script is sent over to the XML-RPC server and a copy is saved,
default location is /var/lib/rteval.  This XML file is then parsed and
the data is stored in a database for further analysis.


**
** Requirements
**
   - Apache web server
   - mod_python-3.3.x
   - PostgreSQL v8.3 or later
   - rteval 1.3


**
** Apache preparations
**

The default path used for the rteval client is

    http://{server hostname}/rteval/API1/

If you have a HTTP setup which will follow this scheme, you do not
need to change any URLs at all.


**
** Database preparations
**

All reports are saved in a database.  To create the needed database
user and database, execute the following command line:

   psql < ../sql/rteval-1.0.sql

This script will first create a database user called 'xmlrpc', assign
a default password before creating a database called 'rteval'.  The
database will be populated with the needed tables and the 'xmlrpc'
user will get the needed privileges to do its job.

Remember to also update the pg_hba.conf file in the PostgreSQL data
directory.  You need to allow the xmlrpc user access from the web
server.

pg_hba.conf entry example:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
hostssl rteval	    xmlrpc	127.0.0.1/32	      md5

The XML-RPC database connector will always try to connect via SSL.  To
modify the default password, connect to the database with psql and
issue this SQL command:

   rteval=# ALTER USER xmlrpc WITH ENCRYPTED PASSWORD '<newpassword>';


**
** Installing the needed files
**
A quick little shell script will copy the needed files for you.

    ./install.sh {server-side file path}

The {server-side file path} argument need to point at a directory
Apache uses for htdocs files.

When running the install.sh script, a configuration file suitable for
Apache will be generated (apache-rteval.conf).  This file needs to be
copied to a directory where Apache will pick it up, or implement its
content into your apache config file.

On RHEL/Fedora based distributions, the apache-rteval.conf can be
copied into /etc/httpd/conf.d/


**
**  Configuration
**

If you are not using any of the default values for
the database configuration, you need to create or modify the
/etc/rteval.conf file.  The XML-RPC service will read the
[xmlrpc_server] section in this file.

This is the default values, if the xmlrpc_server section is not found
or parameters is not set.

     # Paths
     datadir:     /var/lib/rteval
     xsltpath:    /usr/share/rteval

     # Database parameters
     db_server:   localhost
     db_port:     5432
     database:    rteval
     db_username: xmlrpc
     db_password: rtevaldb

The directory datadir parameter points at must be writable to the
apache process.  Here copies of the received summary.xml files will be
saved before being parsed into the the database.


**
** Testing the setup
**

For a quick test, dig up a summary.xml file from an earlier rteval run and
try sending it to the XML-RPC server by using the testclient_sendreportfile
script:

     ./testclient_sendreportfile --report=summary.xml \
                                 --xmlrpc-submit=localhost

See --help for more info on this utility.  Usually the log files of Apache and
PostgreSQL provides pretty good information on what's going wrong.