Skip to content

For users

Sergio Lindo Mansilla edited this page Jan 10, 2018 · 6 revisions

Index

In this wiki page you can find:

  1. How to get the latest docker images
  2. How to build the docker images yourself
  3. How to get an specific version of the docker images
  4. Test the webui
  5. Test the worker
  6. Get tests and needles for testing openSUSE
  7. Clone a job

1. How to get the latest docker images

To get the latest images, you can use:

# webui
user@pc:~$ docker pull binarysequence/openqa-webui
# worker
user@pc:~$ docker pull binarysequence/openqa-worker-x86_64

2. How to build the docker images yourself

Assuming that you are on your home directory and you have clone this repository locally to ~/github/dockerized-openQA

# webui
user@pc:~$ docker build -t openqa-webui github/dockerized-openQA/webui/
# worker
user@pc:~$ docker build -t openqa-worker-x86_64:latest github/dockerized-openQA/worker-x86_64/

3. How to get an specific version of the docker images

If you want to get an specific version, look for available tags in:

And then use:

user@pc:~$ docker pull binarysequence/openqa-webui:2017-11-24
user@pc:~$ docker pull binarysequence/openqa-worker-x86_64:2017-11-16

4. Test the webui

To be able to access the webui from the docker container, you need to open the ports 80 or 443. For 443 you may need to set up an ssl certificate and configure openQA to serve the webui through ssl. In this example we are only opening the port 80 to test the image. An rsync server is also included in the webui image. The worker will need to get test data and assets from the webui. openQA gives you freedom to provide those files how you like. I decided to choose rsync and include it on the docker image for the webui. To be able to access this rsync server from the docker container, you need to open the port 873. Of course, you can bind the containers ports to other ports on your host, in case that they are already in use. But, this wiki page doesn't cover this advanced set up.

You may not need to set up a name for the containers, but I am shipping the docker images with some default configuration that will help you to run both containers on the same machine with minimum effort.

You can execute:

user@pc:~$ docker run -d --name openqa_webui -p 80:80 -p 873:873 binarysequence/openqa-webui

To test if the webui is running, go to your browser and open http://localhost. You should see the landing page of the webui. Now click on the login link. You will be logged as the fake user Demo. Find more information about this users in the openQA documentation. This login is necessary so the webui creates a pair of default api keys that will be used for the worker to be able to connect to the webui.

You can see those keys in your browser at http://localhost/api_keys. Of course that should not be used on productive instance, but this wiki page is only covering a quick start for newcomers.

5. Test the worker

The worker uses qemu with kvm (https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine), so it must be executed on a machine that supports kvm. If not, the openQA jobs will end up as incomplete because they cannot find the kvm module. Find openQA job statuses at https://github.com/os-autoinst/openQA/blob/master/docs/GettingStarted.asciidoc#jobs.

To start the container, run:

user@pc:~$ docker run -d --privileged --name openqa_worker --link openqa_webui:openqa-webui binarysequence/openqa-worker-x86_64

The worker should automatically connect to your webui. You can see in your browser if your worker is connected at http://localhost/admin/workers.

known pitfalls:

6. Get tests and needles for testing openSUSE

openQA provides a script that automatically downloads the tests and the needles for openSUSE.

You need to execute that scrip in the webui container.

## when the container webui is running
user@pc:~$ docker exec -it --user geekotest openqa_webui /var/lib/openqa/script/fetchneedles

7. Clone a job

To clone a job, you have to execute the script clone_job in the webui container.

## when the container webui is running
user@pc:~$ docker exec -it --user geekotest openqa_webui /var/lib/openqa/script/clone_job.pl --host localhost --from https://openqa.opensuse.org 541932

known pitfalls: