Released docs. You are viewing the documentation published with v0.39.0. Development docs are available at Latest.
Use this runbook when you move a deployment of Base Registry Engine (BReg), Registry Casework, Evidence, and Registry Scheduling to a new release, or take it out of service. Each product’s own guide carries its upgrade command; this page gives the order across products, the version rule that order enforces, and what each product must leave behind when it is retired.
Run one release everywhere
Section titled “Run one release everywhere”Every Registry Stack artifact of a release shares one version: the runtimes, their adopter tooling, and the Rust, Node.js, and Python clients. Run the same release on every side. There is no supported version-skew window, between two runtimes or between a client and a runtime, and a rolling upgrade that mixes releases is not supported:
- Casework and BReg are checked. Casework compares BReg’s
Registry-Engine-Versionheader with its own release on every contract read and refuses any other release; see Upgrade Casework and BReg in lock-step. - Adopter tooling is checked.
evidencectlrefuses anevidenceorbregctlbinary of another version. - Clients are not checked, and break silently. Clients send no version, and runtimes accept any caller. The clients decode responses strictly, so a member one release adds can fail an older client’s decoding, and a member one release requires can be missing from an older runtime’s answer. Upgrade each client to the same release as the runtime it calls.
- BReg activation is not rolling. Once
bregctl applyactivates a successor, everybregprocess still running the previous package fails readiness until it restarts onto the successor. Plan the restart as part of the activation, not after it.
Before 1.0, a release reads only the state its immediate predecessor wrote, and there is no reverse path. If you run an older release, upgrade one release at a time, and finish this runbook for each release before you start the next. See Compatibility direction.
Upgrade in this order
Section titled “Upgrade in this order”BReg goes first, because Casework and Evidence both read it. Casework follows because it refuses a BReg of another release. Evidence and its wallet-facing front end come next. Scheduling reads none of them and upgrades on its own, before the clients. Each release’s notes list, per product, the project and runtime-file changes its upgrade needs; make them in the step that upgrades that product. Rehearse the whole sequence on a restored copy first, as Run a disaster-recovery drill describes.
- Back up every database. Take the BReg and Casework
pg_dumps, and the Scheduling one when it runs, and copy those products’ packages and runtime files. These backups are the only way back; see Roll back. - Stop
evidence-oid4vci, when it runs. Its outstanding offers end here; see Operational limits. - Pause and drain Evidence traffic for every question that reads BReg, or pause the whole instance when you cannot drain one question at a time. Keep the previous Evidence candidate.
- Upgrade BReg. Make the project and runtime-file changes the release notes list, rebuild
the deployed project with no model change using the new
bregctl testandbregctl package --test-receipt FILE --output BUILD(a receipt from the earlier release is not accepted), pointpackage.rootatBUILD/package(andpackage.expectedDigest, when set, at the package digest it reports,packageDigestwith--format json), check it against the live database withbregctl plan --runtime-config FILE --package BUILD/packagenaming the same directory, apply it withbregctl apply --runtime-config FILE --package BUILD/package, runbregctl verify --runtime-config FILE, and restart everybregprocess on the new binary;bregctl status --runtime-config FILEconfirms what the database activated. A model change follows as its own successor; see Activate the successor. When anapplystops before it finishes, rerun it with the samedatabase.roles: a retry under other roles is refused asapply.resume.roles_differ, naming the roles the activation started with. A new package applied underdatabase.rolesother than the ones the active activation serves with is refused asapply.successor.roles_differbefore maintenance; apply the active package under the new roles first, then the new package. A role change, the active package applied under otherdatabase.roles, cannot be assessed bybregctl migration reconcile: when one stops before it finishes, fix the cause and rerun the same apply, which resumes it. Casework reports each BReg source as unavailable from here until step 5 finishes. - Upgrade Casework. Settle pending attempts first, since an upgrade can strand them. When step
4 changed the
registryRevisiona BReg source serves, check each such source withcaseworkctl check PROJECT --against-breg-package DIR --source-id ID, repin it withcaseworkctl source add BREG_PROJECT --project PROJECT --source-id ID --apply, package the Casework project again, and point the runtime file’spackage.rootat the new package (andpackage.expectedDigest, when set, at its digest); see Check a BReg source’s pinned revision. Stop every earliercaseworkprocess before the apply: one left running holds the audit writer lock the new runtime needs, and can strand a source attempt when the apply changes a source’s binding generation. Runcaseworkctl plan --runtime-config FILEandcaseworkctl apply --runtime-config FILEwith the new binaries, then startcaseworkand runcaseworkctl doctor --runtime-config FILE; see Plan, apply, and serve. - Upgrade Evidence. Re-import each BReg source whose export the release notes say changed,
then package a fresh candidate with the new
evidencectl package, runevidence check --runtime-config FILE --require-runtime-dependencieswith the new binary (add--without-audit-lockwhile the earlier instance still runs), stop the earlierevidence, start the new one, and verify a fresh synthetic assertion. Then start the newevidence-oid4vci. - Upgrade Scheduling, when it runs. Stop the earlier
schedulingruntime, or keep its destination bindings until its hook deliveries drain. Runschedulingctl plan --runtime-config FILEandschedulingctl apply --runtime-config FILEwith the new binary, then startscheduling;schedulingctl status --runtime-config FILEconfirms what the database activated. - Resume traffic, and upgrade clients. Roll out every application that embeds a Registry Stack client at the same release before it calls the upgraded runtimes.
Roll back
Section titled “Roll back”No product migrates backwards. A Casework binary refuses a database whose schema is newer than it supports, and a BReg package applies forward only. Evidence refuses a runtime file carrying keys its release does not know. To return to the previous release:
- BReg. To return to the previous release, stop every
bregand retire the upgraded database, restore the step 1pg_dumpinto a fresh database, and point the previous runtime file copied in step 1 at it. The restored copy carries the claim of the database it was dumped from, so adopt it with the previous release’sbregctl instance-claim adopt --runtime-config FILE --acknowledge-original-retired(see After a logical restore for why), then start the previousbregwith the previous package and that runtime file; the new release’s tools cannot read the earlier package or runtime file. To undo only a model change, roll forward to a successor that reverts it, and when the data itself must go back, restore the pre-activation backup; see Roll back by rolling forward. - Casework. Restore the pre-apply backup and run the previous binary, package, and runtime file copied in step 1; see Restore Registry Casework for what that restore loses.
- Evidence. Restart the previous binary with the previous bundle and runtime file.
- Scheduling. Restore the pre-apply database backup, then run the previous binary, package, and runtime file copied in step 1. Always restore first: an earlier Scheduling runtime may not detect a schema newer than its own.
Because the release rule holds in both directions, rolling back one product means rolling back every product that must match it: Casework refuses a BReg that went back without it.
Retire a deployment
Section titled “Retire a deployment”Retire the products in the reverse of the upgrade order, so nothing still running depends on what you have removed. Retiring a product leaves records behind: signatures others still verify, decisions others may challenge, and audit entries your retention policy holds. None of the products has a decommission command, so the steps below are yours.
Retire Scheduling
Section titled “Retire Scheduling”Scheduling reads no other product and no other product reads it, so it can retire at any point in this sequence.
- Stop routing booking requests to Scheduling, and tell the callers holding appointments how those appointments will be honoured.
- Stop
scheduling. Reminder and observer-hook deliveries are outbox work its own workers send, so every delivery still pending stops with it and is not sent. - Scheduling has no export command. Keep a final
pg_dumpfor as long as your policy holds its appointment records. - Ship the final audit file, its sealed files, and the
schedulingctlsibling ofaudit.path.
Retire Evidence
Section titled “Retire Evidence”- Stop
evidence-oid4vci, then stop routing requests to Evidence. - Keep the published public keys available. An assertion Evidence issued stays valid for up to
maximumAssertionValiditySeconds(at most one year), and the JWKS is served only by the running process, so publish the key set elsewhere or give it to each relying party, and keep it until that period and the verifier clock skew have passed since the last issuance. - Ship the final audit files after the process stops, and keep every audit master whose pseudonyms an investigation may still need; see Rotate the audit master.
- Retire the signing key in Transit only after step 2’s period ends; see Retire the old version.
- Retire or rebind the Evidence provider in every BReg project whose governed actions call it, since an action that resolves against a retired provider fails.
Retire Casework
Section titled “Retire Casework”- Stop staff access. Settle every pending and uncertain attempt, as Settle an uncertain source attempt describes, so no change is left half-applied at a source.
- Finish or close the reviews Casework hosts for BReg. A review left open makes BReg wait for a
result that never comes; close it from BReg with
bregctl review-recovery close. - Casework has no export command. Keep a final
pg_dumpfor as long as your policy holds its decisions and accountability records, or erase source-backed payload copies first withcaseworkctl retention erase. - Stop the runtime, ship the final audit file, its sealed files, and the
caseworkctlcompanion file, then revoke Casework’s client credentials at each BReg source’s identity provider.
Retire Base Registry Engine
Section titled “Retire Base Registry Engine”- Stop every consumer, then close the import authorities still open with
bregctl import-authority close. - Export what must outlive the registry.
bregctl data exportexports one entity through one access profile, checkpointed; a finalpg_dumpis the only complete copy. See Export with a checkpoint. - Erase what your policy does not let you keep, before that final backup: see Erase retained history and Erase expired Evidence uses.
- Stop
breg. Pending webhook deliveries stop with it and are not sent; checkbregctl webhook listfirst if receivers must see them. - Ship the final audit files and the
bregctlcompanion file. - Keep the field-encryption key for as long as you keep any backup that holds sealed values, and the audit hash key for as long as you keep the audit archive. Destroy each only when the last record that needs it is gone.