This document provides an overview of openQA and instructions for installing and configuring openQA on openSUSE Leap 42.1. It describes openQA's system architecture and workflow, and includes workshops to install openQA, configure the web UI and a worker, manage API keys, configure test settings, and run an openSUSE installation test.
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
openQA hands on with openSUSE Leap 42.1 - openSUSE.Asia Summit ID 2016
1.
2. Agenda
• Introduction of openQA
‒ System Architecture and Workflow
‒ Include Items : openQA, OS-autoinst, Needles ...etc.
‒ What is openQA-Worker doing for
‒ How is the Image Matching in openQA
‒ Contribute to Upstream in GitHub
• WORKSHOP
‒ Installation of openQA framework in openSUSE Leap 42.1
‒ How to run a test job and configure the settings on openQA WEBUI
‒ How to create/compose your own test case for openQA
17. OpenQA-Worker
• Workers are processes running virtual machines to
perform the actual testing. They are distributed as a
separate package and can be installed on multiple
machines but still using only one WebUI.
24. Workshop #1: Installation
• Add repo for openSUSE Leap 42.1
# zypper in openQA
• Installation of openQA
# zypper ar -f obs://devel:openQA/openSUSE_Leap_42.1 openQA
# zypper ar -f obs://devel:openQA:Leap:42.1/openSUSE_Leap_42.1 openQA-perl-modules
Refer to :https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc
25. Workshop #2: Basic Configuration
• Apache proxy configuration
• SSL/TLS
‒ If you don’t have a TLS/SSL certificate for your host you must
turn HTTPS off. You can do that in /etc/openqa/openqa.ini
# a2enmod headers
# a2enmod proxy
# a2enmod proxy_http
# a2enmod proxy_wstunnel
26. Workshop #3: Start openQA WebUI
• Use systemd command to enable openQA services
• The openQA web UI should be available on
http://localhost/ now.
• To ensure openQA runs on each boot, you should also
systemctl enable the same services.
# systemctl start openqa-scheduler
# systemctl start openqa-gru
# systemctl start openqa-websockets
# systemctl start openqa-webui
# systemctl restart apache2
27. Workshop #4: Run openQA-Worker
• Workers are processes running virtual machines to
perform the actual testing. They are distributed as a
separate package and can be installed on multiple
machines but still using only one WebUI.
• Installation
# zypper in openQA-worker
• Start
# systemctl start openqa-worker@1.service (You can start as many workers as you
dare, you just need to supply different worker id (number after @).)
28. Workshop #5: Manage API Key
• To allow workers to access your instance, you need to log
into openQA as operator and create a pair of API key and
secret.
• OpenQA WEBUI → Manage API keys → CREATE
‒ Use the API and fill in your installed worker machine
• Modify /etc/openqa/client.conf
[localhost]
key = 0123456789ABCDEF (replace into your key)
secret = 0123456789ABCDEF (replace into your key)
29. Workshop #6: User Authentication
• OpenQA supports three different authentication
methods - OpenID (default), iChain and Fake. See auth
section in /etc/openqa/openqa.ini
[auth]
• # method name is case sensitive!
• method = OpenID|iChain|Fake
• For Testing purposes only! Fake authentication bypass
any authentication and automatically allow any login
requests as Demo user with administrator privileges and
without password.
30.
31. Workshop #7: Test Configuration-1
• Medium types
• Distri → opensuse
• Version → 42.1
• Flavor → Desktop-DVD
• Arch → x86_64
• Settings → ISO_MAXSIZE=4700372992
SHUTDOWN_NEEDS_AUTH=1
33. Workshop #9: Test Configuration-3
• Job Group
• Name → openSUSE_42.1_installation
• Settings → DESKTOP = gnome
INSTALLONLY = 1
• Test suites
• Create a openSUSE 42.1 job group
• Add the test suite into the test group
34.
35. Workshop #10: Test ISO,Cases,Needles
• Test Needles
• Get → Download openSUSE-Leap-42.1-DVD-x86_64.iso file from official website
• Locate → /var/lib/openqa/factory/iso
• Test ISO
• Get → $git clone https://github.com/os-autoinst/os-autoinst-distri-opensuse
• Action → Rename os-autoinst-distri-opensuse folder as opensuse
• Locate → /var/lib/openqa/tests/opensuse
• Test Cases
• Get → $git clone https://github.com/os-autoinst/os-autoinst-needles-opensuse
• Action → Rename os-autoinst-needles-opensuse folder as needles
• Locate → /var/lib/openqa/tests/opensuse/products/opensuse/needles
36.
37. Workshop #11: Run openQA test
Test for openSUSE 42.1 GM ISO:
# /usr/share/openqa/script/client isos post ISO=openSUSE-Leap-42.1-DVD-x86_64.iso
DISTRI=opensuse VERSION=42.1 FLAVOR=Desktop-DVD ARCH=x86_64 BUILD=GM
• Launch openQA test via script