39 lines
5.5 KiB
XML
39 lines
5.5 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="830" viewBox="0 0 1200 830" role="img" aria-labelledby="title desc">
|
|
<title id="title">IoT fleet agent stop, switch, start upgrade sequence</title>
|
|
<desc id="desc">The operator CAS-writes the current NATS attempt. The active agent forwards one upgrade request and keeps reconciling while the updater downloads, verifies, installs, and probes. The updater stops the old service, waits for inactivity, switches the symlink, starts the candidate, and commits after strict readiness. The restarted agent publishes completion.</desc>
|
|
<defs>
|
|
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" 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="7" markerHeight="7" 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:"JetBrains Mono",Consolas,monospace}</style>
|
|
</defs>
|
|
<rect width="1200" height="830" fill="#ffffff"/>
|
|
<g class="sans">
|
|
<text x="40" y="44" fill="#0f172a" font-size="28" font-weight="750">Prepare live, then stop, switch, start</text>
|
|
<text x="40" y="70" fill="#64748b" font-size="15">One authenticated intent controls the complete transaction. Strict readiness commits immediately.</text>
|
|
|
|
<g font-size="14" font-weight="700" text-anchor="middle">
|
|
<rect x="35" y="96" width="180" height="46" rx="10" fill="#0f766e"/><text x="125" y="125" fill="#fff">Fleet operator</text>
|
|
<rect x="275" y="96" width="150" height="46" rx="10" fill="#f0fdfa" stroke="#5eead4"/><text x="350" y="125" fill="#115e59">NATS KV</text>
|
|
<rect x="485" y="96" width="180" height="46" rx="10" fill="#172554"/><text x="575" y="125" fill="#fff">Active agent</text>
|
|
<rect x="725" y="96" width="180" height="46" rx="10" fill="#7c2d12"/><text x="815" y="125" fill="#fff">Root updater</text>
|
|
<rect x="965" y="96" width="200" height="46" rx="10" fill="#fffbeb" stroke="#fbbf24"/><text x="1065" y="125" fill="#78350f">systemd / candidate</text>
|
|
</g>
|
|
<g stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="5 5"><path d="M125 142V805"/><path d="M350 142V805"/><path d="M575 142V805"/><path d="M815 142V805"/><path d="M1065 142V805"/></g>
|
|
|
|
<g font-size="13">
|
|
<text x="45" y="178" fill="#64748b" font-weight="700">1</text><path d="M125 185H350" stroke="#0f766e" stroke-width="2.2" marker-end="url(#arrow)"/><text x="237" y="178" text-anchor="middle" fill="#115e59">CAS current attempt</text>
|
|
<text x="45" y="228" fill="#64748b" font-weight="700">2</text><path d="M350 235H575" stroke="#0f766e" stroke-width="2.2" marker-end="url(#arrow)"/><text x="462" y="228" text-anchor="middle" fill="#115e59">authenticated intent</text>
|
|
<path d="M575 275H815" stroke="#b45309" stroke-width="2.2" marker-end="url(#arrow-warn)"/><text x="695" y="268" text-anchor="middle" fill="#9a3412">one upgrade request</text>
|
|
<rect x="500" y="302" width="150" height="62" rx="8" fill="#eef2ff"/><text x="575" y="326" text-anchor="middle" fill="#312e81" font-weight="700">keep reconciling</text><text x="575" y="347" text-anchor="middle" fill="#64748b">no early drain</text>
|
|
<text x="45" y="395" fill="#64748b" font-weight="700">3</text><rect x="730" y="375" width="170" height="94" rx="8" fill="#fff7ed" stroke="#fdba74"/><text x="815" y="400" text-anchor="middle" fill="#9a3412" font-weight="700">preparing</text><text x="815" y="422" text-anchor="middle" fill="#9a3412">HTTPS + SHA-256</text><text x="815" y="443" text-anchor="middle" fill="#9a3412">install + fsync</text><text x="815" y="462" text-anchor="middle" fill="#9a3412">probe as fleet-agent</text>
|
|
<text x="45" y="505" fill="#64748b" font-weight="700">4</text><path d="M815 512H1065" stroke="#b45309" stroke-width="2.2" marker-end="url(#arrow-warn)"/><text x="940" y="505" text-anchor="middle" fill="#9a3412">activating: systemctl stop</text>
|
|
<path d="M1065 548H575" stroke="#b45309" stroke-width="2.2" marker-end="url(#arrow-warn)"/><text x="820" y="541" text-anchor="middle" fill="#9a3412">SIGTERM</text>
|
|
<rect x="500" y="565" width="150" height="78" rx="8" fill="#eef2ff"/><text x="575" y="588" text-anchor="middle" fill="#312e81" font-weight="700">attempt current drain</text><text x="575" y="608" text-anchor="middle" fill="#64748b">status + flush if done</text><text x="575" y="628" text-anchor="middle" fill="#64748b">60 s systemd bound</text>
|
|
<path d="M1065 660H815" stroke="#0f766e" stroke-width="2.2" marker-end="url(#arrow)"/><text x="940" y="653" text-anchor="middle" fill="#115e59">inactive observed</text>
|
|
<text x="45" y="693" fill="#64748b" font-weight="700">5</text><rect x="980" y="680" width="170" height="76" rx="8" fill="#fffbeb" stroke="#fbbf24"/><text x="1065" y="704" text-anchor="middle" fill="#78350f" font-weight="700">atomic symlink switch</text><text x="1065" y="726" text-anchor="middle" fill="#92400e">start + strict READY=1</text><text x="1065" y="746" text-anchor="middle" fill="#92400e">3 min NATS bound</text>
|
|
<text x="45" y="785" fill="#64748b" font-weight="700">6</text><path d="M1065 792H815" stroke="#0f766e" stroke-width="2.2" marker-end="url(#arrow)"/><text x="940" y="785" text-anchor="middle" fill="#115e59">READY=1: commit locally</text>
|
|
<path d="M575 812H350" stroke="#0f766e" stroke-width="2.2" marker-end="url(#arrow)"/><text x="462" y="805" text-anchor="middle" fill="#115e59">agent reflects complete status</text>
|
|
</g>
|
|
</g>
|
|
</svg>
|