552 lines
17 KiB
XML
552 lines
17 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<svg
|
||
width="1600"
|
||
height="1020"
|
||
viewBox="0 0 1600 1020"
|
||
version="1.1"
|
||
id="svg1"
|
||
sodipodi:docname="archicratie-web-edition-blue-green-runbook-verbatim.svg"
|
||
inkscape:version="1.3-alpha (95f74fb, 2023-03-31)"
|
||
inkscape:export-filename="out/archicratie-web-edition-blue-green-runbook-verbatim.png"
|
||
inkscape:export-xdpi="96"
|
||
inkscape:export-ydpi="96"
|
||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
xmlns:svg="http://www.w3.org/2000/svg">
|
||
<sodipodi:namedview
|
||
id="namedview1"
|
||
pagecolor="#ffffff"
|
||
bordercolor="#111111"
|
||
borderopacity="1"
|
||
inkscape:showpageshadow="0"
|
||
inkscape:pageopacity="0"
|
||
inkscape:pagecheckerboard="1"
|
||
inkscape:deskcolor="#d1d1d1"
|
||
inkscape:document-units="px"
|
||
showgrid="false"
|
||
inkscape:zoom="1.0606602"
|
||
inkscape:cx="675.05126"
|
||
inkscape:cy="300.28467"
|
||
inkscape:window-width="1472"
|
||
inkscape:window-height="1022"
|
||
inkscape:window-x="222"
|
||
inkscape:window-y="74"
|
||
inkscape:window-maximized="0"
|
||
inkscape:current-layer="layer1" />
|
||
<defs
|
||
id="defs1">
|
||
<style
|
||
id="style1"><![CDATA[
|
||
.bg { fill: #fff; }
|
||
.outer { fill: #fff; stroke: #111; stroke-width: 3; rx: 18; }
|
||
.box { fill: #fff; stroke: #111; stroke-width: 2; rx: 14; }
|
||
.ok { fill: #eafff1; stroke: #1a7f37; stroke-width: 2; rx: 14; }
|
||
.warn { fill: #fff0f0; stroke: #b42318; stroke-width: 2; rx: 14; }
|
||
.title { font: 800 40px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #111; }
|
||
.subtitle { font: 500 16px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #333; }
|
||
.h2 { font: 800 24px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #111; }
|
||
.h3 { font: 800 20px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #111; }
|
||
.txt { font: 500 16px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #111; }
|
||
.small { font: 500 12px system-ui, -apple-system, Segoe UI, Roboto, Arial; fill: #333; }
|
||
.mono { font: 500 12px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #111; }
|
||
.arrow { stroke: #111; stroke-width: 2; fill: none; marker-end: url(#arrow); }
|
||
.arrowThin { stroke: #111; stroke-width: 1.5; fill: none; marker-end: url(#arrow); }
|
||
.cap { stroke-linecap: round; stroke-linejoin: round; }
|
||
]]></style>
|
||
<marker
|
||
id="arrow"
|
||
viewBox="0 0 10 10"
|
||
refX="9"
|
||
refY="5"
|
||
markerWidth="8"
|
||
markerHeight="8"
|
||
orient="auto-start-reverse">
|
||
<path
|
||
d="M 0 0 L 10 5 L 0 10 z"
|
||
fill="#111"
|
||
id="path1" />
|
||
</marker>
|
||
</defs>
|
||
<g
|
||
inkscape:label="Calque 1"
|
||
inkscape:groupmode="layer"
|
||
id="layer1">
|
||
<!-- Title -->
|
||
<text
|
||
x="40"
|
||
y="55"
|
||
class="title"
|
||
id="text1">Archicratie – Web Edition : Blue/Green Runbook visuel (VERBATIM)</text>
|
||
<text
|
||
x="40"
|
||
y="88"
|
||
class="subtitle"
|
||
id="text2">Cible : déployer une nouvelle version sur le slot inactif (8081/8082), basculer via Traefik (dynamic/20-archicratie-backend.yml), vérifier (smoke tests), rollback en 30s si besoin.</text>
|
||
<!-- Outer frame -->
|
||
<rect
|
||
x="30"
|
||
y="110"
|
||
width="1540"
|
||
height="870"
|
||
class="outer"
|
||
id="rect2" />
|
||
<!-- Invariants box -->
|
||
<rect
|
||
x="60"
|
||
y="140"
|
||
width="1480"
|
||
height="130"
|
||
class="box"
|
||
id="rect3" />
|
||
<text
|
||
x="90"
|
||
y="175"
|
||
class="h2"
|
||
id="text3">Invariants (ce qui évite de casser la prod)</text>
|
||
<text
|
||
x="90"
|
||
y="198"
|
||
class="txt"
|
||
id="text4">• Les 2 slots existent en parallèle : archicratie-web-blue = 127.0.0.1:8081 et archicratie-web-green = 127.0.0.1:8082.</text>
|
||
<text
|
||
x="90"
|
||
y="220"
|
||
class="txt"
|
||
id="text5">• Traefik edge écoute :18080 et choisit le slot LIVE via /volume2/docker/edge/config/dynamic/20-archicratie-backend.yml.</text>
|
||
<text
|
||
x="90"
|
||
y="242"
|
||
class="txt"
|
||
id="text7">• Une seule cible active dans Traefik (pas de load-balance non déterministe). Rollback = remettre l’URL précédente dans le même fichier.</text>
|
||
<!-- RIGUEUR ABSOLUE (ajout non destructif) -->
|
||
<rect
|
||
x="64"
|
||
y="269"
|
||
width="1480"
|
||
height="30"
|
||
rx="12"
|
||
class="warn"
|
||
id="rect-rigueur" />
|
||
<text
|
||
x="84"
|
||
y="289"
|
||
class="txt"
|
||
id="text-rigueur"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">• RIGUEUR ABSOLUE : STAGING = slot INACTIF (opposé au LIVE). LIVE = 20-archicratie-backend.yml ; STAGING = 21-archicratie-staging.yml.</text>
|
||
<!-- Step columns -->
|
||
<!-- Column 1 -->
|
||
<rect
|
||
x="60"
|
||
y="300"
|
||
width="470"
|
||
height="610"
|
||
class="box"
|
||
id="rect4" />
|
||
<text
|
||
x="90"
|
||
y="335"
|
||
class="h2"
|
||
id="text8">Étape 1 — Build & déployer</text>
|
||
<text
|
||
x="90"
|
||
y="365"
|
||
class="h3"
|
||
id="text9">But</text>
|
||
<text
|
||
x="90"
|
||
y="387"
|
||
class="txt"
|
||
id="text10">Mettre la nouvelle version sur le slot inactif</text>
|
||
<text
|
||
x="90"
|
||
y="409"
|
||
class="txt"
|
||
id="text11">(sans toucher au slot LIVE actuel).</text>
|
||
<!-- Où box -->
|
||
<rect
|
||
x="90"
|
||
y="435"
|
||
width="410"
|
||
height="210"
|
||
class="box"
|
||
id="rect5" />
|
||
<text
|
||
x="110"
|
||
y="465"
|
||
class="h3"
|
||
id="text12">Où</text>
|
||
<text
|
||
x="110"
|
||
y="490"
|
||
class="mono"
|
||
id="text13">/volume2/docker/archicratie-web/current/</text>
|
||
<text
|
||
x="110"
|
||
y="515"
|
||
class="txt"
|
||
id="text14">Compose : docker-compose.yml</text>
|
||
<text
|
||
x="110"
|
||
y="545"
|
||
class="txt"
|
||
id="text15">Slots :</text>
|
||
<text
|
||
x="140"
|
||
y="568"
|
||
class="mono"
|
||
id="text16">web_blue → 127.0.0.1:8081</text>
|
||
<text
|
||
x="140"
|
||
y="590"
|
||
class="mono"
|
||
id="text17">web_green → 127.0.0.1:8082</text>
|
||
<text
|
||
x="110"
|
||
y="622"
|
||
class="small"
|
||
id="text18">Le build injecte aussi PUBLIC_GITEA_* via build args</text>
|
||
<text
|
||
x="110"
|
||
y="640"
|
||
class="small"
|
||
id="text19">(déjà dans ton compose).</text>
|
||
<!-- Commands box -->
|
||
<rect
|
||
x="90"
|
||
y="665"
|
||
width="410"
|
||
height="225"
|
||
class="box"
|
||
id="rect6" />
|
||
<text
|
||
x="110"
|
||
y="695"
|
||
class="h3"
|
||
id="text20">Commandes (safe)</text>
|
||
<text
|
||
x="110"
|
||
y="720"
|
||
class="txt"
|
||
id="text21">1) Choisir le slot cible (inactif)</text>
|
||
<text
|
||
x="100"
|
||
y="742"
|
||
class="small"
|
||
id="text22"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">Astuce : le LIVE = ce que pointe Traefik dans 20-archicratie-backend.yml</text>
|
||
<text
|
||
x="110"
|
||
y="770"
|
||
class="txt"
|
||
id="text23">2) Build + redémarrer uniquement ce slot</text>
|
||
<text
|
||
x="130"
|
||
y="794"
|
||
class="mono"
|
||
id="text24">cd /volume2/docker/archicratie-web/current</text>
|
||
<text
|
||
x="130"
|
||
y="814"
|
||
class="mono"
|
||
id="text25">sudo docker compose build web_green</text>
|
||
<text
|
||
x="130"
|
||
y="834"
|
||
class="mono"
|
||
id="text26">sudo docker compose up -d --no-deps web_green</text>
|
||
<text
|
||
x="110"
|
||
y="862"
|
||
class="small"
|
||
id="text27">Remplace web_green par web_blue selon la cible.</text>
|
||
<text
|
||
x="110"
|
||
y="880"
|
||
class="small"
|
||
id="text28">Ne pas toucher l’autre service.</text>
|
||
<!-- Arrow to column 2 -->
|
||
<path
|
||
d="M 530 605 L 560 605"
|
||
class="arrow cap"
|
||
id="path6" />
|
||
<!-- Column 2 -->
|
||
<rect
|
||
x="560"
|
||
y="300"
|
||
width="470"
|
||
height="610"
|
||
class="box"
|
||
id="rect7" />
|
||
<text
|
||
x="590"
|
||
y="335"
|
||
class="h2"
|
||
id="text29">Étape 2 — Switch Traefik (LIVE)</text>
|
||
<text
|
||
x="590"
|
||
y="365"
|
||
class="h3"
|
||
id="text30">But</text>
|
||
<text
|
||
x="590"
|
||
y="387"
|
||
class="txt"
|
||
id="text31">Basculer le LIVE en modifiant 1 fichier</text>
|
||
<text
|
||
x="590"
|
||
y="409"
|
||
class="txt"
|
||
id="text32">et laisser Traefik recharger automatiquement.</text>
|
||
<!-- Canon file box -->
|
||
<rect
|
||
x="565.48694"
|
||
y="433.11438"
|
||
width="458.08331"
|
||
height="176.31372"
|
||
class="box"
|
||
id="rect8"
|
||
ry="0" />
|
||
<text
|
||
x="610"
|
||
y="465"
|
||
class="h3"
|
||
id="text33">Fichier canonique (LIVE switch)</text>
|
||
<text
|
||
x="572"
|
||
y="490"
|
||
class="mono"
|
||
id="text34"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace">/volume2/docker/edge/config/dynamic/20-archicratie-backend.yml</text>
|
||
<text
|
||
x="610"
|
||
y="520"
|
||
class="txt"
|
||
id="text35">Contient :</text>
|
||
<text
|
||
x="588"
|
||
y="545"
|
||
class="mono"
|
||
id="text36"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace">http.services.archicratie_web.loadBalancer.servers[0].url</text>
|
||
<text
|
||
x="610"
|
||
y="575"
|
||
class="txt"
|
||
id="text37">Ex : http://127.0.0.1:8082 (green)</text>
|
||
<text
|
||
x="610"
|
||
y="597"
|
||
class="txt"
|
||
id="text38">ou http://127.0.0.1:8081 (blue)</text>
|
||
<!-- Procedure warn box -->
|
||
<rect
|
||
x="567.37256"
|
||
y="621.88562"
|
||
width="454.31201"
|
||
height="279.4281"
|
||
class="warn"
|
||
id="rect9" />
|
||
<text
|
||
x="610"
|
||
y="644"
|
||
class="h3"
|
||
id="text39"
|
||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:20px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">Procédure (anti-casse)</text>
|
||
<text
|
||
x="576"
|
||
y="668"
|
||
class="txt"
|
||
id="text40"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">1) Backup horodaté du fichier</text>
|
||
<text
|
||
x="591"
|
||
y="690"
|
||
class="mono"
|
||
id="text41"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace">cd /volume2/docker/edge/config/dynamic</text>
|
||
<text
|
||
x="577"
|
||
y="712"
|
||
class="mono"
|
||
id="text42"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace"><tspan
|
||
sodipodi:role="line"
|
||
id="tspan2"
|
||
x="577"
|
||
y="712">sudo cp 20-archicratie-backend.yml</tspan><tspan
|
||
sodipodi:role="line"
|
||
id="tspan3"
|
||
x="577"
|
||
y="727">20-archicratie-backend.yml.bak.$(date +%F-%H%M%S)</tspan></text>
|
||
<text
|
||
x="576"
|
||
y="752"
|
||
class="txt"
|
||
id="text43"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">2) Éditer l’URL (un seul backend)</text>
|
||
<text
|
||
x="591"
|
||
y="774"
|
||
class="mono"
|
||
id="text44"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace">sudo vi 20-archicratie-backend.yml</text>
|
||
<text
|
||
x="591"
|
||
y="788"
|
||
class="small"
|
||
id="text47"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">Changer uniquement la valeur url : 8081 ↔ 8082</text>
|
||
<text
|
||
x="571"
|
||
y="810"
|
||
class="txt"
|
||
id="text45bis"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial"><tspan
|
||
sodipodi:role="line"
|
||
id="tspan4"
|
||
x="571"
|
||
y="810">2bis) Mettre à jour 21-archicratie-staging.yml sur l’autre port</tspan><tspan
|
||
sodipodi:role="line"
|
||
id="tspan5"
|
||
x="571"
|
||
y="830">(opposé au LIVE)</tspan></text>
|
||
<text
|
||
x="571"
|
||
y="856"
|
||
class="txt"
|
||
id="text45"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">3) Traefik recharge (watch=true)</text>
|
||
<text
|
||
x="591"
|
||
y="878"
|
||
class="small"
|
||
id="text46"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:normal;font-family:sans-serif"><tspan
|
||
sodipodi:role="line"
|
||
id="tspan71"
|
||
x="591"
|
||
y="878">Pas de restart requis si provider file watch=true</tspan><tspan
|
||
sodipodi:role="line"
|
||
id="tspan72"
|
||
x="591"
|
||
y="893">(ton traefik.yml).</tspan></text>
|
||
<!-- Arrow to column 3 -->
|
||
<path
|
||
d="M 1030 605 L 1060 605"
|
||
class="arrow cap"
|
||
id="path7" />
|
||
<!-- Column 3 -->
|
||
<rect
|
||
x="1060"
|
||
y="300"
|
||
width="480"
|
||
height="610"
|
||
class="box"
|
||
id="rect10" />
|
||
<text
|
||
x="1090"
|
||
y="335"
|
||
class="h2"
|
||
id="text48">Étape 3 — Smoke tests</text>
|
||
<text
|
||
x="1090"
|
||
y="365"
|
||
class="h3"
|
||
id="text49">But</text>
|
||
<text
|
||
x="1090"
|
||
y="387"
|
||
class="txt"
|
||
id="text50">Prouver que le nouveau LIVE répond,</text>
|
||
<text
|
||
x="1090"
|
||
y="409"
|
||
class="txt"
|
||
id="text51">et que l’auth (Authelia/whoami) est OK.</text>
|
||
<!-- Slot direct ok box -->
|
||
<rect
|
||
x="1090"
|
||
y="435"
|
||
width="420"
|
||
height="185"
|
||
class="ok"
|
||
id="rect11" />
|
||
<text
|
||
x="1110"
|
||
y="465"
|
||
class="h3"
|
||
id="text52">Tests “slot direct” (preuve build)</text>
|
||
<text
|
||
x="1110"
|
||
y="490"
|
||
class="txt"
|
||
id="text53">Le slot construit doit répondre en 200 :</text>
|
||
<text
|
||
x="1130"
|
||
y="515"
|
||
class="mono"
|
||
id="text54">curl -sS -I http://127.0.0.1:8081/ | head -n 12</text>
|
||
<text
|
||
x="1130"
|
||
y="540"
|
||
class="mono"
|
||
id="text55">curl -sS -I http://127.0.0.1:8082/ | head -n 12</text>
|
||
<text
|
||
x="1110"
|
||
y="570"
|
||
class="small"
|
||
id="text56">L’un des deux peut rester l’ancien LIVE.</text>
|
||
<text
|
||
x="1110"
|
||
y="590"
|
||
class="small"
|
||
id="text57">L’objectif est que le slot cible soit OK.</text>
|
||
<!-- Edge tests box -->
|
||
<rect
|
||
x="1090"
|
||
y="638.4342"
|
||
width="420"
|
||
height="251.56581"
|
||
class="box"
|
||
id="rect54" />
|
||
<text
|
||
x="1110"
|
||
y="675"
|
||
class="h3"
|
||
id="text57b"
|
||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:20px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">Tests “edge” (preuve routage + auth)</text>
|
||
<text
|
||
x="1110"
|
||
y="700"
|
||
class="txt"
|
||
id="text57c"
|
||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:16px;line-height:normal;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">Host rules : tester AVEC Host header :</text>
|
||
<text
|
||
x="1130"
|
||
y="724"
|
||
class="mono"
|
||
id="text57d"
|
||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace"><tspan
|
||
sodipodi:role="line"
|
||
id="tspan57d1"
|
||
x="1130"
|
||
y="724">curl -sS -I -H 'Host:</tspan><tspan
|
||
sodipodi:role="line"
|
||
id="tspan57d2"
|
||
x="1130"
|
||
y="739">archicratie.trans-hands.synology.me'</tspan><tspan
|
||
sodipodi:role="line"
|
||
x="1130"
|
||
y="754"
|
||
id="tspan57d3">http://127.0.0.1:18080/ | head -n 20</tspan></text>
|
||
<text
|
||
x="1130"
|
||
y="780"
|
||
class="mono"
|
||
id="text58"
|
||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:ui-monospace, SFMono-Regular, Menlo, monospace"><tspan
|
||
id="tspan1" /></text>
|
||
</g>
|
||
</svg>
|