RFD5 - Testing Farm support for Fedora, CentOS Stream and RHEL in Image Mode
Status: ⏳️ in progress
This RFD describes the future testing process of Image Mode for Fedora, CentOS Stream and RHEL in Testing Farm.
For more information about Image Mode see:
Introduction
Image mode for RHEL, Fedora and CentOS Stream is an important new feature of our operating systems.
It is crucial that these operating systems are validated as a part of the standard development workflows and that the testing entry barrier for these variations of operating systems is as low as possible.
That means they need to get first-class support in tmt
and Testing Farm
, which form the standard tooling and infrastructure for testing Fedora, RHEL and CentOS Stream.
MVP
Please, do not consider the MVP as the final solution for testing Image Mode. It is for early enablement and the next sections of the document will deal with defining how the final and approved solution will look like. Please provide feedback directly to this RFD proposal to shape the future of testing according to your needs. |
Testing Farm team has implemented an MVP for testing Image mode on latest nightly composes of RHEL 9.6.0
, CentOS Stream 9
and Fedora-40
with the Testing Farm 2024-10.1 release.
Objectives
The MVP has the following objectives:
-
Provide a consistent test development and execution with standard
Fedora
,CentOS Stream
andRHEL
. -
Support
x86_64
andaarch64
architectures. -
Support nested virtualization via
Openstack
(Red Hat Ranch) and bare metal support onAWS
(Public Ranch). -
Gather feedback from the users and provide a common ground to agree on the final solution for testing.
-
Support multi-host scenarios with current limitations.
-
Execute existing
tmt
package or composes level tests. -
Restart Testing Farm request on Image Mode with a single command.
Please note that the MVP is:
-
Not usable in RHEL Gating.
-
Not supported for
ppc64le
ands390x
architectures. -
Not supported in
Beaker
,Azure
andIBM Cloud
.
Testing Environment
Testing Farm team has decided that the tests will start testing in a booted system in Image Mode.
This makes it possible to support existing testing infrastructure without the complexity of building, distributing the pre-created images to all supported infrastructures and booting them.
In other terms, you get a deployed system in a pre-defined configuration (see the section below for Containerfile
details), similar to a system ready for "day 2" operations as described in the Image mode for Red Hat Enterprise Linux: A quick start guide.
Composes
Testing Farm has built images for the following operating systems for consumption via tmt
and Testing Farm:
The Qcow2 images can be used with `tmt’s virtual provision plugin. See the Examples section for details. |
-
CentOS Stream 9 Image Mode
-
Testing Farm Compose:
CentOS-Stream-9-image-mode
-
Qcow2
-
Containerfile: https://gitlab.com/testing-farm/infrastructure/-/tree/main/images/bootc/Containerfile
-
Available on 🌎️ Public Ranch
-
-
Fedora 40 Image Mode
-
Testing Farm Compose:
Fedora-40-image-mode
-
Qcow2
-
Containerfile: https://gitlab.com/testing-farm/infrastructure/-/tree/main/images/bootc/Containerfile
-
Available on 🌎️ Public Ranch
-
-
RHEL 9.6 Image Mode
-
Testing Farm Compose:
RHEL-9.6.0-image-mode
-
Qcow2
-
Containerfile: https://gitlab.cee.redhat.com/baseos-qe/ansible-baseos-ci/-/blob/main/images/bootc/rhel/Containerfile
-
Available on 🎩 Red Hat Ranch (Red Hat employees only)
-
tmt
Image mode support for tmt
was added in teemtee/tmt#3229.
Currently, tmt
uses rpm-ostree install -A
to install all required dependencies for the tests execution into the test environment.
Examples
The examples document the most common use cases for the MVP.
tmt
Use the these examples to try out local development use cases using tmt
.
The image sizes are over 1GiB, so make sure to be patient if your network connection is slow.
The download will be needed only once, as the download images are cached by |
Please use tmt version |
When calling |
Provision and login to the system for experimenting (x86_64).
tmt run provision -h virtual --image http://images.osci.redhat.com/RHEL-9.6.0-image-mode-x86_64.qcow2 login finish
Provision and login to the system for experimenting (aarch64).
Running this command on |
The emulation does not currently work for Fedora-40. The testcloud maintainers are looking into the issue. |
tmt run provision -h virtual --image http://images.osci.redhat.com/RHEL-9.6.0-image-mode-aarch64.qcow2 --arch aarch64 login finish
Execute bash
component functional tests against RHEL-9.6.0-image-mode
locally.
rhpkg clone -a rpms/bash
cd bash
tmt run -a provision -h virtual --image http://images.osci.redhat.com/RHEL-9.6.0-image-mode-x86_64.qcow2
Switch to a new container image container which installed nginx
This use case is currently broken, we are looking into it. |
Testing Farm provides in the test environment following credentials to quay.io: * push access to quay.io/testing-farm/image-mode private repository. |
# provision the machine and login
tmt run -vv provision -h virtual --image /images/RHEL-9.6.0-image-mode-x86_64.qcow2 login
# create a container file which installs and enables nginx
cat > Containerfile << EOF
FROM images.paas.redhat.com/testingfarm/rhel-bootc:9.6
RUN dnf -y install nginx && systemctl enable nginx
EOF
# build and push the container image and tag it to the available repository, use a unique string for the tag
TAG=$(uuidgen)
podman build -t quay.io/testing-farm/image-mode:$TAG .
podman push quay.io/testing-farm/image-mode:$TAG
# switch to the newly created container on next boot
bootc switch quay.io/testing-farm/image-mode:$TAG
# reboot
reboot
# reconnect back to the tmt machine
tmt run --last login
systemctl status nginx
Testing Farm
Use these examples to try out common use cases using the Testing Farm service.
See Testing Farm onboarding docs if you are not onboarded.
See |
Restart cockpit
gating tests run against RHEL-9.6.0-image-mode
.
You can lookup an existing CI run via CI Dashboard.
-
Lookup a component for RHEL-9.6.0 and the test job you would like to restart
-
Click
Run Details
to get a link to the Testing Farm artifacts
testing-farm restart --compose RHEL-9.6.0-image-mode https://artifacts.osci.redhat.com/testing-farm/69e6b99c-25b2-4a2a-8efb-305eb7bd314f/
Execute bash
component functional tests in Testing Farm on x86_64.
rhpkg clone -a rpms/bash
cd bash
testing-farm request --compose RHEL-9.6.0-image-mode
Execute bash
component functional tests in Testing Farm on aarch64 and x86_64.
rhpkg clone -a rpms/bash
cd bash
testing-farm request --compose RHEL-9.6.0-image-mode --arch aarch64,x86_64
Production Support
Please see this merge request for proposal of the final solution for testing Image Mode in Testing Farm.