Files
harmony/docs/diagrams/fleet-agent-upgrade-architecture.svg

64 lines
5.4 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="540" viewBox="0 0 1200 540" role="img" aria-labelledby="title desc">
<title id="title">IoT fleet agent upgrade ownership and trust architecture</title>
<desc id="desc">The fleet operator writes one authenticated NATS upgrade intent. The active agent forwards it while continuing Podman reconciliation. A root updater downloads by HTTPS, verifies SHA-256, probes as fleet-agent, and performs the systemd stop, symlink switch, and start transaction.</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0 0 10 5 0 10z" fill="#0f766e"/></marker>
<marker id="arrow-warn" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0 0 10 5 0 10z" fill="#b45309"/></marker>
<style>.sans{font-family:Inter,ui-sans-serif,system-ui,sans-serif}.mono{font-family:&quot;JetBrains Mono&quot;,Consolas,monospace}</style>
</defs>
<rect width="1200" height="540" fill="#ffffff"/>
<g class="sans">
<text x="42" y="50" fill="#0f172a" font-size="29" font-weight="750">One intent, one active workload owner</text>
<text x="42" y="78" fill="#64748b" font-size="16">Authenticated NATS carries upgrade intent. HTTPS and SHA-256 bind the candidate bytes.</text>
<rect x="35" y="110" width="300" height="360" rx="18" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="60" y="142" fill="#475569" font-size="12" font-weight="750" letter-spacing="1.4">CONTROL PLANE</text>
<rect x="65" y="175" width="240" height="90" rx="12" fill="#172554"/>
<text x="88" y="205" fill="#bfdbfe" font-size="12" font-weight="700">DESIRED RELEASE</text>
<text x="88" y="235" fill="#fff" font-size="18" font-weight="700" class="mono">Device.spec</text>
<text x="88" y="256" fill="#bfdbfe" font-size="14">version and artifact metadata</text>
<rect x="65" y="315" width="240" height="110" rx="12" fill="#0f766e"/>
<text x="88" y="345" fill="#ccfbf1" font-size="12" font-weight="700">FLEET OPERATOR</text>
<text x="88" y="376" fill="#fff" font-size="17" font-weight="700">current attempt</text>
<text x="88" y="400" fill="#ccfbf1" font-size="14">CAS and status reflection</text>
<path d="M185 265V315" stroke="#0f766e" stroke-width="2.5" marker-end="url(#arrow)"/>
<rect x="390" y="110" width="250" height="360" rx="18" fill="#f0fdfa" stroke="#5eead4" stroke-width="1.5"/>
<text x="415" y="142" fill="#115e59" font-size="12" font-weight="750" letter-spacing="1.4">AUTHENTICATED MESH</text>
<rect x="425" y="178" width="180" height="245" rx="14" fill="#fff" stroke="#99f6e4"/>
<text x="515" y="216" text-anchor="middle" fill="#0f172a" font-size="21" font-weight="750">NATS KV</text>
<text x="445" y="265" fill="#115e59" font-size="12" class="mono">agent-upgrade-intent</text>
<text x="445" y="309" fill="#115e59" font-size="12" class="mono">agent-upgrade-status</text>
<text x="445" y="365" fill="#64748b" font-size="12">device-scoped data subjects</text>
<text x="445" y="390" fill="#64748b" font-size="12">identity from verified JWT</text>
<path d="M305 370H425" stroke="#0f766e" stroke-width="2.5" marker-end="url(#arrow)"/>
<path d="M425 400H305" stroke="#0f766e" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="695" y="110" width="470" height="360" rx="18" fill="#fff7ed" stroke="#fdba74" stroke-width="1.5"/>
<text x="720" y="142" fill="#9a3412" font-size="12" font-weight="750" letter-spacing="1.4">IOT PODMAN DEVICE</text>
<rect x="730" y="175" width="180" height="110" rx="12" fill="#172554"/>
<text x="750" y="203" fill="#bfdbfe" font-size="12" font-weight="700">UNPRIVILEGED</text>
<text x="750" y="234" fill="#fff" font-size="19" font-weight="750">Fleet agent</text>
<text x="750" y="259" fill="#bfdbfe" font-size="13">forward · reconcile · report</text>
<rect x="960" y="175" width="170" height="110" rx="12" fill="#7c2d12"/>
<text x="980" y="203" fill="#fed7aa" font-size="12" font-weight="700">ROOT</text>
<text x="980" y="234" fill="#fff" font-size="19" font-weight="750">Updater</text>
<text x="980" y="259" fill="#fed7aa" font-size="13">prepare · switch · recover</text>
<path d="M605 230H730" stroke="#0f766e" stroke-width="2.5" marker-end="url(#arrow)"/>
<path d="M910 230H960" stroke="#b45309" stroke-width="2.5" marker-end="url(#arrow-warn)"/>
<text x="935" y="216" text-anchor="middle" fill="#9a3412" font-size="11">upgrade</text>
<rect x="730" y="340" width="180" height="80" rx="12" fill="#eef2ff" stroke="#a5b4fc"/>
<text x="750" y="372" fill="#312e81" font-size="17" font-weight="700">Podman workloads</text>
<text x="750" y="397" fill="#64748b" font-size="13">reconcile until SIGTERM</text>
<rect x="960" y="330" width="170" height="100" rx="12" fill="#fffbeb" stroke="#fbbf24"/>
<text x="980" y="360" fill="#78350f" font-size="17" font-weight="700">systemd + symlink</text>
<text x="980" y="385" fill="#92400e" font-size="13">stop · inactive · switch</text>
<text x="980" y="408" fill="#92400e" font-size="13">start · strict readiness</text>
<path d="M820 285V340" stroke="#64748b" stroke-width="2"/>
<path d="M1045 285V330" stroke="#b45309" stroke-width="2.5" marker-end="url(#arrow-warn)"/>
<text x="42" y="510" fill="#64748b" font-size="14">NationTech administration is one trust domain; device_id comes from a JWKS-verified Zitadel JWT.</text>
</g>
</svg>