(Condense install instructions) |
(Update instructions to match autotest-0.12.0 release) |
||
Line 3: | Line 3: | ||
{{admon/note|Docs in progress|See [https://fedorahosted.org/autoqa/ticket/5 this trac ticket] for more details.}} | {{admon/note|Docs in progress|See [https://fedorahosted.org/autoqa/ticket/5 this trac ticket] for more details.}} | ||
This page details installing and configuring | This page details installing and configuring {{package|autotest-server}}. | ||
= Package installation = | = Package installation = | ||
Autotest is currently packaged for | Autotest is currently packaged for Fedora 13, but due to unpackaged dependencies, is not yet available for Fedora. The following section describes how autotest is installed on a Fedora 13 system using the autoqa package repository. | ||
== Use the right repos == | == Use the right repos == | ||
Line 43: | Line 43: | ||
Finally, with yum repositories configured, use the {{command|yum}} command to install ''autotest'' and it's dependencies. | Finally, with yum repositories configured, use the {{command|yum}} command to install ''autotest'' and it's dependencies. | ||
<pre># yum install autotest</pre> | <pre># yum install autotest-server</pre> | ||
= Configuration = | = Configuration = | ||
Line 80: | Line 80: | ||
#: <pre> | #: <pre> | ||
#:$ mysql -u root -p</pre> | #:$ mysql -u root -p</pre> | ||
# Create the | # Create the ''autotest_web'' database and user permissions needed by autotest using the following SQL commands. It is recommended that you use a password other than ''NEWPASSWORD''. | ||
#: <pre> | #: <pre> | ||
#: create database autotest_web; | #: create database autotest_web; | ||
Line 86: | Line 86: | ||
#: grant SELECT on autotest_web.* TO 'nobody'@'%'; | #: grant SELECT on autotest_web.* TO 'nobody'@'%'; | ||
#: grant SELECT on autotest_web.* TO 'nobody'@'localhost'; | #: grant SELECT on autotest_web.* TO 'nobody'@'localhost'; | ||
#: flush privileges;</pre> | |||
# Create the ''tko'' database and user permissions needed by autotest using the following SQL commands. It is recommended that you use a password other than ''NEWPASSWORD''. | |||
#: <pre> | |||
#: create database tko; | #: create database tko; | ||
#: grant all privileges on tko.* TO 'autotest'@'localhost' identified by 'NEWPASSWORD'; | #: grant all privileges on tko.* TO 'autotest'@'localhost' identified by 'NEWPASSWORD'; | ||
Line 104: | Line 107: | ||
#: <pre> | #: <pre> | ||
#: # /usr/share/autotest/frontend/manage.py syncdb --noinput</pre> | #: # /usr/share/autotest/frontend/manage.py syncdb --noinput</pre> | ||
# Restart httpd to | |||
#: <pre> | |||
#: $ service httpd restart</pre> | |||
# Make sure that current database users have admin privileges | # Make sure that current database users have admin privileges | ||
#: <pre> | #: <pre> |
Revision as of 20:21, 22 June 2010
This page details installing and configuring autotest-server
.
Package installation
Autotest is currently packaged for Fedora 13, but due to unpackaged dependencies, is not yet available for Fedora. The following section describes how autotest is installed on a Fedora 13 system using the autoqa package repository.
Use the right repos
Setup the required package repositories.
- If using RHEL or CentOS, configure the system to receive package updates using the update mechanism provided by the distribution (e.g. for RHEL, run
rhn_register
). - If using RHEL or CentOS, enable EPEL by following the instructions at EPEL/FAQ#howtouse
- Enable the Fedora infrastructure package repository. Create a configuration file
/etc/yum.repos.d/fedora-infra.repo
that contains the following information:- [fedora-infrastructure]
- name=fedora-infrastructure - $releasever - $basearch
- baseurl=http://infrastructure.fedoraproject.org/$releasever/$basearch
- enabled=1
- gpgcheck=0
- Enable the Fedora infrastructure package repository. Create a configuration file
/etc/yum.repos.d/autoqa.repo
that contains the following information:- [autoqa]
- name=autoqa - $releasever
- baseurl=http://jlaska.fedorapeople.org/autoqa/repos/$releasever
- enabled=1
- gpgcheck=0
Install
Finally, with yum repositories configured, use the yum
command to install autotest and it's dependencies.
# yum install autotest-server
Configuration
With the packages installed, it's time to configure related system services.
httpd
The autotest server requires the Apache HTTP Server. No additional configuration is required, autotest provides a /etc/httpd/conf.d/autotest.conf
configuration file.
- Start httpd:
# service httpd restart
- Configure httpd to start on system boot:
# chkconfig httpd on
mysql
Autotest requires access to a mysql server. You can use an existing server, or setup a new mysql server using the instructions below.
Initialization (optional)
If you are using an existing mysql-server, you may skip this section.
- Install and setup mysql server
- # yum install mysql-server
- # chkconfig mysqld on
- # service mysqld start
- Setup a password for the root database user. Please use a password other than NEWPASSWORD.
- # mysqladmin -u root password NEWPASSWORD
Tables and priveleges
Whether using a local mysql-server, or connecting to an existing mysql-server, autotest requires database tables with appropriate permissions.
- Using the
mysql
command, login to the root database using the password specified above- $ mysql -u root -p
- Create the autotest_web database and user permissions needed by autotest using the following SQL commands. It is recommended that you use a password other than NEWPASSWORD.
- create database autotest_web;
- grant all privileges on autotest_web.* TO 'autotest'@'localhost' identified by 'NEWPASSWORD';
- grant SELECT on autotest_web.* TO 'nobody'@'%';
- grant SELECT on autotest_web.* TO 'nobody'@'localhost';
- flush privileges;
- Create the tko database and user permissions needed by autotest using the following SQL commands. It is recommended that you use a password other than NEWPASSWORD.
- create database tko;
- grant all privileges on tko.* TO 'autotest'@'localhost' identified by 'NEWPASSWORD';
- grant SELECT on tko.* TO 'nobody'@'%';
- grant SELECT on tko.* TO 'nobody'@'localhost';
- flush privileges;
autotest
With the mysql database configured, it's time to tell autotest how to connect, and to pre-populate the database with initial data.
- Update the autotest configuration files
/usr/share/autotest/global_config.ini
and/usr/share/autotest/shadow_config.ini
, changing the values for password, hostname and notify_email. - Setup the database schemas and populate initial data
- # python /usr/share/autotest/database/migrate.py --database=AUTOTEST_WEB sync
- # python /usr/share/autotest/database/migrate.py --database=TKO sync
- Run the Django syncdb operation
- # /usr/share/autotest/frontend/manage.py syncdb --noinput
- Restart httpd to
- $ service httpd restart
- Make sure that current database users have admin privileges
- # mysql -u root -p -e 'update autotest_web.auth_user set is_superuser=1;'
Congratulations! Your autotest server should be up and running. Direct your web browser to http://localhost.