Mirrors the proven catalog patterns field-for-field: - lidarr -> the Servarr twin of radarr/sonarr (API v1, artist content); no provisioner (it is a consumer app). - mongodb -> postgres shape: mongodb-database provider, provisioner mints a per-consumer db+user (ADR 0053), client shells to mongosh (no npm driver, the psql convention). - mssql -> postgres shape: mssql-database provider, sqlcmd client. - mosquitto -> redis shape: mqtt-topic provider via the Dynamic Security plugin, deliberately avoiding hal's password_file (that file is nox issue 011 exactly); provisioner mints a per-consumer MQTT client+role. All four typecheck (strict, NodeNext) against the built @novox/mesh-sdk, and their service images are digest-pinned to resolved registry digests. The mesh-runtime-<mod> images keep the all-zeros placeholder the pipeline pins, as postgres/redis do, and must bundle each module's CLI (mongosh/sqlcmd/ mosquitto_ctrl) as mesh-runtime-postgres bundles psql. Not yet lab-verified: each module lists in-code what an integration test must prove (auth model, provisioner reconcile, mosquitto dynsec bootstrap ordering). Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
116 lines
2.7 KiB
JSON
116 lines
2.7 KiB
JSON
{
|
|
"module": "mssql",
|
|
"version": "1",
|
|
"provides": [
|
|
{
|
|
"name": "mssql-database",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"module.mssql.database.provisioned",
|
|
"module.mssql.database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"module.mssql.database.provisioned",
|
|
"module.mssql.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 1433,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database"
|
|
}
|
|
],
|
|
"serves": {
|
|
"mssql-database": {}
|
|
},
|
|
"receives": {
|
|
"mssql-database": "/var/lib/mssql/grants/mesh.json"
|
|
},
|
|
"grants": {
|
|
"mssql-database": "/var/lib/mssql/grants"
|
|
},
|
|
"own-secrets": {
|
|
"sa": "/var/lib/mssql/sa.secret",
|
|
"broker": "/var/lib/mesh/mssql/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/mssql",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mssql",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"path": "/var/lib/mssql/grants",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "sa-env",
|
|
"type": "file",
|
|
"path": "/var/lib/mssql/sa.env",
|
|
"mode": "0600",
|
|
"content": "ACCEPT_EULA=Y\nMSSQL_SA_PASSWORD=${secret:sa}\n"
|
|
},
|
|
{
|
|
"id": "data",
|
|
"type": "directory",
|
|
"path": "/services/mssql/db-data",
|
|
"mode": "0700",
|
|
"owner": "10001:0"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "mssql"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "mssql",
|
|
"image": "mcr.microsoft.com/mssql/server@sha256:ba4c8329f48fb8f02e1416be6a930ebfd71268caee78aa985f3af4315e457c89",
|
|
"network": "mssql",
|
|
"env-file": [
|
|
"/var/lib/mssql/sa.env"
|
|
],
|
|
"ports": [
|
|
"1433"
|
|
],
|
|
"volumes": [
|
|
"/services/mssql/db-data:/var/opt/mssql"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-mssql",
|
|
"image": "mesh-runtime-mssql@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "mssql",
|
|
"volumes": [
|
|
"/var/lib/mesh/mssql/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mssql/grants:/var/lib/mssql/grants:ro",
|
|
"/var/lib/mssql/sa.secret:/run/secrets/sa:ro"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_MSSQL": "mssql://sa@mssql:1433/master",
|
|
"MESH_PROVISION_PASSWORD_FILE": "/run/secrets/sa",
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_RECEIVES": "/var/lib/mssql/grants/mesh.json"
|
|
}
|
|
}
|
|
]
|
|
}
|