Getting started with OpenQA in Fedora

OpenQA and getting started with it!
Life is too , hence comes the need to automate test cases.

Installation Steps [You must be in the root]
1.dnf copr enable adamwill/openQA  #Needs to be enabled
2.dnf install openqa openqa-httpd  openqa-worker

3.create filesystem layout
cd /var/lib/openqa
mkdir factory/hdd
cd /etc/httpd/conf.d
cp openqa.conf.template openqa.conf
cp openqa-ssl.conf.template openqa-ssl.conf

4. setup apache
cd /etc/apache2/vhosts.d/
a2enmod headers
a2enmod proxy
a2enmod proxy_http

a2enmod proxy_wstunnel
a2enmod ssl
a2enflag SSL

5.Configure OpenQA WebUI by editing `/etc/openqa/openqa.ini`:
cp openqa-ssl.conf.template openqa-ssl.conf
cp openqa.conf.template openqa.conf
download_domains =
method = Fake
edit openqa-ssl.conf

6.Start the Services (consider also running `enable` if you want persistence:
vim openqa-ssl.conf
systemctl start httpd
systemctl start openqa-gru
systemctl start openqa-webui

7.Un-comment lines starting with `#SSL`. Replace paths to certificates from
`openqa.{crt,key}` to `server.{crt,key}`.
Create non-temporary API keys in the Web Interface at http://localhost click `Login`, then `Manage API Keys` and create new keyset.
Edit `/etc/openqa/client.conf`:

correct OpenID line
key = insert key from web api
secret = insert secret from web api
vim /etc/openqa/openqa.ini

You will face write issue , here's the solution

8.Start the Worker:
Uncomment & change:
systemctl start openqa-worker@1
provider =
method = OpenID

9.Check that it's active in the WebUI's admin interface. To start more workers, change the number after the `@` sign in the above command.

10.set up fedora tests from repo

Grab the tests, and initialize the database:
zypper in guestfs-tools
git clone /var/lib/openqa/tests/fedora
chown -R geekotest /var/lib/openqa/tests/
cd /var/lib/openqa/tests/
git clone fedora
chown -R geekotest:geekotest fedora
cd fedora

11.set up disks

To run the tests, you will also need to provide some disk images:
1.git clone ~/openqa_fedora_tools
2.dnf install libguestfs-tools libguestfs-xfs
3.mkdir -p /var/lib/openqa/factory/hdd /var/lib/openqa/factory/hdd/
~/openqa_fedora_tools/tools/ all
chown geekotest *

12.setup services
1.systemctl enable apache2
2.systemctl restart apache2
3.systemctl enable openqa-webui
4.systemctl restart openqa-webui

check if openqa-webui is runing

curl http://localhost/

13. login via OpenID in the web interface - the first one to login is automagically set to be the admin

13.setup Worker - go to http://localhost/api_keys & create the keys. Copy the key & secret to `/etc/openqa/client.conf`

14.start worker
systemctl enable openqa-worker@1
systemctl start openqa-worker@1


Popular posts from this blog

Rocket on Fedora

WebVr in Fedora/RHEL 25 Pre Release

How to create live USB with Fedora Media Writer on Windows 8.1