summaryrefslogtreecommitdiffstats
path: root/server/README.xmlrpc
blob: 438657a27ad2dc2d31c98e8a373a6b13ad0c63ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
**
** Setting up a rteval XML-RPC server
**

The XML-RPC server has the purpose of collecting information from
several rteval clients.  All the data in the summary.xml produced by the
rteval script is sent over to the XML-RPC server and registered in a
submission queue.  The XML-RPC server will then send back a submission
ID to the client.

A parser daemon needs to run as well.  This daemon is connected to the
same database as the XML-RPC service and it will wait for new reports in
the submission queue to be parsed.  Look into the README.parser file
for more information on setting up the rteval_parserd process.

Each parsed report will get a unique system ID which then can be used to
track how each system changes behaviour on different kernels.


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


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

When installing the rteval-xmlrpc-1.1 RPM on a Fedora/RHEL based box,
Apache will be automatically configured.  But the Apache web server
will need to be restarted when you have setup the database.

     # server httpd restart

For manual installations, see the instructions under "Building and
installing from source" further down in this file.


**
** Database preparations
**

** Setting up a new database
All reports are saved in a database.  If you have not used the
rteval-xmlrpc interface before, you need to create the needed database
user and database, execute the following command line:

   # psql < /usr/share/doc/rteval-xmlrpc-1.1/rteval-1.2.sql

This script will first create a database user called 'rtevxmlrpc' and
'rtevparser', assign default password before creating the database called
'rteval'.  The database will be populated with the needed tables and the
'rtevxmlrpc' and 'rtevparser' users will get the needed privileges to do
their 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	    rtevxmlrpc	127.0.0.1/32	      md5
hostssl rteval	    rtevparser	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 rtevxmlrpc WITH ENCRYPTED PASSWORD '<newpassword>';
   rteval=# ALTER USER rtevparser WITH ENCRYPTED PASSWORD '<newpassword>';

Or you can use the "safe mode" via the psql command:

   rteval=# \password rtevxmlrpc
   Enter new password:
   Enter it again:
   rteval=# \password rtevparser
   Enter new password:
   Enter it again:


** Update an already existing database
If you already have an rteval database setup, you can run the delta
scripts to only do the pure database schema changes.

To find out which schema version you using, do the following:

   psql rteval -c "SELECT value FROM rteval_info WHERE key='sql_schema_ver'"
   value
   -------
     1.1
   (1 row)

This indicates that the database is at the schema version 1.1.  If you do not
have the rteval_info table, you are for sure on schema version 1.0.

* Update from schema version 1.0 to 1.1
   psql rteval < /usr/share/doc/rteval-xmlrpc-1.1/delta-1.0_1.1.sql

* Update from schema version 1.2 to 1.2
   psql rteval < /usr/share/doc/rteval-xmlrpc-1.1/delta-1.1_1.2.sql


**
** Building an installing from source
**

The rteval-xmlrpc uses autotools to configure and build the
rteval-xmlrpc server and parser.

   ./configure [--with-xmlrpc-webroot=<full path>]

If the --with-xmlrpc-webroot is not provided, the mod_python files
needed for the XML-RPC server will not be installed, and only the
report parser will be built and installed.

The path to the --with-xmlrpc-webroot must be a directory which the
Apache web server can access and serve files from (htdocs dir).  On
Fedora/RHEL this path should be:

     ./configure --with-xmlrpc-webroot=/var/www/html/rteval

With this done, you can now do the traditional 'make' and 'make
install'.  The default install prefix is /usr/local, unless you
changed it with --prefix=<path>.  You will then find the
rteval_parserd installed under /usr/local/bin/rteval_parserd and
README files, the SQL scripts and an Apache config file will be found
under /usr/local/share/doc/rteval-parser-1.1/

The Apache configuration file can be copied into the configuration
directory Apache uses for its modules.  On RHEL/Fedora based
distributions, the apache-rteval.conf can be copied into
/etc/httpd/conf.d/

For more information about the report parser (rteval-parserd), please
have a look at the README.parser file.


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

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

The directory the datadir parameter points at must be writable to the
apache process.  Here copies of the received summary.xml files will be
saved before the rteval-parserd process parses the reports.


**
** 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 if something goes wrong.