mesh/merge-gate building on ace since 00:53
mesh/delivery superseded: a newer head of the same pull request
mesh/check failed: integration: github.com/novox/mesh-controller/internal/identity.TestACertificateChainsToTheMeshsOwnAuthority: authority_test.go:45:…
188 lines
5.2 KiB
JSON
188 lines
5.2 KiB
JSON
{
|
|
"module": "build-agent",
|
|
"version": "1",
|
|
"slug": "agent",
|
|
"config": {
|
|
"cpu-weight": {
|
|
"type": "number",
|
|
"description": "The CPU weight of everything a build or check starts on this machine, from 1 to 10000 against 100 for an ordinary service or a login session: under load the builds get their share of that, on an idle machine they take what is free (novox/hq issue 1798). The default 20 is about a sixth of the CPU against one competing workload; a desktop may take 10.",
|
|
"minimum": 1,
|
|
"maximum": 10000,
|
|
"default": 20
|
|
},
|
|
"io-weight": {
|
|
"type": "number",
|
|
"description": "The disk IO weight of everything a build or check starts, from 1 to 10000 against 100 for an ordinary service: the default 10 lets the machine's own work go first (novox/hq issue 1798).",
|
|
"minimum": 1,
|
|
"maximum": 10000,
|
|
"default": 10
|
|
},
|
|
"memory-high": {
|
|
"type": "string",
|
|
"description": "The memory above which builds and checks are slowed and made to give memory back, a percentage of the machine's memory or a size (systemd's MemoryHigh): the default 50% leaves half the machine to what it runs (novox/hq issue 1798).",
|
|
"pattern": "([1-9][0-9]?|100)%|[1-9][0-9]*[KMGT]",
|
|
"default": "50%"
|
|
},
|
|
"memory-max": {
|
|
"type": "string",
|
|
"description": "The memory builds and checks together may never exceed, a percentage or a size (systemd's MemoryMax); a build past it is killed by the kernel and fails, so keep it above memory-high: the default 70% (novox/hq issue 1798).",
|
|
"pattern": "([1-9][0-9]?|100)%|[1-9][0-9]*[KMGT]",
|
|
"default": "70%"
|
|
}
|
|
},
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "node-build-agent",
|
|
"scope": "node",
|
|
"serves": [
|
|
"current",
|
|
"kill",
|
|
"pause",
|
|
"resume"
|
|
]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-delivery-gate.pulls",
|
|
"mesh-delivery.pulls"
|
|
],
|
|
"requires": [
|
|
"artifact-store",
|
|
{
|
|
"name": "npm-package-registry",
|
|
"optional": true
|
|
}
|
|
],
|
|
"binds": {
|
|
"npm-package-registry": "${dir:mesh-state}/package-registry.json"
|
|
},
|
|
"secrets": {
|
|
"npm-package-registry": "${dir:mesh-state}/package-registry.secret"
|
|
},
|
|
"own-secrets": {
|
|
"broker": "${dir:mesh-state}/broker",
|
|
"genesis-package-registry": {
|
|
"path": "${dir:mesh-state}/genesis-package-registry.json",
|
|
"issued-by": "outside"
|
|
}
|
|
},
|
|
"data": {
|
|
"own": [
|
|
{
|
|
"id": "workspace",
|
|
"path": "${dir:workspace}",
|
|
"class": "cache",
|
|
"why": "a build's working copy, cloned again for every build"
|
|
},
|
|
{
|
|
"id": "judge-cache",
|
|
"path": "${dir:judge-cache}",
|
|
"class": "cache",
|
|
"why": "the Go cache every merge check's judge is built with and the group judges kept per head; mounted into judge builds only, never into a check's containers (novox/hq ADR 0358 \u00a76)"
|
|
}
|
|
]
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "workspace",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "judge-cache",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "build-slice",
|
|
"type": "file",
|
|
"path": "/etc/systemd/system/mesh-build.slice",
|
|
"mode": "0644",
|
|
"trusted": false,
|
|
"template": "files/mesh-build.slice"
|
|
},
|
|
{
|
|
"id": "build-slice-unit",
|
|
"type": "service",
|
|
"unit": "mesh-build.slice",
|
|
"state": "running"
|
|
},
|
|
{
|
|
"id": "agent-env",
|
|
"type": "file",
|
|
"path": "${dir:mesh-state}/build-agent.env",
|
|
"mode": "0600",
|
|
"template": "files/build-agent.env"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "mesh-build-agent",
|
|
"artifact": "server",
|
|
"env-file": [
|
|
"${dir:mesh-state}/build-agent.env"
|
|
],
|
|
"volumes": [
|
|
"${dir:mesh-state}:/run/mesh:ro",
|
|
"${dir:workspace}:${dir:workspace}",
|
|
"${dir:judge-cache}:${dir:judge-cache}",
|
|
"/var/run/docker.sock:/var/run/docker.sock"
|
|
],
|
|
"restart-on": [
|
|
"agent-env"
|
|
],
|
|
"network": "host",
|
|
"health": {
|
|
"kind": "exec",
|
|
"command": "/usr/local/bin/mesh-builder ready",
|
|
"interval": "10s",
|
|
"timeout": "5s",
|
|
"looks": 3,
|
|
"grace": "60s"
|
|
},
|
|
"busy": {
|
|
"command": "/usr/local/bin/mesh-builder busy"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "server",
|
|
"kind": "image",
|
|
"from": "Dockerfile",
|
|
"compiles": "cmd/mesh-builder",
|
|
"context": {
|
|
"seat": "git",
|
|
"repository": "novox/mesh-controller",
|
|
"ref": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
],
|
|
"on": [
|
|
{
|
|
"arg": "GO_BASE",
|
|
"image": "golang@sha256:8ac98ca534ac3f51e1f420a1dd2c15e74c75cfa0f23f3ad27eb5d7236c349a0c"
|
|
},
|
|
{
|
|
"arg": "ALPINE_BASE",
|
|
"image": "alpine@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc"
|
|
}
|
|
]
|
|
}
|
|
}
|