inbuxa upgrade: what is here, to this installer's releases #21

Merged
jcoffey-dev merged 1 commits from feat/upgrade into main 2026-10-12 19:56:09 +00:00
Owner

Installer spec phase 3, first part: inbuxa upgrade [server|console|webmail] [--dry-run] [--yes] [--no-backup].

It moves what's installed to the releases this installer pins. A newer installer is what brings newer releases.

  • What's installed is read from the machine: image tags in compose.yaml, the server binary's --version, the console's release marker, the webmail's VERSION.
  • status now lists each component's version and what this installer would make it.

Order and safety

  • The server goes first, then the console, then the webmail. Each is checked once it's running again; if the check fails, that component is put back and the upgrade stops:
    • a container returns to its old tag in compose.yaml;
    • the server on the host returns to its old binary, kept as inbuxa-server.<version>;
    • the console and webmail on the host return to their old directory, which is kept until the new one is in place (and for the webmail, answering). The webmail's IHASMAIL_VERSION follows its files.
  • Before the server, which may convert its store on first start, it's stopped and its own data archived into <dir>/backups: the volumes, archived with the server's own image, or <dir>/server on the host. --no-backup skips this. A store kept elsewhere (PostgreSQL, S3) is reported as backed up where it lives.

Also

  • The release marker now records the version next to the checksum, and local for a tarball given by hand, which upgrade always replaces.
  • Options and component names can come in any order. A VM test caught upgrade server --no-backup being misread, because Go's flag package stops at the first positional argument.

Tests

  • Unit tests: the plan read from compose.yaml and the host's files, exactly one image tag changed, a directory put back when its replacement fails, options after components.
  • e2e:
    • upgrade-containers 17/17: installed by v2026.10.12.1, then archived, moved to the new images, the same mailbox still signs in, and a second run has nothing to do.
    • upgrade-host-server 11/11: a binary that won't start is put back with the server answering; then the real release goes in with the old binary kept and the data archived.
    • upgrade-frontends-host 10/10: older tarballs move to the releases; the webmail answers as its new version and the console still points at the server.
    • install-local, install-host, webmail-host, all-host and interface pass unchanged.

Not in this PR: uninstall and certs, the rest of phase 3.

Installer spec phase 3, first part: **`inbuxa upgrade [server|console|webmail] [--dry-run] [--yes] [--no-backup]`**. It moves what's installed to the releases this installer pins. A newer installer is what brings newer releases. - **What's installed is read from the machine:** image tags in `compose.yaml`, the server binary's `--version`, the console's release marker, the webmail's `VERSION`. - **`status`** now lists each component's version and what this installer would make it. **Order and safety** - The server goes first, then the console, then the webmail. Each is checked once it's running again; if the check fails, that component is **put back** and the upgrade stops: - a container returns to its old tag in `compose.yaml`; - the server on the host returns to its old binary, kept as `inbuxa-server.<version>`; - the console and webmail on the host return to their old directory, which is kept until the new one is in place (and for the webmail, answering). The webmail's `IHASMAIL_VERSION` follows its files. - **Before the server**, which may convert its store on first start, it's stopped and **its own data archived into `<dir>/backups`**: the volumes, archived with the server's own image, or `<dir>/server` on the host. `--no-backup` skips this. A store kept elsewhere (PostgreSQL, S3) is reported as backed up where it lives. **Also** - The release marker now records the version next to the checksum, and `local` for a tarball given by hand, which `upgrade` always replaces. - Options and component names can come in any order. A VM test caught `upgrade server --no-backup` being misread, because Go's flag package stops at the first positional argument. **Tests** - Unit tests: the plan read from `compose.yaml` and the host's files, exactly one image tag changed, a directory put back when its replacement fails, options after components. - **e2e:** - `upgrade-containers` **17/17**: installed by v2026.10.12.1, then archived, moved to the new images, the same mailbox still signs in, and a second run has nothing to do. - `upgrade-host-server` **11/11**: a binary that won't start is **put back with the server answering**; then the real release goes in with the old binary kept and the data archived. - `upgrade-frontends-host` **10/10**: older tarballs move to the releases; the webmail answers as its new version and the console still points at the server. - install-local, install-host, webmail-host, all-host and interface pass unchanged. **Not in this PR:** `uninstall` and `certs`, the rest of phase 3.
jcoffey-dev added 1 commit 2026-10-12 19:52:27 +00:00
`inbuxa upgrade [server|console|webmail] [--dry-run] [--yes] [--no-backup]`
moves what is installed to the releases this installer pins; a newer
installer is what brings newer releases. What is installed is read from
the machine: the image tags in compose.yaml, the server binary's
--version, the console's release marker, the webmail's VERSION. status
now shows each component's version, and what this installer would make
it.

One component at a time, the server first, each checked once it is
running again and put back if not, which stops the upgrade:
- a container by its tag in compose.yaml, and its old tag to undo it;
- the server on the host keeps its old binary as inbuxa-server.<version>;
- the console and the webmail on the host keep their old directory until
  the new one is in and, for the webmail, answering; its environment's
  IHASMAIL_VERSION follows the files.
Before the server, which may convert its store on first start, it is
stopped and its own data archived into <dir>/backups -- the volumes with
the server's own image, or <dir>/server -- unless --no-backup. A store kept
elsewhere is said to be backed up where it lives.

The release marker now records the version beside the checksum, and
"local" for a tarball given by hand, which upgrade always replaces.
Options and components can come in any order.

Tests: the plan read from compose.yaml and the host's files, one image
tag changed and no other, a directory put back when its replacement
fails, options after components. e2e: upgrade-containers 17/17 (installed
by v2026.10.12.1; archive, new images, the same mailbox signing in, a
second run with nothing to do), upgrade-host-server 11/11 (a binary that
won't start put back with the server answering, then the real release
with the old binary kept and the data archived), upgrade-frontends-host
10/10 (older tarballs to the releases, the webmail answering as its new
version, the console still pointed at the server). install-local,
install-host, webmail-host, all-host and interface pass unchanged.
jcoffey-dev merged commit 66e9afda83 into main 2026-10-12 19:56:09 +00:00
jcoffey-dev deleted branch feat/upgrade 2026-10-12 19:56:09 +00:00
Sign in to join this conversation.