The module's server container was called mesh-store and its data directory /var/lib/mesh-store — the seat's name reused for the module's own resources, a leftover from the first migration. On a machine whose postgres holds no seat (ace, as a database provider only) that produced a container called mesh-store holding nothing of the kind. The container is now named postgres. The data directory keeps its path: a path change recreates a running container on an empty directory (hq 126), and novox's store lives there. Rolling this out recreates novox's store container once (a restart on its bind mount, no data moves). The two catalogue-test failures on this branch (resolver_manifests_test) fail identically on main today.
139 lines
3.1 KiB
JSON
139 lines
3.1 KiB
JSON
{
|
|
"module": "postgres",
|
|
"version": "1",
|
|
"provides": [
|
|
{
|
|
"name": "postgres-database",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "mesh-store",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"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": "/var/lib/postgres/grants/mesh.json"
|
|
},
|
|
"grants": {
|
|
"postgres-database": "/var/lib/postgres/grants"
|
|
},
|
|
"own-secrets": {
|
|
"superuser": "/var/lib/postgres/superuser.secret",
|
|
"broker": "/var/lib/mesh/postgres/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/postgres",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/postgres",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"path": "/var/lib/postgres/grants",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "store-data",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-store",
|
|
"mode": "0700",
|
|
"owner": "999:70"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "postgres",
|
|
"image": "pgvector/pgvector@sha256:cf134a767f474095eeba57e0117be8e568e011a63f33fbf252f14c9b760f8e6f",
|
|
"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",
|
|
"/var/lib/postgres/superuser.secret:/run/secrets/superuser:ro"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-postgres",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/postgres/broker:/run/secrets/broker:ro",
|
|
"/var/lib/postgres/grants:/var/lib/postgres/grants:ro",
|
|
"/var/lib/postgres/superuser.secret:/run/secrets/superuser:ro"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_POSTGRES": "postgres://postgres@127.0.0.1:${port:5432}/postgres?sslmode=disable",
|
|
"MESH_PROVISION_POSTGRES_PORT": "${seat:mesh-store:5432}",
|
|
"MESH_PROVISION_PASSWORD_FILE": "/run/secrets/superuser",
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_RECEIVES": "/var/lib/postgres/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"
|
|
}
|
|
]
|
|
}
|
|
}
|