Skip to content

The servers' images by commit, through the registry

Step 3 of the operations model: a server image is an artifact of an ethere commit, named by it, published to a registry, imported into each cluster's Glance by its operator, and the servers follow the commit the cluster's repository pins. Written on 2026-11-24, after steps 1 and 2 (the operator reads its repository, Flux deploys it at the pinned ref).

Where things stand

  • Built by an admin, from a cluster's shell (images.yml): the cluster's inventory merged into the build.
  • Glance by role: an upload deletes the image named after its role (ethere-k8s-aio) and creates it again (images/_finalize.yml): no version, nothing says which commit a server runs. A server is created from the image of its role's name, Cluster API's included (EthereMachine.spec.image is the role).
  • Rotation by age only (provisioning/rotate.yml, rotate_due_days): a new image waits for the servers to age, or an admin's rollout (etherecontrolplane … rollout.after).
  • Almost independent of the cluster. What a cluster's configuration changes reaches its servers through the user-data (the API's public name, the DNS zones, the OIDC settings: provisioning/_userdata.yml), Nova's metadata (the cluster mode, the enrolled certificates) or the playbooks after boot (the Gateway, identity, Flux, volumes). Two exceptions only, baked from the building cluster's inventory: the git servers' policy (/etc/ethere/git-policy.json, files__services_git_replica: git_repositories, which dampetra extends with ethere), in the aio and quorum images; Cinder CSI's clusterID (k8s/cinder-csi.yml: cluster_name), rendered into the control plane's addons.

The target

  • An image is a function of an ethere commit alone: the same bytes whichever cluster builds it (the build role, later, builds once for every cluster).
  • Named by its content (decided 2026-11-25, once builds were reproducible): in Glance <role>-<SHA256 12>, the properties ethere_role, ethere_sha256, and ethere_commit_<commit 12> for every commit giving it (a commit that changes nothing of a role adds its property, nothing uploaded); in a registry, an OCI artifact images/<role>:<commit> (the commit's tags as aliases), its one layer the qcow2, annotated with its SHA256.
  • Imported by each cluster's operator: a commit pinned whose artifacts are in the registry, the operator imports the images of its topology into its Glance, in every region it has servers in (dampetra: EU-WEST-PAR, GRA9, SBG5), before anything uses them. Artifacts missing: it waits and says so (its status), nothing applied.
  • The servers follow the pinned commit: created from the role's image carrying the pinned commit's property; a server whose image's SHA256 (its metadata, set at its creation) isn't that image's is due for rotation, as an old one is (one at a time, the oldest first, as today); the control plane's through Cluster API (the EthereControlPlane rolls out when it changes). The pinned commit's image missing in a region: nothing replaced there, the reason reported. A cluster pinning a path (the test project, a standalone cluster) keeps the role's name. Cluster API's workers (a MachineDeployment's template names the role) don't follow yet.
  • Old images collected: a role's images no server uses, but the pinned one and the one before it (a rollback), deleted from Glance; the registry's retention later.

Its prerequisite: images independent of the cluster

  1. The git policy at boot, in the user-data (decided below): a file under /run/ethere/, the server's -policy pointed at it; a new repository is a rotation, not an image. Not Nova's metadata (a value is limited to 255 characters, too small for a policy), not the cluster's repository (the git servers serve it: a server can't need its own repository to start), not the Kubernetes API (git and etcd must not block each other).
  2. Cinder CSI's clusterID, set after boot with what k8s/volumes.yml already applies (its credentials' Secret, its StorageClass): a fixed value would make two clusters of one project share their volumes' owner.
  3. A test that the images don't depend on the cluster: the image hosts' build-time variables (the fragments files__, directories__, paludis_specs__, enabled_units__, and the addons) rendered with two different clusters' inventories (the test project's and a fixture's), compared: equal.

Reproducible builds (done 2026-11-25)

Two builds of the same inputs give the same bytes (the raw image and its qcow2), from a reused chroot or a new one: every file's time images_mtime (1980-01-01, the first FAT holds; Python's sources keep theirs, a package's, which their bytecode checks), set in the chroot before its staging copy; every UUID derived from the image's name (systemd-repart --seed: the GPT's, the partitions', the filesystems'); mkfs.fat --invariant (its volume label's time, its serial); no random seed of systemd-boot in the ESP (it makes it at the first boot). Found by building ethere-edge twice and comparing partition by partition: the files were the same, only their metadata differed.

So an image's content is known by its SHA256: a commit that changes nothing of a role (its docs, another role's code) gives the same image, and its servers need no rotation.

Then (2026-11-26, the build role's spike): the builder set up again gave another initrd (its files' times), so every image another SHA256; the initrd is now packed as the images are (images_mtime, entries sorted, cpio --reproducible), and ldconfig's auxiliary cache (its libraries' inodes and times) left out. Checked: a workstation's build and one from ethere-build's chroot, each after builder/setup.yml, the same image and the same initrd.

Increments

  1. Images independent of the cluster (above), the test first. No change for a running cluster but a rotation.
  2. Glance by content, the servers following the pinned commit (an admin uploading, no registry yet): the build writes the qcow2's SHA256 and commit beside it; images.yml -t openstack creates <role>-<SHA256 12> if missing and adds the commit's property (refused for another commit's qcow2, the build workspace being shared); provisioning/servers.yml, capi/machine.yml create from the pinned commit's image, its SHA256 in the server's metadata; one rule (a filter) says a server due, for rotate.yml and capi/controlplane.yml; the collection of old images last, a commit of its own. dampetra: its servers rotated once onto the named images.
  3. Through the registry (2026-11-25): registry/release.yml pushes the qcow2s images.yml built of the commit (their .commit beside them) as artifacts (regctl artifact put: ethere-images/<role>:<commit> and its tags, one layer, the file's bytes: its digest the image's SHA256), with the operator's image; the operator imports them into Glance before its rotations (images/import.yml, a step of its own whose failure stops nothing: no image, no server due), every role server_topology gives servers in each of its regions, then collects the older ones (images/_glance_prune.yml, shared with the upload). The import is plugins/modules/ethere_image_import.py: the blob read by ranges (a request each, a cut one resumed where it stopped), sent as one chunked body to Glance (OVH's accepts it: tried 2026-11-25), nothing on disk, a megabyte in memory; the SHA256 checked before the commit's property is added, last; a leftover never active deleted and imported again. Through a port-forward to the Service zot with a reader's one-time certificate (registry/_forward.yml, shared with registry/push.yml), from the pod as from a workstation: one path, the suites' (the Kubernetes API carries the bytes: a direct route from the pod to the Service later, if it weighs). Only an active image is a commit's (_image_wanted.yml): an import under way is none yet. images.yml -t openstack uploads directly still: a cluster's first images, before it has a registry; a cluster pinning a path.
  4. Then step 4, the build role: the builder publishes, every cluster imports.

Decisions (2026-11-24)

  • The git policy in the user-data: the cluster's data reaches its servers there already (its zones, its names); a new repository a rotation, not an image. The principle of images without post-boot configuration holds for what an image is, the user-data for what the cluster says.
  • Cinder CSI's clusterID set after boot by k8s/volumes.yml (with its credentials and its StorageClass); a neutral value in the image.
  • The import streamed: the registry's blob sent into Glance's upload (a chunked body), no file on the node, a buffer only in the operator's memory. To try on OVH's Glance first (no web-download: it can't reach the cluster's registry).
  • The test suites unchanged: a test project pins a path, its suites upload the images they build by role (uploadImages()); the path by commit and registry gets tests of its own.

  • A tag pinned: its commit's images (the commit's property, the commit read in the artifact's annotation; the tag an alias in the registry alone): a tag and its commit the same image, none renamed if a tag moves.

  • Glance by content (2026-11-25): builds reproducible, an image's SHA256 its identity; two commits giving the same image share it, nothing imported or rotated for a commit that doesn't change it.
  • The registry's retention: a tagged commit's images kept (the releases); the others' deleted beyond the last five published, never the one a known cluster pins; Zot's garbage collection frees S3. Done 2026-11-25 (registry/retention.yml, docs/admin/registry.md): the known cluster is the registry's own (ethere.yaml's ref).