Skip to main content

Kubernetes with Helm

The platform is deployed on Kubernetes with the openent-monolithe Helm chart, found in the open-ent-mods repository under helm/openent-monolithe.

Architecture​

One launcher-next container runs every module declared in ent-core.yaml: the core services (sign-in, directory, communication, portal…) and the applications. Modules talk to each other over the Vert.x event bus, clustered with Hazelcast, so services that run in their own pods (administration API, timetable planner) join the same bus.

Dedicated services run alongside it, each in its own pod:

ComponentRole
launcher-nextThe platform modules, resolved from the Maven repository at the version set by ent-core.yaml
dashboardAdministration and home interface (Next.js, container image)
admin-dashboardAdministration API (Quarkus); drives the launcher over the event bus
school-plannerTimetable planner (Quarkus), resource-hungry
arcadedbGraph database for users, organizations, groups and rights
pdf, antivirus, content-transformer, video-media-serverTechnical services called by the modules
maintenanceMaintenance page served by Traefik

The chart​

The chart also installs the data services as Helm dependencies:

DependencyVersionSwitch
PostgreSQL (Bitnami)15.5.23postgresql.enabled
MongoDB (Bitnami)15.6.14mongodb.enabled
Redis0.27.1redis.enabled
OpenSearch2.26.1opensearch.enabled
OpenSearch Dashboards2.24.1opensearch-dashboards.enabled
NATS2.12.6nats.enabled

Each one can be switched off to use an existing service. To rebuild the dependencies, from helm/openent-monolithe:

helm dependency build

Configuration​

SourceContent
Chart values.yamlEverything about the deployment: launcher image, ingress hosts, environment variables (env), resources, dedicated services, storage
starter/ent-core.yamlThe modules and their settings, passed to the chart with --set-file entCoreConfig=…
ConfigMap <release>-versionsModule versions (*_VERSION), read by the launcher at start-up (envFrom) and referenced in ent-core.yaml as ${X_VERSION}

Changing a version in the versions ConfigMap does not restart the platform: the new version is picked up at the next restart, or immediately when the module is delivered on its own.

Secrets (database passwords, OIDC keys, encryption keys) live in Kubernetes Secrets. The chart reuses the existing Secret on every upgrade, so a value supplied once with --set is not lost on the next deployment.

Deploying​

Chart upgrades go through scripts/deploy/helm-upgrade-ent.py in open-ent-mods, run from the repository root:

./scripts/deploy/helm-upgrade-ent.py --plan   # checks and plan, nothing applied
./scripts/deploy/helm-upgrade-ent.py --yes # apply

Before applying, the script:

  1. checks that the chart and starter/ent-core.yaml are committed and up to date with the main branch — the repository values.yaml is the single source of configuration;
  2. shows the values that change compared with the running revision;
  3. renders the chart (server-side dry run) and says whether the platform pod will restart, and which other services will;
  4. compares the module versions with those the launcher actually serves, and refuses a mismatch unless --allow-version-drift is given.

When the platform pod restarts, the script turns maintenance on before helm upgrade and off once the platform is back. --maintenance-title, --maintenance-duration, --maintenance-kind and --maintenance-description set what users see; --before-upgrade "<command>" runs an operation under maintenance right before the upgrade, such as a data migration.

Delivering one module​

A module is delivered on its own, without helm upgrade: it is published to the Maven repository, then reloaded live by the launcher (scripts/release/release.sh <module> --deploy prod). The other modules keep serving.

Delivering the dashboard​

The dashboard is a container image (ghcr.io/open-ent/open-ent/dashboard, tag latest). It is delivered by building the image, pushing it and restarting its own pod only (scripts/deploy/deploy-dashboard.sh dashboard in open-ent-mods).

Maintenance​

  • Automatic fallback: when the launcher cannot be reached, Traefik serves the maintenance page instead of a 502, 503 or 504 error. It is always on and shows nothing while the platform answers.
  • Planned maintenance: scripts/deploy/maintenance.sh on sends all traffic for the platform hosts to the maintenance page and declares the window on the status page; maintenance.sh off reopens and closes the window. A window can be announced in advance (maintenance.sh announce --start "YYYY-MM-DD HH:MM" --duration 45).

Graph engine​

graphEngine selects the graph database used by the launcher, the dashboard, the administration API and the planner, all at once:

ValueDatabase
arcadedbArcadeDB (arcadedb.enabled), HTTP API, OpenCypher queries
neo4jNeo4j 3.1 (neo4j.enabled)

The ArcadeDB password is generated on the first deployment and kept in its Secret afterwards.

Persistent storage​

VolumeMounted atContent
data (persistence)/srv/launcher/storageFiles handled by the platform
modules (modsPersistence)/srv/launcher/modsModules downloaded and extracted by the launcher; shared with the administration API, which writes uploaded modules there
assets (assetsPersistence)/srv/launcher/assetsThemes, shared JavaScript, fonts

All three volumes are kept when the chart is uninstalled (keepOnDelete: true). The modules volume is ReadWriteOnce: the launcher and the administration API must run on the same node, or the volume must switch to ReadWriteMany.

Session affinity​

Some functions keep state that is local to one pod. Backup and restore is one: the export, verify and download steps must reach the pod that started the export.

Traefik routes directly to pod endpoints and bypasses the cluster IP, so Service.spec.sessionAffinity: ClientIP has no effect. Affinity is provided by the Traefik sticky cookie, set by annotations on the service:

service:
sessionAffinity: None
annotations:
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
traefik.ingress.kubernetes.io/service.sticky.cookie.name: "ent_affinity"
traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true"
traefik.ingress.kubernetes.io/service.sticky.cookie.httponly: "true"

Traefik then sets an ent_affinity cookie that pins a client to one pod. These values are on by default in the chart. With an NGINX ingress, use nginx.ingress.kubernetes.io/affinity: cookie in ingress.annotations instead.

Checking the deployment​

./scripts/deploy/deploy-doctor.sh

The open-ent-mods diagnosis reviews the launcher modules (none expected in error), the pods and the main pages, and compares, for each module, the version and commit actually served with those of the repository.

kubectl -n <namespace> get pods

<release>-openent-monolithe-… 3/3 Running
<release>-openent-monolithe-arcadedb-… 1/1 Running
<release>-openent-monolithe-dashboard-… 1/1 Running
<release>-openent-monolithe-admin-dashboard-… 1/1 Running
<release>-openent-monolithe-school-planner-… 1/1 Running
<release>-openent-monolithe-maintenance-… 1/1 Running
…

The platform pod holds three containers: the launcher, the asset file browser and the online help.