From fda1a4745e5ea3101f492060c86268a75987a4d5 Mon Sep 17 00:00:00 2001 From: Albert Esteve Date: Mon, 3 Oct 2022 09:38:58 +0200 Subject: [PATCH 1/2] docker: add centos-9 test container Add centos-stream-9 Dockerfile to the docker folder so that it can be build and pushed, and later used in the pipelines. Signed-off-by: Albert Esteve --- docker/Dockerfile.centos-9 | 80 ++++++++++++++++++++++++++++++++++++++ docker/Makefile | 2 +- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile.centos-9 diff --git a/docker/Dockerfile.centos-9 b/docker/Dockerfile.centos-9 new file mode 100644 index 0000000000..748a1cc1f6 --- /dev/null +++ b/docker/Dockerfile.centos-9 @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: Red Hat, Inc. +# SPDX-License-Identifier: GPL-2.0-or-later + +FROM quay.io/centos/centos:stream9 + +# Add runtime dependencies. +RUN dnf install -y 'dnf-command(copr)' \ + && dnf copr enable -y ovirt/ovirt-master-snapshot centos-stream-9 \ + && dnf install -y ovirt-release-master \ + && dnf update -y \ + && dnf install -y \ + autoconf \ + automake \ + createrepo_c \ + dnf-utils \ + dosfstools \ + e2fsprogs \ + gcc \ + gdb \ + genisoimage \ + git \ + glusterfs-api \ + iproute-tc \ + iscsi-initiator-utils \ + lshw \ + lsof \ + lvm2 \ + make \ + mom \ + NetworkManager \ + nmstate \ + nmstate-plugin-ovsdb \ + openssl \ + ovirt-imageio-client \ + psmisc \ + python3 \ + python3-augeas \ + python3-blivet \ + python3-cryptography \ + python3-dateutil \ + python3-dbus \ + python3-decorator \ + python3-devel \ + python3-dmidecode \ + python3-ioprocess \ + python3-libselinux \ + python3-libvirt \ + python3-magic \ + python3-nose \ + python3-pip \ + python3-requests \ + python3-rpm \ + python3-sanlock \ + python3-six \ + python3-yaml \ + qemu-img \ + redhat-rpm-config \ + rpm-build \ + sanlock \ + sudo \ + systemd \ + systemd-udev \ + which \ + xfsprogs \ + && dnf clean all + +# Create vdsm user with groups kvm,qemu,sanlock +RUN useradd --system -m -u 36 -N -G 36,107,179 vdsm + +# Add gdb python support. +RUN debuginfo-install -y python3 \ + && dnf clean all + +# Add development packages +COPY requirements.txt requirements.txt +RUN python3 -m pip install --upgrade pip \ + && python3 -m pip install --requirement requirements.txt + +# Add lvm configuration. +COPY lvmlocal.conf /etc/lvm/ diff --git a/docker/Makefile b/docker/Makefile index 8199bb0e67..38099f3a29 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Red Hat, Inc. # SPDX-License-Identifier: GPL-2.0-or-later -targets := centos-8 +targets := centos-8 centos-9 prefix := vdsm-test .PHONY: $(targets) push From ab37085654077541466d77e3a21b29129071a1fa Mon Sep 17 00:00:00 2001 From: Albert Esteve Date: Mon, 3 Oct 2022 09:45:50 +0200 Subject: [PATCH 2/2] ci.yml: add centos-9 to container matrix Create distro matrix for testing different containers in the pipelines. Add centos-9 to the already existing centos-8 distro to the distro matrix. Fixes: #333 Signed-off-by: Albert Esteve --- .github/workflows/ci.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91cec7b999..20221f6537 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,11 @@ env: jobs: lint: runs-on: ubuntu-latest - container: quay.io/ovirt/vdsm-test-centos-8 + strategy: + fail-fast: false + matrix: + distro: [centos-8, centos-9] + container: quay.io/ovirt/vdsm-test-${{ matrix.distro }} steps: - uses: ovirt/checkout-action@main - name: Run linters @@ -17,8 +21,12 @@ jobs: env: TRAVIS_CI: 1 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: [centos-8, centos-9] container: - image: quay.io/ovirt/vdsm-test-centos-8 + image: quay.io/ovirt/vdsm-test-${{ matrix.distro }} # Required to create loop devices. options: --privileged steps: @@ -29,8 +37,12 @@ jobs: env: TRAVIS_CI: 1 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: [centos-8, centos-9] container: - image: quay.io/ovirt/vdsm-test-centos-8 + image: quay.io/ovirt/vdsm-test-${{ matrix.distro }} # Required to create loop devices. options: --privileged steps: @@ -41,8 +53,12 @@ jobs: env: TRAVIS_CI: 1 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: [centos-8, centos-9] container: - image: quay.io/ovirt/vdsm-test-centos-8 + image: quay.io/ovirt/vdsm-test-${{ matrix.distro }} # Needed for many operations, i.e. creating bridges options: --privileged steps: