tunnel : passerelle R9128 retirée (2026-10-02) — BHS64 seule passerelle OVH ; BHS64b/BHS128/BHS128b retirés du MacLustr
4 changed files +9 −9
modified
README.md
+2 −2
@@ -41,7 +41,7 @@ après une coupure ; `mld harden` rend chaque nœud capable de revenir seul (aut | ||
| 41 | 41 | | `mld prepare <nœud> [--ka-helpers] [--no-tunnel] [--no-harden]` | installe node/pnpm/pm2/python via Homebrew, pm2 startup, marqueur, raccordement wg1 au tunnel, `harden` ; `--ka-helpers` = pousseur Ka + alias `gitsrv` + clé autorisée sur la passerelle | |
| 42 | 42 | | `mld bootstrap <nœud>` | Xcode CLT + Homebrew sur un Mac vierge (sudo NOPASSWD temporaire) | |
| 43 | 43 | | `mld import <nœud>` | brouillons de manifestes depuis les PM2 vivants d'un nœud (`~/dispatch/apps/_drafts/`) | |
| 44 | −| `mld tunnel status [-g R9128]` | pairs WireGuard (handshake, trafic) + routes Caddy de la passerelle | | |
| 44 | +| `mld tunnel status` | pairs WireGuard (handshake, trafic) + routes Caddy de la passerelle | | |
| 45 | 45 | | `mld tunnel peer <nœud>…` | raccorde un Mac au hub (wireguard-tools + LaunchDaemon `io.maclustr.wireguard-wg1`, IP fixe de `/etc/maclustr-tunnel/ipmap`) | |
| 46 | 46 | | `mld tunnel route <app>…` · `mld tunnel rm <app>…` | (re)pointe / retire la route publique d'une app (normalement fait par deploy/retire) | |
| 47 | 47 | | `mld heal [--dry-run] [--apps …] [--nodes …]` | auto-réparation : 1 SSH par nœud (PM2, launchd, wg1, HTTP local) puis resurrect/start/restart/kickstart/route ; `--install` pose le LaunchDaemon (5 min) | |
@@ -51,7 +51,7 @@ après une coupure ; `mld harden` rend chaque nœud capable de revenir seul (aut | ||
| 51 | 51 | |
| 52 | 52 | Un manifeste décrit *comment* tourne une app : `dir` (même chemin absolu sur tous les nœuds), |
| 53 | 53 | `processes` (PM2 : script, args, interpreter, cwd, env, cron_restart…), `tunnel` (`domain`, `gateway` |
| 54 | −BHS64|R9128, `redirects` apex, `websocket` : route publique https://domain → nœud courant:port ; l'ancien bloc `ngrok` | |
| 54 | +BHS64 (seule passerelle depuis le 2026-10-02), `redirects` apex, `websocket` : route publique https://domain → nœud courant:port ; l'ancien bloc `ngrok` | |
| 55 | 55 | est converti automatiquement et les vieux processus `<app>-ngrok` supprimés au start), `launchd` (plists générés), `requires` (runtimes, RAM, ports), |
| 56 | 56 | `placement` (`pin`, `prefer`, `avoid` + raison), `sync_excludes`, `extra_paths`, `env_overrides` |
| 57 | 57 | (réécriture de `.env` au déploiement), `hooks.post_sync` / `post_start`, `ka_repo` (inscription au pousseur). |
modified
assets/wg-node-setup.sh
+4 −4
@@ -1,10 +1,10 @@ | ||
| 1 | 1 | #!/bin/bash |
| 2 | −# wg-node-setup.sh — installe WireGuard (wireguard-go + wg-quick) sur un Mac du cluster et le raccorde au hub R9128. | |
| 2 | +# wg-node-setup.sh — installe WireGuard (wireguard-go + wg-quick) sur un Mac du cluster et le raccorde au hub BHS64 (wg1, 10.67.0.x). | |
| 3 | 3 | # Usage : bash wg-node-setup.sh <ip-wg du nœud> <pubkey-serveur> <mot-de-passe-sudo> [iface=$IF] [endpoint=51.255.75.61:51820] |
| 4 | −# $IF = hub R9128 (France, 10.66.0.x) ; wg1 = hub BHS64 (Québec, 10.67.0.x). Un LaunchDaemon par interface. | |
| 4 | +# wg1 = hub BHS64 (Québec, 10.67.0.x). (Le hub R9128 / wg0 a été retiré le 2026-10-02.) Un LaunchDaemon par interface. | |
| 5 | 5 | # Imprime « PUBKEY <clé> » à la fin (à donner à tunnelctl peer add sur la passerelle). |
| 6 | 6 | set -euo pipefail |
| 7 | −ADDR=${1:?ip wg}; SERVER_PUB=${2:?pubkey serveur}; PW=${3:?sudo}; IF=${4:-wg0}; ENDPOINT=${5:-51.255.75.61:51820} | |
| 7 | +ADDR=${1:?ip wg}; SERVER_PUB=${2:?pubkey serveur}; PW=${3:?sudo}; IF=${4:-wg1}; ENDPOINT=${5:-51.161.112.61:443} | |
| 8 | 8 | SUBNET=${ADDR%.*} # ex. 10.67.0 |
| 9 | 9 | BREW=/opt/homebrew/bin/brew |
| 10 | 10 | # NB : sudo -S lit le mot de passe sur stdin → ne jamais combiner sudo_ avec un heredoc/pipe de contenu. |
@@ -29,7 +29,7 @@ TMPC=$(mktemp); chmod 600 "$TMPC" | ||
| 29 | 29 | echo "MTU = 1380" |
| 30 | 30 | echo |
| 31 | 31 | echo "[Peer]" |
| 32 | − echo "# hub R9128 (OVH)" | |
| 32 | + echo "# hub MacLustr Tunnel (OVH)" | |
| 33 | 33 | echo "PublicKey = $SERVER_PUB" |
| 34 | 34 | echo "Endpoint = $ENDPOINT" |
| 35 | 35 | echo "AllowedIPs = $SUBNET.0/24" |
modified
mld/cli.py
+1 −1
@@ -280,7 +280,7 @@ def main(argv=None): | ||
| 280 | 280 | s = sp.add_parser("import", help="brouillons de manifestes depuis les PM2 d'un nœud"); s.add_argument("node"); s.add_argument("apps", nargs="*"); s.set_defaults(f=cmd_import) |
| 281 | 281 | s = sp.add_parser("prepare", help="runtimes Homebrew + pm2 startup + raccordement tunnel + harden sur un nœud"); s.add_argument("node"); s.add_argument("--runtime", action="append"); s.add_argument("--ka-helpers", action="store_true"); s.add_argument("--no-tunnel", action="store_true"); s.add_argument("--no-harden", action="store_true"); s.set_defaults(f=cmd_prepare) |
| 282 | 282 | s = sp.add_parser("bootstrap", help="Xcode CLT + Homebrew sur un nœud vierge (long)"); s.add_argument("node"); s.set_defaults(f=cmd_bootstrap) |
| 283 | − s = sp.add_parser("tunnel", help="MacLustr Tunnel : status | peer <nœud>… | route <app>… | rm <app>…"); s.add_argument("sub", choices=["status", "peer", "route", "rm"]); s.add_argument("args", nargs="*"); s.add_argument("-g", "--gateway", help="BHS64 (défaut) ou R9128"); s.set_defaults(f=cmd_tunnel) | |
| 283 | + s = sp.add_parser("tunnel", help="MacLustr Tunnel : status | peer <nœud>… | route <app>… | rm <app>…"); s.add_argument("sub", choices=["status", "peer", "route", "rm"]); s.add_argument("args", nargs="*"); s.add_argument("-g", "--gateway", help="passerelle (BHS64, la seule depuis le 2026-10-02)"); s.set_defaults(f=cmd_tunnel) | |
| 284 | 284 | s = sp.add_parser("heal", help="auto-réparation : PM2/launchd/wg1/routes de chaque app du registre (--install = LaunchDaemon 5 min)"); s.add_argument("--apps", nargs="*"); s.add_argument("--nodes", nargs="*"); s.add_argument("--dry-run", action="store_true"); s.add_argument("--quiet", action="store_true"); s.add_argument("--no-public", action="store_true"); s.add_argument("--install", action="store_true"); s.add_argument("--interval", type=int, help="secondes entre deux passages (avec --install)"); s.set_defaults(f=cmd_heal) |
| 285 | 285 | s = sp.add_parser("harden", help="résilience d'un nœud : auto-login, pas de veille, redémarrage après coupure/gel, MAJ macOS + Tailscale off"); s.add_argument("nodes", nargs="*"); s.add_argument("--all", action="store_true"); s.add_argument("--autologin", action="store_true", help="force l'auto-login même sur un nœud loué"); s.add_argument("--no-autologin", action="store_true"); s.set_defaults(f=cmd_harden) |
| 286 | 286 | a = p.parse_args(argv) |
modified
mld/config.py
+2 −2
@@ -23,10 +23,10 @@ HEAL_STATE = os.path.join(STATE, "heal-state.json") # mémoire de `m | ||
| 23 | 23 | |
| 24 | 24 | # MacLustr Tunnel (remplace ngrok depuis le 2026-09-10) : passerelles OVH = hub WireGuard + Caddy (TLS auto), pilotées |
| 25 | 25 | # par `tunnelctl` (sudo sans mot de passe pour ubuntu). La clé de la passerelle M1M32 est autorisée pour `ubuntu`. |
| 26 | −# Chaque Mac porte une interface par passerelle (wg1 → BHS64, wg0 → R9128), LaunchDaemon io.maclustr.wireguard-<iface>. | |
| 26 | +# Chaque Mac porte une interface wg1 → BHS64 (LaunchDaemon io.maclustr.wireguard-wg1). La passerelle secondaire R9128 | |
| 27 | +# (wg0, 10.66.0.x) a été retirée le 2026-10-02 avec BHS64b/BHS128/BHS128b : BHS64 est le seul serveur OVH restant. | |
| 27 | 28 | TUNNEL_GATEWAYS = { |
| 28 | 29 | "BHS64": {"host": "51.161.112.61", "user": "ubuntu", "subnet": "10.67.0", "iface": "wg1", "endpoint": "51.161.112.61:443", "place": "OVH Beauharnois (Québec)"}, |
| 29 | − "R9128": {"host": "51.255.75.61", "user": "ubuntu", "subnet": "10.66.0", "iface": "wg0", "endpoint": "51.255.75.61:443", "place": "OVH Gravelines (France)"}, | |
| 30 | 30 | } |
| 31 | 31 | TUNNEL_DEFAULT = "BHS64" |
| 32 | 32 | |
| 33 | 33 | |