NetworkManager's service carries a check of kind unit, still with no state, so the watcher's tool check stands beside a check of another kind, as zfs's units stand beside its watch process's tool check. Builds: design 08 sign-in-page §27; lead answer C-2 (hq df22a138)
118 lines
3.5 KiB
JSON
118 lines
3.5 KiB
JSON
{
|
|
"module": "networkmanager",
|
|
"version": "0.1",
|
|
"class": "core",
|
|
"upgrade": {
|
|
"policy": "record",
|
|
"why": "the machine's network: a build that breaks it can cut the machine off from the bus, and then neither the gate's rollback nor a push reaches it (hq ADR 0236)"
|
|
},
|
|
"slug": "nm",
|
|
"requires": [
|
|
"wildcard-resolution"
|
|
],
|
|
"capabilities": [
|
|
"package-manager",
|
|
"service-manager",
|
|
"uplink-networkmanager"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "node-uplink",
|
|
"scope": "node"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"node-engine.running"
|
|
],
|
|
"invokes": [
|
|
"seat:mesh-module-assigner.assignments",
|
|
"seat:node-resolver.uplink-names",
|
|
"seat:node-resolver.routes"
|
|
],
|
|
"tools": [
|
|
"uplink_sign_in",
|
|
"uplink_names_again",
|
|
"uplink_rating_again",
|
|
"uplink_publish_again",
|
|
"uplink_health"
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/uplink-tools",
|
|
"binary": "uplink-tools",
|
|
"loads": [
|
|
"uplink-tools"
|
|
]
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
},
|
|
"facts": {
|
|
"resolvers": {
|
|
"path": "/etc/resolv.conf",
|
|
"template": "# Managed by the mesh, and written by the module holding this machine's uplink:\n# the program that manages the machine's network would otherwise rewrite this\n# file on every change of network, so its holder is the one that writes it\n# (novox/hq ADR 0117, ADR 0223). Replaced on every push; edit nothing here.\n#\n# Every resolver of the mesh, by address, and nothing else (novox/hq ADR 0223) \u2014\n# this machine's own first when it holds one, then the others by name. Each\n# answers the mesh's names from the same roster and forwards every other name, so\n# whichever answers first gives the one answer. There is no public resolver here:\n# a C library that asks every listed server at once and takes the first reply \u2014\n# musl, so every Alpine container \u2014 took a public resolver's \"no such name\" for\n# a mesh name and failed. A machine that reaches none of these has no names until\n# it does. Containers copy these lines from their machine.\n{{range index .Holders \"mesh-dns-resolver\"}}nameserver {{.Address}}\n{{end}}options timeout:1 attempts:2 edns0\n"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "package",
|
|
"type": "package",
|
|
"package": "networkmanager"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "/etc/NetworkManager/conf.d/50-mesh.conf",
|
|
"mode": "0644",
|
|
"template": "files/50-mesh.conf"
|
|
},
|
|
{
|
|
"id": "service",
|
|
"type": "service",
|
|
"unit": "NetworkManager.service",
|
|
"reload-on": [
|
|
"config"
|
|
],
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
},
|
|
{
|
|
"id": "sign-in-state",
|
|
"type": "directory",
|
|
"path": "${machine:account-home}/.local/state/mesh/networkmanager",
|
|
"owner": "${machine:account}",
|
|
"mode": "0700",
|
|
"unknown": "module"
|
|
},
|
|
{
|
|
"id": "sign-in",
|
|
"type": "process",
|
|
"name": "networkmanager-sign-in",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./uplink-tools",
|
|
"watch"
|
|
],
|
|
"user": "${machine:account}",
|
|
"health": {
|
|
"kind": "tool",
|
|
"tool": "uplink_health",
|
|
"interval": "60s",
|
|
"timeout": "20s",
|
|
"looks": 2,
|
|
"grace": "60s"
|
|
}
|
|
}
|
|
]
|
|
}
|