Upgrade
Bookend never updates itself. A release is a bundle the bank verifies and applies inside a maintenance window. Schema changes are forward-only DDL scripts applied by the migrator; the release notes list every script a release adds.
The commands below use the production override from the Installation Guide; add -f deploy/compose.external-db.yml if the install uses an external database.
Before the window
Section titled “Before the window”- Read the release notes (
CHANGELOG.mdin the new bundle; after the upgrade, also System → Release notes orGET /v1/releases). Note anyrestart_requiredsettings and the DDL scripts the release adds. - Verify the new bundle’s checksums and signature per its
VERIFY.md, then load its images:docker load -i bookend-<new version>-images.tar. Loading does not touch the running stack, and the previous images stay available for a rollback. - Compare the new bundle’s
deploy/compose.ymlanddeploy/.env.examplewith the installed ones. Copy the newcompose.ymlinto place; keep yourdeploy/.envand override files, adding any new variable the release notes call for. - Take a backup (
backup-restore.md): database dump,documentsandexportsvolumes,deploy/.env. - Confirm the current state is clean:
GET /v1/diagnosticsshows every health entryhealthy, the last evidence sweep has no broken chains, no pipeline runs are in flight (GET /v1/loans?state=processingis empty) and no boarding record iscommitting.
During the window
Section titled “During the window”# set BOOKEND_VERSION=<new version> in deploy/.envdocker compose -f deploy/compose.yml -f deploy/compose.production.yml up -d --waitdocker compose -f deploy/compose.yml -f deploy/compose.production.yml logs migrator # lists the scripts it applied; exits 0api starts only after the migrator has completed successfully, and its readiness check (/readyz, schema) stays unhealthy until the ledger holds every script the new build requires, so an upgrade cannot run against a half-migrated database. The scheduler picks up persisted jobs (pipeline stages, nightly evidence sweep, daily heartbeat) where they were.
Smoke test
Section titled “Smoke test”GET /readyzhealthy;GET /v1/diagnosticsshows the newversionand the expecteddatabase.schemaVersion.- Golden-package test: upload
BK-DEMO-001from the new validation pack as a new loan; it must reachreviewwith no findings, andGET /v1/loans/BK-DEMO-001/evidence/verifymust reportintact: true. Reject the test loan afterward. - Open one existing loan: values, provenance chips, findings and the evidence chain render; its
evidence/verifyis intact. - Send a metering heartbeat (System → Metering & license → Send heartbeat now) unless air-gapped.
Rollback
Section titled “Rollback”- The release added no DDL scripts (the release notes say so, and
logs migratorreported 0 applied): setBOOKEND_VERSIONback to the previous version indeploy/.envand runup -d --waitagain. - The release applied new scripts: the previous version’s migrator refuses to run against a ledger that holds scripts it does not know (exit 4), so the previous images cannot simply be restarted. Set
BOOKEND_VERSIONback and restore the pre-upgrade backup (backup-restore.md); the restored ledger matches the previous version. - Record the rollback in the change log and send the
GET /v1/diagnosticsoutput andlogs migratorto Bookend support.