A version prepares its state before it runs
The mesh derives the preparation from the module's own resource instead of each module hand-writing a step beside it (novox/hq ADR 0135). A manifest says one word — `prepares` — and the mesh runs that module's own program in its preparation mode, in the module's own context: the same image, the same environment, the same mounts, because it is the same code. A published port and a fixed address are taken away rather than copied, since the version being replaced still holds them. One word for every kind of module: a Go binary receives `prepare` as its argument, a bundle receives it through the runtime whose entry takes the same word. The control plane answers it like anything else — its own schema stops being a special case, and its hand-written step is gone.
This commit is contained in:
+1
-24
@@ -27,6 +27,7 @@
|
||||
"bus": "/var/lib/mesh/mesh-controller/bus"
|
||||
},
|
||||
"secrets-owner": "65534:65534",
|
||||
"prepares": true,
|
||||
"resources": [
|
||||
{
|
||||
"id": "mesh-state",
|
||||
@@ -34,30 +35,6 @@
|
||||
"path": "/var/lib/mesh/mesh-controller",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "migrate",
|
||||
"type": "container",
|
||||
"name": "mesh-controller-migrate",
|
||||
"run-once": true,
|
||||
"network": "host",
|
||||
"args": [
|
||||
"migrate"
|
||||
],
|
||||
"env": {
|
||||
"MESH_STORE_INVENTORY_FILE": "/run/secrets/inventory",
|
||||
"MESH_STORE_IDENTITY_FILE": "/run/secrets/identity",
|
||||
"MESH_STORE_LICENCES_FILE": "/run/secrets/licences",
|
||||
"MESH_STORE_INVENTORY_PORT": "${seat:mesh-store:5432}",
|
||||
"MESH_STORE_IDENTITY_PORT": "${seat:mesh-store:5432}",
|
||||
"MESH_STORE_LICENCES_PORT": "${seat:mesh-store:5432}"
|
||||
},
|
||||
"volumes": [
|
||||
"/var/lib/mesh/mesh-controller/inventory:/run/secrets/inventory:ro",
|
||||
"/var/lib/mesh/mesh-controller/identity:/run/secrets/identity:ro",
|
||||
"/var/lib/mesh/mesh-controller/licences:/run/secrets/licences:ro"
|
||||
],
|
||||
"artifact": "server"
|
||||
},
|
||||
{
|
||||
"id": "server",
|
||||
"type": "container",
|
||||
|
||||
Reference in New Issue
Block a user