PRISME France 2030 · Culture & IA

Cartographie spok — réseau, Docker, Syncthing

Vérifier la maturitéSpecDoc. générale

Généré : 2026-06-27 · sources : dépôt infrastructure-grainerie (n8n) + collecte SSH nassim@spok.

1. Position de spok dans l’architecture

ÉlémentValeur
Hôtespok — serveur prod Grainerie
IP management10.0.0.113/24 (bond0, VLAN Ubiquiti Default / 24)
Passerelle10.0.0.1
Interface physique activeenp4s0f3 (1 GbE, seule UP)
Interfaces physiques inactivesenp4s0f0, enp4s0f1, enp4s0f2 (DOWN — câblage prévu)
Interfaces VLAN kernelaucune (8021q absent)
CPUIntel Xeon X7560 — 64 threads
RAM251 GiB (~210 GiB disponible)
StockageLVM spok--vg-root 1,6 To sur HDD (ROTA=1)

Conséquence clé : les VLANs Ubiquiti (24, 20, 30, …) sont des segments L2/L3 gérés par le switch/routeur. spok n’a pas d’interfaces taguées ; il vit sur le LAN management 10.0.0.0/24. On ne doit pas « déplacer » Syncthing sur VLAN 20 via macvlan sans casser l’isolation inter-VLAN.

2. Modèle réseau Docker (prod)

Internet / LAN 10.0.0.0/24
        │
   enp4s0f3 (hôte)
        │
   ┌────┴────────────────────────────────────────────┐
   │ traefik (172.18.0.0/16) — ingress HTTPS │
   │ syncthing, n8n (UI), baserow, carbone, … │
   ├────────────────────────────────────────────────┤
   │ docker_n8n (192.168.80.0/20) — stack n8n/métriques │
   │ n8n, redis, prometheus, coalescer, vespa… │
   ├────────────────────────────────────────────────┤
   │ docker_proxy — homepage / proxy │
   │ docker_sync_in — sync-in │
   │ + ~15 autres bridges (authentik, passbolt…) │
   └────────────────────────────────────────────────┘
Réseau DockerRôle
traefikIngress Traefik v3 — services exposés *.grainerie.netlib.re
docker_n8nStack n8n + observabilité (Prometheus, Redis, coalescer…)
docker_proxyHomepage / proxy interne
docker_sync_inService sync-in (OnlyOffice pipeline)
socket_proxy_netAPI Docker ro (socket-proxy) — edge compose

Doc east-west (gated) : — évite hairpin Traefik pour n8n↔Baserow ; non déployé tant que gate Gunicorn ouverte.

3. Syncthing — état actuel

ParamètreValeur prod
Conteneursyncthing — healthy
Imagesyncthing@sha256:6a5f5…
Réseau Dockertraefik uniquement (172.18.0.10)
Ports host publiés22000/tcp, 21027/udp (sync P2P sur enp4s0f3)
UITraefik → sync.grainerie.netlib.re :8384
Configsyncthing → config
CPU/RAM8 CPUs (cpuset 24-31,56-63), 8g limit, GOMEMLIMIT 6144MiB

Référence dépôt : Configuration (docker compose), tuning : .

Ce qui est correct aujourd’hui

Ce qui était incorrect dans les propositions macvlan/VLAN 20

Goulot actuel : tout trafic (HTTPS Traefik, sync Syncthing 22000, n8n, backups Borg, etc.) partage enp4s0f3 vers 10.0.0.1.

Type traficEmplacementImpact uplink
Sync fichiersHost:22000 ↔ pairs SyncthingÉlevé (octets + métadonnées)
UI / API webTraefik:443Variable (n8n, Baserow, OnlyOffice)
Petits fichiers / logsSyncthing + cohabitation OnlyOfficeOverhead TCP, I/O HDD

Leviers compatibles avec l’architecture existante (sans macvlan inter-VLAN) :

  1. Limitation Syncthing : plafond bande passante (~800 Mbps) + plages horaires
  2. QoS Ubiquiti sur 10.0.0.113 (priorité basse sync vs management)
  3. Ignores / dossiers hot — déjà dans (CODIR 120s watcher)
  4. Second NIC (enp4s0f0–f2) : même L3 ou route policy sans mélanger VLANs clients — dédié sync physique seulement
  5. East-west internal-net (post-gate) : réduit hairpin HTTPS pour n8n↔Baserow, libère Traefik

5. Plan Syncthing réaliste (post-câblage NIC)

Quand enp4s0f0–f2 seront câblés :

  1. Ne pas créer de VLAN kernel pour « sortir » Syncthing du 10.0.0.0/24
  2. Option A — deuxième interface same-subnet : IP secondaire ou NIC dédiée sync, Syncthing bind address / firewall mark
  3. Option B — QoS + rate limit sur interface unique (moins risqué)
  4. Conserver compose existant ; ajuster uniquement :

6. Fichiers de vérité (dépôt n8n)

EmplacementRôle
Configuration (docker compose)Racine modulaire V9
Configuration (docker compose.edge)Traefik + socket-proxy
syncthingStack Syncthing
COMPOSE MODULARModularité + déploiement spok
INTERNAL NET EAST WESTRéseau interne (gated)

7. Recommandations agents LLM (investigation infra)

Pour éviter les réponses macvlan/VLAN incorrectes :

  1. Lancer Script shell (collect spok network cartography) avant toute proposition
  2. Lire +
  3. Contraintes immuables en tête de session :
  1. Session courte ou contexte 128k — voir Configuration (marty context extended.fragment)