From Fedora Project Wiki

Revision as of 04:29, 15 February 2017 by Adamwill (talk | contribs) (update docker link to point upstream)

This page provides specific steps to do a basic one-system installation of openQA (with jobs run on the same system as the server) on Fedora (25 or higher), directly to the system. See these instructions if you would prefer to deploy openQA into Docker containers. For more details and background information on this process, see the upstream install guide.

  • Install the required packages:
sudo dnf install openqa openqa-httpd openqa-worker
  • Configure httpd:
cd /etc/httpd/conf.d/
cp openqa.conf.template openqa.conf
cp openqa-ssl.conf.template openqa-ssl.conf
  • Configure the web UI by editing /etc/openqa/openqa.ini:
[global]
branding=plain
download_domains = fedoraproject.org
  • To use insecure but convenient 'fake' authentication, add:
[auth]
method = Fake
  • To use more secure FAS-based authentication, add:
[auth]
method=OpenID
[openid]
provider = https://id.fedoraproject.org/
httpsonly = 1
  • Start the services (consider also running enable if you want persistence):
systemctl start httpd
systemctl start openqa-gru
systemctl start openqa-scheduler
systemctl start openqa-websockets
systemctl start openqa-webui
  • Create non-temporary API keys in the web interface at http://localhost. Click Login, then Manage API Keys and create a key and secret. Edit /etc/openqa/client.conf as follows:
[localhost]
key = insert key from web api
secret = insert secret from web api
  • Start a worker, and check that it shows up in the web UI admin interface:
systemctl start openqa-worker@1
  • To start more workers, change the number after the @ sign in the above command.
  • Check out the Fedora tests and load them into openQA:
cd /var/lib/openqa/tests/
git clone https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
chown -R geekotest:geekotest fedora
cd fedora
./templates
  • To run some of the tests, you will also need to build some hard disk images:
git clone https://pagure.io/fedora-qa/createhdds.git ~/createhdds
dnf install libguestfs-tools libguestfs-xfs python3-fedfind python3-libguestfs libvirt-daemon-config-network libvirt-python3 virt-install withlock
mkdir -p /var/lib/openqa/factory/hdd/fixed
cd /var/lib/openqa/factory/hdd/fixed
~/createhdds/createhdds.py all
chown geekotest *
Long running process
Note that this will take quite a long time to run. You can continue with the rest of the set up while it runs, but until all the images are generated, some tests will fail to run correctly.
  • [optional] Set up a cron job that will run regularly and re-generate some of the images every two weeks or so. Create a file /etc/cron.daily/createhdds with this content (adjusting /path/to/createhdds as appropriate):
#!/bin/sh
cd /var/lib/openqa/share/factory/hdd/fixed
LIBGUESTFS_BACKEND=direct withlock /var/lock/createhdds.lock /path/to/createhdds/createhdds.py all --clean
  • To stay up-to-date as the tests are updated, you can do this periodically:
cd /var/lib/openqa/share/tests/fedora
git pull
./templates --clean

At this point you should be able to schedule jobs (see the fedora_openqa instructions) and most of the tests should work. However, a few of the tests require two or more workers to be able to communicate with each other (e.g. the FreeIPA tests, where one job sets up a server, and other jobs set up clients and try to connect to the server). For these tests to work, you must do some quite complex software-defined networking configuration on the worker host(s). Instructions for this are in the page OpenQA_advanced_network_guide.