Every module named its events the way the old bus spelled a routing key — `module.<module>.<verb>`. Design 29 says a module names an event locally and the mesh works out where it lands, so all 37 were stale against a rule already decided. On the new bus that derives into a namespace belonging to a module called "module", so no cross-module subscription in the mesh matched anything: nothing failed, nothing reacted (novox/hq 04-ISSUES/127). 36 manifests converted, and 43 files of module code with them. The code mattered as much as the manifests: the runtime builds the subject from what `emit()` is handed, so a converted manifest with unconverted code would have had the permission and the subject disagree. Three things the new check found on the way: - `photos` emitted an event its manifest never declared, which the new bus refuses outright. Declared. - `showcase` waited for an event nothing emits, so its demo could never be triggered — only `showcase` may publish under its own name. It emits both halves now. - `distribution` declared an event named after a different module. It emits `image.pushed` under its own name. An event about a *role* belongs on the seat, where the name outlives whoever holds it, but the sdk has no way to publish on a seat yet, so that stays recorded rather than declared. The audit logger's "everything" pattern is `**` rather than the old bus's `#`.
138 lines
3.2 KiB
JSON
138 lines
3.2 KiB
JSON
{
|
|
"module": "mssql",
|
|
"version": "1",
|
|
"provides": [
|
|
{
|
|
"name": "mssql-database",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"database.provisioned",
|
|
"database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"mssql.database.provisioned",
|
|
"mssql.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 4848,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database. 4848, not 1433: the machine this replaces has served it there since it was installed, and every consumer was handed that number"
|
|
}
|
|
],
|
|
"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/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:4402d880dd4c34bfa7d8705e56a86cd6c88da80a1f6bbbe741f999e76264a090",
|
|
"network": "mssql",
|
|
"env-file": [
|
|
"/var/lib/mssql/sa.env"
|
|
],
|
|
"ports": [
|
|
"1433"
|
|
],
|
|
"volumes": [
|
|
"/services/mssql/data:/var/opt/mssql"
|
|
],
|
|
"secrets-in-environment": "the image documents only MSSQL_SA_PASSWORD, no _FILE and no configuration field; not convertible without a wrapper entrypoint"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-mssql",
|
|
"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"
|
|
},
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|