mesh/merge-gate checking again: the gate refused `unknown` because the controller judged with a node-engine validator pinned before mesh-host #117; mesh-co…
mesh/repo-check checking again: the gate refused `unknown` because the controller judged with a node-engine validator pinned before mesh-host #117; mesh-co…
mesh/delivery-group group feat/owned-paths checking: 0 of 2 member(s) ready
mesh/delivery superseded: a newer head of the same pull request
Every directory and archive resource carries `unknown`: move-out for a home folder whose program writes nothing there (the node-engine, delivered in mesh-host #117, moves the rest to ~/.local/state/mesh-moved/<module>/ with a list), module for ~/.ssh and ~/.claude, program elsewhere; `knows` keeps what a program or the operator relies on (powerlevel10k's compiled files, i3's scripts and the asus/g14 drop-ins, dunst's slack rule, betterbird's records, node-env's forge credential, issue 1033). Two shared folders are no longer declared. Each module's README says it. checks/owned holds every manifest to it; checks/sshdir stays while main's merge check runs it (issue 1035). Tests that pin a manifest follow the new key only. Reviewed in three rounds.
175 lines
4.3 KiB
JSON
175 lines
4.3 KiB
JSON
{
|
|
"module": "mssql",
|
|
"version": "1",
|
|
"upgrade": {
|
|
"policy": "record",
|
|
"why": "a provider whose restart drops every consumer on its machine, and whose new version may upgrade its databases in place: a person takes each build, after a backup (hq ADR 0236)"
|
|
},
|
|
"provides": [
|
|
{
|
|
"name": "mssql-database",
|
|
"scope": "mesh",
|
|
"identity": {
|
|
"max": 128,
|
|
"in": "a SQL Server login and database name"
|
|
}
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"database.provisioned",
|
|
"database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"mssql.database.provisioned",
|
|
"mssql.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"name": "database",
|
|
"port": 1433,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database, and the people who were given its address; the machine port is the assignment's to pin"
|
|
}
|
|
],
|
|
"serves": {
|
|
"mssql-database": {}
|
|
},
|
|
"receives": {
|
|
"mssql-database": "${dir:grants}/mesh.json"
|
|
},
|
|
"grants": {
|
|
"mssql-database": "${dir:grants}"
|
|
},
|
|
"own-secrets": {
|
|
"sa": "${dir:state}/sa.secret",
|
|
"reader": "${dir:state}/reader.secret"
|
|
},
|
|
"data": {
|
|
"own": [
|
|
{
|
|
"id": "data",
|
|
"path": "${dir:data}",
|
|
"class": "valuable",
|
|
"backup": {
|
|
"dump": "{ cat ${dir:state}/sa.secret; echo; cat ${dir:state}/backup.sql; } | docker exec -i mssql sh -c 'read -r p; SQLCMDPASSWORD=\"$p\" exec /opt/mssql-tools18/bin/sqlcmd -C -b -S localhost -U sa -i /dev/stdin'",
|
|
"into": "dumps"
|
|
},
|
|
"why": "every consumer's database; copied by the dump, not as live files"
|
|
},
|
|
{
|
|
"id": "dumps",
|
|
"path": "${dir:dumps}",
|
|
"class": "rebuildable",
|
|
"why": "last night's dump, made again every night"
|
|
}
|
|
],
|
|
"consumers": {
|
|
"mssql-database": {
|
|
"class": "valuable",
|
|
"in": "data",
|
|
"why": "a consumer's rows are the only copy of what it wrote"
|
|
}
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "sa-env",
|
|
"type": "file",
|
|
"path": "${dir:state}/sa.env",
|
|
"mode": "0600",
|
|
"template": "files/sa.env"
|
|
},
|
|
{
|
|
"id": "data",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "10001:0",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "dumps",
|
|
"type": "directory",
|
|
"path": "${dir:data}/backup",
|
|
"mode": "0700",
|
|
"owner": "10001:0",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "mssql"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "mssql",
|
|
"image": "mcr.microsoft.com/mssql/server@sha256:4402d880dd4c34bfa7d8705e56a86cd6c88da80a1f6bbbe741f999e76264a090",
|
|
"network": "mssql",
|
|
"env-file": [
|
|
"${dir:state}/sa.env"
|
|
],
|
|
"ports": [
|
|
"1433"
|
|
],
|
|
"volumes": [
|
|
"${dir: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": "backup-sql",
|
|
"type": "file",
|
|
"path": "${dir:state}/backup.sql",
|
|
"mode": "0600",
|
|
"template": "files/backup.sql"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"index.js",
|
|
"tools/index.js",
|
|
"provisioner/index.js"
|
|
],
|
|
"loads": [
|
|
"index.js",
|
|
"tools/index.js",
|
|
"provisioner/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_MSSQL": "mssql://sa@127.0.0.1:${port:1433}/master",
|
|
"MESH_PROVISION_PASSWORD_FILE": "${dir:state}/sa.secret",
|
|
"MESH_RECEIVES": "${dir:grants}/mesh.json",
|
|
"MESH_MSSQL_READER_PASSWORD_FILE": "${dir:state}/reader.secret"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|