Architecture¶
How an image goes from an upstream release to images.openimages.cloud and the website. This
page describes the code on the main branches of the
open-img-cloud repositories; the file paths below are
relative to those repositories.
flowchart LR
UP[Upstream release] --> W[watch.yml<br/>image repo]
CRON[images-router<br/>Cron Trigger] -->|workflow_dispatch| W
W -->|PR auto/upstream-bump| V[VERSION]
V -->|merge: auto-release.yml<br/>creates tag v<VERSION>| R[release.yml<br/>image repo]
R -->|uses @main| B[Reusable build workflow<br/>open-img-cloud/.github]
B -->|qcow2, sidecars, bundle, MANIFEST| S[(Infomaniak Object Storage<br/>one bucket per image)]
B --> P[Cloudflare purge]
B --> VAL[validate-image<br/>through the CDN]
B --> SM[smoke-openstack<br/>Infomaniak Public Cloud]
B -->|POST /_hooks/catalog| IR
S --> IR[images-router Worker<br/>images.openimages.cloud]
IR -->|dispatch deploy.yml| WEB[oic-website build<br/>openimages.cloud]
IR -->|MANIFEST.json, _stats.json| WEB
WEB -->|index.json, osism/images.yml| IR
Repositories¶
| Repository | Role |
|---|---|
One repository per image (debian-13, alpine-linux, freebsd, ...) |
VERSION, build hooks under build/, thin release.yml and watch.yml callers. GPL-2.0 |
.github |
Reusable workflows, composite actions, cloud-init policy template, conventions, image standards, organization profile. GPL-2.0 |
images-router |
Cloudflare Worker serving images.openimages.cloud, schedulers, download statistics, catalog hook. GPL-2.0 |
oic-website |
Astro site on Cloudflare Workers: catalog, guides, index.json, osism export. Apache-2.0 |
oic-sync |
Synchronization CLI for Glance, Proxmox VE and mirrors (oic-sync). Apache-2.0 |
terraform-provider-openimages |
Terraform and OpenTofu provider, read-only data sources over the index (Terraform and OpenTofu). Apache-2.0 |
ansible-collection-openimages |
Ansible collection openimages.cloud (Ansible). GPL-3.0-or-later |
docs |
This documentation. CC-BY-4.0 |
stackopshq/libguestfs-tools-container (outside the organization) |
Builder container ghcr.io/stackopshq/libguestfs-tools, signed with cosign |
Image repositories consume the reusable workflows at @main, not at a tag: a change merged in
.github applies to every image at its next build.
Build engines¶
Each release.yml calls exactly one reusable workflow of open-img-cloud/.github:
| Workflow | Used for | How |
|---|---|---|
build-libguestfs-image.yml |
Most distributions: customized upstream cloud images | Download and check the upstream image, run the repo's build/customize.sh, inject 99_oic-policy.cfg, virt-sysprep, virt-sparsify --compress, then boot test in QEMU with a ConfigDrive seed |
build-dib-image.yml |
Octavia, Manila, Trove, Gentoo | Run the repo's build/dib-build.sh (diskimage-builder) |
build-nix-flake-image.yml |
NixOS | Run the repo's Nix build script |
build-freebsd-image.yml |
FreeBSD, OPNsense, Talos Linux | Run the repo's build script as root in an ephemeral FreeBSD VM booted on the runner (KVM), convert its raw disk to compressed qcow2, then a separate release job |
Flatcar Container Linux goes through build-libguestfs-image.yml: the official image is checked against the Flatcar image signing key and republished unchanged.
These four workflow paths are exactly what the cosign identity expression accepts (Verifying images); adding a fifth engine means updating that expression everywhere it is published.
Common to all engines, after the build:
- Checksums (
.md5,.sha1,.sha256,SHA256SUMS). cosign sign-blobin keyless mode with GitHub OIDC (id-token: write), producing<file>.bundle.MANIFEST.json(provenance: commit, CI run, builder image and digest, upstream URL).- Publish (
actions/publish-image): upload to the image's bucket under<version>/, mirror tolatest/unless disabled, addsha512,size,virtual_size,firmware,archto the manifest, write anindex.htmllisting, rebuildversions.jsonat the bucket root. - Purge the Cloudflare cache for the affected URLs (
actions/cf-purge). - Validate through the public CDN (
actions/validate-image): manifest keys, cosign, sidecars, size, cache headers. - Runtime test on Infomaniak Public Cloud (
actions/smoke-openstack) when the caller setsruntime_smoke_login_user(image contract). - Catalog hook:
POST https://images.openimages.cloud/_hooks/catalogwith a GitHub OIDC token, so the website (andindex.json) is rebuilt right away. Best effort: the daily site build is the fallback.
Steps 4 to 8 only run when publish is true (tag push). A workflow_dispatch run defaults to
publish: false: the image is built (and signed, the sign input defaults to true) but nothing
is uploaded. The image repository's release.yml passes the inputs; see the reusable workflow
files for the full list.
Builder and runners¶
- The libguestfs and DIB workflows default to the builder
ghcr.io/stackopshq/libguestfs-tools, pinned to an exact version in the workflow inputs, and verify its cosign signature in averify-builderjob before anything runs. Repositories that build inubuntu:24.04(Octavia, Manila, Trove, Gentoo, NixOS) setverify_builder: falseand document why. - The DIB workflow takes an APT mirror for the builder (
apt_mirror, default the Azure mirror ofarchive.ubuntu.com), an optionaldib_distribution_mirrorfor the guest, and abuild_timeout_minuteslimit (default 120), so a slow mirror fails the build instead of hanging it. - Runners default to GitHub-hosted
ubuntu-latest(which exposes/dev/kvm); therunner_labelsinput can target self-hosted KVM runners.
Upstream integrity (libguestfs path)¶
The base image is checked against, in order of precedence: a hash passed by the caller
(upstream_sha256, for upstreams that publish it only on a web page), the upstream checksum list
(upstream_checksum_url, SHA-256 or SHA-512, a missing entry fails the build), or a
<url>.sha256 file next to the upstream image. When none of these exists the build only emits a
warning, and the cosign signature of the result remains the downstream guarantee.
Storage¶
One public, versioned bucket per image on Infomaniak Object Storage (Ceph S3, Switzerland),
named after the image id. Paths: <version>/<file> and latest/<file> in the bucket, plus
versions.json at the root. Buckets are created by hand at onboarding; publish-image does not
create them. The upload credentials (OIC_S3_KEY_ID, OIC_S3_SECRET) are organization secrets.
images-router (CDN Worker)¶
A Cloudflare Worker on the route images.openimages.cloud/* (images-router/src/index.js):
- Routing: the first path segment selects the bucket, the rest is the object key. Only buckets
listed in
ALLOWED_BUCKETS(wrangler.toml) are served; anything else is a 404. A path ending in/serves that directory'sindex.html. - Caching: versioned paths
public, max-age=31536000, immutable;latest/and bucket-root filespublic, max-age=300. Range and conditional requests are forwarded. - Catalog relay:
/index.jsonand/osism/images.ymlare fetched fromhttps://openimages.cloudand served from the registry host. - Download statistics: each counted qcow2 download is written to Workers Analytics Engine
(dataset
oic_downloads);/_stats.jsonserves the aggregates. CI User-Agents are excluded. - Schedulers (Cron Triggers): every day at 05:40 UTC the Worker dispatches the
watch.ymlof each repository listed inSCHEDULED_WORKFLOWSand the websitedeploy.yml; every Monday at 04:00 UTC it dispatches.github'scatalog-audit.yml. GitHub disablesschedule:triggers of inactive public repositories after 60 days,workflow_dispatchis not affected; the repositories keep their ownschedule:as a fallback. - Catalog hook (
src/hooks.js):POST /_hooks/catalogaccepts a GitHub Actions OIDC token for its own audience, from a workflow of theopen-img-cloudorganization on amainbranch, and dispatches the website deploy.
The Worker deploys on push to main.
Website¶
oic-website is an Astro site deployed to Cloudflare Workers by deploy.yml: on push to main,
daily at 07:30 UTC, and when dispatched by the Worker (daily scheduler and catalog hook).
- The curated list of images is
src/data/images.yaml(title, description, repository, login user, variants,os_distro, status, featured position...). - At build time the site reads each image's
latest/MANIFEST*.jsonfrom the registry. The publishedlatest/manifest is the source of truth for the current version;images.yamlis only a fallback. - It generates the image pages with ready-to-copy commands,
/verify/,/quality/,/about/, and the machine-readableindex.jsonand osism export.
Release flow¶
- Watch.
watch.yml(daily, from its own cron and from the Worker) callsupstream-watch.yml, which runs the repository'sbuild/detect-upstream.sh. When the upstream version differs fromVERSION, it opens or updates a pull request on the branchauto/upstream-bump. Service images follow OpenStack series; Octavia has no watcher and is bumped by hand. - Merge the pull request (manual). Merging is releasing.
- Tag. Each image repository has
auto-release.yml, which calls.github'srelease-on-version.ymlon every push tomainthat changesVERSION: it creates the tagv<VERSION>and startsrelease.ymlon it. Do not tag by hand. A tag pushed by hand still works the same way. - Release. The tag triggers
release.yml, which resolves the version and calls the reusable build workflow: build, sign, publish, purge, validate, runtime test, catalog hook. - Catalog. The website and
index.jsonfollow through the hook, or at the next daily build. - Packages.
package-manifests.ymlreads the published image back, checks it againstversions.jsonand writespackages.json(installed packages) next to the qcow2, so the website can show what changed between two versions (packages_urlin the index). - Audit. Every Monday
catalog-audit.ymlrevalidates everylatest/artifact and opens, updates or closes a "Catalog audit" issue inopen-img-cloud/.github.
Some repositories (Octavia, Manila, Trove) also have sync-latest.yml, a manual workflow that
points latest/ to an already published version without rebuilding.
Secrets¶
Release secrets are set at the organization level and inherited by the image repositories:
OIC_S3_KEY_ID, OIC_S3_SECRET (object storage), CF_ZONE_ID, CF_API_TOKEN (cache purge),
OS_AUTH_URL, OS_REGION_NAME, OS_APPLICATION_CREDENTIAL_ID,
OS_APPLICATION_CREDENTIAL_SECRET (runtime test). The reusable workflows declare them optional
so that dry runs work without them, and fail fast when publish is true and one is missing. The
Worker holds its own GH_DISPATCH_TOKEN for the dispatches.