(Introduction) |
(mock_fedorainfra update) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 42: | Line 42: | ||
# service nfs restart | # service nfs restart | ||
</pre> | </pre> | ||
{{admon/important|Watch for SELinux and firewall configuration|Fedora has [[SELinux]] and firewall enabled by default. While setting up network services on your machines you must also configure SELinux and firewall accordingly, or disable them completely. SELinux can be disabled in {{filename|/etc/selinux/config}} and firewall by setting <code>chkconfig iptables off</code>.}} | |||
== Install AutoQA server == | == Install AutoQA server == | ||
* Install a machine that you want to use as an AutoQA server. It may be a virtual machine. Then execute all the steps below on that new machine. | * Install a machine that you want to use as an AutoQA server. It may be a virtual machine. Then execute all the steps below on that new machine. | ||
* Install Autotest server according to the guide [[Install and configure autotest]]. | * Install Autotest server according to the guide [[Install and configure autotest]]. | ||
* Mount your shared AutoQA checkout to this machine (adjust the IP address of your local machine and the path): | * Mount your shared AutoQA checkout to this machine (adjust the IP address of your local machine and the path): | ||
<pre> | <pre> | ||
Line 62: | Line 55: | ||
# mount -a | # mount -a | ||
</pre> | </pre> | ||
* Install AutoQA dependencies: | |||
* Install AutoQA | |||
<pre> | <pre> | ||
# cd /autoqa | # cd /autoqa | ||
# make install-requires | |||
</pre> | |||
* Install AutoQA: | |||
<pre> | |||
# make clean install | # make clean install | ||
# service autotestd restart | |||
</pre> | </pre> | ||
* (Optional) Install [https://github.com/tflink/mock_fedorainfra mock_fedorainfra] according to the [http://tflink.github.com/mock_fedorainfra/ installation guide] (as WSGI application). This will allow you to use fake Bodhi server to send AutoQA results to. Then edit {{filename|autoqa.conf}} and set <code>bodhi_server = http://your_server/bodhi/</code> (external URL) and <code>send_bodhi_comments = true</code>. Provide some fake FAS credentials in {{filename|secrets.conf}}. | |||
* (Optional) [[Install and configure Squid for AutoQA]] | |||
== Install AutoQA client == | == Install AutoQA client == | ||
* Install a machine that you want to use as an AutoQA client. It may be a virtual | * Install a machine that you want to use as an AutoQA client. It may be a virtual machine. | ||
* Register the client with the Autotest server according to the guide [[How to add autotest clients]]. | |||
* | |||
== The workflow == | == The workflow == | ||
Line 97: | Line 81: | ||
* You can use your AutoQA server for local execution of your tests. Just append <code>--local</code> to the command (see [[Writing AutoQA Tests#Run your test]]). Don't forget to run <code>make clean install</code> after you do some changes in your code. | * You can use your AutoQA server for local execution of your tests. Just append <code>--local</code> to the command (see [[Writing AutoQA Tests#Run your test]]). Don't forget to run <code>make clean install</code> after you do some changes in your code. | ||
* If you don't append the <code>--local</code> option, the test will be scheduled on the AutoQA client. | * If you don't append the <code>--local</code> option, the test will be scheduled on the AutoQA client. | ||
[[Category:AutoQA]] | [[Category:AutoQA]] |
Latest revision as of 15:19, 28 February 2012
This page will help you set up an environment for AutoQA development. This guide documents approaches that we have found convenient, but of course you can do anything differently, as you like.
Introduction
When developing tests for AutoQA (or AutoQA itself), there are a few things to consider:
- some tests may be potentially harmful, you don't want to execute it on your local machine
- even though most of the tests may be executed manually (without server scheduling), it is often helpful to try them out on the client-server architecture
This guide will therefore help you dive into AutoQA development while using three machines:
- Local machine
- the bare metal machine you have in front of you, used for coding (i.e. you have all your favorite IDEs and environment variables)
- AutoQA server
- (virtual) machine that will serve as a server or a standalone test execution machine (if something gets broken your local machine is not influenced)
- AutoQA client
- (virtual) machine that will serve as a client for your server (useful for testing the scheduler, etc)
Checkout the code
On your local machine, checkout the source code:
$ git clone git://git.fedorahosted.org/autoqa.git
You will do all the coding here, with your favorite tools.
In order to have your latest code available also on the AutoQA server and the AutoQA client, you will export your development directory over NFS and mount it on those machines.
- Install NFS service:
# yum install nfs-utils # chkconfig nfs on
- Put the following into
/etc/exports
:
/home/joe/autoqa *(rw,all_squash,anonuid=500,anongid=500)
Replace the path with the correct one, replace UID and GID numbers with your UID and GID numbers, and optionally replace the star with a network subset definition for better security (e.g. 192.168.1.0/24
if your server and client are on that network subset).
- Restart NFS service:
# service nfs restart
Install AutoQA server
- Install a machine that you want to use as an AutoQA server. It may be a virtual machine. Then execute all the steps below on that new machine.
- Install Autotest server according to the guide Install and configure autotest.
- Mount your shared AutoQA checkout to this machine (adjust the IP address of your local machine and the path):
# yum install nfs-utils # mkdir /autoqa # echo "192.168.1.1:/home/joe/autoqa /autoqa nfs defaults,soft,intr 0 0" >> /etc/fstab # mount -a
- Install AutoQA dependencies:
# cd /autoqa # make install-requires
- Install AutoQA:
# make clean install # service autotestd restart
- (Optional) Install mock_fedorainfra according to the installation guide (as WSGI application). This will allow you to use fake Bodhi server to send AutoQA results to. Then edit
autoqa.conf
and setbodhi_server = http://your_server/bodhi/
(external URL) andsend_bodhi_comments = true
. Provide some fake FAS credentials insecrets.conf
. - (Optional) Install and configure Squid for AutoQA
Install AutoQA client
- Install a machine that you want to use as an AutoQA client. It may be a virtual machine.
- Register the client with the Autotest server according to the guide How to add autotest clients.
The workflow
- You do all the coding on your local machine. Nothing is executed there, so you don't have to be afraid about losing your data or anything like that.
- Any time you want to test some changes on your AutoQA server, you have to log in there and perform the following:
# cd /autoqa # make clean install && service autotestd restart
- You can use your AutoQA server for local execution of your tests. Just append
--local
to the command (see Writing AutoQA Tests#Run your test). Don't forget to runmake clean install
after you do some changes in your code. - If you don't append the
--local
option, the test will be scheduled on the AutoQA client.