Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 21 #434

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/quarkus-ecosystem-test
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ run_build() {
done
}

echo "Running build for Java 17"
echo "Running build for Java 21"
echo "JAVA_HOME=${JAVA_HOME}"
run_build 17
run_build 21
12 changes: 6 additions & 6 deletions .github/workflows/build-push-container-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
java:
- '17'
- '21'
project:
- { name: event-statistics }
- { name: rest-fights }
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV &&
echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV &&
if [[ ${{ matrix.java }} == '17' ]]; then
if [[ ${{ matrix.java }} == '21' ]]; then
echo "JVM_DOCKERFILE=Dockerfile.jvm" >> "$GITHUB_ENV"
else
echo "JVM_DOCKERFILE=Dockerfile.jvm${{ matrix.java }}" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- { name: event-statistics }
- { name: rest-fights }
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
strategy:
matrix:
java:
- '17'
- '21'
kind:
- ""
- "native-"
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
working-directory: .github/workflows/scripts
shell: bash
run: echo "CONTAINER_TAG=$(./compute-container-tag.sh ${{ env.APP_VERSION }} ${{ env.QUARKUS_VERSION }} "${{ matrix.kind }}" ${{ matrix.java }} "${{ matrix.project.openai-type }}")" >> $GITHUB_ENV

- name: Create ADDITIONAL_TAG
working-directory: .github/workflows/scripts
shell: bash
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
strategy:
matrix:
java:
- '17'
- '21'
kind:
- ""
- "native-"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-deploy-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin
cache: maven

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quarkus-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/simple-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Basic build and test

env:
MANDREL_VERSION: "23.0.2.1"
MANDREL_VERSION: "23.1.1.0"

on:
push:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- { name: event-statistics }
- { name: rest-fights }
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- { name: rest-heroes }
- { name: rest-villains }
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- event-statistics
- rest-fights
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- { name: event-statistics }
- { name: rest-fights }
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- { name: rest-heroes }
- { name: rest-villains }
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- event-statistics
- rest-fights
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is a sample application demonstrating Quarkus features and best practices.

This is **NOT** a single multi-module project. Each service in the system is its own sub-directory of this parent directory. As such, each individual service needs to be run on its own.

The base JVM version for all the applications is Java 17.
The base JVM version for all the applications is Java 21.

- [Super Hero Battle UI](ui-super-heroes)
- [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=coverage)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=quarkusio-quarkus-super-heroes_ui-super-heroes&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=quarkusio-quarkus-super-heroes_ui-super-heroes)
Expand Down Expand Up @@ -97,7 +97,7 @@ Pick one of the 4 versions of the application from the table below and execute t

| Description | Image Tag | Docker Compose Run Command | Docker Compose Run Command with Monitoring |
|-------------|-----------------|--------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| JVM Java 17 | `java17-latest` | `docker compose -f deploy/docker-compose/java17.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/java17.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` |
| JVM Java 21 | `java21-latest` | `docker compose -f deploy/docker-compose/java21.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/java21.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` |
| Native | `native-latest` | `docker compose -f deploy/docker-compose/native.yml up --remove-orphans` | `docker compose -f deploy/docker-compose/native.yml -f deploy/docker-compose/monitoring.yml up --remove-orphans` |

> [!TIP]
Expand Down Expand Up @@ -141,7 +141,7 @@ Pick one of the 4 versions of the system from the table below and deploy the app

| Description | Image Tag | OpenShift Descriptor | Minikube Descriptor | Kubernetes Descriptor | Knative Descriptor |
|-------------|-----------------|-----------------------------------------------------------|---------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------|
| JVM Java 17 | `java17-latest` | [`java17-openshift.yml`](deploy/k8s/java17-openshift.yml) | [`java17-minikube.yml`](deploy/k8s/java17-minikube.yml) | [`java17-kubernetes.yml`](deploy/k8s/java17-kubernetes.yml) | [`java17-knative.yml`](deploy/k8s/java17-knative.yml) |
| JVM Java 21 | `java21-latest` | [`java21-openshift.yml`](deploy/k8s/java21-openshift.yml) | [`java21-minikube.yml`](deploy/k8s/java21-minikube.yml) | [`java21-kubernetes.yml`](deploy/k8s/java21-kubernetes.yml) | [`java21-knative.yml`](deploy/k8s/java21-knative.yml) |
| Native | `native-latest` | [`native-openshift.yml`](deploy/k8s/native-openshift.yml) | [`native-minikube.yml`](deploy/k8s/native-minikube.yml) | [`native-kubernetes.yml`](deploy/k8s/native-kubernetes.yml) | [`native-knative.yml`](deploy/k8s/native-knative.yml) |

### Monitoring
Expand Down
12 changes: 6 additions & 6 deletions docs/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -48,7 +48,7 @@ This image is a visual of what the workflow consists of:
![build-push-images-workflow](../images/build-push-container-images-workflow.png)

### Build JVM container images job
This job [Builds JVM container images](https://quarkus.io/guides/container-image#building) for the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 17 (both amd64 & arm64 platforms) using the [Docker Build action](https://github.com/docker/build-push-action).
This job [Builds JVM container images](https://quarkus.io/guides/container-image#building) for the [`event-statistics`](../event-statistics), [`rest-fights`](../rest-fights), [`rest-heroes`](../rest-heroes), [`rest-villains`](../rest-villains), [`rest-narration`](../rest-narration/deploy), [`grpc-locations`](../grpc-locations/deploy), and [`ui-super-heroes`](../ui-super-heroes) applications on Java 21 (both amd64 & arm64 platforms) using the [Docker Build action](https://github.com/docker/build-push-action).

Each container image created has 4 tags:
- `{{app-version}}-quarkus-{{quarkus-version}}-java{{java-version}}-amd64`
Expand All @@ -59,7 +59,7 @@ Each container image created has 4 tags:
> [!TIP]
> - Replace `{{app-version}}` with the application version (i.e. `1.0`).
> - Replace `{{quarkus-version}}` with Quarkus version the application uses (i.e. `3.0.3.Final`).
> - Replace `{{java-version}}` with the Java version the application was built with (i.e. `17`).
> - Replace `{{java-version}}` with the Java version the application was built with (i.e. `21`).

There are a total of 14 images built (7 applications x 1 JVM version x 2 platforms).

Expand Down Expand Up @@ -120,7 +120,7 @@ Each Quarkus project ([`event-statistics`](../event-statistics), [`rest-fights`]

These extensions generate the manifests needed for the application itself but not for any other services. [These extensions can also incorporate additional resources](https://quarkus.io/guides/deploying-to-kubernetes#using-existing-resources) by placing additional resources in each project's `src/main/kubernetes` directory.

The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) loops through all versions of each application (Java version 17, both JVM and native - 8 total versions) and merges the contents of files these extensions generate and places them into each project's `deploy/k8s` directory as well as the respective files in the [root `deploy/k8s` directory](../deploy/k8s).
The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) loops through all versions of each application (Java version 21, both JVM and native - 8 total versions) and merges the contents of files these extensions generate and places them into each project's `deploy/k8s` directory as well as the respective files in the [root `deploy/k8s` directory](../deploy/k8s).

The [`generate-k8s-resources.sh` script](../scripts/generate-k8s-resources.sh) additionally creates the monitoring (Prometheus/Jaeger/OpenTelemetry Collector) descriptors within the [root `deploy/k8s` directory](../deploy/k8s) for each Kubernetes variant platform.

Expand All @@ -140,10 +140,10 @@ This table describes the different files that can be found inside a project's `s

| File name | Description |
|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `infra.yml` | Any infrastructure definitions that are needed by the application. Definitions in here a re-used for each version of the application (i.e. JVM 17, Native). |
| `infra.yml` | Any infrastructure definitions that are needed by the application. Definitions in here a re-used for each version of the application (i.e. JVM 21, Native). |
| `java{{java-version}}.yml` | Definition for the JVM version of application itself for a particular java version, denoted by `{{java-version}}`. |
| `native.yml` | Definition for the native image version of the application itself. |

The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) loops through all versions of each application (Java version 17, both JVM and native - 8 total versions) and merges contents of these files from each project's `src/main/docker-compose` directory into each project's `deploy/docker-compose` directory as well as the respective files in the [root `deploy/docker-compose` directory](../deploy/docker-compose).
The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) loops through all versions of each application (Java version 21, both JVM and native - 8 total versions) and merges contents of these files from each project's `src/main/docker-compose` directory into each project's `deploy/docker-compose` directory as well as the respective files in the [root `deploy/docker-compose` directory](../deploy/docker-compose).

The [`generate-docker-compose-resources.sh` script](../scripts/generate-docker-compose-resources.sh) additionally creates the [monitoring compose file (`monitoring.yml`)](../deploy/docker-compose/monitoring.yml) within the [root `deploy/docker-compose` directory](../deploy/docker-compose).
2 changes: 1 addition & 1 deletion docs/deploying-to-azure-containerapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading