mesh/delivery-group group feat/774-l3-reland rejected: composed together: the checker's verdict at the members' heads (b48c90fea31f): integration: mesh-self-ch…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: integration: mesh-self-check/cmd/mesh-self-check.TestTheSelfCheckWholeRunsOnTheBus: the run answered {Run:doctor-1793351737-1 At:20…
One commit with exactly the tree of the reviewed head35b4509c0a, on main12c2574c9d, so two compiled programs added and removed on the branch leave no trace in history (issue 1577).
203 lines
4.9 KiB
JSON
203 lines
4.9 KiB
JSON
{
|
|
"module": "postgres",
|
|
"version": "1",
|
|
"moved": true,
|
|
"upgrade": {
|
|
"policy": "record",
|
|
"why": "a provider whose restart drops every consumer on its machine, and whose new major version changes its data's format: a person takes each build, after a backup (hq ADR 0236)"
|
|
},
|
|
"provides": [
|
|
{
|
|
"name": "postgres-database",
|
|
"credential": {"form": "pair"},
|
|
"scope": "mesh",
|
|
"identity": {
|
|
"max": 63,
|
|
"in": "a PostgreSQL role and database name"
|
|
}
|
|
}
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "mesh-store",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"databases",
|
|
"query"
|
|
]
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"database.provisioned",
|
|
"database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"postgres.database.provisioned",
|
|
"postgres.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"name": "database",
|
|
"port": 5432,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database"
|
|
}
|
|
],
|
|
"guards": [
|
|
5432
|
|
],
|
|
"serves": {
|
|
"postgres-database": {
|
|
"port": 5432
|
|
}
|
|
},
|
|
"receives": {
|
|
"postgres-database": "${dir:grants}/mesh.json"
|
|
},
|
|
"grants": {
|
|
"postgres-database": "${dir:grants}"
|
|
},
|
|
"own-secrets": {
|
|
"superuser": "${dir:data}/superuser.secret",
|
|
"reader": "${dir:data}/reader.secret"
|
|
},
|
|
"data": {
|
|
"own": [
|
|
{
|
|
"id": "store",
|
|
"path": "${dir:store-data}",
|
|
"class": "valuable",
|
|
"backup": {
|
|
"dump": "docker exec -u postgres postgres sh -c 'cd /var/lib/postgresql/data/dumps && for db in $(psql -Atc \"select datname from pg_database where oid >= 16384 order by 1\"); do pg_dump -Fc -f \"$db.dump.partial\" \"$db\" && mv \"$db.dump.partial\" \"$db.dump\" || exit 1; done'",
|
|
"into": "dumps"
|
|
},
|
|
"why": "every consumer's database; copied by the dump below, since a running store's files are not a consistent copy"
|
|
},
|
|
{
|
|
"id": "dumps",
|
|
"path": "${dir:dumps}",
|
|
"class": "rebuildable",
|
|
"why": "last night's dump of the store, made again every night"
|
|
}
|
|
],
|
|
"consumers": {
|
|
"postgres-database": {
|
|
"class": "valuable",
|
|
"in": "store",
|
|
"why": "a consumer's rows are the only copy of what it wrote"
|
|
}
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "data",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/postgres",
|
|
"owner": "postgres",
|
|
"mode": "0700",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"path": "${dir:data}/grants",
|
|
"mode": "0700",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "consumers",
|
|
"type": "file",
|
|
"path": "${dir:data}/consumers.json",
|
|
"mode": "0600",
|
|
"template": "files/consumers.json"
|
|
},
|
|
{
|
|
"id": "store-data",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-store",
|
|
"mode": "0700",
|
|
"owner": "999:70",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "dumps",
|
|
"type": "directory",
|
|
"path": "${dir:store-data}/dumps",
|
|
"mode": "0700",
|
|
"owner": "999:70",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "postgres",
|
|
"image": "pgvector/pgvector@sha256:cf134a767f474095eeba57e0117be8e568e011a63f33fbf252f14c9b760f8e6f",
|
|
"health": {
|
|
"kind": "tcp",
|
|
"endpoint": "database"
|
|
},
|
|
"env": {
|
|
"POSTGRES_PASSWORD_FILE": "/run/secrets/superuser",
|
|
"PGDATA": "/var/lib/postgresql/data/pgdata"
|
|
},
|
|
"ports": [
|
|
"5432:5432"
|
|
],
|
|
"volumes": [
|
|
"/var/lib/mesh-store:/var/lib/postgresql/data",
|
|
"${dir:data}/superuser.secret:/run/secrets/superuser:ro"
|
|
]
|
|
},
|
|
{
|
|
"id": "client",
|
|
"type": "package",
|
|
"package": "postgresql-libs"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/postgres-provider",
|
|
"binary": "postgres-provider",
|
|
"loads": [
|
|
"postgres-provider"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_POSTGRES": "postgres://postgres@127.0.0.1:${port:5432}/postgres?sslmode=disable",
|
|
"MESH_PROVISION_PASSWORD_FILE": "${dir:data}/superuser.secret",
|
|
"MESH_RECEIVES": "${dir:grants}/mesh.json",
|
|
"MESH_POSTGRES_READER_PASSWORD_FILE": "${dir:data}/reader.secret",
|
|
"MESH_CONSUMERS_FILE": "${dir:data}/consumers.json"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
},
|
|
"state": [
|
|
"bound"
|
|
],
|
|
"reads": [
|
|
"mesh-provisioner.plans",
|
|
"mesh-provisioner.provisions"
|
|
]
|
|
}
|