-
Notifications
You must be signed in to change notification settings - Fork 4
For users
In this wiki page you can find:
- How to get the latest docker images
- How to build the docker images yourself
- How to get an specific version of the docker images
- Test the webui
- Test the worker
- Get tests and needles for testing openSUSE
- Clone a job
- This page expects that you already have some knowledge about docker and openQA. Please find the official documentation at:
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
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/
If you want to get an specific version, look for available tags in:
- https://hub.docker.com/r/binarysequence/openqa-webui/tags/
- https://hub.docker.com/r/binarysequence/openqa-worker-x86_64/tags/
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
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.
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.
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
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