Open ssssam opened 4 months ago
In Fedora openQA, everything is deployed via ansible - https://pagure.io/fedora-infra/ansible . worker hosts are defined in the inventory in a few groups - https://pagure.io/fedora-infra/ansible/blob/main/f/inventory/inventory#_348 . There are some significant definitions in the group vars, including firewall config required for tap stuff in https://pagure.io/fedora-infra/ansible/blob/main/f/inventory/group_vars/openqa_tap_workers . The playbook is https://pagure.io/fedora-infra/ansible/blob/main/f/playbooks/groups/openqa-workers.yml and the plays are in https://pagure.io/fedora-infra/ansible/blob/main/f/roles/openqa/worker . Worker hosts are physical machines running plain Fedora (currently 40) and install the relevant packages from Fedora's main repositories, where I maintain them.
We still use a very old-style deployment on Fedora, where the tests live on the server and are shared to the worker hosts via NFS, so checking out tests and so on happens on the server. The ansible plays take care of installing the packages, setting up networking, ensuring the NFS share is configured, enabling the worker instance services and so on.
Here's how transient workers are currently implemented in GNOME OS.
There are no permanent worker machines set up.
Tests are started from Gitlab CI pipelines. See the .gitlab-ci.yml for openqa-tests.git for how this is implemented. Each Gitlab CI job for QA does the following:
utils/fetch_test_media.sh
(a small wrapper around Curl) to download ISO and/or disk image from the S3 bucket where they are stored./etc/openqa/client.conf
with an openqa.gnome.org API key (which is passed in as Gitlab CI variables./etc/openqa/worker.conf
with a unique worker class. The worker class contains the Gitlab CI pipeline number./run_openqa_worker.sh
(the container entrypoint script) to start the worker daemon, which will connect to the web UI and register itself as a new worker.openqa-cli
to call thePOST isos
endpoint. We pass inconfig/scenario_definitions.yaml
, and openQA creates a job for each job_template defined in that file. Finally it parses the JSON response to get a list of job IDs.Future improvements:
openqa-cli
.