feat: refuse a tag without an image for the host's platform #10

Merged
christianmanivong merged 1 commits from feat/arm64-preflight into main 2026-10-11 06:39:07 +00:00
Owner

Before a deploy, check that the tag has an image for the host's platform. This prepares for arm64 hosts such as the Raspberry Pi (NetOrk/netork#934).

  • From 0.34.0 on, netOrk's releases (latest, X.Y.Z) are amd64 + arm64. deploy.sh needs nothing else for that: every step runs docker on the target host, and the third-party images (postgres, redis, apt-cacher-ng, signal-api) also exist for arm64.
  • New: after the login, check_platform compares docker version (the host's architecture) with docker manifest inspect for engine, and on UI servers ui. If the platform is missing (e.g. latest-dev on a Pi), the deploy stops before anything changes on the host, with a message naming the tags that would work. If the registry's answer can't be read, the pull decides as before.
  • README: a Raspberry Pi section, and step 1 extended.
  • Tests: tests/test_deploy_platform.py (7 cases). The parsing was also run against real registry output: 0.34.0 passes, 0.33.2 and latest-dev are refused on arm64.
Before a deploy, check that the tag has an image for the host's platform. This prepares for arm64 hosts such as the Raspberry Pi (NetOrk/netork#934). - From 0.34.0 on, netOrk's releases (`latest`, `X.Y.Z`) are amd64 + arm64. `deploy.sh` needs nothing else for that: every step runs `docker` on the target host, and the third-party images (postgres, redis, apt-cacher-ng, signal-api) also exist for arm64. - New: after the login, `check_platform` compares `docker version` (the host's architecture) with `docker manifest inspect` for engine, and on UI servers ui. If the platform is missing (e.g. `latest-dev` on a Pi), the deploy stops before anything changes on the host, with a message naming the tags that would work. If the registry's answer can't be read, the pull decides as before. - README: a Raspberry Pi section, and step 1 extended. - Tests: `tests/test_deploy_platform.py` (7 cases). The parsing was also run against real registry output: 0.34.0 passes, 0.33.2 and latest-dev are refused on arm64.
christianmanivong added 1 commit 2026-10-11 06:38:39 +00:00
From 0.34.0 on, netOrk's releases (X.Y.Z, latest) are published for
linux/amd64 and linux/arm64, so a Raspberry Pi with a 64-bit OS can be a
target (NetOrk/netork#934). The deploy itself needed no change for that:
every step runs docker on the target host, which pulls its own platform,
and the images on the host (postgres, redis, apt-cacher-ng, signal-api)
exist for arm64 as well.

What did not work is a tag without arm64: latest-dev, main-<sha>,
feature-<branch> and every release before 0.34.0. On a Pi those failed at
the first pull with "no matching manifest for linux/arm64/v8", which names
neither the cause nor a tag that would work.

Now, right after the registry login, the host's architecture (docker
version) is compared with the platforms the registry lists for the
engine image, and on UI servers the ui image (docker manifest inspect).
A definite mismatch stops the deploy before anything on the host changes,
and says which tags carry arm64. When the registry's answer can't be read,
the pull decides, as before.
christianmanivong merged commit a7e3617291 into main 2026-10-11 06:39:07 +00:00
christianmanivong deleted branch feat/arm64-preflight 2026-10-11 06:39:07 +00:00
Sign in to join this conversation.