Aller au contenu

RGZ NOC — Système d'Information Complet

PROJET MOSAÏQUE

Convertir 500 revendeurs WiFi Zone illégaux en réseau légal FAI

RGZ S.A. (Bénin) — Stack 22 conteneurs — 81 outils complets

Vue d'Ensemble

81
Outils
22
Conteneurs
500+
Revendeurs
8
Villes

PROJET MOSAÏQUE est une initiative complète de digitalisation et de légalisation du secteur WiFi en Afrique de l'Ouest. Le système intègre 81 outils organisés en 14 catégories (A-N), déployés via 22 conteneurs Docker coordonnés par une stack d'orchestration robuste.

État: Stack core EN PRODUCTION depuis 2026-02-19. Phases 1-4 planifiées (outils 1-80 à développer progressivement).


Accès Rapide


Démarrage Rapide (3 commandes)

# 1. Cloner le dépôt
git clone https://github.com/solvixtech/rgz-noc.git && cd rgz-noc

# 2. Configurer les variables d'environnement
cp .env.example .env && nano .env

# 3. Initialiser et démarrer la stack
./scripts/init.sh && ./scripts/start.sh

Vérifier l'état:

./scripts/status.sh


Architecture Système

graph TB
    subgraph "CORE Services (14)"
        API["rgz-api:8000<br/>FastAPI Python"]
        DB["rgz-db:5432<br/>PostgreSQL 16"]
        REDIS["rgz-redis:6379<br/>Redis 7"]
        RADIUS["rgz-radius:1812<br/>FreeRADIUS 3.2"]
        GW["rgz-gateway<br/>nftables NAT"]
        DNS["rgz-dns:53<br/>Unbound"]
        BEAT["rgz-beat<br/>Celery Beat"]
        PORTAL["rgz-portal:80<br/>HTML SPA"]
        WEB["rgz-web:3000<br/>React Admin"]
        KEA["rgz-kea:67<br/>Kea DHCP"]
        IDS["rgz-ids<br/>Suricata 7.x"]
        NGINX["rgz-nginx:443<br/>HTTP Proxy"]
        WG["rgz-wireguard<br/>VPN"]
        CANARY["rgz-canary<br/>Synthetics"]
    end

    subgraph "MONITORING (8)"
        PROM["rgz-prometheus:9090<br/>Time-series DB"]
        AM["rgz-alertmanager<br/>Alerts"]
        GRAFANA["rgz-grafana:3000<br/>Dashboards"]
        ES["rgz-elasticsearch<br/>Logs"]
        KB["rgz-kibana:5601<br/>Log UI"]
        LS["rgz-logstash<br/>Pipeline"]
        NF["rgz-netflow:2055<br/>Flow collector"]
        DOCS["rgz-docs:8080<br/>MkDocs"]
    end

    API -->|deps| DB
    API -->|cache| REDIS
    RADIUS -->|auth| API
    GW -->|traffic| RADIUS
    BEAT -->|scheduled| API
    PORTAL -->|auth| API
    WEB -->|data| API
    IDS -->|ids| GW
    PROM -->|scrape| API
    PROM -->|scrape| RADIUS
    GRAFANA -->|read| PROM
    ES -->|logs| API
    KB -->|ui| ES

    style API fill:#3f68ae,color:#fff
    style DB fill:#3f68ae,color:#fff
    style GRAFANA fill:#f5c445,color:#34383c
    style PROM fill:#2e7d32,color:#fff

Réseau interne: rgz_rgz-net 172.23.0.0/16 Ingress TLS: Traefik + Let's Encrypt (certifiés jusqu'à 2026-05-20)


Domaines Opérationnels

Domaine Service Status Port
api-rgz.duckdns.org FastAPI ✅ Production 8000 → 443
admin-rgz.duckdns.org React Dashboard ✅ Production 3000 → 443
access-rgz.duckdns.org Portail Captif ✅ Production 80 → 443
grafana-rgz.duckdns.org Grafana ✅ Production 3000 → 443
registre-rgz.duckdns.org Site Recensement ✅ Production HTTP
docs-rgz.duckdns.org Documentation ✅ Production 8080 → 443

Certificats TLS renouvelés automatiquement via certbot-dns-duckdns (tâche Celery #50).


Catégories d'Outils (14)

### A. NOC Docker Stack (10 outils) — EN PRODUCTION Cœur du système : API, base de données, cache, authentification RADIUS, gateway, monitoring. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #1 | rgz-api | ✅ Prod | CRITIQUE | | #2 | rgz-web | ✅ Prod | CRITIQUE | | #3 | rgz-portal | ✅ Prod | CRITIQUE | | #4 | rgz-db | ✅ Prod | CRITIQUE | | #5 | rgz-redis | ✅ Prod | CRITIQUE | | #6 | rgz-radius | ✅ Prod | CRITIQUE | | #7 | rgz-gateway | ✅ Prod | CRITIQUE | | #8 | rgz-ids | ✅ Prod | CRITIQUE | | #9 | rgz-dns | ✅ Prod | CRITIQUE | | #10 | rgz-beat | ✅ Prod | CRITIQUE |
### B. Portail Captif (8 outils) — PLANIFIÉ Phase 3 Modules d'authentification, inscription, paiement, fraude, branding revendeur. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #11 | inscription-ocr | 📅 Phase 3 | CRITIQUE | | #12 | otp-sms | 📅 Phase 3 | CRITIQUE | | #13 | multi-appareils | 📅 Phase 3 | CRITIQUE | | #14 | forfaits-vouchers | 📅 Phase 3 | CRITIQUE | | #15 | paiement-momo | 📅 Phase 3 | CRITIQUE | | #16 | bannieres | 📅 Phase 3 | HAUTE | | #17 | anti-fraude | 📅 Phase 3 | CRITIQUE | | #18 | branding-reseller | 📅 Phase 3 | HAUTE |
### C. Billing & Revenue (7 outils) — PLANIFIÉ Phase 3-4 Facturation, vouchers, paiement mobile KKiaPay, réconciliation, edge-cases. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #19 | moteur-facturation | 📅 Phase 3 | CRITIQUE | | #20 | generateur-vouchers | 📅 Phase 3 | CRITIQUE | | #21 | reconciliation | 📅 Phase 4 | CRITIQUE | | #22 | remboursements | 📅 Phase 3 | HAUTE | | #23 | edge-cases-billing | 📅 Phase 4 | HAUTE | | #24 | factures-pdf | 📅 Phase 3 | CRITIQUE | | #25 | credit-sla-auto | 📅 Phase 4 | HAUTE |
### D. QoS & DBA (4 outils) — PLANIFIÉ Phase 2-3 Gestion dynamique débit (HTB/fq_codel), DSCP marking, fair-use, MIR recalcul. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #26 | dba-daemon | 📅 Phase 2 | CRITIQUE | | #27 | htb-fq-codel | 📅 Phase 2 | CRITIQUE | | #28 | nftables-dscp | 📅 Phase 2 | CRITIQUE | | #29 | fair-use-enforcer | 📅 Phase 3 | HAUTE |
### E. Réseau & Infrastructure (7 outils) — Partiel Prod + Phase 2-3 DHCP, VLAN, nftables, CPE preconfig, DNS sinkhole, WireGuard, OSPF. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #30 | kea-dhcp | 📅 Phase 2 | CRITIQUE | | #31 | vlan-allocation | 📅 Phase 2 | CRITIQUE | | #32 | nftables-generator | 📅 Phase 2 | CRITIQUE | | #33 | cpe-preconfig | 📅 Phase 2 | CRITIQUE | | #34 | dns-sinkhole | 📅 Phase 2 | CRITIQUE | | #35 | wireguard-vpn | 📅 Phase 2 | MOYENNE | | #36 | config-ospf | 📅 Q3-2026 | MOYENNE |
### F. Monitoring & Observabilité (8 outils) — Partiel Prod + Phase 3 Prometheus, Grafana, ELK, SNMP poller, SLA probe, anomalies, NetFlow. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #37 | dashboards-grafana | 📅 Phase 3 | CRITIQUE | | #38 | prometheus-alert | ✅ Prod | CRITIQUE | | #39 | snmp-poller | 📅 Phase 3 | CRITIQUE | | #40 | elk-stack | ✅ Prod | CRITIQUE | | #41 | rf-monitoring | 📅 Phase 3 | CRITIQUE | | #42 | netflow-collector | 📅 Phase 3 | HAUTE | | #43 | sla-probe-engine | 📅 Phase 3 | CRITIQUE | | #44 | anomaly-detection | 📅 Phase 3 | HAUTE |
### G. Sécurité & Conformité (6 outils) — Partiel Prod + Phase 2-3 Logs immuables, APDP/RGPD, ARCEP reporting, audit-trail, compliance-check, SSL-cert. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #45 | logs-immutables | 📅 Phase 2 | CRITIQUE | | #46 | module-apdp | 📅 Phase 2 | CRITIQUE | | #47 | arcep-reporting | 📅 Phase 2 | CRITIQUE | | #48 | audit-trail | 📅 Phase 2 | CRITIQUE | | #49 | compliance-check | 📅 Phase 3 | HAUTE | | #50 | ssl-cert-manager | 📅 Phase 2 | HAUTE |
### H. Dashboards & Portails (5 outils) — PLANIFIÉ Phase 3 Dashboards self-service revendeur, NOC, bannieres, RMA, page statut public. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #51 | dashboard-reseller | 📅 Phase 3 | CRITIQUE | | #52 | dashboard-noc | 📅 Phase 3 | HAUTE | | #53 | espace-bannieres | 📅 Phase 3 | HAUTE | | #54 | dashboard-rma | 📅 Phase 3 | HAUTE | | #55 | page-statut-public | 📅 Phase 3 | HAUTE |
### I. Workflows & Automatisation (5 outils) — PLANIFIÉ Phase 2-3 Onboarding revendeur (7 étapes), RMA tickets, incident escalation, cutover, rollback. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #56 | onboarding-reseller | 📅 Phase 3 | CRITIQUE | | #57 | rma-ticket-system | 📅 Phase 3 | HAUTE | | #58 | incident-escalation | 📅 Phase 3 | HAUTE | | #59 | cutover-checklist | 📅 Phase 3 | HAUTE | | #60 | rollback-decision | 📅 Phase 3 | HAUTE |
### J. Communication & Notifications (4 outils) — PLANIFIÉ Phase 2-4 SMS templates (OTP/alertes/SLA), WhatsApp Business, Email SMTP, crisis dispatcher. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #61 | sms-template-engine | 📅 Phase 2 | CRITIQUE | | #62 | whatsapp-business | 📅 Phase 3 | HAUTE | | #63 | email-notification | 📅 Phase 3 | HAUTE | | #64 | crisis-dispatcher | 📅 Phase 4 | HAUTE |
### K. Outils RF & Terrain (5 outils) — PLANIFIÉ Phase 0-3 RF link budget, spectrum analyzer, CPE alignment, site survey DB, mobile audit PWA. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #65 | rf-link-budget | 📅 Phase 0 | CRITIQUE | | #66 | spectrum-analyzer | 📅 Phase 3 | HAUTE | | #67 | cpe-alignment-tool | 📅 Phase 0 | HAUTE | | #68 | site-survey-db | 📅 Phase 3 | HAUTE | | #69 | mobile-audit-pwa | 📅 Phase 3 | HAUTE |
### L. Rapports & BI (5 outils) — PLANIFIÉ Phase 4 Rapport SLA mensuel, ARCEP trimestriel, post-incident RCA, bandwidth trending, revenue forecast. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #70 | rapport-sla-mensuel | 📅 Phase 4 | HAUTE | | #71 | rapport-arcep | 📅 Phase 4 | CRITIQUE | | #72 | post-incident-rca | 📅 Phase 4 | HAUTE | | #73 | bandwidth-trending | 📅 Phase 4 | HAUTE | | #74 | revenue-forecast | 📅 Phase 4 | HAUTE |
### M. Scripts & Utilitaires (6 outils) — Partiel Prod + Phase 1-3 PG dump backup, firmware updater, config git backup, APDP anonymisation, iperf3 auto, canary tests. | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #75 | pg-dump-backup | 📅 Phase 1 | CRITIQUE | | #76 | firmware-updater | 📅 Phase 3 | HAUTE | | #77 | config-backup-git | 📅 Phase 3 | HAUTE | | #78 | data-deletion-apdp | 📅 Phase 3 | HAUTE | | #79 | iperf3-test-auto | 📅 Phase 0 | HAUTE | | #80 | canary-test-system | 📅 Phase 2 | HAUTE |
### N. Site Recensement | Outil | Nom | Statut | Priorité | |-------|-----|--------|----------| | #81 | site-recensement | ✅ Production | CRITIQUE | Plateforme de formulaire + admin + export CSV. **EN PRODUCTION** : https://registre-rgz.duckdns.org

Architecture de Déploiement

Types de Conteneurs

Type Exemple Déploiement Fichier
A rgz-api, rgz-db Conteneur principal docker/*/Dockerfile
B #11-#64 (plupart) Module Python dans rgz-api app/api/v1/endpoints/
C #21, #39, #75 Tâche Celery Beat app/tasks/
D #51-#55 Route React web/src/pages/
E #16, #18, #34 Config/script dans conteneur existant scripts/, config/
F Prometheus, Grafana, Kea Image officielle + config config/*/
G #33, #65, #67, #79 Conteneur dédié tools/*/
H #81 Déployé séparément recensement/

Dépendances de Phases

PHASE 0 (parallélisable)     : #4, #5, #7, #9, #38, #40, #65, #67, #79
PHASE 1 (dépend Phase 0)     : #1, #6, #8, #10, #30, #75
PHASE 2 (dépend Phase 1)     : #2, #3, #12, #15, #20, #26-28, #31-32, #34, #39, #43, #45-48, #50, #57, #59-62, #68, #77, #80
PHASE 3 (dépend Phase 2)     : #11, #13, #14, #16-19, #22, #24, #29, #33, #37, #41-42, #44, #49, #51-53, #55, #56, #58, #63, #66, #69, #76, #78
PHASE 4 (dépend Phase 3)     : #21, #23, #25, #54, #60, #64, #70-74

Services de Base (14 conteneurs core)

version: '3.9'
services:
  rgz-api:
    image: localhost/rgz-api:latest
    ports: ["8000:8000"]
    restart: unless-stopped
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}
    depends_on: [rgz-db, rgz-redis]

  rgz-db:
    image: postgres:16-alpine
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    restart: unless-stopped
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}

  rgz-redis:
    image: redis:7-alpine
    restart: unless-stopped
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}

  rgz-radius:
    image: localhost/rgz-radius:latest
    restart: unless-stopped
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}

  rgz-beat:
    image: localhost/rgz-api:latest
    command: celery -A app.celery_app beat --loglevel=info
    restart: unless-stopped
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}

Scripts Opérationnels Disponibles

./scripts/init.sh              # Initialiser les bases de données et configs
./scripts/start.sh             # Démarrer la stack complète
./scripts/stop.sh              # Arrêter proprement tous les services
./scripts/status.sh            # Afficher l'état des conteneurs
./scripts/logs.sh              # Afficher les logs temps réel
./scripts/restart.sh           # Redémarrer services spécifiques
./scripts/smoke_test.sh        # Vérifier la santé du système
./scripts/update.sh            # Mettre à jour les images
./scripts/backup.sh            # Sauvegarder données et configs
./scripts/init-elk.sh          # Initialiser indices Elasticsearch

Prochaines Étapes

  1. Phase 0 (Immédiat): Outils sans dépendances RF + monitoring avancé
  2. Phase 1 (2 semaines): API core, RADIUS, DHCP, backup
  3. Phase 2 (4 semaines): Services principaux (facturation, QoS, sécurité)
  4. Phase 3 (8 semaines): Modules portail, dashboards, workflows
  5. Phase 4 (12 semaines): Intégrations, rapports, BI avancée

Ressources Techniques

  • API Reference: https://api-rgz.duckdns.org/docs
  • Monitoring: https://grafana-rgz.duckdns.org
  • Logs: https://kibana-rgz.duckdns.org
  • Status Page: https://access-rgz.duckdns.org/status

Dernière mise à jour: 2026-02-21 Prochaine révision: 2026-03-07