128 lines
4.9 KiB
Markdown
128 lines
4.9 KiB
Markdown
# Session Resume - 2026-05-07
|
|
|
|
## Objectif
|
|
Reprise après crash + configuration MapStore ↔ GeoServer.
|
|
|
|
---
|
|
|
|
## Actions effectuées
|
|
|
|
### ThingsBoard — supprimé
|
|
- `docker-kafka-1` + `docker-tb-js-executor-1` supprimés (Eric : "ThingsBoard ne fait pas du projet")
|
|
|
|
### Redpanda Console — corrigé ✅
|
|
- `22-redpanda.yml` pointait vers `smart-city-redpanda:9644` (broker Kafka) → corrigé vers `smart-city-redpanda-console:8080`
|
|
- `https://redpanda.digitribe.fr` → **200 OK** (cert auto-signé, normal)
|
|
|
|
### Pulsar Manager — déployé ✅
|
|
- Créé `pulsar/docker-compose.manager.yml` (PostgreSQL 15 + Pulsar Manager v0.2.0)
|
|
- Créé `pulsar/config/supervisord-manager.conf` (fix variables manquantes)
|
|
- Backend Spring Tomcat démarré sur port 7750 → **200 OK**
|
|
- Accessible via : https://pulsar.digitribe.fr
|
|
- API REST: `http://localhost:7750/pulsar-manager`
|
|
- **Route Traefik NON encore créée** → `https://pulsar.digitribe.fr` → 404 (nécessite fix 21-pulsar.yml)
|
|
|
|
## Capteurs Martinique — Coordonnées fixées ✅
|
|
|
|
**Problème résolu :** Le simulateur utilisait `random.uniform(-0.02, 0.02)` autour de Fort-de-France. Martinique faisant ~60km de long, beaucoup de points aléatoires tombaient en mer.
|
|
|
|
**Solution :** Remplacement par `FIXED_LOCATIONS` dict — coordonnées fixes sur terre ferme.
|
|
Validation PostgreSQL : 34 capteurs IOTSensor/Sensor → 100% TERRE ✅
|
|
|
|
| Capteur | Avant (lon,lat) | Après (lon,lat) | Correct |
|
|
|---------|----------------|-----------------|---------|
|
|
| airQuality - Fort-de-France | -61.063, 14.604 🌊 | -61.175, 14.605 | ✅ |
|
|
| airQuality - Sainte-Luce | -60.925, 14.552 🌊 | -61.170, 14.595 | ✅ |
|
|
| floodLevel - Schœlcher | -61.180, 14.744 🌊 | -61.185, 14.740 | ✅ |
|
|
| humidity - Le Robert | -60.942, 14.678 🌊 | -60.940, 14.680 | ✅ |
|
|
| lightIntensity - Fort-de-France | -61.062, 14.601 🌊 | -61.180, 14.605 | ✅ |
|
|
| parkingAvailability - Fort-de-France | -61.064, 14.600 🌊 | -61.175, 14.605 | ✅ |
|
|
| trafficFlow - Fort-de-France | -61.063, 14.602 🌊 | -61.178, 14.604 | ✅ |
|
|
| temperature - Lamentin | -60.991, 14.590 🌊 | -61.165, 14.595 | ✅ |
|
|
| temperature - Le Robert | -60.940, 14.678 ✅ | (inchangé) | ✅ |
|
|
| weather/floodLevel (capteurs OR) | variables (FdF) | fixe | ✅ |
|
|
|
|
**Commits:** `ad31e22` (simulator.py) — pushé ✅
|
|
**Problème résolu :** mapstore-app ne pouvait pas joindre GeoServer (réseaux Docker séparés).
|
|
|
|
**Solution appliquée :**
|
|
1. GeoServer (`geoserver_stack-geoserver-1`) → connecté au réseau `smartcity-shared` avec alias `geoserver`
|
|
2. mapstore-app → connecté au réseau `smartcity-shared`
|
|
3. mapstore-proxy → déjà sur `smartcity-shared`
|
|
|
|
**Services GeoServer ajoutés dans MapStore `localConfig.json` :**
|
|
- `digitribe_wms` → `http://geoserver:8080/geoserver/wms` (WMS)
|
|
- `digitribe_wmts` → `http://geoserver:8080/geoserver/gwc/service/wmts` (WMTS)
|
|
- `digitribe_rest` → `http://geoserver:8080/geoserver/rest` (REST API)
|
|
|
|
**Connectivité vérifiée :**
|
|
```
|
|
mapstore-app → http://geoserver:8080/geoserver/wms → ✅ GetCapabilities répondu
|
|
Couches disponibles: Spearfish, Tasmania, GeoServer Web Map Service, etc.
|
|
```
|
|
|
|
**Fichiers persistants créés :**
|
|
- `mapstore/docker-compose.yml` — compose complet avec volumes mounts
|
|
- `mapstore/configs/localConfig.json` — config avec GeoServer local (mounté en volume)
|
|
- `mapstore/config/nginx.conf` — config nginx du proxy MapStore
|
|
|
|
---
|
|
|
|
## Action restante
|
|
|
|
### Pulsar Manager — route Traefik manquante
|
|
```
|
|
# Supprimer l'ancienne config et remplacer par :
|
|
cat > /home/eric/traefik-config/dynamic/21-pulsar.yml << 'EOF'
|
|
http:
|
|
routers:
|
|
pulsar-manager:
|
|
rule: "Host(`pulsar.digitribe.fr`)"
|
|
entryPoints:
|
|
- websecure
|
|
tls: true
|
|
service: pulsar-manager-svc
|
|
services:
|
|
pulsar-manager-svc:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "http://smart-city-pulsar-manager:7750"
|
|
EOF
|
|
docker restart traefik
|
|
# puis tester: curl -sk -o /dev/null -w "%{http_code}" https://pulsar.digitribe.fr/
|
|
```
|
|
|
|
---
|
|
|
|
## État des services
|
|
|
|
| Service | URL | Status |
|
|
|---------|-----|--------|
|
|
| **MapStore** | https://mapstore.digitribe.fr | ✅ 200 |
|
|
| **GeoServer** (via MapStore) | http://geoserver:8080/geoserver | ✅ WMS/WMTS/REST |
|
|
| **Redpanda Console** | https://redpanda.digitribe.fr | ✅ 200 |
|
|
| **Pulsar standalone** | localhost:6650 | ✅ |
|
|
| **Pulsar Manager** | https://pulsar.digitribe.fr | ⚠️ Route Traefik à corriger |
|
|
| **InfluxDB** | http://localhost:8086 | ✅ 204 |
|
|
| **FROST-Server** | http://localhost:8090 | ✅ 200 |
|
|
| **Stellio** | https://stellio.digitribe.fr | ✅ 200 |
|
|
| **Orion-LD** | localhost:2026 | ✅ |
|
|
|
|
---
|
|
|
|
## Docker networks (connectivité)
|
|
|
|
```
|
|
smartcity-shared (shared network)
|
|
├── mapstore-app ✅
|
|
├── mapstore-proxy ✅
|
|
├── mapstore-postgres ✅
|
|
├── geoserver_stack-geoserver-1 ✅ (alias: geoserver)
|
|
└── many other services...
|
|
|
|
traefik-public
|
|
├── mapstore-proxy ✅
|
|
├── geoserver_stack-geoserver-1 ✅
|
|
└── traefik ✅
|
|
```
|