Skip to the content

Upgrade full Central to a new release

Upgrade a full Central deployment while it serves: the schema expanded first, the roles rolled, then the old schema dropped once nothing runs on it.

Built, not yet claimed preview: this guide describes a package that has not passed its release gate.

A full Central deployment upgrades without stopping. The chart's migration Job expands the schema so that the release you are leaving and the one you are moving to both run on it; the roles then roll to the new release; and once every process runs it, you contract the schema, which drops what only the old release needed. Until that last step you can still roll back.

1. See what the upgrade will do

Run the new release's garm-central on the operator host. operator upgrade status prints the schema Postgres holds against the one this release runs, and the migration steps between them. doctor --preflight checks the stores as the chart's hook will: a schema this release upgrades is ok there, one it cannot reach fails.

A schema no step reaches means a release was skipped: upgrade through each release in turn. A step marked as a required stop expands only once the step before it is contracted, so that release's contract comes first.

garm-central --full operator.json operator upgrade status
garm-central --full operator.json doctor --preflight

See also

Check full Central's health with doctor

Check every store, role, grant and tenant of a full Central deployment in one pass, read what a warning means, and feed the result to monitoring.

2. Upgrade the chart: expand, then roll

helm upgrade runs two hook Jobs before any role's pods change: the preflight, then migrate. migrate expands the schema one step at a time, each step only adding (tables, columns with a default or none, indexes), and then backfills every tenant, one tenant at a time under its own lock. A Job that stops part way resumes where it left off when it runs again.

The roles then roll. Pods of both releases run side by side on the expanded schema: nothing the old release reads or writes has gone. Each step is recorded in the deployment audit chain as schema.expand and schema.backfill.

helm upgrade central deploy/helm/agentgarm-central -n agentgarm -f values.yaml --wait

See also

Install full Central with Helm

Install full Central on Kubernetes: its datastores, the first tenant and its root, each role's keys, the chart from digests, a first admin and machine.

3. Watch the roll

operator upgrade status and the operator console's Upgrades screen show every process seen with its release, and each phase: expand and backfill done, the roll running, the contract blocked until every process that beat in the last 10 seconds runs the new release. A pod that was replaced stays listed for 10 minutes and holds nothing up.

To roll back before the contract, roll back the chart. The old release's migration Job finds the schema expanded past it and changes nothing, and its pods run on it as they did during the roll.

helm rollback central -n agentgarm

See also

Run a full Central deployment from the operator console

Open full Central's operator console on the operator host, add your passkey, and read the deployment's health, tenants, backups and audit chain.

4. Contract the schema

Once every process runs the new release, operator upgrade contract drops what only the old release needed: old columns and tables, and constraints the old release could not have kept. It runs as the schema's owner and asks you to name the schema it makes final: the first 12 characters of its digest, which operator upgrade status prints.

This is the point of no return. After it, the old release can no longer run on the schema, and going back means restoring Postgres from a backup taken before the upgrade. It is refused while any step is still backfilling or any process seen in the last 10 minutes runs another release, ready or not, and it is chained as schema.contract. A pod the roll replaced is still seen for those 10 minutes; to contract sooner, forget each one that is gone for good with operator upgrade contract --forget ROLE/INSTANCE, as operator upgrade status names it (chained as process.forget). A process still running beats again and holds the contract again.

You can also contract from the operator console's Upgrades screen. Start it with operator ui --contract on a host whose --full file holds the schema owner's sign-in. The screen offers the contract once it is ready: type the digest's first 12 characters and approve with your operator passkey. Without --contract, the console holds no owner's sign-in and shows the command instead.

The contract holds no ClickHouse owner's sign-in, so ClickHouse's part of it (the columns the old release wrote) is dropped by the next migrate: run it on the operator host, or let the chart's migration Job run it at your next upgrade. Until then operator upgrade status prints ClickHouse drops pending and the Upgrades screen shows the contract as waiting.

garm-central --full operator.json operator upgrade contract --digest 4f7c0e2a9b13
garm-central --full operator.json migrate

See also

Back up full Central and recover from a disaster

Back up full Central's Postgres, events and streams to another region, rehearse a restore, and bring the whole deployment back after losing it.