Files
mesh-catalog/modules/distribution/module.json
T
jschoubben 541c2e02d9 distribution: provide and serve no artifact-store, and answer the seats' list from the store's own files (ADR 0632 §1, §3, §4; issue 1966)
The store is found by the seats' holder and its listen registry; list says,
per repository, each manifest's digest, whether it is an index and what it
names, its tags, its size and whether it is held, so the sweep reads the
store through the seat. E15 now asks that nothing is provided or served.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-04 21:11:15 +01:00

268 lines
5.9 KiB
JSON

{
"module": "distribution",
"version": "2",
"claims": [
{
"name": "container-image-registry",
"scope": "mesh",
"serves": [
"hold",
"list",
"mirror",
"publish",
"publish-part",
"release",
"remove",
"tags",
"versions"
]
},
{
"name": "oci-artifact-registry",
"scope": "mesh",
"serves": [
"hold",
"list",
"publish",
"publish-part",
"release",
"remove",
"versions"
]
},
{
"name": "mesh-artifact-store",
"scope": "mesh"
}
],
"tools": [
"registry_callers",
"registry_direct_writes",
"registry_health",
"registry_holds",
"registry_incoming",
"registry_mirrors",
"registry_old_name"
],
"invokes": [
"distribution.registry_callers",
"mesh-delivery-builder.builder_versions",
"mesh-delivery-view.node_haves",
"seat:node-engine.manifest-reads",
"seat:mesh-hand-acts.hand-act"
],
"consumes": [
"mesh-delivery-view.delivered",
"node-engine.manifest-reads-changed"
],
"config": {
"callers": {
"type": "string",
"trusted": true,
"runtime": true,
"default": "",
"description": "per verb, the modules that may call it (JSON object of verb to modules; operator for the operator's session); empty is design 51's list"
}
},
"requires": [
{
"name": "incoming",
"storage": "object-store",
"template": "objects",
"options": {
"max-mib": 8192
}
},
{
"name": "transfers",
"storage": "key-value",
"template": "state"
},
{
"name": "idle",
"storage": "key-value",
"template": "state",
"options": {
"key-ttl": true
}
},
{
"name": "holds",
"storage": "key-value",
"template": "state"
},
{
"name": "windows",
"storage": "key-value",
"template": "state"
},
{
"name": "mirrors",
"storage": "key-value",
"template": "state"
},
{
"name": "findings",
"storage": "key-value",
"template": "state"
},
{
"name": "events",
"storage": "stream",
"template": "events",
"options": {
"events": [
"old-name-closed",
"direct-writes-closed"
],
"max-age-days": 7,
"max-mib": 16
}
}
],
"capabilities": [
"container-runtime"
],
"own-secrets": {
"broker": "/var/lib/mesh/registry/broker"
},
"secrets-owner": "distribution",
"listens": [
{
"name": "registry",
"port": 5000,
"protocol": "tcp",
"from": "mesh",
"why": "every machine pulls images and artifacts from here; distribution's program serves it in front of the store"
}
],
"data": {
"own": [
{
"id": "registry",
"path": "${dir:registry-data}",
"class": "rebuildable",
"backup": "none",
"measure": "shallow",
"why": "the artifact store: every image is built again from its source, and too large to copy every night (ADR 0214 left it out)"
}
]
},
"resources": [
{
"id": "account",
"type": "user",
"name": "distribution",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh/registry"
},
{
"id": "state",
"type": "directory",
"path": "/var/lib/mesh/registry",
"mode": "0700",
"unknown": "program",
"owner": "distribution"
},
{
"id": "registry-data",
"type": "directory",
"path": "/var/lib/mesh-registry",
"mode": "0700",
"unknown": "program",
"owner": "distribution"
},
{
"id": "store",
"type": "container",
"name": "mesh-registry",
"image": "registry@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373",
"ports": [
"127.0.0.1:5001:5000"
],
"volumes": [
"/var/lib/mesh-registry:/var/lib/registry"
],
"env": {
"REGISTRY_STORAGE_DELETE_ENABLED": "true"
},
"health": {
"kind": "http",
"endpoint": "registry",
"path": "/v2/",
"status": 200,
"interval": "60s",
"timeout": "10s",
"looks": 2,
"grace": "90s"
}
},
{
"id": "program",
"type": "process",
"name": "distribution",
"artifact": "program",
"run": [
"./distribution"
],
"env": {
"MESH_BROKER_FILE": "/var/lib/mesh/registry/broker",
"MESH_REGISTRY_LOOPBACK": "http://127.0.0.1:5001",
"MESH_REGISTRY_LISTEN": ":5000"
},
"user": "distribution",
"health": {
"kind": "tool",
"tool": "registry_health",
"interval": "60s",
"timeout": "10s",
"looks": 2,
"grace": "90s"
}
},
{
"id": "collect",
"type": "container",
"name": "mesh-registry-collect",
"image": "registry@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373",
"volumes": [
"/var/lib/mesh-registry:/var/lib/registry"
],
"args": [
"garbage-collect",
"/etc/docker/registry/config.yml"
],
"schedule": "30 3 * * *",
"while-stopped": [
"store"
]
}
],
"build": {
"artifacts": [
{
"name": "program",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/distribution",
"binary": "distribution"
},
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/distribution-tools",
"binary": "distribution-tools",
"loads": [
"distribution-tools"
],
"env": {
"MESH_REGISTRY_CONTAINER": "mesh-registry"
}
}
]
}
}