From 5f76e34994c959f02cc92d0ddea59b8563213bfd Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 12 Sep 2026 16:45:59 +0200 Subject: [PATCH] Add the builder as a module, so the mesh can be given one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code that turns a repository into artifacts already existed and is deliberately something a machine runs as an ordinary module rather than something the control plane does. There was no module for it, so it could never be placed and never ran — which is why nothing in the catalogue could be produced. It asks for a container runtime because it builds images, requires the artifact store because it publishes into it, and claims one per machine. Its credential folder is mounted rather than the file, since a file mount keeps pointing at the old contents after the mesh writes new ones. The store is reached on the machine's own loopback: the address in a binding is where a machine sits on the private network, and the store has to be co-located anyway because runtimes refuse a plain-HTTP registry anywhere else. Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx --- modules/builder/module.json | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 modules/builder/module.json diff --git a/modules/builder/module.json b/modules/builder/module.json new file mode 100644 index 0000000..8de43ea --- /dev/null +++ b/modules/builder/module.json @@ -0,0 +1,57 @@ +{ + "module": "builder", + "version": "1", + "capabilities": [ + "container-runtime" + ], + "claims": [ + { + "name": "the-build-machine", + "scope": "node" + } + ], + "requires": [ + "artifact-store" + ], + "own-secrets": { + "broker": "/var/lib/mesh/builder/broker" + }, + "resources": [ + { + "id": "mesh-state", + "type": "directory", + "path": "/var/lib/mesh/builder", + "mode": "0700" + }, + { + "id": "workspace", + "type": "directory", + "path": "/var/lib/builder/workspace", + "mode": "0700" + }, + { + "id": "builder-env", + "type": "file", + "path": "/var/lib/mesh/builder/builder.env", + "mode": "0600", + "content": "MESH_BROKER_FILE=/run/mesh/broker\nMESH_REGISTRY=127.0.0.1:${bound:artifact-store:port}\nMESH_WORKSPACE=/workspace\n" + }, + { + "id": "server", + "type": "container", + "name": "mesh-builder", + "image": "mesh-builder@sha256:0000000000000000000000000000000000000000000000000000000000000000", + "env-file": [ + "/var/lib/mesh/builder/builder.env" + ], + "volumes": [ + "/var/lib/mesh/builder:/run/mesh:ro", + "/var/lib/builder/workspace:/workspace", + "/var/run/docker.sock:/var/run/docker.sock" + ], + "restart-on": [ + "builder-env" + ] + } + ] +}