diff --git a/.github/quarkus-ecosystem-test b/.github/quarkus-ecosystem-test index 235bc375b..0b03cfc06 100755 --- a/.github/quarkus-ecosystem-test +++ b/.github/quarkus-ecosystem-test @@ -16,6 +16,6 @@ run_build() { done } -echo "Running build for Java 17" +echo "Running build for Java 21" echo "JAVA_HOME=${JAVA_HOME}" -run_build 17 +run_build 21 diff --git a/.github/workflows/build-push-container-images.yml b/.github/workflows/build-push-container-images.yml index 5bc366450..09a594e67 100644 --- a/.github/workflows/build-push-container-images.yml +++ b/.github/workflows/build-push-container-images.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: java: - - '17' + - '21' project: - { name: event-statistics } - { name: rest-fights } @@ -70,7 +70,7 @@ jobs: run: | echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV && echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV && - if [[ ${{ matrix.java }} == '17' ]]; then + if [[ ${{ matrix.java }} == '21' ]]; then echo "JVM_DOCKERFILE=Dockerfile.jvm" >> "$GITHUB_ENV" else echo "JVM_DOCKERFILE=Dockerfile.jvm${{ matrix.java }}" >> "$GITHUB_ENV" @@ -121,7 +121,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - { name: event-statistics } - { name: rest-fights } @@ -215,7 +215,7 @@ jobs: strategy: matrix: java: - - '17' + - '21' kind: - "" - "native-" @@ -267,7 +267,7 @@ jobs: working-directory: .github/workflows/scripts shell: bash run: echo "CONTAINER_TAG=$(./compute-container-tag.sh ${{ env.APP_VERSION }} ${{ env.QUARKUS_VERSION }} "${{ matrix.kind }}" ${{ matrix.java }} "${{ matrix.project.openai-type }}")" >> $GITHUB_ENV - + - name: Create ADDITIONAL_TAG working-directory: .github/workflows/scripts shell: bash @@ -300,7 +300,7 @@ jobs: strategy: matrix: java: - - '17' + - '21' kind: - "" - "native-" diff --git a/.github/workflows/create-deploy-resources.yml b/.github/workflows/create-deploy-resources.yml index e79330659..9da8c9151 100644 --- a/.github/workflows/create-deploy-resources.yml +++ b/.github/workflows/create-deploy-resources.yml @@ -45,7 +45,7 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin cache: maven diff --git a/.github/workflows/quarkus-snapshot.yaml b/.github/workflows/quarkus-snapshot.yaml index 5bb054c74..439cc86c3 100644 --- a/.github/workflows/quarkus-snapshot.yaml +++ b/.github/workflows/quarkus-snapshot.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Java uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin - name: Checkout repo diff --git a/.github/workflows/simple-build-test.yml b/.github/workflows/simple-build-test.yml index ee0603e8f..fa7e48fa9 100644 --- a/.github/workflows/simple-build-test.yml +++ b/.github/workflows/simple-build-test.yml @@ -1,7 +1,7 @@ name: Basic build and test env: - MANDREL_VERSION: "23.0.2.1" + MANDREL_VERSION: "23.1.1.0" on: push: @@ -59,7 +59,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - { name: event-statistics } - { name: rest-fights } @@ -101,7 +101,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - { name: rest-heroes } - { name: rest-villains } @@ -144,7 +144,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - event-statistics - rest-fights @@ -174,7 +174,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - { name: event-statistics } - { name: rest-fights } @@ -234,7 +234,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - { name: rest-heroes } - { name: rest-villains } @@ -296,7 +296,7 @@ jobs: fail-fast: false matrix: java: - - '17' + - '21' project: - event-statistics - rest-fights diff --git a/README.md b/README.md index 0fa5f0cbf..fbf26707f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This is a sample application demonstrating Quarkus features and best practices. This is **NOT** a single multi-module project. Each service in the system is its own sub-directory of this parent directory. As such, each individual service needs to be run on its own. -The base JVM version for all the applications is Java 17. +The base JVM version for all the applications is Java 21. - [Super Hero Battle UI](ui-super-heroes) - [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=coverage)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) @@ -97,7 +97,7 @@ Pick one of the 4 versions of the application from the table below and execute t | Description | Image Tag | Docker Compose Run Command | Docker Compose Run Command with Monitoring | |-------------|-----------------|--------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/java17.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/java21.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/native.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` | > [!TIP] @@ -141,7 +141,7 @@ Pick one of the 4 versions of the system from the table below and deploy the app | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | ### Monitoring diff --git a/docs/automation.md b/docs/automation.md index 1618a8e5e..69970e7a2 100644 --- a/docs/automation.md +++ b/docs/automation.md @@ -26,7 +26,7 @@ It runs whenever code is pushed to the `main` branch as well as upon any pull re > [!TIP] > The workflow can also be [triggered manually](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow). -It runs `./mvnw clean verify` and `./mvnw clean verify -Pnative` on the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 17. +It runs `./mvnw clean verify` and `./mvnw clean verify -Pnative` on the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 21. ## Build and push container images workflow The [Build and push container images](../.github/workflows/build-push-container-images.yml) workflow does pretty much what it sounds like: builds and pushes container images. For JVM images, it builds both `amd64` and `arm64` images. Multi-arch native images are coming soon. @@ -48,7 +48,7 @@ This image is a visual of what the workflow consists of: ![build-push-images-workflow](../images/build-push-container-images-workflow.png) ### Build JVM container images job -This job [Builds JVM container images](https://quarkus.io/guides/container-image#building) for the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 17 (both amd64 & arm64 platforms) using the [Docker Build action](https://github.com/docker/build-push-action). +This job [Builds JVM container images](https://quarkus.io/guides/container-image#building) for the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 21 (both amd64 & arm64 platforms) using the [Docker Build action](https://github.com/docker/build-push-action). Each container image created has 4 tags: - `{{app-version}}-quarkus-{{quarkus-version}}-java{{java-version}}-amd64` @@ -59,7 +59,7 @@ Each container image created has 4 tags: > [!TIP] > - Replace `{{app-version}}` with the application version (i.e. `1.0`). > - Replace `{{quarkus-version}}` with Quarkus version the application uses (i.e. `3.0.3.Final`). -> - Replace `{{java-version}}` with the Java version the application was built with (i.e. `17`). +> - Replace `{{java-version}}` with the Java version the application was built with (i.e. `21`). There are a total of 14 images built (7 applications x 1 JVM version x 2 platforms). @@ -120,7 +120,7 @@ Each Quarkus project ([`event-statistics`](../event-statistics), [`rest-fights`] These extensions generate the manifests needed for the application itself but not for any other services. [These extensions can also incorporate additional resources](https://quarkus.io/guides/deploying-to-kubernetes#using-existing-resources) by placing additional resources in each project's `src/main/kubernetes` directory. -The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) loops through all versions of each application (Java version 17, both JVM and native - 8 total versions) and merges the contents of files these extensions generate and places them into each project's `deploy/k8s` directory as well as the respective files in the [root `deploy/k8s` directory](../deploy/k8s). +The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) loops through all versions of each application (Java version 21, both JVM and native - 8 total versions) and merges the contents of files these extensions generate and places them into each project's `deploy/k8s` directory as well as the respective files in the [root `deploy/k8s` directory](../deploy/k8s). The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) additionally creates the monitoring (Prometheus/Jaeger/OpenTelemetry Collector) descriptors within the [root `deploy/k8s` directory](../deploy/k8s) for each Kubernetes variant platform. @@ -140,10 +140,10 @@ This table describes the different files that can be found inside a project's `s | File name | Description | |----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `infra.yml` | Any infrastructure definitions that are needed by the application. Definitions in here a re-used for each version of the application (i.e. JVM 17, Native). | +| `infra.yml` | Any infrastructure definitions that are needed by the application. Definitions in here a re-used for each version of the application (i.e. JVM 21, Native). | | `java{{java-version}}.yml` | Definition for the JVM version of application itself for a particular java version, denoted by `{{java-version}}`. | | `native.yml` | Definition for the native image version of the application itself. | -The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) loops through all versions of each application (Java version 17, both JVM and native - 8 total versions) and merges contents of these files from each project's `src/main/docker-compose` directory into each project's `deploy/docker-compose` directory as well as the respective files in the [root `deploy/docker-compose` directory](../deploy/docker-compose). +The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) loops through all versions of each application (Java version 21, both JVM and native - 8 total versions) and merges contents of these files from each project's `src/main/docker-compose` directory into each project's `deploy/docker-compose` directory as well as the respective files in the [root `deploy/docker-compose` directory](../deploy/docker-compose). The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) additionally creates the [monitoring compose file (`monitoring.yml`)](../deploy/docker-compose/monitoring.yml) within the [root `deploy/docker-compose` directory](../deploy/docker-compose). diff --git a/docs/deploying-to-azure-containerapps.md b/docs/deploying-to-azure-containerapps.md index d86b27fff..94ddf911f 100644 --- a/docs/deploying-to-azure-containerapps.md +++ b/docs/deploying-to-azure-containerapps.md @@ -84,7 +84,7 @@ For that, we need to set the following environment variables: ```shell # Images SUPERHEROES_IMAGES_BASE="quay.io/quarkus-super-heroes" -IMAGES_TAG="java17-latest" +IMAGES_TAG="java21-latest" # Azure RESOURCE_GROUP="super-heroes" diff --git a/event-statistics/README.md b/event-statistics/README.md index c6b8a0227..8156a410e 100644 --- a/event-statistics/README.md +++ b/event-statistics/README.md @@ -93,7 +93,7 @@ Pick one of the 4 versions of the application from the table below and execute t | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|--------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | These Docker Compose files are meant for standing up this application and the required Kafka broker only. If you want to stand up the entire system, [follow these instructions](../README.md#running-locally-via-docker-compose). @@ -115,7 +115,7 @@ Pick one of the 4 versions of the application from the table below and deploy th | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -130,11 +130,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index 6f34ebff2..0a0923061 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -12,7 +12,7 @@ 4.1.1 3.12.1 true - 17 + 21 0.8.11 UTF-8 UTF-8 diff --git a/event-statistics/src/main/docker-compose/java17.yml b/event-statistics/src/main/docker-compose/java21.yml similarity index 81% rename from event-statistics/src/main/docker-compose/java17.yml rename to event-statistics/src/main/docker-compose/java21.yml index 4ed418205..060395354 100644 --- a/event-statistics/src/main/docker-compose/java17.yml +++ b/event-statistics/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - event-statistics-java17: - image: quay.io/quarkus-super-heroes/event-statistics:java17-latest - container_name: event-statistics-java17 + event-statistics-java21: + image: quay.io/quarkus-super-heroes/event-statistics:java21-latest + container_name: event-statistics-java21 depends_on: - apicurio - fights-kafka diff --git a/event-statistics/src/main/docker/Dockerfile.jvm b/event-statistics/src/main/docker/Dockerfile.jvm index 43b6ff20b..374315bda 100644 --- a/event-statistics/src/main/docker/Dockerfile.jvm +++ b/event-statistics/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/event-statistics-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/event-statistics-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8085:8085 quarkus/event-statistics-jvm17 +# docker run -i --rm -p 8085:8085 quarkus/event-statistics-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8085 5005 # # Then run the container using : # -# docker run -i --rm -p 8085:8085 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/event-statistics-jvm17 +# docker run -i --rm -p 8085:8085 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/event-statistics-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/event-statistics/src/main/docker/Dockerfile.legacy-jar b/event-statistics/src/main/docker/Dockerfile.legacy-jar index 099c22693..06d1d5ca7 100644 --- a/event-statistics/src/main/docker/Dockerfile.legacy-jar +++ b/event-statistics/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/event-statistics/src/main/resources/application.properties b/event-statistics/src/main/resources/application.properties index 8ff29dbda..079239709 100644 --- a/event-statistics/src/main/resources/application.properties +++ b/event-statistics/src/main/resources/application.properties @@ -46,7 +46,7 @@ quarkus.kubernetes.labels.system=quarkus-super-heroes %openshift.quarkus.config.profile.parent=prod %openshift.quarkus.kubernetes.deployment-target=openshift %openshift.quarkus.container-image.builder=openshift -quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-17:1.17 +quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21:1.17 quarkus.openshift.base-native-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 quarkus.openshift.deployment-kind=deployment quarkus.openshift.route.expose=true diff --git a/grpc-locations/README.md b/grpc-locations/README.md index 00df360c7..f7360b329 100644 --- a/grpc-locations/README.md +++ b/grpc-locations/README.md @@ -48,7 +48,7 @@ Pick one of the versions of the application from the table below and execute the | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|--------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | These Docker Compose files are meant for standing up this application and the required database only. If you want to stand up the entire system, [follow these instructions](../README.md#running-locally-via-docker-compose). @@ -70,7 +70,7 @@ Pick one of the versions of the application from the table below and deploy the | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -85,11 +85,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/grpc-locations/pom.xml b/grpc-locations/pom.xml index 982cb3d75..30d266c2f 100644 --- a/grpc-locations/pom.xml +++ b/grpc-locations/pom.xml @@ -11,7 +11,7 @@ 3.25.1 3.12.1 1.9.22 - 17 + 21 2.1.0 0.8.11 UTF-8 diff --git a/grpc-locations/src/main/docker-compose/java17.yml b/grpc-locations/src/main/docker-compose/java21.yml similarity index 84% rename from grpc-locations/src/main/docker-compose/java17.yml rename to grpc-locations/src/main/docker-compose/java21.yml index 92a129aa4..8410e4858 100644 --- a/grpc-locations/src/main/docker-compose/java17.yml +++ b/grpc-locations/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - grpc-locations-java17: - image: quay.io/quarkus-super-heroes/grpc-locations:java17-latest - container_name: grpc-locations-java17 + grpc-locations-java21: + image: quay.io/quarkus-super-heroes/grpc-locations:java21-latest + container_name: grpc-locations-java21 depends_on: - locations-db ports: diff --git a/grpc-locations/src/main/docker/Dockerfile.jvm b/grpc-locations/src/main/docker/Dockerfile.jvm index 0247130a3..9d6219a62 100644 --- a/grpc-locations/src/main/docker/Dockerfile.jvm +++ b/grpc-locations/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/grpc-locations-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/grpc-locations-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8089:8089 quarkus/grpc-locations-jvm17 +# docker run -i --rm -p 8089:8089 quarkus/grpc-locations-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8089 5005 # # Then run the container using : # -# docker run -i --rm -p 8089:8089 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/grpc-locations-jvm17 +# docker run -i --rm -p 8089:8089 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/grpc-locations-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/grpc-locations/src/main/docker/Dockerfile.legacy-jar b/grpc-locations/src/main/docker/Dockerfile.legacy-jar index 04874aad8..c2fc221f4 100644 --- a/grpc-locations/src/main/docker/Dockerfile.legacy-jar +++ b/grpc-locations/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt b/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt index 3d06187fe..133fffdff 100644 --- a/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt +++ b/grpc-locations/src/main/kotlin/io/quarkus/sample/superheroes/location/grpc/LocationGrpcService.kt @@ -2,12 +2,12 @@ package io.quarkus.sample.superheroes.location.grpc import io.grpc.Status import io.grpc.stub.StreamObserver -import io.smallrye.common.annotation.Blocking import io.quarkus.grpc.GrpcService import io.quarkus.logging.Log import io.quarkus.sample.superheroes.location.grpc.LocationsGrpc.LocationsImplBase import io.quarkus.sample.superheroes.location.mapping.LocationMapper import io.quarkus.sample.superheroes.location.service.LocationService +import io.smallrye.common.annotation.Blocking @GrpcService class LocationGrpcService(private val locationService: LocationService) : LocationsImplBase() { diff --git a/grpc-locations/src/main/resources/application.yml b/grpc-locations/src/main/resources/application.yml index c584e12e8..780db0530 100644 --- a/grpc-locations/src/main/resources/application.yml +++ b/grpc-locations/src/main/resources/application.yml @@ -51,7 +51,7 @@ quarkus: application: "${quarkus.kubernetes.part-of}" system: quarkus-super-heroes openshift: - base-jvm-image: registry.access.redhat.com/ubi9/openjdk-17:1.17 + base-jvm-image: registry.access.redhat.com/ubi9/openjdk-21:1.17 base-native-image: quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 deployment-kind: deployment route: diff --git a/rest-fights/README.md b/rest-fights/README.md index c10024c02..9ef853628 100644 --- a/rest-fights/README.md +++ b/rest-fights/README.md @@ -165,7 +165,7 @@ By default, the application is configured with the following: | Description | Environment Variable | Java Property | Value | |--------------------------|---------------------------------------------------------------|---------------------------------------------------------------|------------------------------------------| -| Database Host | `QUARKUS_MONGODB_HOSTS` | `quarkus.mongodb.hosts` | `localhost:27017` | +| Database Host | `QUARKUS_MONGODB_HOSTS` | `quarkus.mongodb.hosts` | `localhost:27021` | | Database username | `QUARKUS_MONGODB_CREDENTIALS_USERNAME` | `quarkus.mongodb.credentials.username` | `superfight` | | Database password | `QUARKUS_MONGODB_CREDENTIALS_PASSWORD` | `quarkus.mongodb.credentials.password` | `superfight` | | Kafka Bootstrap servers | `KAFKA_BOOTSTRAP_SERVERS` | `kafka.bootstrap.servers` | `PLAINTEXT://localhost:9092` | @@ -187,7 +187,7 @@ Pick one of the versions of the application from the table below and execute the | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|--------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | ### Fights Service and all Downstream Dependencies @@ -198,7 +198,7 @@ The above Docker Compose files are meant for standing up this application and th | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|-----------------------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17-all-downstream.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21-all-downstream.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native-all-downstream.yml up --remove-orphans` | ### Only Downstream Dependencies @@ -209,8 +209,8 @@ If you want to develop the Fights service (i.e. via [Quarkus Dev Mode](https://q | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f rest-heroes/deploy/docker-compose/java17.yml -f rest-villains/deploy/docker-compose/java17.yml -f rest-narration/deploy/docker-compose/java17.yml -f grpc-locations/deploy/docker-compose/java17.yml up --remove-orphans` | -| Native | `native-latest` | `docker compose -f rest-heroes/deploy/docker-compose/native.yml -f rest-villains/deploy/docker-compose/native.yml -f rest-narration/deploy/docker-compose/native.yml -f grpc-locations/deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f rest-heroes/deploy/docker-compose/java21.yml -f rest-villains/deploy/docker-compose/java21.yml -f rest-narration/deploy/docker-compose/java21.yml -f grpc-locations/deploy/docker-compose/java21.yml up --remove-orphans` | +| Native | `native-latest` | `docker compose -f rest-heroes/deploy/docker-compose/native.yml -f rest-villains/deploy/docker-compose/native.yml -f rest-narration/deploy/docker-compose/native.yml -f grpc-locations/deploy/docker-compose/java21.yml up --remove-orphans` | If you want to stand up the entire system, [follow these instructions](../README.md#running-locally-via-docker-compose). @@ -231,7 +231,7 @@ Pick one of the versions of the application from the table below and deploy the | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -240,7 +240,7 @@ These are only the descriptors for this application and the required database, K | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift-all-downstream.yml`](deploy/k8s/java17-openshift-all-downstream.yml) | [`java17-minikube-all-downstream.yml`](deploy/k8s/java17-minikube-all-downstream.yml) | [`java17-kubernetes-all-downstream.yml`](deploy/k8s/java17-kubernetes-all-downstream.yml) | [`java17-knative-all-downstream.yml`](deploy/k8s/java17-knative-all-downstream.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift-all-downstream.yml`](deploy/k8s/java21-openshift-all-downstream.yml) | [`java21-minikube-all-downstream.yml`](deploy/k8s/java21-minikube-all-downstream.yml) | [`java21-kubernetes-all-downstream.yml`](deploy/k8s/java21-kubernetes-all-downstream.yml) | [`java21-knative-all-downstream.yml`](deploy/k8s/java21-knative-all-downstream.yml) | | Native | `native-latest` | [`native-openshift-all-downstream.yml`](deploy/k8s/native-openshift-all-downstream.yml) | [`native-minikube-all-downstream.yml`](deploy/k8s/native-minikube-all-downstream.yml) | [`native-kubernetes-all-downstream.yml`](deploy/k8s/native-kubernetes-all-downstream.yml) | [`native-knative-all-downstream.yml`](deploy/k8s/native-knative-all-downstream.yml) | Each application is exposed outside of the cluster on port `80`. @@ -255,11 +255,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index d8ea0f265..5f28f126f 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -13,7 +13,7 @@ 0.11.0 1.5.5.Final true - 17 + 21 0.1.3 0.8.11 1.1.0 diff --git a/rest-fights/src/main/docker-compose/java17.yml b/rest-fights/src/main/docker-compose/java21.yml similarity index 90% rename from rest-fights/src/main/docker-compose/java17.yml rename to rest-fights/src/main/docker-compose/java21.yml index 4ed47bacb..cad5d540f 100644 --- a/rest-fights/src/main/docker-compose/java17.yml +++ b/rest-fights/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - rest-fights-java17: - image: quay.io/quarkus-super-heroes/rest-fights:java17-latest - container_name: rest-fights-java17 + rest-fights-java21: + image: quay.io/quarkus-super-heroes/rest-fights:java21-latest + container_name: rest-fights-java21 depends_on: - fights-db - apicurio diff --git a/rest-fights/src/main/docker/Dockerfile.jvm b/rest-fights/src/main/docker/Dockerfile.jvm index 70cd5b887..36352ae03 100644 --- a/rest-fights/src/main/docker/Dockerfile.jvm +++ b/rest-fights/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-fights-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-fights-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8082:8082 quarkus/rest-fights-jvm17 +# docker run -i --rm -p 8082:8082 quarkus/rest-fights-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8082 5005 # # Then run the container using : # -# docker run -i --rm -p 8082:8082 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-fights-jvm17 +# docker run -i --rm -p 8082:8082 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-fights-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-fights/src/main/docker/Dockerfile.legacy-jar b/rest-fights/src/main/docker/Dockerfile.legacy-jar index 7a3aa5579..27024ce4c 100644 --- a/rest-fights/src/main/docker/Dockerfile.legacy-jar +++ b/rest-fights/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-fights/src/main/resources/application.properties b/rest-fights/src/main/resources/application.properties index 89bccf196..a807dd05a 100644 --- a/rest-fights/src/main/resources/application.properties +++ b/rest-fights/src/main/resources/application.properties @@ -119,7 +119,7 @@ quarkus.kubernetes.labels.system=quarkus-super-heroes %openshift.quarkus.config.profile.parent=prod %openshift.quarkus.kubernetes.deployment-target=openshift %openshift.quarkus.container-image.builder=openshift -quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-17:1.17 +quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21:1.17 quarkus.openshift.base-native-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 quarkus.openshift.deployment-kind=deployment quarkus.openshift.route.expose=true diff --git a/rest-heroes/README.md b/rest-heroes/README.md index 686c37093..ebf214d66 100644 --- a/rest-heroes/README.md +++ b/rest-heroes/README.md @@ -96,7 +96,7 @@ Pick one of the 4 versions of the application from the table below and execute t | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|--------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | These Docker Compose files are meant for standing up this application and the required database only. If you want to stand up the entire system, [follow these instructions](../README.md#running-locally-via-docker-compose). @@ -118,7 +118,7 @@ Pick one of the 4 versions of the application from the table below and deploy th | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -133,11 +133,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index b804cebe3..15a143d1c 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -11,7 +11,7 @@ 3.25.1 3.12.1 1.5.5.Final - 17 + 21 0.8.11 1.1.0 0.0.1 diff --git a/rest-heroes/src/main/docker-compose/java17.yml b/rest-heroes/src/main/docker-compose/java21.yml similarity index 84% rename from rest-heroes/src/main/docker-compose/java17.yml rename to rest-heroes/src/main/docker-compose/java21.yml index 226466289..e9e3dd9fb 100644 --- a/rest-heroes/src/main/docker-compose/java17.yml +++ b/rest-heroes/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - rest-heroes-java17: - image: quay.io/quarkus-super-heroes/rest-heroes:java17-latest - container_name: rest-heroes-java17 + rest-heroes-java21: + image: quay.io/quarkus-super-heroes/rest-heroes:java21-latest + container_name: rest-heroes-java21 depends_on: - heroes-db ports: diff --git a/rest-heroes/src/main/docker/Dockerfile.jvm b/rest-heroes/src/main/docker/Dockerfile.jvm index 0c76fee7c..35c222e2a 100644 --- a/rest-heroes/src/main/docker/Dockerfile.jvm +++ b/rest-heroes/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-heroes-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-heroes-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8083:8083 quarkus/rest-heroes-jvm17 +# docker run -i --rm -p 8083:8083 quarkus/rest-heroes-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8083 5005 # # Then run the container using : # -# docker run -i --rm -p 8083:8083 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-heroes-jvm17 +# docker run -i --rm -p 8083:8083 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-heroes-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-heroes/src/main/docker/Dockerfile.legacy-jar b/rest-heroes/src/main/docker/Dockerfile.legacy-jar index 6a9a558a4..99aa62b6a 100644 --- a/rest-heroes/src/main/docker/Dockerfile.legacy-jar +++ b/rest-heroes/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-heroes/src/main/resources/application.yml b/rest-heroes/src/main/resources/application.yml index c9c79a389..4761640bf 100644 --- a/rest-heroes/src/main/resources/application.yml +++ b/rest-heroes/src/main/resources/application.yml @@ -55,7 +55,7 @@ quarkus: application: "${quarkus.kubernetes.part-of}" system: quarkus-super-heroes openshift: - base-jvm-image: registry.access.redhat.com/ubi9/openjdk-17:1.17 + base-jvm-image: registry.access.redhat.com/ubi9/openjdk-21:1.17 base-native-image: quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 deployment-kind: deployment route: diff --git a/rest-narration/README.md b/rest-narration/README.md index c687fd8d7..02c5b521e 100644 --- a/rest-narration/README.md +++ b/rest-narration/README.md @@ -125,8 +125,8 @@ Pick one of the versions of the application from the table below and execute the | Description | Image Tag | Docker Compose Run Command | |----------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | -| JVM Java 17 (Azure OpenAI) | `java17-latest-azure-openai` | Modify the image in `deploy/docker-compose/java17.yml`, update environment variables, then run `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | +| JVM Java 21 (Azure OpenAI) | `java21-latest-azure-openai` | Modify the image in `deploy/docker-compose/java21.yml`, update environment variables, then run `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | | Native (Azure OpenAI) | `native-latest-azure-openai` | Modify the image in `deploy/docker-compose/native.yml`, update environment variables, then run `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | @@ -154,7 +154,7 @@ Pick one of the versions of the application from the table below and deploy the | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | > [!IMPORTANT] @@ -176,11 +176,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/rest-narration/pom.xml b/rest-narration/pom.xml index 460dd53dd..02a15d056 100644 --- a/rest-narration/pom.xml +++ b/rest-narration/pom.xml @@ -10,7 +10,7 @@ 3.25.1 3.12.1 - 17 + 21 0.8.11 1.1.0 UTF-8 diff --git a/rest-narration/src/main/docker-compose/java17.yml b/rest-narration/src/main/docker-compose/java21.yml similarity index 74% rename from rest-narration/src/main/docker-compose/java17.yml rename to rest-narration/src/main/docker-compose/java21.yml index e96642773..5a8013f41 100644 --- a/rest-narration/src/main/docker-compose/java17.yml +++ b/rest-narration/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - rest-narration-java17: - image: quay.io/quarkus-super-heroes/rest-narration:java17-latest - container_name: rest-narration-java17 + rest-narration-java21: + image: quay.io/quarkus-super-heroes/rest-narration:java21-latest + container_name: rest-narration-java21 ports: - "8087:8087" environment: diff --git a/rest-narration/src/main/docker/Dockerfile.jvm b/rest-narration/src/main/docker/Dockerfile.jvm index 5a96e3b2e..0e693e5f4 100644 --- a/rest-narration/src/main/docker/Dockerfile.jvm +++ b/rest-narration/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-narration-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-narration-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8087:8087 quarkus/rest-narration-jvm17 +# docker run -i --rm -p 8087:8087 quarkus/rest-narration-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8087 5005 # # Then run the container using : # -# docker run -i --rm -p 8087:8087 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-narration-jvm17 +# docker run -i --rm -p 8087:8087 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-narration-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-narration/src/main/docker/Dockerfile.legacy-jar b/rest-narration/src/main/docker/Dockerfile.legacy-jar index 4a69504a5..5aafea2c6 100644 --- a/rest-narration/src/main/docker/Dockerfile.legacy-jar +++ b/rest-narration/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-narration/src/main/resources/application.properties b/rest-narration/src/main/resources/application.properties index 855fd5740..518cad3ea 100644 --- a/rest-narration/src/main/resources/application.properties +++ b/rest-narration/src/main/resources/application.properties @@ -98,7 +98,7 @@ quarkus.kubernetes.labels.system=quarkus-super-heroes %openshift.quarkus.config.profile.parent=prod %openshift.quarkus.kubernetes.deployment-target=openshift %openshift.quarkus.container-image.builder=openshift -quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-17:1.17 +quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21:1.17 quarkus.openshift.base-native-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 quarkus.openshift.deployment-kind=deployment quarkus.openshift.route.expose=true diff --git a/rest-villains/README.md b/rest-villains/README.md index 1e8eb1633..85a00a476 100644 --- a/rest-villains/README.md +++ b/rest-villains/README.md @@ -94,7 +94,7 @@ Pick one of the 4 versions of the application from the table below and execute t | Description | Image Tag | Docker Compose Run Command | |-------------|-----------------|--------------------------------------------------------------------------| -| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | +| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | | Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | These Docker Compose files are meant for standing up this application and the required database only. If you want to stand up the entire system, [follow these instructions](../README.md#running-locally-via-docker-compose). @@ -116,7 +116,7 @@ Pick one of the 4 versions of the application from the table below and deploy th | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -131,11 +131,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index 041261b0b..5a230e913 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -11,7 +11,7 @@ 3.25.1 3.12.1 1.5.5.Final - 17 + 21 0.8.11 1.1.0 0.0.1 @@ -113,6 +113,11 @@ quarkus-junit5 test + + io.quarkus.junit5 + junit5-virtual-threads + test + io.quarkus quarkus-junit5-mockito @@ -184,6 +189,7 @@ maven-surefire-plugin ${surefire-plugin.version} + -Djdk.tracePinnedThreads org.jboss.logmanager.LogManager ${maven.home} diff --git a/rest-villains/src/main/docker-compose/java17.yml b/rest-villains/src/main/docker-compose/java21.yml similarity index 84% rename from rest-villains/src/main/docker-compose/java17.yml rename to rest-villains/src/main/docker-compose/java21.yml index 92501b561..9a65b00e8 100644 --- a/rest-villains/src/main/docker-compose/java17.yml +++ b/rest-villains/src/main/docker-compose/java21.yml @@ -1,7 +1,7 @@ - rest-villains-java17: - image: quay.io/quarkus-super-heroes/rest-villains:java17-latest - container_name: rest-villains-java17 + rest-villains-java21: + image: quay.io/quarkus-super-heroes/rest-villains:java21-latest + container_name: rest-villains-java21 depends_on: - villains-db ports: diff --git a/rest-villains/src/main/docker/Dockerfile.jvm b/rest-villains/src/main/docker/Dockerfile.jvm index b629edcfc..c3360a9f2 100644 --- a/rest-villains/src/main/docker/Dockerfile.jvm +++ b/rest-villains/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-villains-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-villains-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8084:8084 quarkus/rest-villains-jvm17 +# docker run -i --rm -p 8084:8084 quarkus/rest-villains-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8084 5005 # # Then run the container using : # -# docker run -i --rm -p 8084:8084 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-villains-jvm17 +# docker run -i --rm -p 8084:8084 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-villains-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-villains/src/main/docker/Dockerfile.legacy-jar b/rest-villains/src/main/docker/Dockerfile.legacy-jar index f28d110e8..aefef94f3 100644 --- a/rest-villains/src/main/docker/Dockerfile.legacy-jar +++ b/rest-villains/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/UIResource.java b/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/UIResource.java index 0c41a5939..b7a134d6f 100644 --- a/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/UIResource.java +++ b/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/UIResource.java @@ -16,6 +16,7 @@ import io.quarkus.sample.superheroes.villain.service.VillainService; import io.smallrye.common.annotation.Blocking; +import io.smallrye.common.annotation.RunOnVirtualThread; @Path("/") public class UIResource { @@ -30,6 +31,7 @@ static class Templates { @GET @Produces(MediaType.TEXT_HTML) @Blocking + @RunOnVirtualThread public TemplateInstance get(@QueryParam("name_filter") Optional nameFilter) { var villains = nameFilter .map(this.service::findAllVillainsHavingName) diff --git a/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/VillainResource.java b/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/VillainResource.java index 28e31577a..593198aa4 100644 --- a/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/VillainResource.java +++ b/rest-villains/src/main/java/io/quarkus/sample/superheroes/villain/rest/VillainResource.java @@ -42,6 +42,7 @@ import io.quarkus.sample.superheroes.villain.service.VillainService; import io.smallrye.common.annotation.NonBlocking; +import io.smallrye.common.annotation.RunOnVirtualThread; /** * JAX-RS API endpoints with /api/villains as the base URI for all endpoints @@ -72,6 +73,7 @@ public class VillainResource { responseCode = "404", description = "No villain found" ) + @RunOnVirtualThread public Response getRandomVillain() { return this.service.findRandomVillain() .map(v -> { @@ -95,6 +97,7 @@ public Response getRandomVillain() { examples = @ExampleObject(name = "villains", value = Examples.VALID_EXAMPLE_VILLAIN_LIST) ) ) + @RunOnVirtualThread public List getAllVillains(@Parameter(name = "name_filter", description = "An optional filter parameter to filter results by name") @QueryParam("name_filter") Optional nameFilter) { var villains = nameFilter .map(this.service::findAllVillainsHavingName) @@ -121,6 +124,7 @@ public List getAllVillains(@Parameter(name = "name_filter", description responseCode = "404", description = "The villain is not found for a given identifier" ) + @RunOnVirtualThread public Response getVillain(@Parameter(name = "id", required = true) @PathParam("id") Long id) { return this.service.findVillainById(id) .map(v -> { @@ -145,6 +149,7 @@ public Response getVillain(@Parameter(name = "id", required = true) @PathParam(" responseCode = "400", description = "Invalid villain passed in (or no request body found)" ) + @RunOnVirtualThread public Response createVillain( @RequestBody( name = "villain", @@ -179,6 +184,7 @@ public Response createVillain( responseCode = "404", description = "No villain found" ) + @RunOnVirtualThread public Response fullyUpdateVillain( @Parameter(name = "id", required = true) @PathParam("id") Long id, @RequestBody( @@ -218,6 +224,7 @@ public Response fullyUpdateVillain( responseCode = "400", description = "Invalid villains passed in (or no request body found)" ) + @RunOnVirtualThread public Response replaceAllVillains( @RequestBody( name = "valid_villains", @@ -257,6 +264,7 @@ public Response replaceAllVillains( responseCode = "404", description = "No villain found" ) + @RunOnVirtualThread public Response partiallyUpdateVillain( @Parameter(name = "id", required = true) @PathParam("id") Long id, @RequestBody( @@ -289,6 +297,7 @@ public Response partiallyUpdateVillain( responseCode = "204", description = "Deletes all villains" ) + @RunOnVirtualThread public void deleteAllVillains() { this.service.deleteAllVillains(); this.logger.debug("Deleted all villains"); @@ -301,6 +310,7 @@ public void deleteAllVillains() { responseCode = "204", description = "Delete a villain" ) + @RunOnVirtualThread public void deleteVillain(@Parameter(name = "id", required = true) @PathParam("id") Long id) { this.service.deleteVillain(id); this.logger.debugf("Villain with id %d deleted ", id); diff --git a/rest-villains/src/main/resources/application.properties b/rest-villains/src/main/resources/application.properties index af0f6c271..e14edfc72 100644 --- a/rest-villains/src/main/resources/application.properties +++ b/rest-villains/src/main/resources/application.properties @@ -63,7 +63,7 @@ quarkus.kubernetes.labels.system=quarkus-super-heroes %openshift.quarkus.config.profile.parent=prod %openshift.quarkus.kubernetes.deployment-target=openshift %openshift.quarkus.container-image.builder=openshift -quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-17:1.17 +quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21:1.17 quarkus.openshift.base-native-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 quarkus.openshift.deployment-kind=deployment quarkus.openshift.route.expose=true diff --git a/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/UIResourceTests.java b/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/UIResourceTests.java index 7a203597c..d5c7ea0b0 100644 --- a/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/UIResourceTests.java +++ b/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/UIResourceTests.java @@ -12,6 +12,8 @@ import io.quarkus.sample.superheroes.villain.Villain; import io.quarkus.test.common.http.TestHTTPResource; import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit5.virtual.ShouldNotPin; +import io.quarkus.test.junit5.virtual.VirtualThreadUnit; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.Locator; @@ -23,6 +25,8 @@ @QuarkusTest @WithPlaywright +@VirtualThreadUnit +@ShouldNotPin class UIResourceTests { private static final int NB_VILLAINS = 100; private static final Villain DARTH_VADER = getDarthVader(); diff --git a/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/VillainResourceTests.java b/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/VillainResourceTests.java index a8e6fc53b..4f6e1fdf0 100644 --- a/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/VillainResourceTests.java +++ b/rest-villains/src/test/java/io/quarkus/sample/superheroes/villain/rest/VillainResourceTests.java @@ -25,10 +25,14 @@ import io.quarkus.sample.superheroes.villain.service.VillainService; import io.quarkus.test.InjectMock; import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit5.virtual.ShouldNotPin; +import io.quarkus.test.junit5.virtual.VirtualThreadUnit; import io.restassured.RestAssured; @QuarkusTest +@VirtualThreadUnit +@ShouldNotPin public class VillainResourceTests { private static final String DEFAULT_NAME = "Super Chocolatine"; private static final String UPDATED_NAME = DEFAULT_NAME + " (updated)"; diff --git a/scripts/deploy-to-azure-containerapps.sh b/scripts/deploy-to-azure-containerapps.sh index 974933c6c..84deead8e 100755 --- a/scripts/deploy-to-azure-containerapps.sh +++ b/scripts/deploy-to-azure-containerapps.sh @@ -29,8 +29,8 @@ help() { echo " -s The SKU to use for the PostgreSQL/MariaDB servers (see https://azure.microsoft.com/en-us/pricing/details/postgresql/flexible-server / https://azure.microsoft.com/en-us/pricing/details/mysql/flexible-server)" echo " Default: 'B1ms'" echo " -t The tag for the images to deploy" - echo " Accepted values: 'java17-latest' or 'native-latest'" - echo " Default: 'java17-latest'" + echo " Accepted values: 'java21-latest' or 'native-latest'" + echo " Default: 'java21-latest'" echo " -u A unique identifier to append to some resources. Some Azure services require unique names within a region (across users)." echo " Default is to use the output of the 'whoami' command." } @@ -442,7 +442,7 @@ create_azure_openai_resources() { # Define defaults RESOURCE_GROUP="super-heroes" LOCATION="eastus2" -IMAGES_TAG="java17-latest" +IMAGES_TAG="java21-latest" UNIQUE_IDENTIFIER=$(whoami) POSTGRES_SKU="B1ms" POSTGRES_TIER="Burstable" diff --git a/scripts/generate-docker-compose-resources.sh b/scripts/generate-docker-compose-resources.sh index 8e6e316a2..4ad2db994 100755 --- a/scripts/generate-docker-compose-resources.sh +++ b/scripts/generate-docker-compose-resources.sh @@ -157,10 +157,10 @@ do do # Keeping this if/else here for the future when we might want to build multiple java versions if [[ "$kind" == "native-" ]]; then - javaVersions=(17) + javaVersions=(21) else - javaVersions=(17) - # javaVersions=(11 17) + javaVersions=(21) + # javaVersions=(17 21) fi for javaVersion in ${javaVersions[@]} diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index d2f60f7dc..cfca09583 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -161,7 +161,7 @@ rm -rf $OUTPUT_DIR/*.yml for kind in "" "native-" do - javaVersions=(17) + javaVersions=(21) projects=("grpc-locations" "rest-narration" "rest-villains" "rest-heroes" "rest-fights" "event-statistics" "ui-super-heroes") for javaVersion in "${javaVersions[@]}" diff --git a/ui-super-heroes/README.md b/ui-super-heroes/README.md index 151b3287e..381c4e0e8 100644 --- a/ui-super-heroes/README.md +++ b/ui-super-heroes/README.md @@ -76,7 +76,7 @@ The application can be started outside of docker compose simply with `docker run If you want to use docker compose, from the `quarkus-super-heroes/ui-super-heroes` directory run: ```bash -docker-compose -f deploy/docker-compose/java17.yml up +docker-compose -f deploy/docker-compose/java21.yml up ``` or @@ -104,7 +104,7 @@ Pick one of the 4 versions of the application from the table below and deploy th | Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor | |-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------| -| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) | +| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) | | Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) | The application is exposed outside of the cluster on port `80`. @@ -119,11 +119,11 @@ Following the [deployment section](https://quarkus.io/guides/deploying-to-kubern | Target Platform | Java Version | Command | |------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Kubernetes | 17 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | -| OpenShift | 17 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Minikube | 17 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative | 17 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | -| Knative (on OpenShift) | 17 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Kubernetes | 21 | `./mvnw clean package -Dquarkus.profile=kubernetes -Dquarkus.kubernetes.deploy=true -DskipTests` | +| OpenShift | 21 | `./mvnw clean package -Dquarkus.profile=openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Minikube | 21 | `./mvnw clean package -Dquarkus.profile=minikube -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative | 21 | `./mvnw clean package -Dquarkus.profile=knative -Dquarkus.kubernetes.deploy=true -DskipTests` | +| Knative (on OpenShift) | 21 | `./mvnw clean package -Dquarkus.profile=knative-openshift -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -Dquarkus.container-image.group=$(oc project -q) -Dquarkus.kubernetes.deploy=true -DskipTests` | You may need to adjust other configuration options as well (see [Quarkus Kubernetes Extension configuration options](https://quarkus.io/guides/deploying-to-kubernetes#configuration-options) and [Quarkus OpenShift Extension configuration options](https://quarkus.io/guides/deploying-to-openshift#configuration-reference)). diff --git a/ui-super-heroes/deploy/docker-compose/java17.yml b/ui-super-heroes/deploy/docker-compose/java17.yml index dc8fcc991..8e390d40c 100644 --- a/ui-super-heroes/deploy/docker-compose/java17.yml +++ b/ui-super-heroes/deploy/docker-compose/java17.yml @@ -6,8 +6,8 @@ version: "3" services: - ui-super-heroes-java17: - image: quay.io/quarkus-super-heroes/ui-super-heroes:java17-latest + ui-super-heroes-java21: + image: quay.io/quarkus-super-heroes/ui-super-heroes:java21-latest container_name: ui-super-heroes ports: - "8080:8080" diff --git a/ui-super-heroes/pom.xml b/ui-super-heroes/pom.xml index 1f5bfed82..f45f8f728 100644 --- a/ui-super-heroes/pom.xml +++ b/ui-super-heroes/pom.xml @@ -9,7 +9,7 @@ The user interface 3.12.1 - 17 + 21 0.8.11 UTF-8 UTF-8 diff --git a/ui-super-heroes/src/main/docker-compose/java17.yml b/ui-super-heroes/src/main/docker-compose/java21.yml similarity index 63% rename from ui-super-heroes/src/main/docker-compose/java17.yml rename to ui-super-heroes/src/main/docker-compose/java21.yml index 0b0370423..983001e35 100644 --- a/ui-super-heroes/src/main/docker-compose/java17.yml +++ b/ui-super-heroes/src/main/docker-compose/java21.yml @@ -1,6 +1,6 @@ - ui-super-heroes-java17: - image: quay.io/quarkus-super-heroes/ui-super-heroes:java17-latest + ui-super-heroes-java21: + image: quay.io/quarkus-super-heroes/ui-super-heroes:java21-latest container_name: ui-super-heroes ports: - "8080:8080" diff --git a/ui-super-heroes/src/main/docker/Dockerfile.jvm b/ui-super-heroes/src/main/docker/Dockerfile.jvm index 9542a895d..559434713 100644 --- a/ui-super-heroes/src/main/docker/Dockerfile.jvm +++ b/ui-super-heroes/src/main/docker/Dockerfile.jvm @@ -7,18 +7,18 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/ui-super-heroes-jvm17 . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/ui-super-heroes-jvm21 . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/ui-super-heroes-jvm17 +# docker run -i --rm -p 8080:8080 quarkus/ui-super-heroes-jvm21 # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 # # Then run the container using : # -# docker run -i --rm -p 8080:8080 quarkus/ui-super-heroes-jvm17 +# docker run -i --rm -p 8080:8080 quarkus/ui-super-heroes-jvm21 # # This image uses the `run-java.sh` script to run the application. # This scripts computes the command line to execute your Java application, and @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/ui-super-heroes/src/main/docker/Dockerfile.legacy-jar b/ui-super-heroes/src/main/docker/Dockerfile.legacy-jar index 9bc117117..4640d9f55 100644 --- a/ui-super-heroes/src/main/docker/Dockerfile.legacy-jar +++ b/ui-super-heroes/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-17:1.17 +FROM registry.access.redhat.com/ubi9/openjdk-21:1.17 # This is here because of # https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9 diff --git a/ui-super-heroes/src/main/resources/application.properties b/ui-super-heroes/src/main/resources/application.properties index 4dec0c201..fc164a99d 100644 --- a/ui-super-heroes/src/main/resources/application.properties +++ b/ui-super-heroes/src/main/resources/application.properties @@ -43,7 +43,7 @@ quarkus.kubernetes.labels.system=quarkus-super-heroes %openshift.quarkus.config.profile.parent=prod %openshift.quarkus.kubernetes.deployment-target=openshift %openshift.quarkus.container-image.builder=openshift -quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-17:1.17 +quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21:1.17 quarkus.openshift.base-native-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 quarkus.openshift.deployment-kind=deployment quarkus.openshift.route.expose=true