Take the catalogue's composition rules into the node-engine
ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk carries no composition rule. The catalogue functions only the node-engine's composition reaches (Resolve, Resolution's Compose, Declaration, DataItems, LeftOut, Rules and the rest, the settings, placeholder and template refusals, the rendering helpers) are copied with their tests into internal/compose/resolution; a method of a mesh-sdk shape becomes a function taking it first. The composition calls its own copies, and the captured catalogue its tests read lives here now, shared by mesh-compose's tests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Written by the mesh (module mounts, novox/hq ADR 0263) from this machine's assignment: the settings
|
||||
# shares and sources, and the binding of nfs-share. Replaced on every push; change the settings, not this.
|
||||
# The module's process reads it as root every 30 seconds and writes one .mount and .automount per entry.
|
||||
shares=${config:shares}
|
||||
sources=${config:sources}
|
||||
server=${bound:nfs-share:from}
|
||||
at=${bound:nfs-share:at}
|
||||
account=${machine:account}
|
||||
node=${machine:name}
|
||||
passwords=${dir:state}
|
||||
state=${dir:state}
|
||||
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"module": "mounts",
|
||||
"version": "1",
|
||||
"requires": [
|
||||
"nfs-share"
|
||||
],
|
||||
"reads": [
|
||||
"nfs-server.exports"
|
||||
],
|
||||
"invokes": [
|
||||
"seat:mesh-controller.data"
|
||||
],
|
||||
"capabilities": [
|
||||
"package-manager",
|
||||
"service-manager"
|
||||
],
|
||||
"claims": [
|
||||
{
|
||||
"name": "node-mounts",
|
||||
"scope": "node",
|
||||
"serves": [
|
||||
"list",
|
||||
"test",
|
||||
"mount",
|
||||
"unmount",
|
||||
"adopt"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
"mounts_list",
|
||||
"mounts_exports",
|
||||
"mounts_health"
|
||||
],
|
||||
"state": [
|
||||
{
|
||||
"name": "shares",
|
||||
"per-machine": true
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shares": {
|
||||
"type": "string",
|
||||
"description": "The shares of another machine this machine mounts: space-separated name=mountpoint, each optionally :ro, or none (novox/hq ADR 0263 rule 5).",
|
||||
"trusted": true,
|
||||
"default": "none"
|
||||
},
|
||||
"sources": {
|
||||
"type": "string",
|
||||
"description": "The occasional sources this machine mounts: space-separated name=smb://[<user>@]<host>/<share>@<mountpoint> or name=disk:<uuid>@<mountpoint>, each optionally :ro, or none (novox/hq ADR 0263 rule 6); an SMB source's username is in its entry, its password the secret smb-password-<name> (novox/hq ADR 0283).",
|
||||
"trusted": true,
|
||||
"default": "none"
|
||||
}
|
||||
},
|
||||
"own-secrets": {
|
||||
"smb-password-*": {
|
||||
"path": "${dir:state}/smb-password-*.secret",
|
||||
"issued-by": "outside"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"id": "nfs-utils",
|
||||
"type": "package",
|
||||
"package": "nfs-utils"
|
||||
},
|
||||
{
|
||||
"id": "cifs-utils",
|
||||
"type": "package",
|
||||
"package": "cifs-utils"
|
||||
},
|
||||
{
|
||||
"id": "state",
|
||||
"type": "directory",
|
||||
"mode": "0700",
|
||||
"place": ".",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "config-dir",
|
||||
"type": "directory",
|
||||
"path": "/etc/mesh-mounts",
|
||||
"mode": "0755",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "file",
|
||||
"path": "/etc/mesh-mounts/mounts.conf",
|
||||
"mode": "0644",
|
||||
"template": "files/mounts.conf"
|
||||
},
|
||||
{
|
||||
"id": "bus-dir-parent",
|
||||
"type": "directory",
|
||||
"path": "/var/lib/mesh-mounts",
|
||||
"mode": "0755",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "bus-dir",
|
||||
"type": "directory",
|
||||
"path": "/var/lib/mesh-mounts/from-bus",
|
||||
"mode": "0755",
|
||||
"owner": "${machine:account}",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "apply",
|
||||
"type": "process",
|
||||
"name": "mesh-mounts-apply",
|
||||
"artifact": "tools-go",
|
||||
"run": [
|
||||
"./mounts",
|
||||
"apply"
|
||||
],
|
||||
"health": {
|
||||
"kind": "unit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "watch",
|
||||
"type": "process",
|
||||
"name": "mesh-mounts-watch",
|
||||
"artifact": "tools-go",
|
||||
"run": [
|
||||
"./mounts",
|
||||
"watch"
|
||||
],
|
||||
"health": {
|
||||
"kind": "tool",
|
||||
"tool": "mounts_health",
|
||||
"interval": "60s",
|
||||
"timeout": "10s",
|
||||
"looks": 2,
|
||||
"grace": "90s"
|
||||
}
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
"name": "tools-go",
|
||||
"kind": "bundle",
|
||||
"language": "go",
|
||||
"system": "arch",
|
||||
"from": "cmd/mounts",
|
||||
"binary": "mounts",
|
||||
"loads": [
|
||||
"mounts"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "files",
|
||||
"kind": "archive",
|
||||
"from": "files"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user