From d76c6f53693dcb31cfccd41ff24fa433480f89fb Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 22 Oct 2026 08:29:25 +0200 Subject: [PATCH] docs(requirements): specify automatic major upgrades, a WireGuard compose hub and the full Mailu import - Automatic major upgrades: PostgreSQL through pg_upgrade --link with a reflink copy, Nextcloud one major at a time, the PeerTube migration scripts and asset reseed, the OpenProject intermediate major, the Moodle and Joomla upgrade paths, downgrade guards for the Bluesky PDS, Confluence and Jira, the MediaWiki extensions refresh and the Matrix switch from the compose to the ansible flavor - A named WireGuard hub for compose deployments with roaming spokes - A Stalwart import of every Mailu mailbox with its Sieve script, mailbox mapping, catch-alls and aliases with external destinations Co-Authored-By: Claude Opus 5.5 (1M context) --- .../042-automatic-major-upgrades.md | 28 +++++++++++++++++++ .../043-svc-net-wireguard-compose-hub.md | 16 +++++++++++ ...044-stalwart-import-every-mailu-mailbox.md | 19 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 docs/requirements/042-automatic-major-upgrades.md create mode 100644 docs/requirements/043-svc-net-wireguard-compose-hub.md create mode 100644 docs/requirements/044-stalwart-import-every-mailu-mailbox.md diff --git a/docs/requirements/042-automatic-major-upgrades.md b/docs/requirements/042-automatic-major-upgrades.md new file mode 100644 index 0000000000..cc268316b2 --- /dev/null +++ b/docs/requirements/042-automatic-major-upgrades.md @@ -0,0 +1,28 @@ +# 042 - Automatic Major Upgrades + +## User Story + +As an operator upgrading a long-running host across several major versions of its applications, I want every deploy to detect the version that the existing data was written by and to step through every mandatory intermediate version on its own, or to stop loudly where no forward path exists, so that one deploy brings old data to the pinned version without manual upgrade stops, silent downgrades or stale code and asset volumes. + +## Acceptance Criteria + +- [ ] `svc-db-postgres` detects the major version of an existing cluster from `PG_VERSION`, in the volume root, in `pgdata/` and in `/docker`, without any inventory value. +- [ ] `svc-db-postgres` upgrades an older cluster major by major with `pg_upgrade --link` in an upgrade image that carries the old and the new server binaries and the extension packages the role declares, and starts the pinned major on the upgraded data. +- [ ] `svc-db-postgres` keeps a reflink copy of the old data directory before the first `pg_upgrade --link` where the filesystem supports reflinks, and otherwise stops with a message that names the missing backup confirmation. +- [ ] A compose deploy of `svc-db-postgres` on a PostgreSQL 17 volume in each of the three layouts ends on the pinned major with every database and role intact. +- [ ] `web-app-nextcloud` detects the installed version from `version.php` in its code volume and upgrades one major at a time up to the pinned version. +- [ ] A compose deploy of `web-app-nextcloud` on data written by Nextcloud 31 ends on the pinned major, and `occ status` reports it. +- [ ] `web-app-peertube` detects the version the existing data was written by without any inventory value and runs every `dist/scripts/migrations/peertube-X.Y.js` above that version up to the pinned version, in order, after the server migrations finished. +- [ ] `web-app-peertube` replaces the image-seeded `peertube_assets` volume whenever the deployed version changes. +- [ ] A compose deploy of `web-app-peertube` on data written by 7.3.0 ends on the pinned version, serves the client of the pinned version and keeps uploaded videos playable. +- [ ] `web-app-openproject` detects the schema stage of an existing database and passes through every major the upstream requires between it and the pinned major. +- [ ] A compose deploy of `web-app-openproject` on a database written by 15.x ends on the pinned major with the seeder exiting 0. +- [ ] `web-app-moodle` detects the release in its code volume and passes through every intermediate release that Moodle requires before the pinned release. +- [ ] A compose deploy of `web-app-moodle` on a code volume below the pinned release's minimum upgrade source ends on the pinned release. +- [ ] `web-app-joomla` detects the core version in its code volume and updates the core up to the pinned major, including the database schema. +- [ ] A compose deploy of `web-app-joomla` on a 5.x code volume ends on the pinned major with SSO enabled. +- [ ] `web-app-bluesky` stops with a message naming both versions when the PDS data carries migrations the pinned image does not know. +- [ ] `web-app-confluence` and `web-app-jira` stop with a message naming both build numbers when the home directory was written by a newer build than the pinned image. +- [ ] `web-app-mediawiki` replaces the image-seeded `mediawiki_extensions` volume and reinstalls its add-on extensions whenever the MediaWiki version changes. +- [ ] A compose deploy switches an existing `web-app-matrix` from `flavor: compose` on Synapse 1.144.0 to `flavor: ansible` with the same signing key id, the old media readable and Synapse running as uid 991. +- [ ] Every new mechanism has unit tests, and `make test` passes. diff --git a/docs/requirements/043-svc-net-wireguard-compose-hub.md b/docs/requirements/043-svc-net-wireguard-compose-hub.md new file mode 100644 index 0000000000..34cc0f09bc --- /dev/null +++ b/docs/requirements/043-svc-net-wireguard-compose-hub.md @@ -0,0 +1,16 @@ +# 043 - WireGuard Hub for Compose Deployments + +## User Story + +As an operator of compose hosts, laptops and hosts behind NAT, I want `svc-net-wireguard` to build a hub-and-spoke mesh around a host I name, without a swarm manager, so that roaming and NATed members reach every other member through the hub and a deploy never waits on a member that is offline. + +## Acceptance Criteria + +- [ ] An explicit inventory value names the hub of a compose deployment, and `cli.administration.inventory.mesh` plans hub-and-spoke meshes around it without any host in `svc-swarm-manager`. +- [ ] The hub forwards between the spokes of its meshes, so a spoke reaches every other spoke through the hub. +- [ ] A spoke marked as roaming gets no endpoint in the hub's peer list and dials the hub with `PersistentKeepalive`. +- [ ] The hub's handshake gate skips roaming spokes, and a roaming spoke's own deploy gates only on the hub. +- [ ] A mesh keeps an operator-chosen subnet and listen port, such as `10.0.0.0/24` on UDP 51871. +- [ ] Deployments that name no hub and have no `svc-swarm-manager` keep planning full meshes exactly as before. +- [ ] Swarm deployments keep the `svc-swarm-manager` host as their hub exactly as before. +- [ ] The planner and the role changes have unit tests, and `make test` passes. diff --git a/docs/requirements/044-stalwart-import-every-mailu-mailbox.md b/docs/requirements/044-stalwart-import-every-mailu-mailbox.md new file mode 100644 index 0000000000..3cc6b84b2b --- /dev/null +++ b/docs/requirements/044-stalwart-import-every-mailu-mailbox.md @@ -0,0 +1,19 @@ +# 044 - Stalwart Imports Every Mailu Mailbox + +## User Story + +As an operator retiring Mailu, I want the Stalwart import to carry over every mailbox in Mailu's maildir volume, not only the inventory accounts, so that mailboxes created through SSO or the Mailu admin UI keep their mail, folders and filters after the switch. + +## Acceptance Criteria + +- [ ] The import enumerates every mailbox directory in the `web-app-mailu` `dovecot_mail` volume, whether or not the address is an inventory user. +- [ ] The import authenticates as a Stalwart administrator or master user, never with a per-mailbox password, so it works for accounts without an inventory password. +- [ ] A mailbox without a Stalwart account gets one, named the way Stalwart's OIDC directory resolves the same person after `services.sso` is turned on, so the user finds the imported mail after the first SSO login. +- [ ] Folders, flags and internal dates survive, and a re-run imports nothing twice. +- [ ] Each mailbox's active Sieve script is imported and activated in Stalwart. +- [ ] The inventory can map a Mailu mailbox onto another Stalwart account, and the import merges the source's folders and messages into the target account instead of creating the source account. +- [ ] A mailbox whose domain Stalwart does not serve is skipped and reported by address, without creating that domain. +- [ ] The deploy prints a per-mailbox summary: messages found, imported, skipped. +- [ ] The inventory declares mail aliases for `web-app-stalwart`, including a catch-all per domain and destinations outside the served domains, and the role provisions them in Stalwart idempotently, removing none it did not create. +- [ ] Mail to a declared alias, to an unknown local part under a catch-all, and to an alias with an external destination reaches every destination. +- [ ] The role's import test covers a mailbox that is not an inventory user and a mailbox with a Sieve script, and `make test` passes.