Commit 2a401479 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

helm deploy

parent 6356689a
Loading
Loading
Loading
Loading
+20
Changes for .changelog/20261013_0030_helm-deploy-pointer-ci-comment.md: 20 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Helm deployment pointer + CI comment fix

**Date:** 2026-10-13

## Context
Chronos and its UI can now be deployed on Kubernetes with the Helm chart in the new sibling repo `org.etsi.osl.chronos.deploy` (`helm/chronos`).

The chart:
- reuses OpenSlice's Artemis and Keycloak;
- bundles MySQL 8.4, because OpenSlice's MySQL 5.7 lacks `FOR UPDATE NOWAIT`;
- serves the API at `{rootUrl}/chronos-api` and the UI at `{rootUrl}/chronos/`;
- runs one backend replica, because the `@Scheduled` jobs have no cluster lock.

## Changes in this repo
- **`.gitlab-ci.yml`:** the header comment wrongly said that the Dockerfile COPYs a pre-built jar. The Dockerfile is multi-stage and builds from source. The comment now says that `maven_build` is a test gate and that its jar artifact is unused. The pipeline itself is unchanged.
- **`README.md` (Quick start)** and **`CLAUDE.md` (Running the service):** added a pointer to the deploy repo.

There is no code change. The backend needed no changes for the chart. It already reads the following from env/config:
- `DB_*`, `ARTEMIS_*`, `KEYCLOAK_ISSUER_URI` and `KEYCLOAK_JWK_URI` from env;
- `chronos.*` and `server.forward-headers-strategy` from `SPRING_APPLICATION_JSON`.
+1
Changes for .changelog/index.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -88,3 +88,4 @@
| 2026-08-30 | [serviceOrderRef on the REST reservation path — documentation parity](20260830_1930_serviceorderref-rest-parity-docs.md) | Answers "JMS can pass a service-order id on a hold/firm booking, REST can't". It always could — REST and JMS share the same `FeasibilityRequest` / `ResourceFirmRequest` records, `ReservationServiceImpl` stamps `serviceOrderRef` on the entity and the response echoes it, and `e2e/ReservationRestIT` already round-trips it. The gap was documentation asymmetry: the JMS guide lists request fields inline per operation, the REST guide's Reservations table listed none (only prose further down), and in Swagger `/reservations/by-resource` carried no request example while `requestHold` / `createFirm` carried three each. .changelog/annotations only, no behavioural change: REST guide table now lists body fields per operation (`serviceOrderRef?`, `correlationId?`, `coverageMode?`) with a by-resource curl example and a REST/JMS-parity + OSOM auto-stamp note; JMS guide gains a payload-parity line; `createFirmReservationByResource` gets a curated `@RequestBody` with two `@ExampleObject`s (`EX_BY_RESOURCE`, `EX_BY_RESOURCE_SPAN`) and `EX_CAPACITY` + the class-level `@Schema` on both records mention the tracking keys; new `OpenApiContractTest.openApiSpec_bookingRequests_document_serviceOrderRef` locks the spec against regression. 967 tests, 1 pre-existing unrelated failure (`ReleasePathTest.onExternalEnd_overdue_emitsReleaseOverdueEvent`) |
| 2026-09-03 | [`/api/v1/modifications` — enforce availability calendar, blackouts & capacity (R16.2)](20260903_2035_modification-calendar-blackout-capacity.md) | Schedule-modification feasibility checked only reservation-vs-reservation overlap + the horizon, so `EXTEND` / `START_MOVE` could push a reservation outside its availability calendar, across a blackout, past the pool's `maxReservationDuration`, or over the capacity ceiling within the new window — all of which the booking and assessment paths already reject (R16.2 specified, unimplemented on the modification path). Added `checkTargetShape(...)` to `ScheduleModificationServiceImpl`: after the existing engine gate passes, the post-modification interval is re-checked against calendar coverage (`AvailabilityService.bookingCoverage`), blackouts (`blockingBlackouts`), `maxReservationDuration`, and `engine.checkConflict` for capacity/overlap — the same primitives the booking path trusts. `EXTEND`/`START_MOVE` only (SHORTEN can only relax all four); calendar+blackout gated by `chronos.calendar.enforce-on-booking`. Rejections carry `CALENDAR` / `BLACKOUT` / `MAX_DURATION_EXCEEDED` / `CAPACITY` / `OVERLAP` in `violatedConstraints`, `suggestedAlternative` null (request property, not a race). No REST/JMS/DTO/schema change; `AvailabilityService` injected in-layer. +7 unit tests (10 existing unchanged via lenient `ALWAYS_OPEN` defaults). 978 tests, 1 pre-existing unrelated failure (`ReleasePathTest.onExternalEnd_overdue_emitsReleaseOverdueEvent`) |
| 2026-10-12 | [Restore the release-overdue alert in `onExternalEnd`](20261012_2328_restore-onexternalend-overdue-alert.md) | Fixes the long-standing `ReleasePathTest.onExternalEnd_overdue_emitsReleaseOverdueEvent` failure. Commit `8c6be7f` had removed the `ReservationReleaseOverdue` emission from `onExternalEnd` without recording it. `ReconciliationJob` does not cover a late release that is confirmed before its next 5-minute scan, so the check (R20.15, R8.4) is restored. 990 tests, 0 failures |
| 2026-10-13 | [Helm deployment pointer + CI comment fix](20261013_0030_helm-deploy-pointer-ci-comment.md) | New sibling repo `org.etsi.osl.chronos.deploy` has a Helm chart for backend + UI next to OpenSlice: shared Artemis and Keycloak, its own MySQL 8.4, `/chronos` and `/chronos-api` subpaths, single replica. Here: README/CLAUDE.md pointers, and the `.gitlab-ci.yml` comment now says the Dockerfile builds from source. Docs only |
+8 −3
Changes for .gitlab-ci.yml: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,9 +2,14 @@
# The tag name becomes the image tag, e.g. pushing tag "v1.4.0" publishes
# ${HARBOR_REGISTRY}/${HARBOR_PROJECT}/org.etsi.osl.chronos:v1.4.0
#
# Chronos's Dockerfile expects a pre-built jar (it COPYs target/*.jar rather than
# building from source), so this pipeline runs `mvn package` first and hands
# the jar to the image-build stage as an artifact.
# The Dockerfile is multi-stage and builds the jar from source itself
# (`mvn package -DskipTests` in its builder stage). The `maven_build` job below
# runs the full `mvn package` including the unit tests, and it acts as a gate:
# the image is only built and pushed if it passes. Its jar artifact is not used
# by the image build.
#
# The Helm chart that deploys this image (with the UI) next to OpenSlice lives in
# the sibling repo org.etsi.osl.chronos.deploy.
#
# Required CI/CD variables (set once at the `openslice` group level so every
# repo in the group inherits them — Settings > CI/CD > Variables):
+1
Changes for CLAUDE.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ java -jar target/org.etsi.osl.chronos-1.0.0-SNAPSHOT.jar
- Starts on port **8888**.
- Swagger UI: `http://localhost:8888/swagger-ui.html`.
- REST base path: `/api/v1`.
- Kubernetes deployment: the Helm chart lives in the sibling repo `org.etsi.osl.chronos.deploy` (`helm/chronos`). It runs a single backend replica because the `@Scheduled` jobs have no cluster lock, and serves the API behind the `/chronos-api` prefix with `server.forward-headers-strategy=framework`.

## Java version

+2
Changes for README.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ mvn package -DskipTests
java -jar target/org.etsi.osl.chronos-1.0.0-SNAPSHOT.jar
```

**Kubernetes (Helm):** the sibling repo `org.etsi.osl.chronos.deploy` has a chart (`helm/chronos`) that deploys Chronos and the UI next to an OpenSlice release. It reuses OpenSlice's Artemis and Keycloak, bundles MySQL 8.4, and serves the UI at `{rootUrl}/chronos/` and the API at `{rootUrl}/chronos-api/`.

Requires MySQL 8.4, ActiveMQ Artemis, and a Keycloak (or other OIDC) issuer running separately.

Once running: