Files
HealthAppRepository/AsBuiltArchitecture/diagrams/06-deployment.drawio
T

166 lines
18 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" version="24.7.17" compressed="false">
<diagram id="p1" name="Colocated Linux: separate native processes">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1250" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c1" value="Colocated Linux: separate native processes" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1640" height="45" />
</mxCell>
<mxCell id="c2" value="Client machine&#10;HTTPS trust in public CA&#10;Token-bearing requests → Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="110" width="350" height="170" />
</mxCell>
<mxCell id="c3" value="One Linux host: Debian/Ubuntu family + apt + systemd&#10;.NET 10 ASP.NET Core runtime; local PostgreSQL for selected persistent services&#10;Same service DLLs as distributed deployment; all ports configurable" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="460" y="110" width="1190" height="160" />
</mxCell>
<mxCell id="c4" value="healthapp-api-gateway.service&#10;Dedicated healthapp-api-gateway identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5443&#10;/opt/healthapp/api-gateway&#10;/etc/healthapp/api-gateway/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c5" value="healthapp-patient-profile.service&#10;Dedicated healthapp-patient-profile identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5081&#10;/opt/healthapp/patient-profile&#10;/etc/healthapp/patient-profile/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="375" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c6" value="healthapp-observation.service&#10;Dedicated healthapp-observation identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5082&#10;/opt/healthapp/observation&#10;/etc/healthapp/observation/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="710" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c7" value="healthapp-insights.service&#10;Dedicated healthapp-insights identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5083&#10;/opt/healthapp/insights&#10;/etc/healthapp/insights/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1045" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c8" value="healthapp-health-overview.service&#10;Dedicated healthapp-health-overview identity&#10;Independent dotnet process&#10;HTTPS 0.0.0.0:5084&#10;/opt/healthapp/health-overview&#10;/etc/healthapp/health-overview/service.env" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1380" y="410" width="300" height="240" />
</mxCell>
<mxCell id="c9" value="HTTPS :5443" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c2" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c10" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c5">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c11" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c6">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c12" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c7">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c13" value="HTTPS + incoming key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c4" target="c8">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c14" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c6" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c15" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c7" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c16" value="HTTPS + callback key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c8" target="c4">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c17" value="Local PostgreSQL server&#10;Separate profile DB and observation DB&#10;Separate roles; no cross-database rights" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="390" y="830" width="610" height="180" />
</mxCell>
<mxCell id="c18" value="Profile DB" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c5" target="c17">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c19" value="Observation DB" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c6" target="c17">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c20" value="Private administrative plan + public CA trust&#10;Gateway key ring: /var/lib/healthapp-api-gateway/keys&#10;Per-service PFX; env supplied by systemd" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1090" y="820" width="540" height="180" />
</mxCell>
<mxCell id="c21" value="Topology is supported configuration, not a fresh inspection of a live host. Peer units are not PartOf/Requires/BindsTo one another. Default port numbers come from Deployment.cs, not hard-coded application routing. Stopping a process does not directly stop peers; dependent API workflows can fail." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1100" width="1620" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="p2" name="Distributed Linux: supported topology">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1350" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c22" value="Distributed Linux: supported topology" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1740" height="45" />
</mxCell>
<mxCell id="c23" value="Machine A&#10;Gateway process / systemd&#10;HTTPS :5443&#10;Local account/assignment configuration&#10;Own key ring + certificate&#10;No clinical DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="700" y="110" width="380" height="210" />
</mxCell>
<mxCell id="c24" value="Machine B&#10;Patient/Profile process / systemd&#10;HTTPS :5081&#10;Own profile DB + role&#10;Local PostgreSQL or configured remote DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c25" value="Machine C&#10;Observation process / systemd&#10;HTTPS :5082&#10;Own observation DB + role&#10;Local PostgreSQL or configured remote DB" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="470" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c26" value="Machine D&#10;Insights process / systemd&#10;HTTPS :5083&#10;No DB&#10;History client origin = Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="910" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c27" value="Machine E&#10;Overview process / systemd&#10;HTTPS :5084&#10;No DB&#10;All three client origins = Gateway" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1350" y="550" width="380" height="220" />
</mxCell>
<mxCell id="c28" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c24">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c29" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c25">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c30" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c26">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c31" value="HTTPS + X-Gateway-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c23" target="c27">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c32" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c25" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c33" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c26" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c34" value="HTTPS + X-Service-Key" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c27" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c35" value="Administrative preparation / distribution&#10;One topology plan → scoped files per host&#10;SSH/SCP and noninteractive native install&#10;OS CA trust + dedicated service identities&#10;Final HTTPS topology verification" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#f5f5f5;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="490" y="970" width="760" height="230" />
</mxCell>
<mxCell id="c36" value="SSH/SCP administration (not app traffic)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=open;dashed=1;" edge="1" parent="1" source="c35" target="c23">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c37" value="Each process uses its own local config/private certificate. No shared runtime directory or common process memory across machines. All origin hosts/ports configurable. Real multi-machine deployment remains an evidence limit; tests use separate loopback origins and transport doubles." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="1240" width="1720" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="p3" name="Native platform adapters: same application DLLs">
<mxGraphModel dx="1700" dy="1500" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1200" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="c38" value="Native platform adapters: same application DLLs" style="text;html=0;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="15" width="1640" height="45" />
</mxCell>
<mxCell id="c39" value="Build machine&#10;.NET 10 SDK + package feeds&#10;Publish separate framework-dependent DLLs&#10;No OS-specific apphost; no containers&#10;Bundle includes provisioner + installers" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#dae8fc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="570" y="110" width="560" height="200" />
</mxCell>
<mxCell id="c40" value="Linux target&#10;Debian/Ubuntu ancestry, apt, systemd&#10;Install aspnetcore-runtime-10.0 if absent&#10;PostgreSQL when persistent service selected&#10;Per-service Unix users/env/PFX&#10;Native unit + restart-on-failure" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c41" value="Windows target&#10;Windows Services / virtual service identities&#10;.NET runtime download if absent&#10;EDB PostgreSQL 17 manifest/checksum&#10;%ProgramData%/HealthApp paths&#10;JSON/PFX ACLs + selected firewall rules&#10;UseWindowsService lifetime" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="600" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c42" value="macOS target&#10;launchd / hidden service identities&#10;.NET runtime download if absent&#10;Homebrew PostgreSQL 17 / owned cluster&#10;Apple tools/Homebrew if needed&#10;/Library/Application Support/HealthApp&#10;System CA trust; private env/plist" style="rounded=0;whiteSpace=wrap;html=0;fillColor=#d5e8d4;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1170" y="540" width="490" height="270" />
</mxCell>
<mxCell id="c43" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c40">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c44" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c41">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c45" value="Same DLLs; native adapter" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;fontSize=12;labelBackgroundColor=#ffffff;endArrow=classic;" edge="1" parent="1" source="c39" target="c42">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="c46" value="Verified code paths/config-format tests ≠ proven native execution on every target. Manual GitHub Actions workflow exists; run outcomes unknown. Linux --root performs offline staging only. Native adapters need administrator/network access; distribution does not provision host SSH permissions. Evidence: deploy/build-release.*, installer/*, ConfigurationWriter, LaunchdWriter." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#fff2cc;strokeColor=#666666;fontSize=14;align=left;verticalAlign=top;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="30" y="970" width="1630" height="100" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>