From 8835452f6ece255168918cd3d8f2fcedcecca015 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 16 Sep 2024 16:48:11 -0400 Subject: [PATCH 1/2] chore(jdk): upgrade to JDK21 on UBI9 --- .github/workflows/ci-code-analysis.yml | 2 +- .github/workflows/pr-ci.yaml | 4 ++-- .github/workflows/push-ci.yaml | 2 +- README.md | 2 +- compose/cryostat.yml | 4 ++-- compose/cryostat_docker.yml | 2 +- compose/cryostat_k8s.yml | 2 +- pom.xml | 4 ++-- src/main/docker/Dockerfile.jvm | 4 ++-- src/main/docker/include/truststore-setup.bash | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-code-analysis.yml b/.github/workflows/ci-code-analysis.yml index d6b8ac38a..8036fc62a 100644 --- a/.github/workflows/ci-code-analysis.yml +++ b/.github/workflows/ci-code-analysis.yml @@ -37,7 +37,7 @@ jobs: step: restore - uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'temurin' - name: Run spotbugs run: mvn -B -U compile spotbugs:check diff --git a/.github/workflows/pr-ci.yaml b/.github/workflows/pr-ci.yaml index 822d497c8..61554e0d7 100644 --- a/.github/workflows/pr-ci.yaml +++ b/.github/workflows/pr-ci.yaml @@ -110,7 +110,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - run: git submodule init && git submodule update @@ -192,7 +192,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - run: git submodule init && git submodule update diff --git a/.github/workflows/push-ci.yaml b/.github/workflows/push-ci.yaml index e0b832f38..0d6ae8c58 100644 --- a/.github/workflows/push-ci.yaml +++ b/.github/workflows/push-ci.yaml @@ -63,7 +63,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - run: git submodule init && git submodule update diff --git a/README.md b/README.md index ecfaef71e..05d9d9819 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ We welcome and appreciate any contributions from our community. Please visit our Build requirements: - git -- JDK 17+ +- JDK 21+ - Maven v3+ - [Quarkus CLI](https://quarkus.io/guides/cli-tooling) v3.4.1+ (Recommended) - [Podman](https://podman.io/docs/installation) 4.7+ diff --git a/compose/cryostat.yml b/compose/cryostat.yml index 6e269b8ce..13c3bbc1f 100644 --- a/compose/cryostat.yml +++ b/compose/cryostat.yml @@ -25,8 +25,8 @@ services: CRYOSTAT_DISCOVERY_DOCKER_ENABLED: ${CRYOSTAT_DISCOVERY_DOCKER_ENABLED:-true} JAVA_OPTS_APPEND: >- -XX:+FlightRecorder - -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m - -XX:StartFlightRecording=name=startup,settings=profile,disk=true,duration=30s + -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m + -XX:StartFlightRecording=filename=/tmp,name=startup,settings=profile,disk=true,duration=30s -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 diff --git a/compose/cryostat_docker.yml b/compose/cryostat_docker.yml index 2060bfd63..05f925807 100644 --- a/compose/cryostat_docker.yml +++ b/compose/cryostat_docker.yml @@ -35,7 +35,7 @@ services: CRYOSTAT_DISCOVERY_JDP_ENABLED: "true" JAVA_OPTS_APPEND: >- -XX:+FlightRecorder - -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m + -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 diff --git a/compose/cryostat_k8s.yml b/compose/cryostat_k8s.yml index 9c99e84ae..aad0d546d 100644 --- a/compose/cryostat_k8s.yml +++ b/compose/cryostat_k8s.yml @@ -20,7 +20,7 @@ services: environment: CRYOSTAT_DISCOVERY_PODMAN_ENABLED: "false" CRYOSTAT_DISCOVERY_JDP_ENABLED: "true" - JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false" + JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false" restart: always healthcheck: test: curl --fail http://localhost:8181/health/liveness || exit 1 diff --git a/pom.xml b/pom.xml index 6946340b0..b57cde2b3 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ ${cryostat.imageVersionLower} - 17 + 21 ${java.version} ${java.version} ${java.version} @@ -318,7 +318,7 @@ - -Dcryostat.discovery.jdp.enabled=true -Dcryostat.discovery.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false + -Dcryostat.discovery.jdp.enabled=true -Dcryostat.discovery.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=filename=/tmp/,name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index 55db03660..d63028dbf 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -77,7 +77,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20-3.1727147550 +FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:1.20-2.1727147592 ENV LANGUAGE='en_US:en' @@ -107,7 +107,7 @@ ENV SSL_TRUSTSTORE=$CONF_DIR/truststore.p12 \ USER root RUN mkdir -p $CONF_DIR \ && chmod -R g=u $CONF_DIR \ - && chown jboss:root $CONF_DIR + && chown default:root $CONF_DIR USER 185 RUN /deployments/app/truststore-setup.bash diff --git a/src/main/docker/include/truststore-setup.bash b/src/main/docker/include/truststore-setup.bash index ab4d80cfa..57f964ec1 100755 --- a/src/main/docker/include/truststore-setup.bash +++ b/src/main/docker/include/truststore-setup.bash @@ -15,7 +15,7 @@ cd "$CONF_DIR" keytool -importkeystore \ -noprompt \ -storetype PKCS12 \ - -srckeystore /usr/lib/jvm/jre-17-openjdk/lib/security/cacerts \ + -srckeystore /usr/lib/jvm/jre-openjdk/lib/security/cacerts \ -srcstorepass changeit \ -destkeystore "$SSL_TRUSTSTORE" \ -deststorepass "$SSL_TRUSTSTORE_PASS" From bb20e1e352815bef00b6c9234968f5b273eaa88d Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Tue, 17 Sep 2024 16:16:58 -0400 Subject: [PATCH 2/2] revert to ubi8 --- compose/cryostat.yml | 4 ++-- compose/cryostat_docker.yml | 2 +- compose/cryostat_k8s.yml | 2 +- pom.xml | 2 +- src/main/docker/Dockerfile.jvm | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compose/cryostat.yml b/compose/cryostat.yml index 13c3bbc1f..6e269b8ce 100644 --- a/compose/cryostat.yml +++ b/compose/cryostat.yml @@ -25,8 +25,8 @@ services: CRYOSTAT_DISCOVERY_DOCKER_ENABLED: ${CRYOSTAT_DISCOVERY_DOCKER_ENABLED:-true} JAVA_OPTS_APPEND: >- -XX:+FlightRecorder - -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m - -XX:StartFlightRecording=filename=/tmp,name=startup,settings=profile,disk=true,duration=30s + -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m + -XX:StartFlightRecording=name=startup,settings=profile,disk=true,duration=30s -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 diff --git a/compose/cryostat_docker.yml b/compose/cryostat_docker.yml index 05f925807..2060bfd63 100644 --- a/compose/cryostat_docker.yml +++ b/compose/cryostat_docker.yml @@ -35,7 +35,7 @@ services: CRYOSTAT_DISCOVERY_JDP_ENABLED: "true" JAVA_OPTS_APPEND: >- -XX:+FlightRecorder - -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m + -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 diff --git a/compose/cryostat_k8s.yml b/compose/cryostat_k8s.yml index aad0d546d..9c99e84ae 100644 --- a/compose/cryostat_k8s.yml +++ b/compose/cryostat_k8s.yml @@ -20,7 +20,7 @@ services: environment: CRYOSTAT_DISCOVERY_PODMAN_ENABLED: "false" CRYOSTAT_DISCOVERY_JDP_ENABLED: "true" - JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=filename=/tmp,name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false" + JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false" restart: always healthcheck: test: curl --fail http://localhost:8181/health/liveness || exit 1 diff --git a/pom.xml b/pom.xml index b57cde2b3..184160f83 100644 --- a/pom.xml +++ b/pom.xml @@ -318,7 +318,7 @@ - -Dcryostat.discovery.jdp.enabled=true -Dcryostat.discovery.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=filename=/tmp/,name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false + -Dcryostat.discovery.jdp.enabled=true -Dcryostat.discovery.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=filename=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index d63028dbf..207be2112 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -107,7 +107,7 @@ ENV SSL_TRUSTSTORE=$CONF_DIR/truststore.p12 \ USER root RUN mkdir -p $CONF_DIR \ && chmod -R g=u $CONF_DIR \ - && chown default:root $CONF_DIR + && chown jboss:root $CONF_DIR USER 185 RUN /deployments/app/truststore-setup.bash