Skip to content

Premier Démarrage

Vérification et validation du NOC après installation.

Prérequis

Installation complétée avec init.sh réussi.

Étape 1: Démarrer la stack

bash
# Démarrer tous les services (core + monitoring)
./scripts/ops/start.sh

# Output attendu:
# ✅ Starting Docker Compose stacks...
# [+] Building docker images...
# [+] Starting services...
# ...
# ✅ Stack core started
# ✅ Stack monitoring started
# ✅ Waiting for services...

Durée: 30-60 secondes selon le hardware.

Étape 2: Vérifier la santé

bash
# Vérifier l'état de tous les services
./scripts/ops/status.sh

# Output attendu:
# SERVICE               STATUS    HEALTH
# rgz-api               running   healthy ✅
# rgz-db                running   healthy ✅
# rgz-redis             running   healthy ✅
# rgz-radius            running   healthy ✅
# rgz-gateway           running   healthy ✅
# rgz-dns               running   healthy ✅
# rgz-beat              running   healthy ✅
# rgz-portal            running   healthy ✅
# rgz-web               running   healthy ✅
# rgz-kea               running   healthy ✅
# rgz-ids               running   healthy ✅
# rgz-nginx             running   healthy ✅
# rgz-wireguard         running   healthy ✅
# rgz-canary            running   healthy ✅
# rgz-prometheus        running   healthy ✅
# rgz-alertmanager      running   healthy ✅
# rgz-grafana           running   healthy ✅
# rgz-elasticsearch     running   healthy ✅
# rgz-kibana            running   healthy ✅
# rgz-logstash          running   healthy ✅
# rgz-netflow           running   healthy ✅
# rgz-docs              running   healthy ✅

Services "unhealthy"?

bash
# Vérifier les logs du service problématique
docker logs rgz-api --tail 50

# Attendre 5-10 secondes (démarrage lent)
sleep 10 && ./scripts/ops/status.sh

# Vérifier les erreurs critiques
docker compose -f docker-compose.core.yml logs --tail 100 rgz-api
docker compose -f docker-compose.monitoring.yml logs --tail 100 rgz-elasticsearch

Causes fréquentes:

ServiceUnhealthy causeSolution
rgz-elasticsearchHeap trop petitAttendre 30s, vérifier vm.max_map_count
rgz-kibanaElasticsearch pas prêtAttendre que ES devienne green
rgz-apiDB non initialiséeVérifier logs: docker logs rgz-db
rgz-grafanaDB grafana pas crééeRelancer: ./scripts/ops/init.sh
rgz-redisAuthentificationVérifier REDIS_PASSWORD dans .env

Étape 3: Exécuter les smoke tests

bash
./scripts/ops/smoke_test.sh

# Output attendu:
# ╔════════════════════════════════════════╗
# ║   RGZ NOC — SMOKE TESTS                ║
# ╠════════════════════════════════════════╣
# ✅ API health check: OK
# ✅ Database connectivity: OK
# ✅ Redis connectivity: OK
# ✅ RADIUS (FreeRADIUS): OK
# ✅ DNS resolution: OK
# ✅ Portal accessibility: OK
# ✅ Prometheus metrics: OK
# ✅ Elasticsearch cluster: yellow/green
# ✅ HTTPS (TLS): OK (api-rgz.duckdns.org)
# ✅ All smoke tests passed! ✅
# ╚════════════════════════════════════════╝

# Temps: 30-60 secondes

En cas d'échec d'un test

bash
# Test API
curl -s https://api-rgz.duckdns.org/health | jq .
# Attendu: {"status": "ok"}

# Test DB
docker exec rgz-db psql -U rgz_admin -d rgz_noc -c "SELECT NOW();"
# Attendu: Timestamp courant

# Test Redis
docker exec rgz-redis redis-cli ping
# Attendu: PONG

# Test DNS
nslookup access-rgz.duckdns.org 127.0.0.1
# Attendu: Address = IP serveur

# Test HTTPS
curl -vI https://api-rgz.duckdns.org/docs
# Attendu: HTTP/2 200

Étape 4: Accès Web

Ouvrir les URLs suivantes dans un navigateur:

Services externes (via Traefik HTTPS)

URLServiceCredentials
https://api-rgz.duckdns.orgAPI SwaggerAucun (public)
https://api-rgz.duckdns.org/docsAPI Swagger UIAucun
https://api-rgz.duckdns.org/redocAPI ReDocAucun
https://admin-rgz.duckdns.orgDashboard adminTBD
https://access-rgz.duckdns.orgPortail captifAucun (public)
https://grafana-rgz.duckdns.orgGrafana dashboardsadmin / (voir GRAFANA_ADMIN_PASSWORD)
https://docs-rgz.duckdns.orgDocumentationAucun (public)
https://registre-rgz.duckdns.orgSite recensementTBD

Services internes (réseau local, pas d'authentification Traefik)

URLServicePortNotes
http://[server_ip]:9090Prometheus9090Accès interne seulement
http://[server_ip]:9093AlertManager9093Accès interne seulement
http://[server_ip]:5601Kibana5601Accès interne + authentification elastic/pass
http://[server_ip]:9200Elasticsearch API9200Accès interne + authentification
http://[server_ip]:9000Portainer (optionnel)9000Docker management UI

Première connexion Grafana

  1. Ouvrir https://grafana-rgz.duckdns.org
  2. Entrer credentials:
    • User: admin
    • Password: (valeur de GRAFANA_ADMIN_PASSWORD dans .env)
  3. Cliquer sur Home (coin haut-gauche)
  4. Vérifier que les dashboards existent:
    • [x] Core Metrics
    • [x] Network Overview
    • [x] RF Monitoring
    • [x] Alerts & Incidents

Tester API via Swagger

  1. Ouvrir https://api-rgz.duckdns.org/docs
  2. Clique sur /health → "Try it out" → "Execute"
  3. Réponse attendue:
    json
    {
      "status": "ok",
      "timestamp": "2026-02-21T12:34:56Z",
      "version": "1.0.0"
    }

Tester Portail captif

  1. Ouvrir https://access-rgz.duckdns.org
  2. Devrait afficher: Formulaire connexion MSISDN + bannières (si configurées)
  3. Logo + couleurs ACCESS (jaune, bleu, rouge) visibles

Étape 5: Vérifier les logs

bash
# Logs API (debug)
docker logs rgz-api --follow

# Logs PostgreSQL
docker logs rgz-db --follow

# Logs Redis
docker logs rgz-redis --follow

# Logs RADIUS (le plus important)
docker logs rgz-radius --follow

# Tous les logs
docker compose -f docker-compose.core.yml logs --follow

# Quitter: Ctrl+C

Temps de démarrage par service

ServiceTempsNotes
rgz-api5-10sFastAPI startup
rgz-db5-10sPostgreSQL init
rgz-redis2-3sRedis startup
rgz-radius3-5sFreeRADIUS config
rgz-elasticsearch20-40sJVM startup (premier démarrage 60s+)
rgz-kibana10-15sKibana init (dépend ES)
rgz-grafana5-10sGrafana startup
Tous les services60-120sStack complète healthy

Arrêt gracieux

bash
# Arrêter les services
./scripts/ops/stop.sh

# Output attendu:
# ✅ Stopping services...
# ✅ All services stopped gracefully

# Vérifier
docker compose -f docker-compose.core.yml ps
# STATUS: Exited (0)

Après premier boot

  1. ✅ Lire Architecture — Comprendre la stack
  2. ✅ Lire Accès URLs — Accès détaillé à tous les services
  3. ✅ Consulter Opérations — Backup, monitoring, logs
  4. ✅ Configurer alertes dans Grafana/AlertManager
  5. ✅ Tester webhooks KKiaPay (paiements)
  6. ✅ Configurer domaines resellers + CPEs

Dashboard santé (Grafana)

Ouvrir https://grafana-rgz.duckdns.org/d/core-metrics

Vérifier les métriques clés:

  • [ ] CPU usage < 80%
  • [ ] RAM available > 2 GB
  • [ ] Disk usage < 80%
  • [ ] Uptime counter > 0
  • [ ] API response time < 200ms
  • [ ] DB connections < 50
  • [ ] Redis hit rate > 95%

Checkpoints après premier boot

  • [ ] Tous les 22 services = "healthy" ✅
  • [ ] Smoke tests = tous passent ✅
  • [ ] API /docs accessible ✅
  • [ ] Grafana login = OK ✅
  • [ ] Portail captif = s'affiche ✅
  • [ ] Logs = aucune erreur critique ✅
  • [ ] HTTPS = TLS valide (Let's Encrypt) ✅
  • [ ] Dashboard Grafana = métriques visibles ✅

Étape suivante: Architecture

PROJET MOSAÏQUE — 81 outils, 22 conteneurs, 500+ revendeurs WiFi Zone