From c4809a5d5de945896728392551a09a1109ea3e02 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 27 Jun 2024 12:40:08 +0200 Subject: [PATCH 1/2] Remove support for building and testing mariadb on RHEL-7 Signed-off-by: Petr "Stone" Hracek --- .github/workflows/container-tests.yml | 2 +- .github/workflows/openshift-tests.yml | 2 +- 10.5/.exclude-rhel7 | 0 imagestreams/imagestreams.yaml | 3 -- imagestreams/mariadb-rhel.json | 36 --------------- test/run-openshift-remote-cluster | 2 +- test/test-lib-mysql.sh | 64 +++++++++++---------------- 7 files changed, 30 insertions(+), 79 deletions(-) create mode 100644 10.5/.exclude-rhel7 diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 8d959740..b49dbd96 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: [ "10.3", "10.5", "10.11" ] - os_test: [ "fedora", "rhel7", "rhel8", "rhel9", "c9s"] + os_test: [ "fedora", "rhel8", "rhel9", "c9s"] test_case: [ "container" ] if: | diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml index bdac0ab9..3c7d3c8a 100644 --- a/.github/workflows/openshift-tests.yml +++ b/.github/workflows/openshift-tests.yml @@ -28,7 +28,7 @@ jobs: fail-fast: false matrix: version: [ "10.3", "10.5", "10.11" ] - os_test: [ "rhel7", "rhel8", "rhel9"] + os_test: [ "rhel8", "rhel9"] test_case: [ "openshift-4" ] steps: diff --git a/10.5/.exclude-rhel7 b/10.5/.exclude-rhel7 new file mode 100644 index 00000000..e69de29b diff --git a/imagestreams/imagestreams.yaml b/imagestreams/imagestreams.yaml index 1ca038c6..e98034f2 100644 --- a/imagestreams/imagestreams.yaml +++ b/imagestreams/imagestreams.yaml @@ -17,9 +17,6 @@ - filename: mariadb-rhel.json latest: "10.11-el9" distros: - - name: RHEL 7 - app_versions: ["10.3", "10.5"] - - name: RHEL 8 app_versions: ["10.3", "10.5", "10.11"] diff --git a/imagestreams/mariadb-rhel.json b/imagestreams/mariadb-rhel.json index 83ea49cd..d950ef8d 100644 --- a/imagestreams/mariadb-rhel.json +++ b/imagestreams/mariadb-rhel.json @@ -9,42 +9,6 @@ }, "spec": { "tags": [ - { - "name": "10.3-el7", - "annotations": { - "openshift.io/display-name": "MariaDB 10.3 (RHEL 7)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MariaDB 10.3 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", - "iconClass": "icon-mariadb", - "tags": "database,mariadb", - "version": "10.3" - }, - "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhscl/mariadb-103-rhel7:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "10.5-el7", - "annotations": { - "openshift.io/display-name": "MariaDB 10.5 (RHEL 7)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MariaDB 10.5 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.", - "iconClass": "icon-mariadb", - "tags": "database,mariadb", - "version": "10.5" - }, - "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhscl/mariadb-105-rhel7:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, { "name": "10.3-el8", "annotations": { diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster index 56cfb2dd..cf0a1e62 100755 --- a/test/run-openshift-remote-cluster +++ b/test/run-openshift-remote-cluster @@ -5,7 +5,7 @@ # IMAGE_NAME specifies a name of the candidate image used for testing. # The image has to be available before this script is executed. # VERSION specifies the major version of the MariaDB in format of X.Y -# OS specifies RHEL version (e.g. OS=rhel7) +# OS specifies RHEL version (e.g. OS=rhel8) # THISDIR=$(dirname ${BASH_SOURCE[0]}) diff --git a/test/test-lib-mysql.sh b/test/test-lib-mysql.sh index a8420fb0..e9080634 100755 --- a/test/test-lib-mysql.sh +++ b/test/test-lib-mysql.sh @@ -45,7 +45,7 @@ function check_mysql_os_service_connection() { } function test_mysql_pure_image() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local image_name_no_namespace=${image_name##*/} local service_name="${image_name_no_namespace%%:*}-testing" @@ -64,7 +64,7 @@ function test_mysql_pure_image() { } function test_mysql_template() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local image_name_no_namespace=${image_name##*/} local service_name="${image_name_no_namespace%%:*}-testing" @@ -86,7 +86,7 @@ function test_mysql_template() { } function test_mysql_s2i() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local app=${2:-https://github.com/sclorg/mariadb-container.git} local context_dir=${3:-test/test-app} local image_name_no_namespace=${image_name##*/} @@ -117,18 +117,14 @@ function test_mariadb_integration() { TEMPLATES="mariadb-ephemeral-template.json mariadb-persistent-template.json" SHORT_VERSION="${VERSION//.}" - if [ "${OS}" == "rhel7" ]; then - namespace_image="rhscl/mariadb-${SHORT_VERSION}-rhel7" - else - namespace_image="${OS}/mariadb-${SHORT_VERSION}" - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + namespace_image="${OS}/mariadb-${SHORT_VERSION}" + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi for template in $TEMPLATES; do @@ -146,21 +142,17 @@ function test_mariadb_integration() { # Check the imagestream function test_mariadb_imagestream() { - local tag="-el7" - if [ "${OS}" == "rhel8" ]; then - tag="-el8" - elif [ "${OS}" == "rhel9" ]; then + local tag="-el8" + if [ "${OS}" == "rhel9" ]; then tag="-el9" fi - if [ "${OS}" != "rhel7" ]; then - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi TEMPLATES="mariadb-ephemeral-template.json @@ -171,15 +163,13 @@ function test_mariadb_imagestream() { } function test_mariadb_template() { - if [ "${OS}" != "rhel7" ]; then - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi TEMPLATES="mariadb-ephemeral-template.json From 8fcfa62bd47199c5b65a28b20353b4d7066856e6 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 27 Jun 2024 12:41:17 +0200 Subject: [PATCH 2/2] Update README.md files accordingly Signed-off-by: Petr "Stone" Hracek --- .../share/container-scripts/mysql/README.md | 12 +++++------- .../share/container-scripts/mysql/README.md | 12 +++++------- README.md | 19 +++++++++---------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/10.3/root/usr/share/container-scripts/mysql/README.md b/10.3/root/usr/share/container-scripts/mysql/README.md index 788e2e07..3ba20161 100644 --- a/10.3/root/usr/share/container-scripts/mysql/README.md +++ b/10.3/root/usr/share/container-scripts/mysql/README.md @@ -4,7 +4,6 @@ MariaDB 10.3 SQL Database Server Docker image This container image includes MariaDB 10.3 SQL database server for OpenShift and general usage. Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), -the CentOS images are available on [Quay.io/centos7](https://quay.io/organization/centos7), the CentOS Stream images are available on [Quay.io/sclorg](https://quay.io/organization/sclorg), and the Fedora images are available in [Fedora Registry](https://registry.fedoraproject.org/). The resulting image can be run using [podman](https://github.com/containers/libpod). @@ -197,16 +196,16 @@ Extending image --------------- This image can be extended in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images) application (where available). -For this, we will assume that you are using the `rhscl/mariadb-103-rhel7` image, +For this, we will assume that you are using the `rhel8/mariadb-103` image, available via `mariadb:10.3` imagestream tag in Openshift. -For example, to build a customized MariaDB database image `my-mariadb-rhel7` +For example, to build a customized MariaDB database image `my-mariadb-rhel8` with a configuration from `https://github.com/sclorg/mariadb-container/tree/master/examples/extend-image` run: ``` $ oc new-app mariadb:10.3~https://github.com/sclorg/mariadb-container.git \ - --name my-mariadb-rhel7 \ + --name my-mariadb-rhel8 \ --context-dir=examples/extend-image \ --env MYSQL_OPERATIONS_USER=opuser \ --env MYSQL_OPERATIONS_PASSWORD=oppass \ @@ -218,7 +217,7 @@ $ oc new-app mariadb:10.3~https://github.com/sclorg/mariadb-container.git \ or via s2i: ``` -$ s2i build --context-dir=examples/extend-image https://github.com/sclorg/mariadb-container.git rhscl/mariadb-103-rhel7 my-mariadb-rhel7 +$ s2i build --context-dir=examples/extend-image https://github.com/sclorg/mariadb-container.git rhel8/mariadb-103 my-mariadb-rhel8 ``` The directory passed to Openshift can contain these directories: @@ -361,7 +360,6 @@ See also -------- Dockerfile and other sources for this container image are available on https://github.com/sclorg/mariadb-container. -In that repository, the Dockerfile for RHEL7 is called Dockerfile.rhel7, -the Dockerfile for RHEL8 is called Dockerfile.rhel8, +In that repository, the Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, and the Dockerfile for Fedora is called Dockerfile.fedora. diff --git a/10.5/root/usr/share/container-scripts/mysql/README.md b/10.5/root/usr/share/container-scripts/mysql/README.md index 389b2742..db5aa6d1 100644 --- a/10.5/root/usr/share/container-scripts/mysql/README.md +++ b/10.5/root/usr/share/container-scripts/mysql/README.md @@ -4,7 +4,6 @@ MariaDB 10.5 SQL Database Server Docker image This container image includes MariaDB 10.5 SQL database server for OpenShift and general usage. Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), -the CentOS images are available on [Quay.io/centos7](https://quay.io/organization/centos7), the CentOS Stream images are available on [Quay.io/sclorg](https://quay.io/organization/sclorg), and the Fedora images are available in [Fedora Registry](https://quay.io/organization/fedora). The resulting image can be run using [podman](https://github.com/containers/libpod). @@ -197,16 +196,16 @@ Extending image --------------- This image can be extended in Openshift using the `Source` build strategy or via the standalone [source-to-image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images) application (where available). -For this, we will assume that you are using the `rhscl/mariadb-105-rhel7` image, +For this, we will assume that you are using the `rhel8/mariadb-105` image, available via `mariadb:10.5` imagestream tag in Openshift. -For example, to build a customized MariaDB database image `my-mariadb-rhel7` +For example, to build a customized MariaDB database image `my-mariadb-rhel8` with a configuration from `https://github.com/sclorg/mariadb-container/tree/master/examples/extend-image` run: ``` $ oc new-app mariadb:10.5~https://github.com/sclorg/mariadb-container.git \ - --name my-mariadb-rhel7 \ + --name my-mariadb-rhel8 \ --context-dir=examples/extend-image \ --env MYSQL_OPERATIONS_USER=opuser \ --env MYSQL_OPERATIONS_PASSWORD=oppass \ @@ -218,7 +217,7 @@ $ oc new-app mariadb:10.5~https://github.com/sclorg/mariadb-container.git \ or via s2i: ``` -$ s2i build --context-dir=examples/extend-image https://github.com/sclorg/mariadb-container.git rhscl/mariadb-105-rhel7 my-mariadb-rhel7 +$ s2i build --context-dir=examples/extend-image https://github.com/sclorg/mariadb-container.git rhel8/mariadb-105 my-mariadb-rhel8 ``` The directory passed to Openshift can contain these directories: @@ -361,8 +360,7 @@ See also -------- Dockerfile and other sources for this container image are available on https://github.com/sclorg/mariadb-container. -In that repository, the Dockerfile for RHEL7 is called Dockerfile.rhel7, -the Dockerfile for RHEL8 is called Dockerfile.rhel8, +In that repository, the Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for RHEL9 is called Dockerfile.rhel9, the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, and the Dockerfile for Fedora is called Dockerfile.fedora. diff --git a/README.md b/README.md index 06dc1b72..3ace0850 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ MariaDB versions currently provided are: * [MariaDB 10.11](10.11) RHEL versions currently supported are: -* RHEL7 * RHEL8 * RHEL9 @@ -44,26 +43,26 @@ CentOS versions currently supported are: Installation ---------------------- -* **RHEL7 based image** +* **RHEL8 based image** - These images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/mariadb-103-rhel7). + These images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhel8/mariadb-105). To download it run: ``` - $ podman pull registry.access.redhat.com/rhscl/mariadb-105-rhel7 + $ podman pull registry.access.redhat.com/rhel8/mariadb-105 ``` - To build a RHEL7 based MariaDB image, you need to run Docker build on a properly + To build a RHEL8 based MariaDB image, you need to run Docker build on a properly subscribed RHEL machine. ``` $ git clone --recursive https://github.com/sclorg/mariadb-container.git $ cd mariadb-container $ git submodule update --init - $ make build TARGET=rhel7 VERSIONS=10.5 + $ make build TARGET=rhel8 VERSIONS=10.5 ``` -For using other versions of MariaDB, just replace the `10.3` value by particular version +For using other versions of MariaDB, just replace the `10.5` value by particular version in the commands above. Note: while the installation steps are calling `podman`, you can replace any such calls by `docker` with the same arguments. @@ -95,16 +94,16 @@ Users can choose between testing MariaDB based on a RHEL or CentOS image. * **RHEL based image** - To test a RHEL7 based MariaDB image, you need to run the test on a properly + To test a RHEL8 based MariaDB image, you need to run the test on a properly subscribed RHEL machine. ``` $ cd mariadb-container $ git submodule update --init - $ make test TARGET=rhel7 VERSIONS=10.5 + $ make test TARGET=rhel8 VERSIONS=10.5 ``` -For using other versions of MariaDB, just replace the `10.3` value by particular version +For using other versions of MariaDB, just replace the `10.5` value by particular version in the commands above. **Notice: By omitting the `VERSIONS` parameter, the build/test action will be performed