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" + ] + } + ] +}