openSUSE:OpenQA:Setup
Bootstraping openQA under leap for local openQA
Once the system is installed - If installing inside a SUSE DTC use the skips
It is important to note: All these commands must be ran as root user - openQA assets are stored under /var/lib/openqa and the owner is geekotest
zypper in openQA-bootstrap ## skip_suse_specifics=1 skip_suse_tests=1 /usr/share/openqa/script/openqa-bootstrap /usr/share/openqa/script/openqa-bootstrap
The bootstrap script will install openQA and all of its dependencies, including dependencies for the test distribution of which you will need to make your own fork if you want to contribute
Running the bootstrap with the suse skips, will not download the test distribution (osado), so you will need to clone it yourself, same for the needles, you should fork https://github.com/os-autoinst/os-autoinst-distri-opensuse/ and https://github.com/os-autoinst/os-autoinst-needles-opensuse
cd /var/lib/openqa/share/tests git clone https://github.com/<yourfork>/os-autoinst-distri-opensuse/ opensuse cd /var/lib/openqa/share/tests/opensuse/products/opensuse git clone https://github.com/<yourfork>/os-autoinst-needles-opensuse needles
Setup for MicroOS tests
MicroOS and other distributions use symlinks so we can rehuse a lot of the test code
cd /var/lib/openqa/share/tests ln -s opensuse microos
cd /var/lib/openqa/share/tests/opensuse/products/microos ln -s ../opensuse/needles .
Firewall setup
Open firewall ports if you are using a different host to connect to the openQA instance
firewall-cmd --zone=public --add-service=http --permanent
If you plan to have more than one openQA worker (say two), and intend on using the developer mode, you will need to also open the ports
## for VNC when using developer mode firewall-cmd --add-port=5991/tcp --permanent firewall-cmd --add-port=5992/tcp --permanent
Reload firewalld to apply the changes
firewall-cmd --reload
At this stage you should be able to clone jobs for the opensuse distri (test distribution) a great candidate is the boot to snapshot test from Tumbleweed - it should pass without any hiccups
openqa-clone-job --skip-chained-deps https://openqa.opensuse.org/tests/4916400
once the test passes, you can start working on openQA tests.
Multi-machine setup
If you want to run or develop tests in a two node machine configuration, you will need to do some network changes, as described in the openQA documentation
Use the following script:
instances=2 ethernet=<your main interface or bridge> bash -x $(which os-autoinst-setup-multi-machine)
Mark the workers as tap capable (by adding tap worker class):
cat >> /etc/openqa/workers.ini <<EOF [global] WORKER_CLASS = qemu_x86_64,tap EOF
Enable two openQA worker instances
systemctl enable --now openqa-worker-plain@{1..2}
If first openQA worker instance was already running, then it needs a restart to pick new tap capability setting from workers.ini
systemctl restart openqa-worker-plain@1.service
Clone a job i.e rsync testsuite, again as root user:
openqa-clone-job --skip-chained-deps https://openqa.opensuse.org/tests/4921097