The breadth install (catalogue-broad) surfaced two latent resolution bugs that
single-module compile checks never caught (compile != resolve):
1. postgres/redis/mongodb/minio served no "port", yet seven consumers
(baserow, letta, invoicing, gitea, umami, keycloak, nextcloud) reference
${bound:<provision>:port}. A binding auto-carries at/from/as; the port is the
provider's half of the answer and must be declared in `serves` (manifest.go:
"Serves is what a consumer needs to know ... a port, a path, a realm"). Added
port to each: postgres 5432, redis 6379, mongodb 27017, minio 9000. Without it
no DB consumer could resolve, let alone deploy.
2. baserow declared an empty contribution `contributes: {"redis-cache": {}}`.
redis's serves spec for the cache is empty (a cache takes no per-consumer
payload), so a consumer only `requires` it; an empty contribution is refused.
Dropped it (requires/binds/secrets unchanged).
Found by mesh-lab catalogue-broad; the same fixes are mirrored in that bed.
Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
120 lines
2.8 KiB
JSON
120 lines
2.8 KiB
JSON
{
|
|
"module": "mongodb",
|
|
"version": "1",
|
|
"provides": [
|
|
{
|
|
"name": "mongodb-database",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"module.mongodb.database.provisioned",
|
|
"module.mongodb.database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"module.mongodb.database.provisioned",
|
|
"module.mongodb.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 27017,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database"
|
|
}
|
|
],
|
|
"serves": {
|
|
"mongodb-database": {
|
|
"port": 27017
|
|
}
|
|
},
|
|
"receives": {
|
|
"mongodb-database": "/var/lib/mongodb/grants/mesh.json"
|
|
},
|
|
"grants": {
|
|
"mongodb-database": "/var/lib/mongodb/grants"
|
|
},
|
|
"own-secrets": {
|
|
"root": "/var/lib/mongodb/root.secret",
|
|
"broker": "/var/lib/mesh/mongodb/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/mongodb",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mongodb",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"path": "/var/lib/mongodb/grants",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "root-env",
|
|
"type": "file",
|
|
"path": "/var/lib/mongodb/root.env",
|
|
"mode": "0600",
|
|
"content": "MONGO_INITDB_ROOT_PASSWORD=${secret:root}\n"
|
|
},
|
|
{
|
|
"id": "data",
|
|
"type": "directory",
|
|
"path": "/services/mongodb/db-data",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "mongodb"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "mongo",
|
|
"image": "mongo@sha256:e3fa459b4f4b72f3257c67a23c145e250b8b5700f033860392c68539b998bbe3",
|
|
"network": "mongodb",
|
|
"env": {
|
|
"MONGO_INITDB_ROOT_USERNAME": "root"
|
|
},
|
|
"env-file": [
|
|
"/var/lib/mongodb/root.env"
|
|
],
|
|
"ports": [
|
|
"27017"
|
|
],
|
|
"volumes": [
|
|
"/services/mongodb/db-data:/data/db"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-mongodb",
|
|
"image": "mesh-runtime-mongodb@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "mongodb",
|
|
"volumes": [
|
|
"/var/lib/mesh/mongodb/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mongodb/grants:/var/lib/mongodb/grants:ro",
|
|
"/var/lib/mongodb/root.secret:/run/secrets/root:ro"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_MONGODB": "mongodb://root@mongo:27017/admin?authSource=admin",
|
|
"MESH_PROVISION_PASSWORD_FILE": "/run/secrets/root",
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_RECEIVES": "/var/lib/mongodb/grants/mesh.json"
|
|
}
|
|
}
|
|
]
|
|
}
|