{ "module": "mesh-build-node", "version": "0.1", "class": "core", "packages": { "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds": "0.1", "git.novox.be/novox/mesh-catalog/modules/ssh-client/sshkeys": "0.1" }, "moved": true, "runs-as": "mesh-build-node", "capabilities": [ "package-manager", "seat-settle-delay", "user-namespaces" ], "state": [ {"name": "toolchains", "max-mib": 8}, {"name": "keys", "max-mib": 8}, {"name": "pauses", "max-mib": 8} ], "claims": [ { "name": "node-build-node", "scope": "node", "serves": ["current", "drop", "pause", "resume", "steps", "kept-artifact", "output", "answer"] } ], "consumes": [ "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed" ], "config": { "capacity": { "type": "number", "description": "How many asks of the Node 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 Node step of this module needs (tsc, esbuild and a test runner; a median step takes 15 s). 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 }, "again-delays": { "type": "string", "description": "The delays a step ask whose fetch or publish met its holder away is given again after: after its first run, then after its second, as durations such as 15s,60s (design 47 H2 §799); a third run met so ends the step failed with why fetch: or publish:.", "trusted": false, "runtime": true, "default": "15s,60s" }, "prune-mark": { "type": "number", "description": "The fill of mesh-build-node's state detected-steps, in percent of its cap, past which the module prunes it at its own write, oldest first (design 47 H2 §812): below the bus module's raise mark of 75 %.", "trusted": false, "runtime": true, "minimum": 1, "maximum": 100, "default": 70 }, "prune-target": { "type": "number", "description": "The fill, in percent of the cap, a prune of mesh-build-node's state detected-steps takes it down to (design 47 H2 §812); below prune-mark.", "trusted": false, "runtime": true, "minimum": 1, "maximum": 100, "default": 50 } }, "tools": [ "build_node_fetch", "build_node_test", "build_node_build", "build_node_release", "build_node_step", "build_node_steps", "build_node_step_end", "build_node_toolchains", "build_node_status", "build_node_health", "mesh-build-node_state_keep", "mesh-build-node_state_prune_now" ], "requires": [ {"name": "steps", "storage": "key-value", "template": "state", "options": {"ttl-seconds": 172800, "objects-max-mib": 256, "max-mib": 16}}, {"name": "detected-steps", "storage": "key-value", "template": "state", "options": {"history": 1, "max-mib": 8}}, {"name": "outputs", "storage": "object-store", "template": "objects", "options": {"max-mib": 1024, "max-age-days": 7}}, "artifact-store", "forge-account", "npm-package-registry", "node-toolchain", "node-tools" ], "binds": { "artifact-store": "${dir:state}/artifact-store.json", "npm-package-registry": "${dir:state}/package-registry.json" }, "invokes": [ "seat:mesh-hand-acts.hand-act", "seat:oci-artifact-registry.publish", "seat:oci-artifact-registry.publish-part", "seat:npm-package-registry.publish", "seat:npm-package-registry.publish-part", "seat:mesh-catalog.module", "seat:mesh-catalog.seat-definitions" ], "own-secrets": { "broker": "${dir:state}/broker" }, "secrets-owner": "mesh-build-node", "runtime-health": { "kind": "tool", "tool": "build_node_health", "interval": "60s", "timeout": "10s", "looks": 2, "grace": "60s" }, "resources": [ { "id": "account", "type": "user", "name": "mesh-build-node", "shell": "/usr/bin/nologin", "home": "/var/lib/mesh-build-node" }, { "id": "state", "type": "directory", "mode": "0700", "owner": "mesh-build-node", "place": ".", "unknown": "program" }, { "id": "settings", "trusted": false, "type": "file", "path": "${dir:state}/settings.json", "mode": "0600", "owner": "mesh-build-node", "takes-config": ["capacity", "cores-per-step", "build-hours"], "merge": "json", "template": "files/settings.json" }, { "id": "work", "type": "directory", "path": "/var/lib/mesh-build-node-work", "mode": "0700", "owner": "mesh-build-node", "unknown": "program" }, { "id": "cache", "type": "directory", "path": "/var/lib/mesh-build-node-cache", "mode": "0711", "owner": "mesh-build-node", "unknown": "program" }, { "id": "ssh-dir", "type": "directory", "path": "${dir:state}/.ssh", "mode": "0700", "owner": "mesh-build-node", "unknown": "program" }, { "id": "ssh-config", "type": "file", "path": "${dir:ssh-dir}/config", "owner": "mesh-build-node", "mode": "0600", "template": "files/forge" }, { "id": "known-hosts", "type": "file", "path": "${dir:ssh-dir}/known_hosts", "owner": "mesh-build-node", "mode": "0644", "template": "files/known_hosts" }, { "id": "git-config", "type": "file", "path": "${dir:state}/.config/git/config", "owner": "mesh-build-node", "mode": "0644", "template": "files/gitconfig" }, { "id": "toolchain-dir", "type": "archive", "path": "${dir:state}/toolchain", "owner": "mesh-build-node", "artifact": "toolchain", "unknown": "program" }, { "id": "git", "type": "package", "package": "git" }, { "id": "openssh", "type": "package", "package": "openssh" }, { "id": "bubblewrap", "type": "package", "package": "bubblewrap" } ], "build": { "artifacts": [ { "name": "tools", "kind": "bundle", "language": "go", "system": "arch", "from": "cmd/mesh-build-node", "binary": "mesh-build-node", "loads": [ "mesh-build-node" ], "check-needs": [ "node-build-node" ] }, { "name": "files", "kind": "archive", "from": "files" }, { "name": "toolchain", "kind": "archive", "from": "toolchain" } ] } }