From Fedora Project Wiki

m (Rename section)
m (Rename section (again))
Line 123: Line 123:
Congratulations!  Your autotest server should be up and running.  Direct your web browser to http://localhost.
Congratulations!  Your autotest server should be up and running.  Direct your web browser to http://localhost.


= Package Upgrade =
= Package upgrade =


When upgrading to a newer {{package|autotest|autotest-server}} package, it is common that the newer server includes database schema changes.  The procedure for updating your autotest database is the same procedure used when initially setting up the database.  Follow the instructions in [[#autotest]] after installing a newer {{package|autotest|autotest-server}} package.
When upgrading to a newer {{package|autotest|autotest-server}} package, it is common that the newer server includes database schema changes.  The procedure for updating your autotest database is the same procedure used when initially setting up the database.  Follow the instructions in [[#autotest]] after installing a newer {{package|autotest|autotest-server}} package.

Revision as of 13:36, 8 July 2010

QA.png


This page details installing and configuring Package-x-generic-16.pngautotest-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.

  1. 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).
  2. If using RHEL or CentOS, enable EPEL by following the instructions at EPEL/FAQ#howtouse
  3. Enable the AutoQA 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.

  1. Start httpd:
    # service httpd restart
  2. Configure httpd to start on system boot:
    # chkconfig httpd on

If you install the results front-end Package-x-generic-16.pngautoqa-israwhidebroken package, you will need to enable mod_wsgi.

  1. In /etc/httpd/conf.d/wsgi.conf, be sure that the mod_wsgi.so module is being loaded. You should see a line of text like the following:
    LoadModule wsgi_module modules/mod_wsgi.so

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.

  1. Install and setup mysql server
    # yum install mysql-server
    # chkconfig mysqld on
    # service mysqld start
  2. 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.

  1. Using the mysql command, login to the root database using the password specified above
    $ mysql -u root -p
  2. 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'@'%' identified by 'NEWPASSWORD';
    grant SELECT on autotest_web.* TO 'nobody'@'%';
    flush privileges;
  3. 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'@'%' identified by 'NEWPASSWORD';
    grant SELECT on tko.* TO 'nobody'@'%';
    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.

  1. 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.
  2. 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
  3. Run the Django syncdb operation
    # /usr/share/autotest/frontend/manage.py syncdb --noinput
  4. Restart httpd to
    $ service httpd restart
  5. Start the autotest scheduler
    $ service autotestd start


Congratulations! Your autotest server should be up and running. Direct your web browser to http://localhost.

Package upgrade

When upgrading to a newer Package-x-generic-16.pngautotest-server package, it is common that the newer server includes database schema changes. The procedure for updating your autotest database is the same procedure used when initially setting up the database. Follow the instructions in #autotest after installing a newer Package-x-generic-16.pngautotest-server package.

  1. Stop httpd
    $ service httpd stop
  2. Stop the autotest scheduler
    $ service autotestd stop
  1. 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
  2. Run the Django syncdb operation
    # /usr/share/autotest/frontend/manage.py syncdb --noinput
  3. Restart httpd to
    $ service httpd restart
  4. Start the autotest scheduler
    $ service autotestd start