blob: 1298726ced28ffb4d48d5e73f7fff7ec5c78af86 [file] [log] [blame]
Setting up the database.
apt-get install mysql-server-5.0 python-mysqldb python-gd gnuplot
In this example, we use 'bob' as the user.
Now log into the main database as root:
$ mysql -u root -pmysql
mysql> create database tko;
mysql> grant all privileges on tko.* TO 'autotest_tko'@'localhost' identified by 'a_password';
mysql> grant SELECT on tko.* TO 'nobody'@'localhost';
mysql> grant SELECT on tko.* TO 'nobody'@'%';
mysql> quit
To create this schema inside the "tko" database:
$ mysql -u autotest_tko -pa_password tko < create_db
You could connect to the db if you wanted to:
$ mysql -u autotest_tko -pa_password tko
--------------------------------------------------
Autotest uses two accounts to access the database - a priviledged account
that's read/write and an unpriviledged one that's read/only. For parse to
work, you need to tell it how to log in - create a .priv_login file with
two lines
autotest_tko
a_password
NOW CHMOD THIS FILE SO ONLY YOU CAN READ IT!
$ chmod 600 .priv_login
For the unprivileged account, we default to "nobody" user with no password,
on localhost. If you didn't use that (as in the example above), you'll need
to create a .unpriv_login file too (equivalent to .priv_login format), but
most people won't need that.
--------------------------------------------------
To load the results of jobs and tests into the tko db:
./parse <data directory>
(e.g. ./parse /usr/local/autotest/results)
--------------------------------------------------
If you want to map machines into groups, create a file called "machines"
in the tko/ directory - on each line, put:
machine_name group_name
one line for each machine.
--------------------------------------------------
There are two separate sets of code. The backend creates the database.
parse, parse.py
The frontend parses the data for display: display.py, frontend.py, *.cgi
db.py is shared.