Thursday, November 11, 2010

SBR600 - AutoQA Project plan 0.1

Project plan 0.1 : Autotest server setting.

AutoQA is an automated test system for Fedora. Its design is simple: when certain events occur, AutoQA launches automated tests.
Autotest is currently b used as the test harness for AutoQA. It handles the dirty work of getting code onto test machines, running it, and holding all the results. Autotest is currently packaged for Fedora 13, but due to unpackaged dependencies, is not yet available for Fedora. Hence in order to install autotest, AutoQA package repository is needed to be configured first.
#wget -P /etc/yum.repos.d http://repos.fedorapeople.org/repos/fedora-qa/autoqa/fedora-autoqa.repo : This command adds the autoQA repository to the fedora repository directory.

Finally, with yum repositories configured, use the yum command to install autotest and it's dependencies.
# yum install autotest-server : This step installs autotest-server and its dependencies

The autotest server requires the Apache HTTP Server. No additional configuration is required,
autotest provides a /etc/httpd/conf.d/autotest.conf configuration file. All the conf files in
the conf.d directory will be included when httpd starts.

1. Start httpd:
# service httpd restart

2. Configure httpd to start on system boot:
# chkconfig httpd on

Autotest requires access to a mysql server. Also need set up a password for the mysql root . If it's not done, errors occur
#mysqladmin -u root password sbr600
After this, create the autotest_web and autotest_tko databases and user permissions needed by autotest.

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 database autotest_tko; grant all privileges on autotest_tko.* TO 'autotest'@'localhost' identified by 'NEWPASSWORD'; grant SELECT on autotest_tko.* TO 'nobody'@'%'; grant SELECT on autotest_tko.* TO 'nobody'@'localhost'; flush privileges;

With the mysql database configured, it's time to tell autotest how to connect, and to pre-populate the database with initial data.

1. The /usr/share/autotest/global_config.ini file is needed to be modified to do this.

In sections [TKO] and [AUTOTEST_WEB], enter the correct values for password
In section [TKO], change the value of database to autotest_tko
In section [SERVER], set the value of hostname

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

# python /usr/share/autotest/frontend/manage.py syncdb --noinput

4. Restart httpd

# service httpd restart

5. Start the autotest scheduler

# service autotestd start

If all the steps are properly done, you can access web-based autotest server page.





No comments:

Post a Comment