Skip to content

The build role (design)

Step 4 of the operations model: the artifacts of an ethere commit (the servers' images, the operator's, the documentation's) built and published by an operator, forge.ethe.re's, not by an admin's workstation; the clusters pull them. Written on 2026-11-25, after step 3 (the servers' images through the registry, imported by each cluster's operator).

Where things stand

  • An admin builds and publishes, from a cluster's shell, on the workstation's host: images.yml --skip-tags openstack (the servers' images, Exherbo in a chroot, root in a user namespace: etherectl ns), containers.yml (the operator's, the documentation's), registry/release.yml (pushed to the cluster's registry through a port-forward, an admin's kubeconfig and pusher certificate; the retention after). About 20 minutes on a warm workspace (builder/, pbins/, downloads/: ~13 GB; images/: ~26 GB).
  • Builds are reproducible: a commit that changes nothing of an image gives the same bytes; its servers neither import nor rotate anything.
  • No standalone cluster runs on the host (40 cores, 184 GB, the ZFS pool fast: ~350 GB free).

Decisions (2026-11-25)

  • ethere's code on forge (2026-11-26): forge's git its source of truth, cloned anonymously over HTTPS from it (git.forge.ethe.re: the public repositories, docs/admin/git.md), mirrored publicly; dampetra's ethere.git a mirror like the others. So forge reads its source from itself.

  • The build cluster: forge.ethe.re, a standalone cluster on the workstation's host (its configuration repository, its zone, its registries named after it).

  • A build image, run by the operator as a Job (revised the same day): ethere-build, the operator's content (ethere at the same paths, its Python environment) and the build's tools (rsync, zstd, qemu-img, regctl: group_vars/build); forge's operator, its build role on, starts one Job per commit from it, privileged (the chroot's mounts), its workspace on a volume. The operator's image stays small and its pod unprivileged; the privileged pod holds none of the operator's secrets (its age key, the cloud's credentials), only the right to push to forge's registry. The same role on an OpenStack cluster later.
  • Pulled, not pushed: forge publishes to its own registry; dampetra's Zot fetches from it (its sync extension, as it caches docker.io today). The builder has no right on any cluster it builds for; a cluster takes what it decides to (its pinned commit). A push across clusters was dropped: an identity of the builder in every consumer's registry, its certificates renewed across clusters, an edge route for writes.
  • Read publicly: ethere's repositories in forge's public registry (registry.forge.ethe.re: its Zot for members, a public certificate) readable without credentials (ethere-operator, ethere-docs, ethere-images/**): ethere is free software, no secret lives between clusters. Authenticity comes with the signatures (step 7); until then a cluster takes what forge publishes, by digest once pinned.
  • On demand: dampetra's Zot fetches a commit's artifacts when one is asked for and missing (the operator's import, the operator's image Flux deploys); only pinned commits come. The first request may miss while the copy runs (a qcow2 of 1.35 GB): the import says so and succeeds at a later reconciliation.
  • Every commit of ethe.re and its tags, the most recent first: a commit overtaken while another builds is skipped. An unchanged image is recognised by its content (nothing imported nor rotated).

Decided 2026-11-27

  • arbor upstream plus a patch, until forge holds the forks: the submodule follows exherbo/arbor (public), our fix (providers.exlib: the build host's alternatives) applied by the build from a patch in ethere, its merge request proposed upstream; catching up upstream's 294 commits on the way, an update of its own (images change: tested, released apart).
  • The host's exposure: in IPv6 only 443 (forge's edge: the registry, git), 80 (ACME, the redirection) and 53 (the zone forge.ethe.re delegated to forge's DNS primary, as dampetra serves its zone); a firewall on the host (nftables) closing the rest, ssh included but from the LAN.
  • Flux watches ethe.re: one more GitRepository in forge, on its own ethere.git; the operator follows its revision as it follows the cluster's.
  • A GitHub organisation of ethere's own for the public mirror (the repositories, ghcr.io), apart from dampetra's.

The design

forge.ethe.re

  1. A standalone cluster on the host (the qemu provider: docs/admin/standalone.md), its own configuration repository, its own git, Flux and operator, like any ethere cluster; one VM sized for builds (16 vCPU, 32 GB, a 200 GB workspace: to measure), nothing else served.
  2. Its public registry reachable from the Internet: registry.forge.ethe.re on the host's public IPv6 (its IPv4 is behind the ISP box's NAT), the port forwarded by the host to the VM (qemu_exposed_ports), the box's IPv6 firewall letting it in; a public certificate (ACME). ethere's repositories readable anonymously, written by the build role only.
  3. Its build role on: build_enabled: true and its source in its inventory (dampetra's ethere.git: below).

Public mirrors

forge runs on one host behind a home connection: its registry is a single point, for dampetra and anyone else. So forge copies what it publishes to public mirrors (build_mirrors: ghcr.io first, under ethere's organisation, or any OCI registry), after each release and its retention:

  • What: ethere's artifacts (the operator's, the documentation's, the servers' images, their tags and, later, their signatures: regctl image copy --referrers), the build cache too (a test or a workstation far from forge).
  • How: by forge's build role, as the last step of a build (a mirror down delays only the mirror: retried at the next build); its credentials (a token limited to writing packages) in forge's secrets, forge's only credential outside itself. The same retention as forge's registry.
  • Read by the clusters as a fallback: their Zot's upstream lists forge then the mirrors (k8s_registry_mirrors: Zot's sync tries its URLs in order); a cluster may list only a mirror, or another one. Integrity by digest, and authenticity by signature once there (step 7): a mirror needs no trust, which is why mirroring is safe on a third party's registry.

The external repositories: forks on forge, mirrored publicly

ethere's submodules (paludis' repositories, vendor/) are other projects'. A fix of ours waits for its merge request upstream; a build can't. Found on 2026-11-26: arbor's fork private (gitlab.exherbo.org/voondo/arbor, one commit of ours, 294 behind upstream: a build from an empty workspace failed to clone it), clever-cloud's pinned commit on none of its public fork's branches (fetched by its hash only through GitHub's network of forks: upstream has it). Decided the same day:

  • A fork of every external repository on forge's git, its source of truth: a branch ethere, upstream's plus our fixes, which the submodule pins; the merge requests upstream made from it, never waited for; upstream merged in regularly (a commit of the fork, then of ethere: images change, so a release of its own).
  • Mirrored publicly (GitHub first, others), as the registry is: what .gitmodules names, so anyone clones ethere and its submodules anonymously (a workstation, a test, another builder); forge's own builds read its git (url.<forge's>.insteadOf <mirror's>).
  • A check before ethere is published: every pinned submodule commit fetchable anonymously from the URL .gitmodules gives (libexec/check-submodules).

The build cache, in a registry

A build from an empty workspace compiles every package (hours); from the cache, minutes. So the caches go through forge's registry as soon as it exists, before the build role, and every build pulls them first, a workstation's, a test's and a Job's alike:

  • The binary packages (pbins/<toolchain fingerprint>/: paludis' pbin repository, its tarballs in distfiles/; pbins/builder/ the builder's): an OCI artifact per fingerprint (ethere-cache/pbins:<fingerprint>), one layer per file, so an unchanged package keeps its digest and is neither pushed nor pulled again; a new fingerprint (a new toolchain) starts its own.
  • The downloads (downloads/: the sources, the stage, the charts): the same, ethere-cache/downloads.
  • Pulled before a build (what the local workspace lacks, by digest), pushed after (what it added); readable publicly as ethere's artifacts, written by the build Job and the admins. A miss or an unreachable registry only slows a build down.

The build role in the operator

  1. Watching the source: the commit of ethe.re to build, a Flux GitRepository of forge's own ethere.git (decided 2026-11-27).
  2. A build, one at a time, a Job of the build image the operator starts and follows (a kind of its own, EthereBuild, its status the commit built, the one under way, the last result; etherectl operator status shows it): the commit checked out in the workspace (a detached worktree, as etherectl makes them), then the same playbooks as the admin's: images.yml --skip-tags openstack, containers.yml, registry/release.yml to forge's own registry (from inside: no port-forward), its retention. Its outputs kept and capped as every step's.
  3. The admin's path unchanged: the same playbooks from the workstation (a broken builder taken over: no chicken and egg).

On dampetra

  1. forge as an upstream of its Zot: a sync registry (k8s_registry_mirrors's mechanism) for ethere's repositories, on demand, from registry.forge.ethe.re (a default of the inventory: a cluster names another builder's registry, or none and pushes itself), no credentials, its certificate checked against the public CAs. Its own pushes (an admin's registry/release.yml) still possible: a takeover.
  2. dampetra moves by its ref alone: an admin's commit; Flux asks for the operator's image (fetched from forge), the operator imports and rotates (steps 2 and 3). An admin builds nothing.

Increments

  1. forge.ethe.re: the standalone cluster on the host, its repository, its VM sized, its public registry reachable from dampetra (the box's IPv6 firewall, the host's forward), ethere's repositories readable anonymously; bootstrapped by the admin, the first release pushed there by hand.
  2. The build cache in forge's registry (pbins, downloads): pushed from the workstation's workspace, pulled by every build, the tests' first (a priority: without it each test of the build role compiles everything).
  3. The public mirror (ghcr.io): forge's releases copied, its cache too; a cluster's upstream with forge and it.
  4. dampetra syncs from forge: its Zot's upstream; a commit released on forge only, pinned on dampetra (a test on the test cloud first: two registries, one syncing from the other).
  5. The build role: the source watched, the build Job of ethere-build, the publication to forge's registry; a test on the test cloud, then on the host.
  6. dampetra's first ref built by forge.

Signatures (step 7, principles settled 2026-11-25)

Nothing periodic for an admin: an expiry a human must not forget breaks everything once forgotten (the 2026-11-01 outage: October's CAs expired under certificates still valid).

  • A signing root without a practical expiry, forge's, in its sops secrets, kept like the rest of its PKI (its repository, the S3 bundles); made once by the admin at forge's bootstrap. No yearly intermediate: forge's operator would hold it anyway, and a compromise is answered the same way (a new root committed).
  • Monthly signing keys forge's operator issues from it, as its other CAs; what the retention keeps re-signed every month (the last commits, the tagged releases: small referrers), so a valid signature never rests on an expired certificate.
  • The keys a cluster trusts: its inventory's, a list (images_signing_keys), whose default is the key ethere's repository carries (keys/forge.ethe.re.pub): a cluster pinning a commit verifies its artifacts with the key in that commit, fixed by its hash (nothing fetched, no trust on first use). forge is never imposed: a cluster replaces the list in its own repository (its own builder's key, several), as it names its registry's upstream (k8s_registry_mirrors: forge's by default, another builder's, none). A new root of forge is a commit of ethere (two keys accepted during a transition), taken by moving the ref. Trust in the artifacts can't exceed trust in the source: whoever writes ethere.git changes the code too.
  • Who verifies: the servers' images, the operator's import (images/import.yml); the operator's own image needs a third party (it can't verify itself): Flux's verification, an admission policy, or Zot's trust extension refusing an unsigned image. To settle then.

To settle

  • The Job's pod in a user namespace (hostUsers: false), not plainly privileged: the build playbooks refuse real root (utils/require_ns.yml: a full uid_map), as etherectl ns runs them as root of a user namespace; the pod's root then isn't the node's. Its mounts (the chroots' /proc, /dev, /sys, binds) in that namespace: what it needs of the runtime (seccomp, AppArmor, procMount) to find on forge's VM. Forge serves nothing else and the Job holds no secret of the operator's, which bounds the risk further.
  • The spike (2026-11-26): the build run from ethere-build's chroot, as root of a user namespace, on a copy of the workspace (builder/setup.yml then images.yml, ethere-edge): it found the image missing xargs (findutils) and qemu-img's libstdc++, and the build needing /etc/resolv.conf (a pod has it), the initrd and the kernel (builder/setup.yml makes them: a build from an empty workspace runs it first), the source at its own path (the submodules' relative .git links). Then in a pod on forge's VM.
  • The workspace volume on the qemu provider (a disk of the VM, a host directory): what the standalone cluster's storage offers.