Files
mesh-catalog/modules/mounts/module.json
T

157 lines
3.2 KiB
JSON

{
"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": "."
},
{
"id": "config-dir",
"type": "directory",
"path": "/etc/mesh-mounts",
"mode": "0755"
},
{
"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"
},
{
"id": "bus-dir",
"type": "directory",
"path": "/var/lib/mesh-mounts/from-bus",
"mode": "0755",
"owner": "${machine:account}"
},
{
"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"
}
]
}
}