Upgrade
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
The schema migrates at boot with no operator gate and the migration set carries no downgrade path, so the backup is not a precaution taken around this procedure — it is the way back (ADR 0056 §6). Everything else below exists to keep that backup usable: to name the release you are leaving, and to notice a recipe change before it stops anything.
Which of these steps has ever been executed. veyqctl upgrade runs on every commit between published releases
and the candidate, in pipeline lane L2 (below); before it existed it had run once, live, between two releases produced
from two commits of the tree with images built on the host (--unsigned-local): a Memory sealed under the first was
still open after it, the upgrade’s backup restored onto a fresh install, and its refusals were each provoked against a
running instance with every container’s start time unchanged. Step 4’s capture is also rehearsed on every
scripts/run_web_e2e.py run, and a restore of every schema state’s backup by lane L3 (below). Read it that way.
What proves an upgrade before a release — and what it does not (ADR 0091 decisions 6 and 7). Two stack lanes run on the images that ship, from releases you could be running:
- Lane L2, upgrade in place (
scripts/run_stack_upgrade.py, every pull request and push). The newest release, and in a leg of its own the newest release of the previous major (the one a new major is entered from, a fix release on itsrelease/<N−1>.xbranch included), is installed from its published files by its ownveyqctl, every signature checked; that release’s own e2e seeder seals content of every application into it; its ownveyqctl upgrade— step 4’s backup, the template check, the health wait — takes it to the candidate, which migrates it at its start, must reportconfigSecretState: OK(step 7), and whose reader opens every item the seeder recorded — names, date and place, the cover, every photo and file byte for byte, the drop box’s guest files, and a READ link as its guest sees it — and whose browser test signs the owner in on a new device. Then the release’s ownveyqctl rollbacktakes it back to that backup, and its own reader reads it again. A migration edited after it was released stops the upgrade, Flyway’s refusal named. - Lane L3, a backup of every schema state restored (
scripts/run_stack_restore.py, every push). Every release’s backup is archived once, after it is released, by its own seeder and its ownveyqctl backupwith the object pool and the kept-apart key. The candidate restores the backup of the oldest release of each set of migrations of its major, and the previous major’s newest release’s, each into a fresh install with its ownveyqctl restore --objects-from --key-from(the Backup and restore path), and reads it as above. A backup the selection names that is missing, or not signed by the archive’s own workflow, is red.
Every leg’s green is attested with the snapshot, and a release is promoted only from a snapshot whose L2 starting
releases and L3 backups are still the ones the releases name. What it does not cover: the seeder writes through the
API, so what only a browser writes is not in the content; a data format a release writes without a migration in the
middle of a set of releases with the same migrations is restored only at the set’s edges; and it says nothing about
the chart — helm upgrade from the predecessor’s chart to the candidate’s runs in no cluster; its immutable fields
and claims are compared on rendered manifests by scripts/chart_upgrade_check.py (Upgrade,
Kubernetes), and a cluster leg is inbox #430. Until 2026-11-28 a jar-level proof (scripts/run_web_e2e.py --upgrade: the predecessor’s own jar and suites, its capture restored onto the candidate’s jar) was the pipeline’s
proof; it booted jars, not the published images, and stays a tool for bisecting a defect between two commits.
cd /opt/veyq./veyqctl check # which release upgrade would take, and what is newer./veyqctl upgrade --key-into /media/usb-stick/veyq-<stamp>.key./veyqctl self-update # then: veyqctl itself, the newest release'supgrade runs only when you run it, and in this order — nothing is stopped before step 4. Each step is a heading
of its own; with -v (--verbose, on every command) it also shows every program it runs, with its arguments, so you can
do it by hand.
-
Resolve the release
.env’sVEYQ_RELEASEselects (below). The running one: nothing to do. An older one: refused — there is no downgrade. -
Verify it and fetch its files into
releases/<new>/, exactly as Verify a release shows: the manifest’s signature first, then both images’. A signature that does not verify stops it here, with nothing pulled. -
Check the new template against
.env. Every key the newenv.exampleassigns that.envlacks, and every${VAR:?…}the new recipe or yourcompose.override.ymlleaves unset, is refused by name: add it to.envand runupgradeagain. A release that adds a required variable has no other way to reach you, and a setting that moved into the admin console leaves the template as a removed variable; a change you have to act on is named in that release’s notes (Versions and compatibility).upgradethen writes the next.envas.env.next(the new image lines, your values, every key the template does not name kept) and lets Compose check it:docker compose -f releases/<new>/docker-compose.prod.yml --env-file .env.next config --quiet. By hand, read the two diffs:Terminal window diff -u releases/<old>/env.example releases/<new>/env.examplediff -u releases/<old>/docker-compose.prod.yml releases/<new>/docker-compose.prod.yml -
Back up, switch, start. With an object pool named (
.env’sVEYQ_BACKUP_OBJECTS_TO, or--objects-tofor this run), it first copies the store’s objects into the pool while the application still runs — objects are immutable, so that copy cannot go stale, and a failure there stops nothing. Then it stops the application — and only it: cold means the writer is stopped, and MariaDB and Garage stay up because the capture reads through their own interfaces (ADR 0056 §2). It captures the database and the store’s index with the running release’s owninstance_backup.pyintobackups/<stamp>-before-<new>/— the pool topped up with what arrived since, the objects otherwise staying in the store, which the upgrade never rewrites — leg (c) to the file--key-intonames, and checks the capture — Backup and restore § Capture shows each command. A capture that fails switches nothing and starts the running release again. Then.env.nextbecomes.env,state.jsonnames the new release, and the stack comes up on the new recipe:docker compose -f releases/<new>/docker-compose.prod.yml --env-file .env up -d --wait(plus your override). The schema migrates during this boot. There is no gate and no prompt. If the stack is not healthy,upgradesays so and names the way back (Rollback). It prints the downtime, from stopping the application to the new release healthy.
--key-into is required, refused before anything else runs when it is missing, already exists or lies inside
backups/: the dump plus the key opens every tenant’s SMTP password, so they never sit side by side. Encrypt the
capture before it leaves the host (Capture). The upgrade’s capture is kept at
most B days, like every other — the instance’s backup retention, 30 until you set it: the way back from an upgrade
exists for that long, so roll back within it, or keep a copy elsewhere and delete it by B
(How long a backup is kept). The cluster’s gate keeps its
captures the same way.
What names the release you are leaving. releases/<old>/ stays, with the manifest that names its images by
digest, and the capture’s manifest.json records app.version. A release is <major>.<minor> and a publish onto an
existing one fails rather than replacing it (ADR 0057),
so that name is one fixed set of bits for good — a rollback target rather than a label.
Then verify, and not by “it started”. Open Server → Object store and run Check store (or
veyq-admin store check): the store setting survives the upgrade in the database, and the check proves it still
reaches its store. Read the instance’s config-secret state as the Server Owner on the admin channel — the admin
console’s Server → Config-secret key, or veyq-admin config-secret — and expect OK; then have a person sign in
and open a Memory that contains media. That is the one assertion touching all three legs at once — the row, the
object and the key are three different failures wearing the same “it looked fine”.
The backup veyqctl takes first under Compose is taken here by the chart’s backup gate: an init container,
backup-gate, that runs in the app pod before the container that migrates
(ADR 0098).
It belongs to the Deployment, so helm upgrade, Argo CD, Flux and a plain kubectl apply all run it, and neither
--no-hooks nor a selective sync skips it. The schema migrates at boot with no downgrade path, so its capture is the
way back. Four things are specific to this target.
- One app pod,
strategy: Recreate, and that is not a tuning knob. Kubernetes’ defaultRollingUpdatestarts the new pod before the old one stops, which would run two migrators against one schema during every upgrade;Recreateis what makes “one migrator at a time” true, at the cost of a short outage per upgrade. It is also what makes the gate’s capture cold: the old pod has terminated before the new one is created. An upgrade here ishelm upgrade, or — when Argo CD syncs a repository — the commitveyqctl upgrademakes, started by hand either way. - What the gate does. It first waits, up to 180 seconds, for the database to accept a connection — on a first
install the bundled MariaDB starts beside it — and fails, writing nothing, if it never does or refuses the login.
It keeps a record on the backup claim of the release whose data the database holds. When
the pod starts a different release, it captures the database and an index of the store (every object’s key,
size and checksum; the objects stay in the store) onto
backup.existingClaim, verifies the capture, moves the record and lets the app migrate. A restart, a rescheduled pod or a sync that changed nothing passes in a second. It refuses — writing nothing, and keeping the app down with its data untouched — a downgrade, a jump of more than one major, and a new major entered from any release but the one that release was tested from; Kubernetes retries it with backoff. Pinning the previous release back starts that release again. - Who sees the gate.
helm upgradewithout--waitreports success before the gate has run, so upgrade with--waitand a--timeoutabove the capture time. Flux waits for readiness by default, withinspec.timeout(5mby default, per Kubernetes operation): set it above the capture time, because past it Flux’s default remediation rolls back, which ends the gate mid-capture (the half-written capture is removed on the next start). Argo CD shows the application progressing; the Deployment reportsProgressDeadlineExceededafterprogressDeadlineSeconds(600 by default), and Kubernetes keeps retrying the gate. - What the chart change between two releases is checked for — and what not (ADR 0064
§ Decision, the chart-upgrade check).
python3 scripts/chart_upgrade_check.pyreads the default predecessor’s chart out of git (the commit before until the first release, the lastv<major>.<minor>from then on, lane L2’s newest leg’s;--upgrade-from <ref>names another, and--upgrade-major-entrythe newest release of the previous major, as lane L2’s major-entry leg does) — atinfra/kubernetes/charts/veyq, or atcharts/veyqwhere an older release carries it — renders it and this checkout’s chart with each of this chart’sci/values files, and refuses whathelm upgradecannot apply or would lose data over: a Deployment’s or StatefulSet’sselector, any StatefulSetspecfield the API server does not let an update change (all butreplicas,ordinals,template,updateStrategy,persistentVolumeClaimRetentionPolicy,minReadySeconds) -serviceName,podManagementPolicy, the claim templates whole (name, order, access modes, class, size, their labels), a claim’s access modes, class or a shrinking size, a RoleBinding’sroleRef, a kind changed under a name, a StatefulSet or claim gone. It also renders this chart with the predecessor’sci/values: values you already run must still pass the schema — and from the release that brings the gate on, they must make the backup choice (backup.existingClaim, orbackup.enabled: false), or the schema refuses them namingbackup. The pipeline’schartjob runs it; before the first release its findings inform, from it they block the publish. It renders and installs nothing, so it does not see a missing StorageClass or one that cannot expand a growing claim, admission, image pulls, your data surviving the upgrade, amariadbPasswordchanged on upgrade (MariaDB keeps the old one), a value path noci/file sets, or what you edited in the cluster by hand. A cluster leg that would is inbox #430.
# Verify a release, <new>: the chart and the three images by digest. Then:helm upgrade veyq "oci://ghcr.io/raddatzk/charts/veyq@${chart_digest}" -n veyq -f my-values.yaml \ --set image.digest="${app_digest}" --set admin.image.digest="${admin_digest}" \ --set backup.image.digest="${tools_digest}" \ --wait --timeout 15m # above the capture timekubectl -n veyq logs deploy/veyq-app -c backup-gate # what the gate captured, or why it refused# the schema migrated during this boot; verify as the Compose tab says — not by "it started"The new chart names the new release as the images’ tag; pin each image to the digest the verification resolved
for it: they ship as one release, only one of a mismatched pair migrated the schema, and the gate refuses an app
release that is not its own. With a digest set the pod runs repository:tag@digest, and the node pulls by the
digest. Rollback is the capture the gate took when you left that release, restored onto it with a one-off Job:
Restore under Helm.
With backup.enabled: false nothing captures before the migration, and the backup is yours, by hand, with the
app scaled to zero — cold means the writer is stopped — through kubectl port-forward to MariaDB and, with garage.enabled, Garage — a store of your own by its address
(Backup and restore). The key is read out before the scale-down, by the image’s own
read-file — only the app pod mounts its claim, and the image has no shell — and goes on a medium of its own, never
into the capture directory (Capture). With app.configSecret.existingSecret
the key is your Secret’s file instead: use that, and skip step 0. This procedure has not been run on a cluster.
# 0. leg (c) out of the pod first, while it still mounts the claim, to a file only you can read(umask 077; kubectl -n veyq exec deploy/veyq-app -c app -- \ java -jar /opt/veyq/image-commands.jar read-file /var/lib/veyq/config-secret.key > ./veyq-config-secret.key)kubectl -n veyq scale deploy/veyq-app --replicas=0 # 1. stop the application, and only it# 2. capture and verify — Backup and restore, through port-forwards, with# --config-secret-file ./veyq-config-secret.key --key-into /media/usb-stick/veyq-<stamp>.key;# then delete ./veyq-config-secret.key — the key now lives on its own medium, never in the capturehelm upgrade veyq "oci://ghcr.io/raddatzk/charts/veyq@${chart_digest}" -n veyq -f my-values.yaml \ --set image.digest="${app_digest}" --set admin.image.digest="${admin_digest}" # Verify a release, <new># 3. the schema migrates during this boot; then verify as the Compose tab says — not by "it started"Which release upgrade takes
Section titled “Which release upgrade takes”VEYQ_RELEASE in .env is the release line (ADR 0096 decisions 4–5):
VEYQ_RELEASE |
upgrade takes |
|---|---|
1.4 |
Nothing: the release is pinned. check still says what is newer |
1 |
The newest release of major 1 |
latest |
The newest release, one major at a time (below) |
A new major is entered only from the release it was tested from. A major is where something is removed, and
the path the release pipeline tests into a release of a new major is the one from its entry: the newest release of
the previous major when it was cut. Each release names its entry in its signed manifest (majorEntry); a jump from
any other release across those removals is a path nobody tested. So when the selected release lies in a later major
and you run an older release than its entry, upgrade goes to the entry first, and ends by saying that the next
upgrade enters the next major. One run never crosses more than one major. With 1.3 running and 2.5 the newest of
all, entered from 1.9, latest takes 1.9, and the next run 2.5. From 1.9 with 3.1 listed it takes the newest of
major 2, never 3.1. A pin in the next major, 2.3, is reached directly from its entry.
A fix release of the old major can come out after the new major’s first release (1.10 after 2.0, which was entered
from 1.9). It is no way into 2.0: nobody tested 1.10 → 2.0, and 1.10 may hold changes 2.0 does not. From 1.3,
latest still takes 1.9 and then 2.0. Running 1.10, upgrade refuses until a release of major 2 entered from 1.10
or later is out; that release is the next one cut after 1.10. A next major with no release (a mirror that lacks it,
or only a prerelease) is refused rather than crossed. veyqctl check says which release the next upgrade takes,
and which major the one after it would enter. It reads that from the signed manifests, so it verifies them as
upgrade does (--unsigned-local for a local build). Under Helm the chart’s backup gate, above, refuses any other
entry: the same release. This rule is held by veyqctl’s self-test; no published release has crossed into a major yet but 1, entered from v0.2480.
Versions and compatibility
Section titled “Versions and compatibility”Decided (ADR 0085).
This is the promise veyq means to keep from V1 on. Major 0 is pre-release and promises nothing. The release you
run and the version clients check share one major. Major 1 began with v1.0 (2026-11-10); no train has left yet, and no installed app exists yet.
- A release is
<major>.<minor>. A minor only adds: it is safe to take. The major moves only when something is removed (an API operation, a setting you must act on), at most once a year, on 1 May, and only if a removal is pending. A security fix that cannot keep the API intact is the one exception: an unscheduled major that removes only the insecure piece. - The previous major gets security fixes until the next train. When a new major is released, the one before it keeps receiving minor releases with security fixes, and nothing else, until the following 1 May. You can take such a fix without leaving your major. After that train your major gets no more fixes.
- What you must act on is named in that release’s notes, a removed configuration variable included.
- Apps keep working across your upgrade window. An installed app speaks every major since the train before last, so after your major stops being current you have about two years to upgrade before an app asks you to. Apps that speak a new major ship before the server’s major does. The web client and the admin console come from the server’s own image and always match it.
veyqctlis a client too.veyqctl --versionnames its release. It refuses an instance or a release of a newer major than its own and says where to get a newerveyqctl. Within a major an olderveyqctlstill works, and says so when it is older than your instance:veyqctl self-updatefetches the newest, for every instance you manage.- The bundled database upgrades itself. When a release moves the bundled MariaDB to a newer version, its first start backs up the database’s system tables and upgrades them, on Compose and Kubernetes alike. An upgraded database does not go back to the older MariaDB: the backup taken before the upgrade is the way back. A database you run yourself is yours to upgrade.
- The precise release is for you. The sign-in page shows only the major; the release you run is in the console’s Server → Release.
Rollback
Section titled “Rollback”Rollback is the backup plus the release you left, and both are nameable only because a release is immutable.
The capture upgrade took is restored under the release you left — never under the new one: restored onto the new
release, the same capture is accepted as an older backup and migrated up again at the next start, which repeats the
failed upgrade instead of undoing it (the restore says so when it sees one). There is no other way back: the
migrations carry no down path, so an instance that has booted on the new schema cannot be handed to the old image.
On Compose the rollback is in place. The capture holds the database and the store’s index, and the objects it needs are still in this instance’s own store, which the upgrade never rewrote:
cd /opt/veyq./veyqctl rollback backups/<stamp>-before-<new> --key-from /media/usb-stick/veyq-<stamp>.keyIt refuses, with nothing stopped, unless the capture’s release is still in releases/ and the capture verifies
against the live store (every object its rows require is there, as indexed), and it asks before it empties the
database (--yes where there is no terminal). Then it stops the application, empties the database, switches .env’s
image lines and state.json back to the release you left, starts that release once so it migrates the empty schema,
stops it, restores the capture with the check only, places the key and starts. The store is never written; objects
uploaded under the failed release stay in it with no record that claims them. Server → Object store counts them
under Objects no record claims, and deletes them after a 30-day grace once you confirm the bucket is this server’s
alone — the rollback, like every restore, restarts that grace and withdraws an earlier confirmation
(Operations). .env’s VEYQ_RELEASE is left as it was, so pin it to the
release you went back to if the next upgrade should not try again. Then verify as
Restore says.
A store that lost objects since the upgrade — the volume gone — is not a rollback any more but a restore onto a fresh
instance, from the object pool (--objects-from, Restore).
Under Helm: the previous chart and images by their digests, the database emptied, then the restore Job with the check
only (Restore under Helm).
How far this is proven: lane L2 (scripts/run_stack_upgrade.py, How veyq is tested)
is built to run on every change to veyq, and ran green from v1.318 and from v0.2480 on a developer machine
(2026-11-27); its first run on GitHub is still to come. It does what this page says with the operator’s own tool: it installs the newest
release — and, in a second leg, the last release of the previous major — from its published files with that release’s
own veyqctl, every signature checked, writes content into it with that release’s own test code, runs that veyqctl’s
upgrade to the version under test, reads every item back (the config-secret key first, then each Memory, photo and
file byte for byte, and in a browser the owner signs in on a new device), then runs that veyqctl’s rollback to the
backup the upgrade took and reads everything again with the older release’s own reader. src/tools/veyqctl_selftest.py
holds the order and the refusals.