Files
mesh-catalog/modules/mesh-build-image/module.json
T
jschoubben 1c4739698a CAT-BI1: a copy keeps its wait for the mirror's outcome in the state mirror-waits
The image seat's published and refused reach one instance of the module, not
necessarily the one whose copy waits, so an outcome held only in memory was
dropped. The instance that hears it now writes it into the copy's key, and the
copy reads it there, woken by its watch of the state; build_image_mirror_waits
reads the state.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-04 15:58:37 +01:00

187 lines
4.9 KiB
JSON

{
"module": "mesh-build-image",
"version": "1",
"moved": true,
"runs-as": "mesh-build-image",
"capabilities": [
"package-manager",
"user-namespaces"
],
"state": [
"keys",
{"name": "steps", "ttl-seconds": 172800}, "pauses",
{"name": "mirror-waits", "ttl-seconds": 172800}
],
"claims": [
{
"name": "node-build-image",
"scope": "node",
"serves": ["current", "pause", "resume"]
}
],
"config": {
"capacity": {
"type": "number",
"description": "How many asks of the image build seat this module runs at once on this node (novox/hq ADR 0525 §5); 0 pulls nothing. It is set per node in the mesh's configuration; a node with no value builds nothing.",
"minimum": 0,
"default": 0
},
"build-hours": {
"type": "string",
"description": "When this node may take this module's build asks: one window HH:MM-HH:MM in the node's local time (an end before its start crosses midnight, 18:00-06:00). Outside it the node takes no new step and finishes the ones it runs; an empty value builds at any hour. It is set per node in the mesh's configuration.",
"pattern": "|([01][0-9]|2[0-3]):[0-5][0-9]-([01][0-9]|2[0-3]):[0-5][0-9]",
"default": ""
},
"cores-per-step": {
"type": "number",
"description": "How many processors one image step of this module needs (buildah, whose RUN lines are mostly fetches). The capacity above is an upper bound: on each node the module runs at most floor(the cores of its build slice's CPU quota / this) steps at once, the quota read live from its cgroup (issue 1806), so a lowered build CPU share never starves its steps. Above 0.",
"minimum": 0.1,
"default": 2
}
},
"tools": [
"build_image_fetch",
"build_image_build",
"build_image_copy",
"build_image_mirror_waits",
"build_image_release",
"build_image_step",
"build_image_steps",
"build_image_step_end",
"build_image_status",
"build_image_health"
],
"requires": [
"forge-account",
"rootless-image-build",
"node-tools"
],
"invokes": [
"seat:container-image-registry.publish",
"seat:container-image-registry.publish-part",
"seat:container-image-registry.mirror"
],
"consumes": [
"container-image-registry.published",
"container-image-registry.refused"
],
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-build-image",
"runtime-health": {
"kind": "tool",
"tool": "build_image_health",
"interval": "60s",
"timeout": "10s",
"looks": 2,
"grace": "60s"
},
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-build-image",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-build-image"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-build-image",
"place": ".",
"unknown": "program"
},
{
"id": "settings",
"trusted": false,
"type": "file",
"path": "${dir:state}/settings.json",
"mode": "0600",
"owner": "mesh-build-image",
"takes-config": ["capacity", "cores-per-step", "build-hours"],
"merge": "json",
"template": "files/settings.json"
},
{
"id": "work",
"type": "directory",
"path": "/var/lib/mesh-build-image-work",
"mode": "0700",
"owner": "mesh-build-image",
"unknown": "program"
},
{
"id": "store",
"type": "directory",
"path": "/var/lib/mesh-build-image-store",
"mode": "0700",
"owner": "mesh-build-image",
"unknown": "program"
},
{
"id": "ssh-dir",
"type": "directory",
"path": "${dir:state}/.ssh",
"mode": "0700",
"owner": "mesh-build-image",
"unknown": "program"
},
{
"id": "ssh-config",
"type": "file",
"path": "${dir:ssh-dir}/config",
"owner": "mesh-build-image",
"mode": "0600",
"template": "files/forge"
},
{
"id": "known-hosts",
"type": "file",
"path": "${dir:ssh-dir}/known_hosts",
"owner": "mesh-build-image",
"mode": "0644",
"template": "files/known_hosts"
},
{
"id": "git-config",
"type": "file",
"path": "${dir:state}/.config/git/config",
"owner": "mesh-build-image",
"mode": "0644",
"template": "files/gitconfig"
},
{
"id": "git",
"type": "package",
"package": "git"
},
{
"id": "openssh",
"type": "package",
"package": "openssh"
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-build-image",
"binary": "mesh-build-image",
"loads": [
"mesh-build-image"
]
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}