The operator's desktop slows while it builds (shanks at 92%, the Go build runtime at 1650% of 24 processors). The build modules declare cpu-cap (default shanks=50,g14=50,ace=75), which the composer turns into the runtime's quota at idle priority; each step's go, node and buildah commands get GOMAXPROCS and UV_THREADPOOL_SIZE for their part of it, and the status tools show the limits and what the kernel holds the runtime to.
201 lines
4.8 KiB
JSON
201 lines
4.8 KiB
JSON
{
|
|
"module": "mesh-build-go",
|
|
"version": "1",
|
|
"moved": true,
|
|
"runs-as": "mesh-build-go",
|
|
"capabilities": [
|
|
"package-manager",
|
|
"user-namespaces"
|
|
],
|
|
"state": [
|
|
"toolchains",
|
|
"keys",
|
|
{"name": "steps", "ttl-seconds": 172800}, "pauses"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "node-build-go",
|
|
"scope": "node",
|
|
"serves": ["current", "pause", "resume"]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-delivery-checker.kept",
|
|
"mesh-delivery-indexer.manifests"
|
|
],
|
|
"config": {
|
|
"capacity": {
|
|
"type": "string",
|
|
"description": "How many asks of the Go build seat this module runs at once on each node, as node=asks pairs separated by commas, such as shanks=3,ace=2 (novox/hq ADR 0525 §5); a node set to 0 pulls nothing, a node not named runs one at a time. The control-node and the laptop build nothing.",
|
|
"pattern": "|[a-z0-9_-]+=[0-9]+(,[a-z0-9_-]+=[0-9]+)*",
|
|
"default": "shanks=3,ace=2,g14=0,novox=0"
|
|
},
|
|
"cpu-cap": {
|
|
"type": "string",
|
|
"description": "The most of each node's processors this module's builds may take, as node=percent pairs separated by commas, such as shanks=50,ace=75 (novox/hq issue 1806); a node not named takes 50. The node-engine holds the module's runtime to it as a CPU quota, at idle priority, and each build step starts no more threads than its part of it.",
|
|
"pattern": "|[a-z0-9_-]+=([1-9]|[1-9][0-9]|100)%?(,[a-z0-9_-]+=([1-9]|[1-9][0-9]|100)%?)*",
|
|
"default": "shanks=50,g14=50,ace=75"
|
|
}
|
|
},
|
|
"tools": [
|
|
"build_go_fetch",
|
|
"build_go_test",
|
|
"build_go_digest",
|
|
"build_go_build",
|
|
"build_go_release",
|
|
"build_go_step",
|
|
"build_go_steps",
|
|
"build_go_toolchains",
|
|
"build_go_status",
|
|
"build_go_health"
|
|
],
|
|
"streams": [
|
|
{
|
|
"name": "toolchains-go",
|
|
"events": ["toolchain.**"]
|
|
}
|
|
],
|
|
"requires": [
|
|
"forge-account",
|
|
"go-toolchain",
|
|
"artifact-store",
|
|
"node-tools"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-build-go",
|
|
"runtime-health": {
|
|
"kind": "tool",
|
|
"tool": "build_go_health",
|
|
"interval": "60s",
|
|
"timeout": "10s",
|
|
"looks": 2,
|
|
"grace": "60s"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-build-go",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-build-go"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-build-go",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "work",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-build-go-work",
|
|
"mode": "0700",
|
|
"owner": "mesh-build-go",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "cache",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-build-go-cache",
|
|
"mode": "0700",
|
|
"owner": "mesh-build-go",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "settings",
|
|
"trusted": false,
|
|
"type": "file",
|
|
"path": "${dir:state}/settings.json",
|
|
"mode": "0600",
|
|
"owner": "mesh-build-go",
|
|
"takes-config": ["capacity", "cpu-cap"],
|
|
"merge": "json",
|
|
"template": "files/settings.json"
|
|
},
|
|
{
|
|
"id": "ssh-dir",
|
|
"type": "directory",
|
|
"path": "${dir:state}/.ssh",
|
|
"mode": "0700",
|
|
"owner": "mesh-build-go",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "ssh-config",
|
|
"type": "file",
|
|
"path": "${dir:ssh-dir}/config",
|
|
"owner": "mesh-build-go",
|
|
"mode": "0600",
|
|
"template": "files/forge"
|
|
},
|
|
{
|
|
"id": "known-hosts",
|
|
"type": "file",
|
|
"path": "${dir:ssh-dir}/known_hosts",
|
|
"owner": "mesh-build-go",
|
|
"mode": "0644",
|
|
"template": "files/known_hosts"
|
|
},
|
|
{
|
|
"id": "git-config",
|
|
"type": "file",
|
|
"path": "${dir:state}/.config/git/config",
|
|
"owner": "mesh-build-go",
|
|
"mode": "0644",
|
|
"template": "files/gitconfig"
|
|
},
|
|
{
|
|
"id": "registry",
|
|
"type": "file",
|
|
"path": "${dir:state}/registry",
|
|
"owner": "mesh-build-go",
|
|
"mode": "0644",
|
|
"template": "files/registry"
|
|
},
|
|
{
|
|
"id": "git",
|
|
"type": "package",
|
|
"package": "git"
|
|
},
|
|
{
|
|
"id": "openssh",
|
|
"type": "package",
|
|
"package": "openssh"
|
|
},
|
|
{
|
|
"id": "bubblewrap",
|
|
"type": "package",
|
|
"package": "bubblewrap"
|
|
},
|
|
{
|
|
"id": "postgresql",
|
|
"type": "package",
|
|
"package": "postgresql"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-build-go",
|
|
"binary": "mesh-build-go",
|
|
"loads": [
|
|
"mesh-build-go"
|
|
]
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|