zededa:sharing-persist-volume-by-two-apps
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| zededa:sharing-persist-volume-by-two-apps [2026/07/24 12:35] – mc | zededa:sharing-persist-volume-by-two-apps [2026/07/24 15:26] (current) – mc | ||
|---|---|---|---|
| Line 127: | Line 127: | ||
| * VMs mount the 9P share manually ('' | * VMs mount the 9P share manually ('' | ||
| * Requires EVE-OS >= 12.7.0, all apps on the same node. | * Requires EVE-OS >= 12.7.0, all apps on the same node. | ||
| + | |||
| + | ===== Worked example: a container writer + VM readers ===== | ||
| + | |||
| + | The practical shape of "one app generates data, the others consume it" when the | ||
| + | consumers are **VMs** (which cannot share a writable volume among themselves): | ||
| + | |||
| + | * **Writer = a CONTAINER app.** Containers get the writable 9P overlay, so the writer mounts the shared content-tree volume at ''/ | ||
| + | * **Readers = VMs.** They mount the SAME volume over 9P (tag '' | ||
| + | * **Data source = a patch envelope.** '' | ||
| + | |||
| + | Wiring: | ||
| + | |||
| + | - Shared **content-tree + block-storage** volume (as above), attached to the writer container AND the reader VMs. | ||
| + | - The writer needs a **LOCAL network instance** — '' | ||
| + | - Create a **patch envelope** ('' | ||
| + | - Optionally expose a web UI from the writer with a **portmap ACL** ('' | ||
| + | |||
| + | Notes proven on-device: '' | ||
| + | **'' | ||
| + | and a full '' | ||
| + | appears under ''/ | ||
| + | start empty. | ||
| + | |||
| + | ===== Deployment gotchas (learned on-device) ===== | ||
| + | |||
| + | * **Container image tag is immutable AND the app holds it.** To bump an image tag you must recreate the image AND every app/ | ||
| + | * **" | ||
| + | * **Patch envelope artifact changes = recreate, not update.** Editing the artifact triggers '' | ||
| + | * **Content-tree volume '' | ||
| + | * **Provider-computed drift** (e.g. content-tree '' | ||
| + | * **Build container images with '' | ||
| + | * **9P mount tag is '' | ||
| + | |||
| + | ===== Updating the config (runbook) ===== | ||
| + | |||
| + | Push a new config version **without** redeploying the image, app, VMs, or volumes — | ||
| + | you only recreate the patch envelope. The writer auto-fetches it on its next poll and | ||
| + | drops a new versioned file into ''/ | ||
| + | |||
| + | <code bash> | ||
| + | # 1. Edit the config artifact | ||
| + | $EDITOR Demo-Hummingbird/ | ||
| + | |||
| + | # 2. Bump the version on the envelope in 6-Instances-Deploy-hum.tf | ||
| + | # user_defined_version = " | ||
| + | |||
| + | # 3. Recreate the envelope + its binding (in-place update is rejected -> -replace) | ||
| + | terraform apply \ | ||
| + | -replace=' | ||
| + | -replace=' | ||
| + | |||
| + | # 4. Wait ~30-60s (controller -> device propagation + the writer' | ||
| + | |||
| + | # 5. Verify (on the writer container or any reader VM) | ||
| + | cat / | ||
| + | cat / | ||
| + | # writer log line: [pcw] new config.json (v=3.0) -> / | ||
| + | </ | ||
| + | |||
| + | * **'' | ||
| + | * **Bumping '' | ||
| + | * **You do NOT touch** the container image, the writer app, the VMs, or the volumes. That is the whole point of the patch-envelope design: config changes with nothing redeployed. | ||
| + | |||
| + | ==== First-time deploy (for reference) ==== | ||
| + | |||
| + | <code bash> | ||
| + | # build + push the writer image (clean manifest — no attestation entries) | ||
| + | docker buildx build --platform linux/ | ||
| + | -t zedmanny/ | ||
| + | |||
| + | # bring everything up | ||
| + | terraform apply | ||
| + | |||
| + | # if the image was already created and you changed its tag, the image is immutable AND | ||
| + | # held by the app -> recreate the whole chain in one apply: | ||
| + | terraform apply \ | ||
| + | -replace=' | ||
| + | -replace=' | ||
| + | -replace=' | ||
| + | </ | ||
| ===== Sources ===== | ===== Sources ===== | ||
| - | * ZEDEDA Help Center — " | + | * ZEDEDA Help Center — " |
| - | * EVE source: '' | + | * EVE source: '' |
zededa/sharing-persist-volume-by-two-apps.1784896534.txt.gz · Last modified: by mc
