(5 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
= Package installation = | = Package installation = | ||
Use the {{command|yum}} command to install ''autotest'' and it's dependencies. | |||
<pre> yum install autotest-server</pre> | |||
The web interface is available in ''autotest-web'' package. Due to unpackaged dependencies (Google Web Toolkit), this package is not packaged in Fedora, but it is available in the AutoQA repository: | |||
Setup the required package repositories. | Setup the required package repositories. | ||
Line 26: | Line 27: | ||
<li>Add the same repositories as mentioned in the [[Install_and_configure_AutoQA#Use_the_Right_Repo|AutoQA installation guide]].</li> | <li>Add the same repositories as mentioned in the [[Install_and_configure_AutoQA#Use_the_Right_Repo|AutoQA installation guide]].</li> | ||
</ol> | </ol> | ||
Finally, install the package: | |||
Finally, | |||
<pre> yum install autotest-web</pre> | <pre> yum install autotest-web</pre> | ||
Line 51: | Line 37: | ||
The autotest server requires the Apache HTTP Server. No additional configuration is required, autotest provides a {{filename|/etc/httpd/conf.d/autotest.conf}} configuration file. | The autotest server requires the Apache HTTP Server. No additional configuration is required, autotest provides a {{filename|/etc/httpd/conf.d/autotest.conf}} configuration file. | ||
<ol> | |||
<li> Start httpd:<br> | |||
<pre>systemctl start httpd.service</pre> | |||
</li> | |||
<li>Configure httpd to start on system boot: <pre>systemctl enable httpd.service</pre></li> | |||
</ol> | |||
== mysql == | == mysql == | ||
Line 64: | Line 53: | ||
<ol> | <ol> | ||
<li> | <li>Setup mysql server | ||
<pre> | <pre>systemctl enable mysqld.service</pre> | ||
<pre>systemctl start mysqld.service</pre> | <pre>systemctl start mysqld.service</pre> | ||
</li> | </li> | ||
Line 101: | Line 84: | ||
<ol> | <ol> | ||
<includeonly><li>Examine the autotest configuration file {{filename|/usr/share/autotest/global_config.ini}} to determine whether updates are required</includeonly> | <includeonly><li>Examine the autotest configuration file {{filename|/usr/share/autotest/global_config.ini}} to determine whether updates are required</includeonly> | ||
<noinclude><li>Update the autotest configuration file {{filename|/ | <noinclude><li>Update the autotest configuration file {{filename|/etc/autotest/global_config.ini}} | ||
<ul> | <ul> | ||
<li>In section <code>[AUTOTEST_WEB]</code>: | <li>In section <code>[AUTOTEST_WEB]</code>: | ||
Line 122: | Line 105: | ||
</includeonly> | </includeonly> | ||
<li> Setup the database schemas and populate initial data | <li> Setup the database schemas and populate initial data | ||
<pre> | <pre>autotest-upgrade-db sync</pre> | ||
</li><li> Run the Django syncdb operation. This needs to be run twice, otherwise ''debug_user'' won't have access to the Django administrative interface. | </li><li> Run the Django syncdb operation. This needs to be run twice, otherwise ''debug_user'' won't have access to the Django administrative interface. | ||
<pre> | <pre> | ||
autotest-manage-rpc-server syncdb --noinput | |||
autotest-manage-rpc-server syncdb --noinput | |||
</pre> | </pre> | ||
</li><li> Restart httpd <pre>service | </li><li> Restart httpd <pre>systemctl restart httpd.service</pre> | ||
</li><li> Start the autotest scheduler <pre>service | </li><li> Start the autotest scheduler <pre>systemctl start autotestd.service</pre> | ||
</li><li> If you want to have autotest scheduler automatically started on machine boot, run one more command: <pre> | </li><li> If you want to have autotest scheduler automatically started on machine boot, run one more command: <pre>systemctl enable autotestd.service</pre></li> | ||
</ol> | </ol> | ||
</onlyinclude> | </onlyinclude> | ||
Congratulations! | Congratulations! Your autotest server should be up and running. Direct your web browser to http://localhost. | ||
= Package upgrade = | = Package upgrade = | ||
Line 147: | Line 130: | ||
Depending on how you use autotest, the {{filename|results/}} directory can fill up rather quickly. Depending on underlying file-system, you may run out of available inodes or disk space. To prevent both scenarios, you can use the {{command|tmpwatch}} command to remove results that meet certain criteria. For example, to remove test results older than ''60 days'', the following {{command|tmpwatch}} command can be used. | Depending on how you use autotest, the {{filename|results/}} directory can fill up rather quickly. Depending on underlying file-system, you may run out of available inodes or disk space. To prevent both scenarios, you can use the {{command|tmpwatch}} command to remove results that meet certain criteria. For example, to remove test results older than ''60 days'', the following {{command|tmpwatch}} command can be used. | ||
<pre> | |||
/usr/sbin/tmpwatch --dirmtime -m -f 60d /var/lib/autotest/results/ -X README | |||
</pre> | |||
or in case of version lower than 0.14 | |||
<pre> | <pre> | ||
/usr/sbin/tmpwatch --dirmtime -m -f 60d /usr/share/autotest/results/ -X README | /usr/sbin/tmpwatch --dirmtime -m -f 60d /usr/share/autotest/results/ -X README | ||
</pre> | </pre> | ||
[[Category:AutoQA]] | [[Category:AutoQA]] |
Latest revision as of 11:16, 29 November 2012
This page details installing and configuring autotest-server
.
Package installation
Use the yum
command to install autotest and it's dependencies.
yum install autotest-server
The web interface is available in autotest-web package. Due to unpackaged dependencies (Google Web Toolkit), this package is not packaged in Fedora, but it is available in the AutoQA repository:
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
- Add the same repositories as mentioned in the AutoQA installation guide.
Finally, install the package:
yum install autotest-web
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:
systemctl start httpd.service
- Configure httpd to start on system boot:
systemctl enable httpd.service
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.
- Setup mysql server
systemctl enable mysqld.service
systemctl start mysqld.service
- Setup a password for the root database user. Please use a password other than NEWPASSWORD.
mysqladmin -u root password NEWPASSWORD
Tables and privileges
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 abovemysql -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;
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 file
/etc/autotest/global_config.ini
- In section
[AUTOTEST_WEB]
:- Enter the correct value for
password
. - Set appropriate value for
job_max_runtime_hrs_default
, the maximum number of hours a single test can run before it is aborted. The recommended value for AutoQA purposes is2
, but we currently use10
because of autotest bug 117.
- Enter the correct value for
- In section
[SERVER]
, set the value ofhostname
- In section
- At this time, autotest and SELinux do not play well together. Until autotest conforms to SELinux policy, or custom policy is available, ensure SELinux is in permissive mode.
setenforce permissive vim /etc/sysconfig/selinux # set SELINUX=permissive
- Setup the database schemas and populate initial data
autotest-upgrade-db sync
- Run the Django syncdb operation. This needs to be run twice, otherwise debug_user won't have access to the Django administrative interface.
autotest-manage-rpc-server syncdb --noinput autotest-manage-rpc-server syncdb --noinput
- Restart httpd
systemctl restart httpd.service
- Start the autotest scheduler
systemctl start autotestd.service
- If you want to have autotest scheduler automatically started on machine boot, run one more command:
systemctl enable autotestd.service
Congratulations! Your autotest server should be up and running. Direct your web browser to http://localhost.
Package upgrade
When upgrading to a newer 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 autotest-server
package.
- Examine the autotest configuration file
/usr/share/autotest/global_config.ini
to determine whether updates are required - Stop httpd
service httpd stop
- Stop the autotest scheduler
service autotestd stop
- Setup the database schemas and populate initial data
autotest-upgrade-db sync
- Run the Django syncdb operation. This needs to be run twice, otherwise debug_user won't have access to the Django administrative interface.
autotest-manage-rpc-server syncdb --noinput autotest-manage-rpc-server syncdb --noinput
- Restart httpd
systemctl restart httpd.service
- Start the autotest scheduler
systemctl start autotestd.service
- If you want to have autotest scheduler automatically started on machine boot, run one more command:
systemctl enable autotestd.service
Maintenance
Removing old results
Depending on how you use autotest, the results/
directory can fill up rather quickly. Depending on underlying file-system, you may run out of available inodes or disk space. To prevent both scenarios, you can use the tmpwatch
command to remove results that meet certain criteria. For example, to remove test results older than 60 days, the following tmpwatch
command can be used.
/usr/sbin/tmpwatch --dirmtime -m -f 60d /var/lib/autotest/results/ -X README
or in case of version lower than 0.14
/usr/sbin/tmpwatch --dirmtime -m -f 60d /usr/share/autotest/results/ -X README