diff --git a/DOCKER-ARCHITECTURE-2026-05-07.md b/DOCKER-ARCHITECTURE-2026-05-07.md new file mode 100644 index 00000000..4fbf1b2e --- /dev/null +++ b/DOCKER-ARCHITECTURE-2026-05-07.md @@ -0,0 +1,196 @@ +# Smart City Digital Twin - Architecture Docker (Stellio Pipeline Added) +**Date** : 07 mai 2026 +**Projet** : `smart-city-digital-twin-martinique` +**Auteur** : Éric FELIXINE (via Hermes Agent) + +--- + +## 1. Vue d'ensemble +Cette cartographie présente l'architecture Docker complète du jumeau numérique Smart City (Martinique), incluant les conteneurs, images, réseaux et ports exposés. + +--- + +## 2. Flux de données principal + +### Pipeline Orion-LD (Fonctionnel ✅) +``` +Simulator → MQTT Brokers (Mosquitto/EMQX/BunkerM) → IoT Agents → Orion-LD → QuantumLeap → CrateDB (standard) → Grafana +``` + +### Pipeline Stellio (En cours de debug ⚠️) +``` +Simulator → MQTT Brokers → IoT Agents → Stellio Context Broker → QuantumLeap-Stellio → CrateDB-Stellio → Grafana +``` + +--- + +## 3. Liste des Conteneurs Actifs (Projet Smart City) + +| Conteneur | Image | Réseaux | Ports | +|-----------|-------|----------|-------| +| `smart-city-simulator` | `smart-city-simulator:latest` | `smartcity-shared`, `traefik-public` | `1883/tcp` | +| `smart-city-mosquitto` | `eclipse-mosquitto:latest` | `smartcity-shared`, `traefik-public` | `1883:1883`, `9001:9001` | +| `smart-city-emqx` | `emqx/emqx:latest` | `smartcity-shared`, `traefik-public` | `11883:1883`, `18081:8081` | +| `smart-city-iot-agent-mosquitto` | `fiware/iotagent-json:latest` | `smartcity-shared` | `4041:4041` | +| `smart-city-iot-agent-emqx` | `fiware/iotagent-json:latest` | `smartcity-shared` | `4042:4041` | +| `smart-city-iot-agent-bunkerm` | `fiware/iotagent-json:latest` | `smartcity-shared` | `4043:4041` | +| **`smart-city-orion-ld`** | `quay.io/fiware/orion-ld` | `smartcity-shared`, `traefik-public` | `1026:1026` | +| **`smart-city-quantumleap`** | `fiware/quantum-leap:latest` | `smartcity-shared`, `traefik-public` | `8668:8668` | +| **`smart-city-cratedb`** | `crate:5.5` | `smartcity-shared` | `4200:4200`, `5432:5432` | +| **`stellio-api-gateway`** | `stellio/stellio-api-gateway:latest-dev` | `stellio-context-broker_default`, `traefik-public`, `smartcity-shared` | `8080:8080` | +| **`stellio-subscription-service`** | `stellio/stellio-subscription-service:latest-dev` | `stellio-context-broker_default`, `smartcity-shared` | `8084:8084` | +| **`stellio-search-service`** | `stellio/stellio-search-service:latest-dev` | `stellio-context-broker_default`, `traefik-public` | `8083:8083` | +| **`stellio-kafka`** | `confluentinc/cp-kafka:8.1.0` | `stellio-context-broker_default` | `9092:9092` | +| **`stellio-postgres`** | `stellio/stellio-timescale-postgis:16-2.24.0-3.6` | `stellio-context-broker_default` | `5432:5432` | +| **`smart-city-quantumleap-stellio`** | `fiware/quantum-leap:latest` | `smartcity-shared`, `traefik-public` | `8669:8668` | +| **`smart-city-cratedb-stellio`** | `crate:latest` | `smartcity-shared` | `4200:4200` | +| `smart-city-redis` | `redis:7-alpine` | `smartcity-shared` | `6379:6379` | +| `smart-city-grafana` | `grafana/grafana:latest` | `smartcity-shared`, `traefik-public` | `3000:3000` | +| `openremote-manager-1` | `openremote/manager:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` | +| `openremote-keycloak-1` | `openremote/keycloak:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` | +| `traefik` | `traefik:v3.0` | `traefik-public`, `openremote_default` | `80:80`, `443:443` | + +--- + +## 4. Réseaux Docker + +| Réseau | Conteneurs Connectés | +|---------|----------------------| +| `smartcity-shared` | Tous les services Smart City (simulator, brokers, context brokers, databases, grafana) | +| `stellio-context-broker_default` | Stellio services (api-gateway, subscription, search, kafka, postgres) | +| `traefik-public` | Services exposés via Traefik (grafana, mapstore, pulsar, stellio, orion, etc.) | +| `openremote_default` | OpenRemote services (manager, keycloak, postgresql) | + +--- + +## 5. Diagramme d'Architecture (Mermaid) + +```mermaid +graph TD + subgraph Simulator [Smart City Simulator] + SIM[Simulator
Python MQTT Publisher] + end + + subgraph MQTT_Brokers [MQTT Brokers] + MOSQ[Mosquitto
:1883] + EMQX[EMQX
:11883] + BUNKER[BunkerM
:1884] + end + + subgraph IoT_Agents [IoT Agents FIWARE] + IOT_MOSQ[IoT Agent Mosquitto
:4041] + IOT_EMQX[IoT Agent EMQX
:4042] + IOT_BUNKER[IoT Agent BunkerM
:4043] + end + + subgraph Orion_LD_Pipeline [Orion-LD Pipeline ✅] + ORION[Orion-LD
:1026] + QL[QuantumLeap
:8668] + CRATEDB[CrateDB
:4200/:5432] + end + + subgraph Stellio_Pipeline [Stellio Pipeline ⚠️] + STELLIO[Stellio API Gateway
:8080] + SUB[Stellio Subscription
:8084] + QL_STELLIO[QuantumLeap-Stellio
:8669] + CRATEDB_STELLIO[CrateDB-Stellio
:4200] + end + + subgraph Visualization [Visualization Layer] + GRAFANA[Grafana
:3000
21 Dashboards] + MAPSTORE[MapStore
:8080] + OPENREMOTE[OpenRemote
:8080] + end + + subgraph Message_Broker [Message Broker] + KAFKA[Stellio Kafka
:9092] + end + + %% Flux Simulator + SIM -->|MQTT| MOSQ + SIM -->|MQTT| EMQX + SIM -->|MQTT| BUNKER + + %% Flux IoT Agents + MOSQ -->|MQTT| IOT_MOSQ + EMQX -->|MQTT| IOT_EMQX + BUNKER -->|MQTT| IOT_BUNKER + + %% Flux Orion-LD (Working ✅) + IOT_MOSQ -->|NGSI-v2| ORION + IOT_EMQX -->|NGSI-v2| ORION + IOT_BUNKER -->|NGSI-v2| ORION + ORION -->|Subscription| QL + QL -->|INSERT| CRATEDB + CRATEDB -->|Query| GRAFANA + + %% Flux Stellio (In Progress ⚠️) + IOT_MOSQ -->|NGSI-LD?| STELLIO + IOT_EMQX -->|NGSI-LD?| STELLIO + STELLIO -->|Subscription| QL_STELLIO + QL_STELLIO -->|INSERT?| CRATEDB_STELLIO + CRATEDB_STELLIO -->|Query| GRAFANA + + %% Kafka (Stellio internal) + STELLIO --> KAFKA + SUB --> KAFKA + + %% Visualization + GRAFANA -->|Dashboards| User[Utilisateur] + MAPSTORE -->|Maps| User + OPENREMOTE -->|Assets| User +``` + +--- + +## 6. État des Pipelines + +### ✅ Pipeline Orion-LD (Opérationnel) +- **Statut** : Entièrement fonctionnel +- **Données** : CrateDB contient 6 tables avec données (`etairqualityobserved` a 6+ rows) +- **Grafana** : Dashboard "Smart City - Air Quality (CrateDB)" fonctionnel +- **Subscription** : Orion-LD → QuantumLeap active (`lastNotification: 2026-05-07`) + +### ⚠️ Pipeline Stellio (Debug en cours) +- **Statut** : Subscription créée, notifications reçues par QuantumLeap-Stellio +- **Problème** : Données ne persistent pas dans CrateDB-Stellio (0 rows) +- **Cause probable** : Mappage NGSI-LD → CrateDB incompatible +- **Subscription Stellio** : `urn:ngsi-ld:Subscription:0baad89d-1625-4b42-adc1-e841e04120ff` + - Endpoint : `http://smart-city-quantumleap-stellio:8668/v2/notify` + - Format : NGSI-LD normalized + +--- + +## 7. Services Web Accessibles + +| Service | URL | Identifiants | Statut | +|---------|-----|-------------|--------| +| **Grafana** | https://grafana.digitribe.fr | `admin` / `Digitribe972` | ✅ 21 dashboards | +| **MapStore** | https://mapstore.digitribe.fr/mapstore/ | - | ✅ Page charge | +| **Pulsar Manager** | https://pulsar.digitribe.fr | `pulsar` / `pulsar` | ✅ Interface OK | +| **OpenRemote** | https://openremote.digitribe.fr | `admin` / `Digitribe972` | ✅ Carte Martinique | +| **Orion-LD** | http://smart-city-orion-ld:1026 | - | ✅ Healthy | +| **Stellio** | http://stellio-api-gateway:8080 | - | ✅ Contient entités | + +--- + +## 8. Connexions Clés + +1. **Traefik** (`:80`/`:443`) : Reverse proxy pour tous les services exposés à l'hôte. +2. **Brokers MQTT** (Mosquitto `:1883`, EMQX `:11883`) : Réception des données du simulateur et des capteurs IoT. +3. **Context Brokers** (Orion-LD `:1026`, Stellio `:8080`) : Gestion des entités NGSI-LD. +4. **Time-Series DB** (CrateDB `:4200` HTTP API, `:5432` PostgreSQL) : Persistance des données pour Grafana. +5. **Grafana** (`:3000`) : Visualisation des données depuis CrateDB, InfluxDB, Prometheus. + +--- + +## 9. Références + +- **Projet** : `~/smart-city-digital-twin-martinique/` +- **Gitea** : https://gitea.digitribe.fr/eric/smart-city-digital-twin-martinique +- **Skills** : `smart-city-sensor-simulator`, `fiware-quantumleap`, `fiware-orion-ld`, `cratedb` +- **Documentation** : `RAPPORT_FINAL_2026-05-06.md`, `BILAN-2026-05-05.md` + +--- + +*Architecture mise à jour le 07 mai 2026 à 21:00 (UTC-4) par Hermes Agent.*