Add the builder as a module, so the mesh can be given one
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
This commit is contained in:
@@ -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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user