diff --git a/.github/quarkus-ecosystem-test b/.github/quarkus-ecosystem-test
index b42f27057..7a17acb86 100755
--- a/.github/quarkus-ecosystem-test
+++ b/.github/quarkus-ecosystem-test
@@ -17,6 +17,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 d1f83eaa9..030841abe 100644
--- a/.github/workflows/build-push-container-images.yml
+++ b/.github/workflows/build-push-container-images.yml
@@ -112,7 +112,7 @@ jobs:
strategy:
matrix:
java:
- - '17'
+ - '21'
project: ${{ fromJson(needs.calculate-modules.outputs.projects_matrix) }}
arch:
- amd64
@@ -134,7 +134,7 @@ jobs:
- name: Create env vars
working-directory: ${{ matrix.project.name }}
run: |
- 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"
@@ -187,7 +187,7 @@ jobs:
fail-fast: false
matrix:
java:
- - { jvm: '17', mandrel: '21' }
+ - { jvm: '21', mandrel: '21' }
project: ${{ fromJson(needs.calculate-modules.outputs.projects_matrix) }}
arch:
- amd64
@@ -256,7 +256,7 @@ jobs:
strategy:
matrix:
java:
- - '17'
+ - '21'
kind:
- ""
- "native-"
@@ -301,7 +301,7 @@ jobs:
strategy:
matrix:
java:
- - '17'
+ - '21'
kind:
- ""
- "native-"
diff --git a/.github/workflows/build-push-ui-images.yml b/.github/workflows/build-push-ui-images.yml
index a252007a9..005c3a477 100644
--- a/.github/workflows/build-push-ui-images.yml
+++ b/.github/workflows/build-push-ui-images.yml
@@ -47,7 +47,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/create-deploy-resources.yml b/.github/workflows/create-deploy-resources.yml
index 42653950c..f638a576f 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 e52ba8259..038804fc8 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 10c2ae4ba..b3953c8b6 100644
--- a/.github/workflows/simple-build-test.yml
+++ b/.github/workflows/simple-build-test.yml
@@ -64,7 +64,7 @@ jobs:
fail-fast: false
matrix:
java:
- - '17'
+ - '21'
project:
- { name: event-statistics }
- { name: rest-fights }
@@ -106,7 +106,7 @@ jobs:
fail-fast: false
matrix:
java:
- - '17'
+ - '21'
project:
- { name: rest-heroes }
- { name: rest-villains }
@@ -149,7 +149,7 @@ jobs:
fail-fast: false
matrix:
java:
- - '17'
+ - '21'
project:
- event-statistics
- rest-fights
@@ -179,7 +179,7 @@ jobs:
fail-fast: false
matrix:
java:
- - { jvm: '17', mandrel: '21' }
+ - { jvm: '21', mandrel: '21' }
project:
- { name: event-statistics }
- { name: rest-fights }
@@ -223,7 +223,7 @@ jobs:
fail-fast: false
matrix:
java:
- - { jvm: '17', mandrel: '21' }
+ - { jvm: '21', mandrel: '21' }
project:
- { name: rest-heroes }
- { name: rest-villains }
@@ -269,7 +269,7 @@ jobs:
fail-fast: false
matrix:
java:
- - { jvm: '17', mandrel: '21' }
+ - { jvm: '21', mandrel: '21' }
project:
- event-statistics
- rest-fights
diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml
index 3a55b6ec8..bbecbf732 100644
--- a/.github/workflows/sonar-scan.yml
+++ b/.github/workflows/sonar-scan.yml
@@ -1,7 +1,7 @@
name: Sonar scan
env:
- BASE_JAVA_VERSION: '17'
+ BASE_JAVA_VERSION: '21'
SONAR_ORG: quarkusio-quarkus-super-heroes
SONAR_HOST_URL: https://sonarcloud.io
diff --git a/README.md b/README.md
index b55b2eb43..8173ed790 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ This is **NOT** the workshop with the step-by-step instructions. If you are look
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)
@@ -101,7 +101,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]
@@ -145,7 +145,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 937c762dd..ce699d158 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,14 +48,14 @@ 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 2 tags:
- `java{{java-version}}-latest-amd64`
- `java{{java-version}}-latest-arm64`
> [!TIP]
-> - 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).
@@ -110,7 +110,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.
@@ -130,10 +130,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 2c2768b80..06318113a 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 752d6c5a9..805599a74 100644
--- a/event-statistics/pom.xml
+++ b/event-statistics/pom.xml
@@ -12,7 +12,7 @@
4.1.1
3.13.0
true
- 17
+ 21
0.8.12
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 9e4c986d8..202c0e0c7 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 099c22693..000000000
--- a/event-statistics/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/event-statistics-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8085:8085 quarkus/event-statistics-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8085
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/event-statistics/src/main/resources/application.properties b/event-statistics/src/main/resources/application.properties
index ed8256d8f..ba67180a1 100644
--- a/event-statistics/src/main/resources/application.properties
+++ b/event-statistics/src/main/resources/application.properties
@@ -47,7 +47,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.20
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 18ab926d8..a671026f7 100644
--- a/grpc-locations/README.md
+++ b/grpc-locations/README.md
@@ -68,7 +68,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).
@@ -90,7 +90,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`.
@@ -105,11 +105,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 9bcd29410..2ef2bc0ae 100644
--- a/grpc-locations/pom.xml
+++ b/grpc-locations/pom.xml
@@ -11,7 +11,7 @@
3.26.3
3.13.0
2.0.21
- 17
+ 21
3.0.0
0.8.12
1.5.0
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 aa8bea66c..8d14f9e79 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 04874aad8..000000000
--- a/grpc-locations/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/grpc-locations-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8089:8089 quarkus/grpc-locations-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8089
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/grpc-locations/src/main/resources/application.yml b/grpc-locations/src/main/resources/application.yml
index c584e12e8..b40456082 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.20
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 fd6e4fe06..a7bfddedb 100644
--- a/rest-fights/README.md
+++ b/rest-fights/README.md
@@ -171,7 +171,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` |
@@ -193,7 +193,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
@@ -204,7 +204,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
@@ -215,8 +215,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).
@@ -237,7 +237,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`.
@@ -246,7 +246,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`.
@@ -261,11 +261,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 6aff1b4ea..3fc647034 100644
--- a/rest-fights/pom.xml
+++ b/rest-fights/pom.xml
@@ -12,7 +12,7 @@
3.13.0
1.6.2
true
- 17
+ 21
0.2.4
0.8.12
1.5.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 348fce802..7ab602652 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 7a3aa5579..000000000
--- a/rest-fights/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/rest-fights-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8082:8082 quarkus/rest-fights-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8082
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/rest-fights/src/main/resources/application.properties b/rest-fights/src/main/resources/application.properties
index edc09acde..09637028c 100644
--- a/rest-fights/src/main/resources/application.properties
+++ b/rest-fights/src/main/resources/application.properties
@@ -126,7 +126,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.20
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 d2665a4c2..5e19eec3b 100644
--- a/rest-heroes/pom.xml
+++ b/rest-heroes/pom.xml
@@ -11,7 +11,7 @@
3.26.3
3.13.0
1.6.2
- 17
+ 21
0.8.12
1.5.0
1.0.0
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 7bf8ba9bf..a4e70ed8c 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 6a9a558a4..000000000
--- a/rest-heroes/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/rest-heroes-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8083:8083 quarkus/rest-heroes-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8083
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/rest-heroes/src/main/resources/application.yml b/rest-heroes/src/main/resources/application.yml
index c9c79a389..5e7e9b82c 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.20
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 84d17d091..625bcb09b 100644
--- a/rest-narration/README.md
+++ b/rest-narration/README.md
@@ -133,8 +133,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` |
@@ -162,13 +162,13 @@ 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]
> As with the [Docker compose descriptors above](#running-locally-via-docker-compose), the running application will **NOT** make live calls to an OpenAI provider. You will need to [modify the descriptors accordingly](#making-live-calls-to-openai-providers) to have the application make live calls to an OpenAI provider.
>
-> Additionally, there are also `java17-latest-azure-openai` and `native-latest-azure-openai` image tags available. You would need to modify the Kubernetes descriptor manually before deploying.
+> Additionally, there are also `java21-latest-azure-openai` and `native-latest-azure-openai` image tags available. You would need to modify the Kubernetes descriptor manually before deploying.
>
> You would first need to modify the image with the appropriate image tag, then update the environment variables according to the [Azure OpenAI properties](#azure-openai-properties).
@@ -184,11 +184,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 a2e116e67..c28a10c49 100644
--- a/rest-narration/pom.xml
+++ b/rest-narration/pom.xml
@@ -10,7 +10,7 @@
3.26.3
3.13.0
- 17
+ 21
0.8.12
1.5.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 7078085b6..794fad3c6 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 4a69504a5..000000000
--- a/rest-narration/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/rest-narration-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8087:8087 quarkus/rest-narration-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8087
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/rest-narration/src/main/resources/application.properties b/rest-narration/src/main/resources/application.properties
index f44922fc1..e28563ada 100644
--- a/rest-narration/src/main/resources/application.properties
+++ b/rest-narration/src/main/resources/application.properties
@@ -138,7 +138,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.20
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 70eef7bcb..f40619fd0 100644
--- a/rest-villains/pom.xml
+++ b/rest-villains/pom.xml
@@ -11,7 +11,7 @@
3.26.3
3.13.0
1.6.2
- 17
+ 21
0.8.12
1.5.0
1.0.0
@@ -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 a003139ab..f870556b4 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index f28d110e8..000000000
--- a/rest-villains/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,97 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/rest-villains-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8084:8084 quarkus/rest-villains-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8084
-USER 185
-ENV AB_JOLOKIA_OFF=""
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
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 812974612..831042591 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,8 @@
import io.quarkus.sample.superheroes.villain.Villain;
import io.quarkus.sample.superheroes.villain.service.VillainService;
+import io.smallrye.common.annotation.RunOnVirtualThread;
+
@Path("/")
public class UIResource {
@Inject
@@ -28,6 +30,7 @@ static class Templates {
@GET
@Produces(MediaType.TEXT_HTML)
+ @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 f2a758296..7f0fd72ec 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
@@ -43,6 +43,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
@@ -70,6 +71,7 @@ public class VillainResource {
responseCode = "404",
description = "No villain found"
)
+ @RunOnVirtualThread
public Response getRandomVillain() {
return this.service.findRandomVillain()
.map(v -> {
@@ -93,6 +95,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)
@@ -119,6 +122,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 -> {
@@ -143,6 +147,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",
@@ -177,6 +182,7 @@ public Response createVillain(
responseCode = "404",
description = "No villain found"
)
+ @RunOnVirtualThread
public Response fullyUpdateVillain(
@Parameter(name = "id", required = true) @PathParam("id") Long id,
@RequestBody(
@@ -216,6 +222,7 @@ public Response fullyUpdateVillain(
responseCode = "400",
description = "Invalid villains passed in (or no request body found)"
)
+ @RunOnVirtualThread
public Response replaceAllVillains(
@RequestBody(
name = "valid_villains",
@@ -255,6 +262,7 @@ public Response replaceAllVillains(
responseCode = "404",
description = "No villain found"
)
+ @RunOnVirtualThread
public Response partiallyUpdateVillain(
@Parameter(name = "id", required = true) @PathParam("id") Long id,
@RequestBody(
@@ -287,6 +295,7 @@ public Response partiallyUpdateVillain(
responseCode = "204",
description = "Deletes all villains"
)
+ @RunOnVirtualThread
public void deleteAllVillains() {
this.service.deleteAllVillains();
Log.debug("Deleted all villains");
@@ -299,6 +308,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);
Log.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..e7b33ec8a 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.20
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 eeac6a294..eb5fcd1bb 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
@@ -11,6 +11,8 @@
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 io.quarkus.sample.superheroes.villain.Villain;
@@ -24,6 +26,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 e31ec15ed..3a04d61ad 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
@@ -23,6 +23,8 @@
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.quarkus.sample.superheroes.villain.Villain;
import io.quarkus.sample.superheroes.villain.service.VillainService;
@@ -30,6 +32,8 @@
import io.restassured.RestAssured;
@QuarkusTest
+@VirtualThreadUnit
+@ShouldNotPin
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 9f4d5ab04..84184b027 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."
}
@@ -443,7 +443,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..e2a7f6c99 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=(11 21)
fi
for javaVersion in ${javaVersions[@]}
diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh
index fef7c441a..9dedd3959 100755
--- a/scripts/generate-k8s-resources.sh
+++ b/scripts/generate-k8s-resources.sh
@@ -162,7 +162,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 d1e11f44e..2ecc1fcbf 100644
--- a/ui-super-heroes/README.md
+++ b/ui-super-heroes/README.md
@@ -91,7 +91,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
@@ -119,7 +119,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 17 | `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`.
diff --git a/ui-super-heroes/pom.xml b/ui-super-heroes/pom.xml
index 083cc4631..ce24069e5 100644
--- a/ui-super-heroes/pom.xml
+++ b/ui-super-heroes/pom.xml
@@ -9,7 +9,7 @@
The user interface
3.13.0
- 17
+ 21
0.2.3
0.8.12
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 6dfd594c7..3b78111e8 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-runtime:1.17
+FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20
# 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
deleted file mode 100644
index 9bc117117..000000000
--- a/ui-super-heroes/src/main/docker/Dockerfile.legacy-jar
+++ /dev/null
@@ -1,96 +0,0 @@
-####
-# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
-#
-# Before building the container image run:
-#
-# ./mvnw package -Dquarkus.package.type=legacy-jar
-#
-# Then, build the image with:
-#
-# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/ui-super-heroes-legacy-jar .
-#
-# Then run the container using:
-#
-# docker run -i --rm -p 8080:8080 quarkus/ui-super-heroes-legacy-jar
-#
-# 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-legacy-jar
-#
-# This image uses the `run-java.sh` script to run the application.
-# This scripts computes the command line to execute your Java application, and
-# includes memory/GC tuning.
-# You can configure the behavior using the following environment properties:
-# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
-# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
-# in JAVA_OPTS (example: "-Dsome.property=foo")
-# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
-# used to calculate a default maximal heap memory based on a containers restriction.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
-# of the container available memory as set here. The default is `50` which means 50%
-# of the available memory is used as an upper boundary. You can skip this mechanism by
-# setting this value to `0` in which case no `-Xmx` option is added.
-# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
-# is used to calculate a default initial heap memory based on the maximum heap memory.
-# If used in a container without any memory constraints for the container then this
-# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
-# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
-# is used as the initial heap size. You can skip this mechanism by setting this value
-# to `0` in which case no `-Xms` option is added (example: "25")
-# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
-# This is used to calculate the maximum value of the initial heap memory. If used in
-# a container without any memory constraints for the container then this option has
-# no effect. If there is a memory constraint then `-Xms` is limited to the value set
-# here. The default is 4096MB which means the calculated value of `-Xms` never will
-# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
-# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
-# when things are happening. This option, if set to true, will set
-# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
-# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
-# true").
-# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
-# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
-# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
-# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
-# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
-# (example: "20")
-# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
-# (example: "40")
-# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
-# (example: "4")
-# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
-# previous GC times. (example: "90")
-# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
-# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
-# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
-# contain the necessary JRE command-line options to specify the required GC, which
-# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
-# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
-# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
-# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
-# accessed directly. (example: "foo.example.com,bar.example.com")
-#
-###
-FROM registry.access.redhat.com/ubi9/openjdk-17:1.17
-
-# This is here because of
-# https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
-#
-# https://access.redhat.com/solutions/6992400 provides the solution to add SHA1 back
-USER root
-RUN update-crypto-policies --set DEFAULT:SHA1
-
-ENV LANGUAGE='en_US:en'
-
-
-COPY target/lib/* /deployments/lib/
-COPY target/*-runner.jar /deployments/quarkus-run.jar
-
-EXPOSE 8080
-USER 185
-ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git a/ui-super-heroes/src/main/resources/application.properties b/ui-super-heroes/src/main/resources/application.properties
index 8aa794fb6..2877a2e72 100644
--- a/ui-super-heroes/src/main/resources/application.properties
+++ b/ui-super-heroes/src/main/resources/application.properties
@@ -52,7 +52,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.20
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