feat: MapStore ↔ GeoServer integration + Pulsar Manager v0.2.0
- Connect GeoServer to smartcity-shared network (alias: geoserver) - Connect mapstore-app to smartcity-shared network - Add digitribe_wms/wmts/rest services in MapStore localConfig.json - Deploy Pulsar Manager with PostgreSQL backend + custom supervisord.conf - Fix Redpanda Traefik config (console instead of broker port) - Create mapstore/ docker-compose with volume mounts for persistence
This commit is contained in:
42
mapstore/config/nginx.conf
Normal file
42
mapstore/config/nginx.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
server {
|
||||
server_name mapstore.digitribe.fr;
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
try_files $uri @mapstore;
|
||||
}
|
||||
|
||||
location /mapstore/ {
|
||||
try_files $uri @mapstore;
|
||||
}
|
||||
|
||||
location /rest/geostore/ {
|
||||
proxy_pass http://mapstore:8080/mapstore/rest/geostore/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /mapstore/rest/geostore/ {
|
||||
proxy_pass http://mapstore:8080/mapstore/rest/geostore/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location @mapstore {
|
||||
proxy_pass http://mapstore:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
1453
mapstore/configs/localConfig.json
Normal file
1453
mapstore/configs/localConfig.json
Normal file
File diff suppressed because it is too large
Load Diff
84
mapstore/docker-compose.yml
Normal file
84
mapstore/docker-compose.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
# MapStore2 - Smart City Digital Twin Martinique
|
||||
# GeoServer local: http://geoserver:8080/geoserver
|
||||
# Accès: https://mapstore.digitribe.fr
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mapstore-postgres:
|
||||
image: geosolutions-mapstore/postgis:14
|
||||
container_name: mapstore-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: mapstore
|
||||
POSTGRES_PASSWORD: mapstore
|
||||
POSTGRES_DB: mapstore
|
||||
volumes:
|
||||
- mapstore2_pg_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- mapstore-network
|
||||
- smartcity-shared
|
||||
- traefik-public
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U mapstore"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
mapstore-app:
|
||||
image: geosolutionsit/mapstore2:latest
|
||||
container_name: mapstore-app
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mapstore-postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
MAPSTORE_BACKEND_PORT: 8080
|
||||
JAVA_OPTS: "-Xms512m -Xmx2g"
|
||||
volumes:
|
||||
# Configuration persistante - GeoServer local
|
||||
- ./configs/localConfig.json:/usr/local/tomcat/webapps/mapstore/configs/localConfig.json:ro
|
||||
networks:
|
||||
- mapstore-network
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "8082:8080"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -s http://localhost:8080/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
mapstore-proxy:
|
||||
image: nginx:alpine
|
||||
container_name: mapstore-proxy
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mapstore-app
|
||||
volumes:
|
||||
# Configuration nginx persistante
|
||||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
networks:
|
||||
- mapstore-network
|
||||
- smartcity-shared
|
||||
- traefik-public
|
||||
ports:
|
||||
- "80:80"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.mapstore.rule=Host(`mapstore.digitribe.fr`)"
|
||||
- "traefik.http.routers.mapstore.entrypoints=websecure"
|
||||
- "traefik.http.routers.mapstore.tls=true"
|
||||
- "traefik.http.services.mapstore.loadbalancer.server.port=80"
|
||||
|
||||
networks:
|
||||
mapstore-network:
|
||||
name: mapstore2_mapstore-network
|
||||
driver: bridge
|
||||
smartcity-shared:
|
||||
external: true
|
||||
traefik-public:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
mapstore2_pg_data:
|
||||
external: true
|
||||
34
pulsar/config/supervisord-manager.conf
Normal file
34
pulsar/config/supervisord-manager.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/tmp/supervisord.log
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
pidfile=/tmp/supervisord.pid
|
||||
|
||||
[program:pulsar-manager-frontend]
|
||||
command=sh -c "cd /pulsar-manager/pulsar-manager/ui && npm start"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
[program:pulsar-manager-backend]
|
||||
command=/pulsar-manager/pulsar-manager/bin/pulsar-manager \
|
||||
--redirect.host=%(ENV_REDIRECT_HOST)s \
|
||||
--redirect.port=%(ENV_REDIRECT_PORT)s \
|
||||
--spring.datasource.driver-class-name=%(ENV_DRIVER_CLASS_NAME)s \
|
||||
--spring.datasource.url=%(ENV_URL)s \
|
||||
--spring.datasource.username=%(ENV_USERNAME)s \
|
||||
--spring.datasource.password=%(ENV_PASSWORD)s \
|
||||
--spring.datasource.initialization-mode=%(ENV_INITIALIZATION_MODE)s \
|
||||
--logging.level.org.apache=%(ENV_LOG_LEVEL)s
|
||||
environment=ENV_REDIRECT_HOST="%(ENV_REDIRECT_HOST)s",ENV_REDIRECT_PORT="%(ENV_REDIRECT_PORT)s",ENV_DRIVER_CLASS_NAME="%(ENV_DRIVER_CLASS_NAME)s",ENV_URL="%(ENV_URL)s",ENV_USERNAME="%(ENV_USERNAME)s",ENV_PASSWORD="%(ENV_PASSWORD)s",ENV_INITIALIZATION_MODE="%(ENV_INITIALIZATION_MODE)s",ENV_LOG_LEVEL="%(ENV_LOG_LEVEL)s"
|
||||
user=root
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
@@ -1,27 +1,51 @@
|
||||
# Pulsar Manager - Web UI for managing Pulsar
|
||||
# Access: https://pulsar.digitribe.fr
|
||||
version: '3.8'
|
||||
|
||||
# Pulsar Manager - Web UI pour Apache Pulsar Standalone
|
||||
# Accès: https://pulsar.digitribe.fr
|
||||
services:
|
||||
pulsar-manager-db:
|
||||
image: postgres:15-alpine
|
||||
container_name: smart-city-pulsar-manager-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: superset
|
||||
POSTGRES_PASSWORD: Digitribe972
|
||||
POSTGRES_DB: pulsar_manager
|
||||
volumes:
|
||||
- pulsar-manager-db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- pulsar-manager-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U superset"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
pulsar-manager:
|
||||
image: apachepulsar/pulsar-manager:v0.4.0
|
||||
image: apachepulsar/pulsar-manager:v0.2.0
|
||||
container_name: smart-city-pulsar-manager
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
pulsar:
|
||||
pulsar-manager-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- PULSAR_CLUSTER_NAME=standalone
|
||||
- PULSAR_SERVICE_URL=pulsar://smart-city-pulsar:6650
|
||||
- PULSAR_WEB_SERVICE_URL=http://smart-city-pulsar:8080
|
||||
- SPRING_APPLICATION_JSON={"server":{"port":7750},"pulsar":{"cluster":"standalone","serviceUrl":"pulsar://smart-city-pulsar:6650","webServiceUrl":"http://smart-city-pulsar:8080"}}
|
||||
# Variables mappées par supervisord.conf custom
|
||||
REDIRECT_HOST: pulsar.digitribe.fr
|
||||
REDIRECT_PORT: "443"
|
||||
DRIVER_CLASS_NAME: org.postgresql.Driver
|
||||
URL: jdbc:postgresql://pulsar-manager-db:5432/pulsar_manager
|
||||
USERNAME: superset
|
||||
PASSWORD: Digitribe972
|
||||
INITIALIZATION_MODE: embedded
|
||||
LOG_LEVEL: INFO
|
||||
volumes:
|
||||
- ./config/supervisord-manager.conf:/etc/supervisord.conf:ro
|
||||
networks:
|
||||
- pulsar-manager-net
|
||||
- traefik-public
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "7750:7750"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:7750 || exit 1"]
|
||||
test: ["CMD-SHELL", "wget -qO- http://localhost:7750 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
@@ -32,14 +56,15 @@ services:
|
||||
- "traefik.http.routers.pulsar-manager.entrypoints=websecure"
|
||||
- "traefik.http.routers.pulsar-manager.tls=true"
|
||||
- "traefik.http.services.pulsar-manager.loadbalancer.server.port=7750"
|
||||
# Redirect /admin and /ws to Pulsar standalone
|
||||
- "traefik.http.routers.pulsar.rule=Host(`pulsar.digitribe.fr`) && PathPrefix(`/admin`, `/ws`, `/lookup`)"
|
||||
- "traefik.http.routers.pulsar.entrypoints=websecure"
|
||||
- "traefik.http.routers.pulsar.tls=true"
|
||||
- "traefik.http.services.pulsar.loadbalancer.server.port=8080"
|
||||
|
||||
networks:
|
||||
pulsar-manager-net:
|
||||
name: pulsar-manager-net
|
||||
driver: bridge
|
||||
traefik-public:
|
||||
external: true
|
||||
smartcity-shared:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
pulsar-manager-db-data:
|
||||
|
||||
107
session_resume_2026-05-07.md
Normal file
107
session_resume_2026-05-07.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# 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)
|
||||
|
||||
### MapStore ↔ GeoServer — configuré ✅
|
||||
**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 ✅
|
||||
```
|
||||
Reference in New Issue
Block a user