428 lines
11 KiB
XML
428 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<svg
|
|
width="1600"
|
|
height="900"
|
|
viewBox="0 0 1600 900"
|
|
version="1.1"
|
|
id="svg49"
|
|
sodipodi:docname="archicratie-web-edition-blue-green-runbook-verbatim-v2.svg"
|
|
inkscape:version="1.3-alpha (95f74fb, 2023-03-31)"
|
|
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="namedview49"
|
|
pagecolor="#ffffff"
|
|
bordercolor="#000000"
|
|
borderopacity="0.25"
|
|
inkscape:showpageshadow="2"
|
|
inkscape:pageopacity="0.0"
|
|
inkscape:pagecheckerboard="0"
|
|
inkscape:deskcolor="#d1d1d1"
|
|
inkscape:zoom="0.82625"
|
|
inkscape:cx="726.17247"
|
|
inkscape:cy="401.21029"
|
|
inkscape:window-width="1472"
|
|
inkscape:window-height="1022"
|
|
inkscape:window-x="234"
|
|
inkscape:window-y="30"
|
|
inkscape:window-maximized="0"
|
|
inkscape:current-layer="svg49" />
|
|
<defs
|
|
id="defs4">
|
|
<!-- Fond clair lisible partout -->
|
|
<linearGradient
|
|
id="bg"
|
|
x1="0"
|
|
y1="0"
|
|
x2="1"
|
|
y2="1">
|
|
<stop
|
|
offset="0"
|
|
stop-color="#ffffff"
|
|
id="stop1" />
|
|
<stop
|
|
offset="1"
|
|
stop-color="#f1f5f9"
|
|
id="stop2" />
|
|
</linearGradient>
|
|
<!-- Flèches -->
|
|
<marker
|
|
id="arrow"
|
|
markerWidth="10"
|
|
markerHeight="10"
|
|
refX="9"
|
|
refY="3"
|
|
orient="auto">
|
|
<path
|
|
d="M0,0 L9,3 L0,6 Z"
|
|
fill="#334155"
|
|
id="path2" />
|
|
</marker>
|
|
<marker
|
|
id="arrowA"
|
|
markerWidth="10"
|
|
markerHeight="10"
|
|
refX="9"
|
|
refY="3"
|
|
orient="auto">
|
|
<path
|
|
d="M0,0 L9,3 L0,6 Z"
|
|
fill="#2563eb"
|
|
id="path3" />
|
|
</marker>
|
|
<marker
|
|
id="arrowG"
|
|
markerWidth="10"
|
|
markerHeight="10"
|
|
refX="9"
|
|
refY="3"
|
|
orient="auto">
|
|
<path
|
|
d="M0,0 L9,3 L0,6 Z"
|
|
fill="#059669"
|
|
id="path4" />
|
|
</marker>
|
|
<!-- Styles SANS variables CSS (compat max) -->
|
|
<style
|
|
id="style4"><![CDATA[
|
|
.title{font:800 28px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial;fill:#0f172a}
|
|
.subtitle{font:500 14px/1.3 system-ui,-apple-system,Segoe UI,Roboto,Arial;fill:#475569}
|
|
.h{font:800 16px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial;fill:#0f172a}
|
|
.t{font:500 13px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial;fill:#111827}
|
|
.s{font:500 12px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial;fill:#475569}
|
|
.mono{font:600 12px/1.35 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;fill:#0f172a}
|
|
|
|
/* Cadres lisibles */
|
|
.box{fill:#ffffff;stroke:#0ea5e9;stroke-width:1.4}
|
|
.box2{fill:#f8fafc;stroke:#94a3b8;stroke-width:1.2}
|
|
|
|
/* Pills */
|
|
.chip{fill:#dbeafe;stroke:#2563eb;stroke-width:1}
|
|
.chip2{fill:#d1fae5;stroke:#059669;stroke-width:1}
|
|
.chipW{fill:#fef3c7;stroke:#d97706;stroke-width:1}
|
|
.chipD{fill:#fee2e2;stroke:#dc2626;stroke-width:1}
|
|
|
|
/* Traits / flèches */
|
|
.line{stroke:#334155;stroke-width:1.4;fill:none}
|
|
.dash{stroke-dasharray:6 6}
|
|
.arrow{stroke:#334155;stroke-width:1.8;fill:none;marker-end:url(#arrow)}
|
|
.arrowA{stroke:#2563eb;stroke-width:2.0;fill:none;marker-end:url(#arrowA)}
|
|
.arrowG{stroke:#059669;stroke-width:2.0;fill:none;marker-end:url(#arrowG)}
|
|
]]></style>
|
|
</defs>
|
|
<rect
|
|
x="0"
|
|
y="0"
|
|
width="1600"
|
|
height="900"
|
|
fill="url(#bg)"
|
|
id="rect4" />
|
|
<text
|
|
x="40"
|
|
y="56"
|
|
class="title"
|
|
id="text4">Archicratie — Runbook Blue/Green (v2, verbatim)</text>
|
|
<text
|
|
x="40"
|
|
y="84"
|
|
class="subtitle"
|
|
id="text5">Mise à jour 2026-02-20 — release-pack → releases/<ts>/app → current → docker compose web_blue/web_green</text>
|
|
<rect
|
|
x="40"
|
|
y="130"
|
|
width="500"
|
|
height="240"
|
|
class="box"
|
|
id="rect5" />
|
|
<text
|
|
x="58"
|
|
y="160"
|
|
class="h"
|
|
id="text6">0) Pré-requis</text>
|
|
<text
|
|
x="58"
|
|
y="184"
|
|
class="t"
|
|
id="text7">main protégé → travail via branches + PR</text>
|
|
<text
|
|
x="58"
|
|
y="202"
|
|
class="t"
|
|
id="text8">CI doit rester source de vérité</text>
|
|
<text
|
|
x="58"
|
|
y="220"
|
|
class="t"
|
|
id="text9">Éviter d'éditer une release en prod (hotfix = exception)</text>
|
|
<text
|
|
x="58"
|
|
y="238"
|
|
class="s"
|
|
id="text10">Si hotfix: on le re-synchronise ensuite dans Git (cf. étape 5)</text>
|
|
<rect
|
|
x="40"
|
|
y="400"
|
|
width="500"
|
|
height="260"
|
|
class="box2"
|
|
id="rect10" />
|
|
<text
|
|
x="58"
|
|
y="430"
|
|
class="h"
|
|
id="text11">1) Préparer une release (atelier DEV)</text>
|
|
<text
|
|
x="58"
|
|
y="454"
|
|
class="mono"
|
|
id="text12">npm ci && npm run build</text>
|
|
<text
|
|
x="58"
|
|
y="472"
|
|
class="mono"
|
|
id="text13">release-pack.sh → tarball/artefact</text>
|
|
<text
|
|
x="58"
|
|
y="490"
|
|
class="mono"
|
|
id="text14">inclut dist/ + pagefind + indexes + build stamp</text>
|
|
<text
|
|
x="58"
|
|
y="508"
|
|
class="t"
|
|
id="text15">ouvrir PR → merge → CI</text>
|
|
<rect
|
|
x="40"
|
|
y="690"
|
|
width="500"
|
|
height="170"
|
|
class="box"
|
|
id="rect15" />
|
|
<text
|
|
x="58"
|
|
y="720"
|
|
class="h"
|
|
id="text16">2) Déposer sur NAS</text>
|
|
<text
|
|
x="58"
|
|
y="744"
|
|
class="mono"
|
|
id="text17">/volume2/docker/archicratie-web/releases/<ts>/app</text>
|
|
<text
|
|
x="58"
|
|
y="762"
|
|
class="mono"
|
|
id="text18">current → pointe vers la release active</text>
|
|
<text
|
|
x="58"
|
|
y="780"
|
|
class="t"
|
|
id="text19">build context docker = current OU release/app (selon compose)</text>
|
|
<rect
|
|
x="600"
|
|
y="130"
|
|
width="520"
|
|
height="210"
|
|
class="box"
|
|
id="rect19" />
|
|
<text
|
|
x="618"
|
|
y="160"
|
|
class="h"
|
|
id="text20">3) Build images</text>
|
|
<text
|
|
x="618"
|
|
y="184"
|
|
class="mono"
|
|
id="text21">sudo env DOCKER_API_VERSION=1.43 \</text>
|
|
<text
|
|
x="618"
|
|
y="202"
|
|
class="mono"
|
|
id="text22">docker compose -f docker-compose.yml build --no-cache \</text>
|
|
<text
|
|
x="618"
|
|
y="220"
|
|
class="mono"
|
|
id="text23"> web_blue web_green</text>
|
|
<text
|
|
x="618"
|
|
y="238"
|
|
class="s"
|
|
id="text24">les 2 images doivent builder OK</text>
|
|
<rect
|
|
x="639.93951"
|
|
y="378.7897"
|
|
width="480.06052"
|
|
height="241.21028"
|
|
class="box2"
|
|
id="rect24" />
|
|
<text
|
|
x="658"
|
|
y="410"
|
|
class="h"
|
|
id="text25"
|
|
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:16px;line-height:1.2;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">4) Switch trafic (blue ↔ green)</text>
|
|
<text
|
|
x="658"
|
|
y="434"
|
|
class="t"
|
|
id="text26"
|
|
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:13px;line-height:1.35;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">déterminer couleur active (proxy / conf)</text>
|
|
<text
|
|
x="658"
|
|
y="452"
|
|
class="t"
|
|
id="text27"
|
|
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:13px;line-height:1.35;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">mettre à jour routing vers l'autre couleur</text>
|
|
<text
|
|
x="658"
|
|
y="470"
|
|
class="t"
|
|
id="text28"
|
|
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:13px;line-height:1.35;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">reload proxy, vérifier 200/302</text>
|
|
<text
|
|
x="658"
|
|
y="488"
|
|
class="mono"
|
|
id="text29"
|
|
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:12px;line-height:1.35;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace">curl -sSI -H 'Host: staging.*' http://127.0.0.1:18080/</text>
|
|
<text
|
|
x="658"
|
|
y="506"
|
|
class="s"
|
|
id="text30"
|
|
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:12px;line-height:1.35;font-family:system-ui, '-apple-system', 'Segoe UI', Roboto, Arial">rollback = revenir à l'ancienne couleur</text>
|
|
<rect
|
|
x="600"
|
|
y="660"
|
|
width="520"
|
|
height="210"
|
|
class="box"
|
|
id="rect30" />
|
|
<text
|
|
x="618"
|
|
y="690"
|
|
class="h"
|
|
id="text31">5) Hotfix de release → re-synchroniser Git (step8)</text>
|
|
<text
|
|
x="618"
|
|
y="714"
|
|
class="t"
|
|
id="text32">A) NAS: find src -mtime -3 → liste fichiers</text>
|
|
<text
|
|
x="618"
|
|
y="732"
|
|
class="t"
|
|
id="text33">B) NAS: tar -czf /tmp/hotfix.tgz -T liste</text>
|
|
<text
|
|
x="618"
|
|
y="750"
|
|
class="t"
|
|
id="text34">C) sha256 + manifest, puis scp vers Mac</text>
|
|
<text
|
|
x="618"
|
|
y="768"
|
|
class="t"
|
|
id="text35">D) Mac: tar -xzf → rsync --checksum vers repo</text>
|
|
<text
|
|
x="618"
|
|
y="786"
|
|
class="t"
|
|
id="text36">E) commit sur branche dédiée → push → PR vers main</text>
|
|
<rect
|
|
x="1180"
|
|
y="160"
|
|
width="380"
|
|
height="520"
|
|
class="box2"
|
|
id="rect36" />
|
|
<text
|
|
x="1198"
|
|
y="190"
|
|
class="h"
|
|
id="text37">Arborescence NAS (rappel)</text>
|
|
<text
|
|
x="1198"
|
|
y="214"
|
|
class="mono"
|
|
id="text38">/volume2/docker/archicratie-web/</text>
|
|
<text
|
|
x="1198"
|
|
y="232"
|
|
class="mono"
|
|
id="text39"> releases/</text>
|
|
<text
|
|
x="1198"
|
|
y="250"
|
|
class="mono"
|
|
id="text40"> 20260219-103222/</text>
|
|
<text
|
|
x="1198"
|
|
y="268"
|
|
class="mono"
|
|
id="text41"> app/ (ctx build)</text>
|
|
<text
|
|
x="1198"
|
|
y="286"
|
|
class="mono"
|
|
id="text42"> current -> releases/…/app</text>
|
|
<text
|
|
x="1198"
|
|
y="304"
|
|
class="mono"
|
|
id="text43"> compose/ docker-compose.yml</text>
|
|
<text
|
|
x="1198"
|
|
y="322"
|
|
class="s"
|
|
id="text44">compose.expanded.yml t'indique le build.context effectif</text>
|
|
<path
|
|
d="M 540,520 H 642.36006"
|
|
class="arrowA"
|
|
id="path44"
|
|
sodipodi:nodetypes="cc" />
|
|
<text
|
|
x="545"
|
|
y="500"
|
|
class="s"
|
|
id="text45">→ NAS + build</text>
|
|
<path
|
|
d="M860 340 C860 360 860 360 860 380"
|
|
class="arrowA"
|
|
id="path45" />
|
|
<text
|
|
x="875"
|
|
y="365"
|
|
class="s"
|
|
id="text46">images OK</text>
|
|
<path
|
|
d="M860 620 C860 640 860 640 860 660"
|
|
class="arrowG"
|
|
id="path46" />
|
|
<text
|
|
x="875"
|
|
y="645"
|
|
class="s"
|
|
id="text47">si hotfix</text>
|
|
<rect
|
|
x="40"
|
|
y="20"
|
|
width="1520"
|
|
height="80"
|
|
class="box2"
|
|
id="rect47" />
|
|
<text
|
|
x="58"
|
|
y="50"
|
|
class="h"
|
|
id="text48">Règle d'or</text>
|
|
<text
|
|
x="58"
|
|
y="74"
|
|
class="t"
|
|
id="text49">La release doit être reproductible depuis Git. Toute modif manuelle en prod doit finir: (a) re-sync dans une branche, (b) PR, (c) merge, (d) prochaine release propre.</text>
|
|
</svg>
|