From 54e775d4b6d9316a65c0589613b9d7faa9900010 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 11 Apr 2019 10:08:56 +0100 Subject: [PATCH 01/11] CLOUD-2868 OpenJDK 11 RHEL8 image https://issues.jboss.org/browse/CLOUD-2868 This depends upon the following changes made to cct_module: https://github.com/jboss-openshift/cct_module/pull/335 Signed-off-by: Jonathan Dowland --- rhel8-jdk11-overrides.yaml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 rhel8-jdk11-overrides.yaml diff --git a/rhel8-jdk11-overrides.yaml b/rhel8-jdk11-overrides.yaml new file mode 100644 index 00000000..150c4122 --- /dev/null +++ b/rhel8-jdk11-overrides.yaml @@ -0,0 +1,44 @@ +schema_version: 1 + +from: "ubi8:latest" +name: &name "openjdk/openjdk-11-rhel8" +version: &version "1.0" +description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" + +labels: +- name: "com.redhat.component" + value: "openjdk-11-rhel8-container" +- name: "usage" + value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" + +envs: +- name: "JBOSS_IMAGE_NAME" + value: *name +- name: "JBOSS_IMAGE_VERSION" + value: *version + +modules: + install: + - name: jboss.container.openjdk.jdk + version: "11" + - name: jboss.container.maven.35.bash + version: "3.5" + +osbs: + configuration: + container: + compose: + pulp_repos: true + include_unpublished_pulp_repos: true + repository: + name: containers/openjdk + branch: openjdk-11-rhel8 + +packages: + content_sets: + x86_64: + - rhel-8-for-x86_64-baseos-rpms + - rhel-8-for-x86_64-appstream-rpms + ppc64le: + - rhel-8-for-ppc64le-baseos-rpms + - rhel-8-for-ppc64le-appstream-rpms From 11f64c85e33aee281fb9803109e7a5acf6adabf4 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 11 Apr 2019 11:43:23 +0100 Subject: [PATCH 02/11] Add tests to check for multiple installed OpenJDK versions Signed-off-by: Jonathan Dowland --- tests/features/java/openjdk.feature | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/features/java/openjdk.feature diff --git a/tests/features/java/openjdk.feature b/tests/features/java/openjdk.feature new file mode 100644 index 00000000..ca83fc44 --- /dev/null +++ b/tests/features/java/openjdk.feature @@ -0,0 +1,14 @@ +# TODO: it would be nice to make the below less specific to 8 & 11. What about when 12 +# is released, etc. +Feature: Container only has one OpenJDK version installed + + @centos/openjdk-8-centos7 + @redhat-openjdk-18/openjdk18-openshift + Scenario: Check that only OpenJDK 8 is installed + Then run rpm -qa in container and check its output does not contain java-11 + + @centos/openjdk-11-centos7 + @openjdk/openjdk-11-rhel7 + @openjdk/openjdk-11-rhel8 + Scenario: Check that only OpenJDK 8 is installed + Then run rpm -qa in container and check its output does not contain java-1.8.0 From 91fb94562f196402d5c9c920a58fdcdc3b84db91 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 11 Apr 2019 14:33:51 +0100 Subject: [PATCH 03/11] Fix jstat/hperf test Remove elaborate pgrep|xargs stuff, pgrep is in procps-ng which is not installed by default in our UBI image, but the Java PID is guaranteed to be #1 anyway since we exec it from the runner script on purpose. Switch to the undertow-servlet quickstart as the repository to base the test on; the sprintboot example doesn't remain running for more than a second or so and so is not suited for tests that rely on it running (all the other instances of it in this file appear to be checking static properties so it doesn't matter as much for those) Signed-off-by: Jonathan Dowland --- tests/features/java/java_s2i.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/features/java/java_s2i.feature b/tests/features/java/java_s2i.feature index 0a8a92a0..c45b8eeb 100644 --- a/tests/features/java/java_s2i.feature +++ b/tests/features/java/java_s2i.feature @@ -307,6 +307,6 @@ Feature: Openshift OpenJDK S2I tests And run find /deployments in container and check its output for spring-boot-sample-simple-1.5.0.BUILD-SNAPSHOT.jar Scenario: Check java perf dir owned by jboss (CLOUD-2070) - Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple - Then run sh -c 'pgrep -x java | xargs -I{} jstat -gc {} 1000 1' in container and check its output for S0C - And run sh -c 'stat --printf="%U %G" /tmp/hsperfdata_jboss/' in container and check its output for jboss root + Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet + Then run jstat -gc 1 1000 1 in container and check its output for S0C + And run stat --printf="%U %G" /tmp/hsperfdata_jboss/ in container and check its output for jboss root From b256c84d6e79bbcbb6307e9a0a89b925af9c62f3 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Fri, 12 Apr 2019 11:47:27 +0100 Subject: [PATCH 04/11] Fix OpenJDK version tests Signed-off-by: Jonathan Dowland --- tests/features/java/openjdk.feature | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/features/java/openjdk.feature b/tests/features/java/openjdk.feature index ca83fc44..5cc563d3 100644 --- a/tests/features/java/openjdk.feature +++ b/tests/features/java/openjdk.feature @@ -5,10 +5,16 @@ Feature: Container only has one OpenJDK version installed @centos/openjdk-8-centos7 @redhat-openjdk-18/openjdk18-openshift Scenario: Check that only OpenJDK 8 is installed - Then run rpm -qa in container and check its output does not contain java-11 + When container is started with args + | arg | value | + | command | rpm -qa | + Then available container log should not contain java-11 @centos/openjdk-11-centos7 @openjdk/openjdk-11-rhel7 @openjdk/openjdk-11-rhel8 Scenario: Check that only OpenJDK 8 is installed - Then run rpm -qa in container and check its output does not contain java-1.8.0 + When container is started with args + | arg | value | + | command | rpm -qa | + Then available container log should not contain java-1.8.0 From a51eda527465cfd51095a5f76a84aab746322bc4 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 18 Apr 2019 12:31:28 +0100 Subject: [PATCH 05/11] Initial RHEL8/OpenJDK 1.8 image Signed-off-by: Jonathan Dowland --- rhel8-jdk8-overrides.yaml | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 rhel8-jdk8-overrides.yaml diff --git a/rhel8-jdk8-overrides.yaml b/rhel8-jdk8-overrides.yaml new file mode 100644 index 00000000..be156747 --- /dev/null +++ b/rhel8-jdk8-overrides.yaml @@ -0,0 +1,42 @@ +schema_version: 1 + +from: "ubi8:latest" +name: &name "openjdk/openjdk-1.8-rhel8" +version: &version "1.0" +description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" + +labels: +- name: "com.redhat.component" + value: "openjdk-1.8-rhel8-container" +- name: "usage" + value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" + +envs: +- name: "JBOSS_IMAGE_NAME" + value: *name +- name: "JBOSS_IMAGE_VERSION" + value: *version + +modules: + install: + - name: jboss.container.maven.35.bash + version: "3.5" + +osbs: + configuration: + container: + compose: + pulp_repos: true + include_unpublished_pulp_repos: true + repository: + name: containers/openjdk + branch: openjdk-1.8-rhel8 + +packages: + content_sets: + x86_64: + - rhel-8-for-x86_64-baseos-rpms + - rhel-8-for-x86_64-appstream-rpms + ppc64le: + - rhel-8-for-ppc64le-baseos-rpms + - rhel-8-for-ppc64le-appstream-rpms From b38ac2138b90cd3a636e3112631aca8357f978bc Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 18 Apr 2019 14:34:20 +0100 Subject: [PATCH 06/11] Fix typo on test scenario name Signed-off-by: Jonathan Dowland --- tests/features/java/openjdk.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/features/java/openjdk.feature b/tests/features/java/openjdk.feature index 5cc563d3..d639213d 100644 --- a/tests/features/java/openjdk.feature +++ b/tests/features/java/openjdk.feature @@ -13,7 +13,7 @@ Feature: Container only has one OpenJDK version installed @centos/openjdk-11-centos7 @openjdk/openjdk-11-rhel7 @openjdk/openjdk-11-rhel8 - Scenario: Check that only OpenJDK 8 is installed + Scenario: Check that only OpenJDK 11 is installed When container is started with args | arg | value | | command | rpm -qa | From 526b8ca639f115e02083481c83d912701ea70ac2 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Tue, 23 Apr 2019 15:30:07 +0100 Subject: [PATCH 07/11] Update RHEL8 image names: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rhel8 → ubi8. This leaves namespace for a future non-UBI8 RHEL8 image, although I don't expect we will ever have one. jdk8 → jdk1.8, and avoid contracting "1.8" to "18" which would eventually cause us problems. Signed-off-by: Jonathan Dowland --- tests/features/java/openjdk.feature | 3 ++- rhel8-jdk8-overrides.yaml => ubi8-jdk1.8-overrides.yaml | 6 +++--- rhel8-jdk11-overrides.yaml => ubi8-jdk11-overrides.yaml | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) rename rhel8-jdk8-overrides.yaml => ubi8-jdk1.8-overrides.yaml (89%) rename rhel8-jdk11-overrides.yaml => ubi8-jdk11-overrides.yaml (89%) diff --git a/tests/features/java/openjdk.feature b/tests/features/java/openjdk.feature index d639213d..29488d78 100644 --- a/tests/features/java/openjdk.feature +++ b/tests/features/java/openjdk.feature @@ -4,6 +4,7 @@ Feature: Container only has one OpenJDK version installed @centos/openjdk-8-centos7 @redhat-openjdk-18/openjdk18-openshift + @openjdk/openjdk-1.8-ubi8 Scenario: Check that only OpenJDK 8 is installed When container is started with args | arg | value | @@ -12,7 +13,7 @@ Feature: Container only has one OpenJDK version installed @centos/openjdk-11-centos7 @openjdk/openjdk-11-rhel7 - @openjdk/openjdk-11-rhel8 + @openjdk/openjdk-11-ubi8 Scenario: Check that only OpenJDK 11 is installed When container is started with args | arg | value | diff --git a/rhel8-jdk8-overrides.yaml b/ubi8-jdk1.8-overrides.yaml similarity index 89% rename from rhel8-jdk8-overrides.yaml rename to ubi8-jdk1.8-overrides.yaml index be156747..54f9508e 100644 --- a/rhel8-jdk8-overrides.yaml +++ b/ubi8-jdk1.8-overrides.yaml @@ -1,13 +1,13 @@ schema_version: 1 from: "ubi8:latest" -name: &name "openjdk/openjdk-1.8-rhel8" +name: &name "openjdk/openjdk-1.8-ubi8" version: &version "1.0" description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" labels: - name: "com.redhat.component" - value: "openjdk-1.8-rhel8-container" + value: "openjdk-1.8-ubi8-container" - name: "usage" value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" @@ -30,7 +30,7 @@ osbs: include_unpublished_pulp_repos: true repository: name: containers/openjdk - branch: openjdk-1.8-rhel8 + branch: openjdk-1.8-ubi8 packages: content_sets: diff --git a/rhel8-jdk11-overrides.yaml b/ubi8-jdk11-overrides.yaml similarity index 89% rename from rhel8-jdk11-overrides.yaml rename to ubi8-jdk11-overrides.yaml index 150c4122..1ed090b2 100644 --- a/rhel8-jdk11-overrides.yaml +++ b/ubi8-jdk11-overrides.yaml @@ -1,13 +1,13 @@ schema_version: 1 from: "ubi8:latest" -name: &name "openjdk/openjdk-11-rhel8" +name: &name "openjdk/openjdk-11-ubi8" version: &version "1.0" description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" labels: - name: "com.redhat.component" - value: "openjdk-11-rhel8-container" + value: "openjdk-11-ubi8-container" - name: "usage" value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" @@ -32,7 +32,7 @@ osbs: include_unpublished_pulp_repos: true repository: name: containers/openjdk - branch: openjdk-11-rhel8 + branch: openjdk-11-ubi8 packages: content_sets: From 5dcf22a5d9840b9ee498aa76bc567b7417de8a60 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 24 Apr 2019 14:04:14 +0100 Subject: [PATCH 08/11] add package manager key for ubi8 images Signed-off-by: Jonathan Dowland --- ubi8-jdk1.8-overrides.yaml | 1 + ubi8-jdk11-overrides.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/ubi8-jdk1.8-overrides.yaml b/ubi8-jdk1.8-overrides.yaml index 54f9508e..01bd9e09 100644 --- a/ubi8-jdk1.8-overrides.yaml +++ b/ubi8-jdk1.8-overrides.yaml @@ -33,6 +33,7 @@ osbs: branch: openjdk-1.8-ubi8 packages: + manager: dnf content_sets: x86_64: - rhel-8-for-x86_64-baseos-rpms diff --git a/ubi8-jdk11-overrides.yaml b/ubi8-jdk11-overrides.yaml index 1ed090b2..38d9557c 100644 --- a/ubi8-jdk11-overrides.yaml +++ b/ubi8-jdk11-overrides.yaml @@ -35,6 +35,7 @@ osbs: branch: openjdk-11-ubi8 packages: + manager: dnf content_sets: x86_64: - rhel-8-for-x86_64-baseos-rpms From d0d234855aa0e8fd8fc30d3d3cadda38ffcaad80 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 25 Apr 2019 11:01:45 +0100 Subject: [PATCH 09/11] Adjust test tagging to cover RHEL7/JDK8 Signed-off-by: Jonathan Dowland --- tests/features/java/gc.feature | 1 + tests/features/java/hawkular.feature | 1 + tests/features/java/java_s2i.feature | 1 + tests/features/java/jolokia.feature | 1 + tests/features/java/ports.feature | 1 + tests/features/java/runtime.feature | 1 + tests/features/openshift.feature | 2 ++ 7 files changed, 8 insertions(+) diff --git a/tests/features/java/gc.feature b/tests/features/java/gc.feature index 25d708d7..337e2ec6 100644 --- a/tests/features/java/gc.feature +++ b/tests/features/java/gc.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK GC tests diff --git a/tests/features/java/hawkular.feature b/tests/features/java/hawkular.feature index 4c4645aa..9ff230ed 100644 --- a/tests/features/java/hawkular.feature +++ b/tests/features/java/hawkular.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK Hawkular tests diff --git a/tests/features/java/java_s2i.feature b/tests/features/java/java_s2i.feature index c45b8eeb..2a6dc197 100644 --- a/tests/features/java/java_s2i.feature +++ b/tests/features/java/java_s2i.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK S2I tests # NOTE: these tests should be usable with the other images once we have refactored the JDK scripts. diff --git a/tests/features/java/jolokia.feature b/tests/features/java/jolokia.feature index bb5fea2a..283ebd95 100644 --- a/tests/features/java/jolokia.feature +++ b/tests/features/java/jolokia.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK Jolokia tests diff --git a/tests/features/java/ports.feature b/tests/features/java/ports.feature index 97d317af..123298a0 100644 --- a/tests/features/java/ports.feature +++ b/tests/features/java/ports.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK port tests diff --git a/tests/features/java/runtime.feature b/tests/features/java/runtime.feature index 9aad5ea9..23ea9877 100644 --- a/tests/features/java/runtime.feature +++ b/tests/features/java/runtime.feature @@ -1,4 +1,5 @@ @openjdk +@redhat-openjdk-18 @centos/openjdk-8-centos7 @centos/openjdk-11-centos7 Feature: Openshift OpenJDK Runtime tests diff --git a/tests/features/openshift.feature b/tests/features/openshift.feature index 22e55fd4..2bb38764 100644 --- a/tests/features/openshift.feature +++ b/tests/features/openshift.feature @@ -1,6 +1,7 @@ Feature: Tests for all openshift images @openjdk + @redhat-openjdk-18 Scenario: Check that product labels are correctly set # We don't set 'release' or 'architecture' on CI builds, but it's set on OSBS builds # Since we base on an image which has it already set, it's kind of meaningless @@ -11,6 +12,7 @@ Feature: Tests for all openshift images And the image should contain label architecture with value x86_64 @openjdk + @redhat-openjdk-18 Scenario: Check that common labels are correctly set Given image is built Then the image should contain label version From 537b15d1de53dca5dc2b13311fbc8c87ad7cf16a Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 1 May 2019 10:41:55 +0100 Subject: [PATCH 10/11] Rename UBI8 images (back) to RHEL8 Signed-off-by: Jonathan Dowland --- ubi8-jdk1.8-overrides.yaml => rhel8-jdk1.8-overrides.yaml | 6 +++--- ubi8-jdk11-overrides.yaml => rhel8-ubi8-overrides.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename ubi8-jdk1.8-overrides.yaml => rhel8-jdk1.8-overrides.yaml (89%) rename ubi8-jdk11-overrides.yaml => rhel8-ubi8-overrides.yaml (90%) diff --git a/ubi8-jdk1.8-overrides.yaml b/rhel8-jdk1.8-overrides.yaml similarity index 89% rename from ubi8-jdk1.8-overrides.yaml rename to rhel8-jdk1.8-overrides.yaml index 01bd9e09..8c88d2ca 100644 --- a/ubi8-jdk1.8-overrides.yaml +++ b/rhel8-jdk1.8-overrides.yaml @@ -1,13 +1,13 @@ schema_version: 1 from: "ubi8:latest" -name: &name "openjdk/openjdk-1.8-ubi8" +name: &name "openjdk/openjdk-1.8-rhel8" version: &version "1.0" description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" labels: - name: "com.redhat.component" - value: "openjdk-1.8-ubi8-container" + value: "openjdk-1.8-rhel8-container" - name: "usage" value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" @@ -30,7 +30,7 @@ osbs: include_unpublished_pulp_repos: true repository: name: containers/openjdk - branch: openjdk-1.8-ubi8 + branch: openjdk-1.8-rhel8 packages: manager: dnf diff --git a/ubi8-jdk11-overrides.yaml b/rhel8-ubi8-overrides.yaml similarity index 90% rename from ubi8-jdk11-overrides.yaml rename to rhel8-ubi8-overrides.yaml index 38d9557c..4eff4f60 100644 --- a/ubi8-jdk11-overrides.yaml +++ b/rhel8-ubi8-overrides.yaml @@ -1,13 +1,13 @@ schema_version: 1 from: "ubi8:latest" -name: &name "openjdk/openjdk-11-ubi8" +name: &name "openjdk/openjdk-11-rhel8" version: &version "1.0" description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" labels: - name: "com.redhat.component" - value: "openjdk-11-ubi8-container" + value: "openjdk-11-rhel8-container" - name: "usage" value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/" @@ -32,7 +32,7 @@ osbs: include_unpublished_pulp_repos: true repository: name: containers/openjdk - branch: openjdk-11-ubi8 + branch: openjdk-11-rhel8 packages: manager: dnf From 44c4541d421110144781ad81276a503860a9b4db Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 1 May 2019 12:03:13 +0100 Subject: [PATCH 11/11] Correct description for RHEL8 JDK 1.8 image Signed-off-by: Jonathan Dowland --- rhel8-jdk1.8-overrides.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhel8-jdk1.8-overrides.yaml b/rhel8-jdk1.8-overrides.yaml index 8c88d2ca..802b8edc 100644 --- a/rhel8-jdk1.8-overrides.yaml +++ b/rhel8-jdk1.8-overrides.yaml @@ -3,7 +3,7 @@ schema_version: 1 from: "ubi8:latest" name: &name "openjdk/openjdk-1.8-rhel8" version: &version "1.0" -description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 11" +description: "Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 1.8" labels: - name: "com.redhat.component"