feat: Add Redpanda Console, Pulsar Distribution Service, and Grafana Dashboards
- Add Redpanda Console service (port 28080, Traefik integration) - Add Pulsar Distribution Service (Pulsar -> Brokers) - Create Grafana dashboards for Redpanda, Pulsar, and Smart City Ingestion - Configure Prometheus targets for Pulsar and Redpanda metrics - Fix FROST URL in distribution service - Create session resume for 2026-05-05
This commit is contained in:
10
pulsar/application.properties
Normal file
10
pulsar/application.properties
Normal file
@@ -0,0 +1,10 @@
|
||||
server.port=7750
|
||||
pulsar.cluster=standalone
|
||||
pulsar.service-url=pulsar://smart-city-pulsar:6650
|
||||
pulsar.web-service-url=http://smart-city-pulsar:8080
|
||||
spring.datasource.driver-class-name=herddb.jdbc.Driver
|
||||
spring.datasource.url=jdbc:herddb:server:localhost:7000?server.start=true&server.base.dir=dbdata
|
||||
spring.datasource.initialization-mode=never
|
||||
logging.level.org.apache=INFO
|
||||
redirect.host=localhost
|
||||
redirect.port=7750
|
||||
24
pulsar/docker-compose-simple.yml
Normal file
24
pulsar/docker-compose-simple.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
pulsar-manager:
|
||||
image: apachepulsar/pulsar-manager:v0.4.0
|
||||
container_name: smart-city-pulsar-manager
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik-public
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "7750:7750"
|
||||
environment:
|
||||
- SPRING_APPLICATION_JSON={"server":{"port":7750},"pulsar":{"cluster":"standalone","serviceUrl":"pulsar://smart-city-pulsar:6650","webServiceUrl":"http://smart-city-pulsar:8080"},"spring":{"datasource":{"driverClassName":"herddb.jdbc.Driver","url":"jdbc:herddb:server:localhost:7000?server.start=true&server.base.dir=dbdata","initialization-mode":"never"},"logging":{"level":{"org":{"apache":"INFO"}}},"redirect":{"host":"localhost","port":7750}}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pulsar-manager.rule=Host(`pulsar.digitribe.fr`)"
|
||||
- "traefik.http.routers.pulsar-manager.entrypoints=websecure"
|
||||
- "traefik.http.routers.pulsar-manager.tls=true"
|
||||
- "traefik.http.services.pulsar-manager.loadbalancer.server.port=7750"
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
smartcity-shared:
|
||||
external: true
|
||||
45
pulsar/docker-compose.manager.yml
Normal file
45
pulsar/docker-compose.manager.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# Pulsar Manager - Web UI for managing Pulsar
|
||||
# Access: https://pulsar.digitribe.fr
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
pulsar-manager:
|
||||
image: apachepulsar/pulsar-manager:v0.4.0
|
||||
container_name: smart-city-pulsar-manager
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
pulsar:
|
||||
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"}}
|
||||
networks:
|
||||
- traefik-public
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "7750:7750"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:7750 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pulsar-manager.rule=Host(`pulsar.digitribe.fr`)"
|
||||
- "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:
|
||||
traefik-public:
|
||||
external: true
|
||||
smartcity-shared:
|
||||
external: true
|
||||
@@ -1,8 +1,11 @@
|
||||
# Apache Pulsar Standalone - Smart City Digital Twin Martinique
|
||||
# HTTP Admin UI: https://pulsar.digitribe.fr (via Traefik)
|
||||
# HTTP API: http://smart-city-pulsar:8080/admin/v2
|
||||
# Binary: pulsar://smart-city-pulsar:6650
|
||||
# Apache Pulsar Stack - Smart City Digital Twin Martinique
|
||||
# Includes: Pulsar Standalone + Pulsar Manager
|
||||
# Pulsar Admin: https://pulsar.digitribe.fr/admin
|
||||
# Pulsar Manager: https://pulsar.digitribe.fr
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Pulsar Standalone
|
||||
pulsar:
|
||||
image: apachepulsar/pulsar:3.2.0
|
||||
container_name: smart-city-pulsar
|
||||
@@ -28,10 +31,66 @@ services:
|
||||
start_period: 60s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pulsar.rule=Host(`pulsar.digitribe.fr`)"
|
||||
- "traefik.http.routers.pulsar.entrypoints=websecure"
|
||||
- "traefik.http.routers.pulsar.tls=true"
|
||||
- "traefik.http.services.pulsar.loadbalancer.server.port=8080"
|
||||
- "traefik.http.routers.pulsar-admin.rule=Host(`pulsar.digitribe.fr`) && PathPrefix(`/admin`, `/ws`, `/lookup`)"
|
||||
- "traefik.http.routers.pulsar-admin.entrypoints=websecure"
|
||||
- "traefik.http.routers.pulsar-admin.tls=true"
|
||||
- "traefik.http.services.pulsar-admin.loadbalancer.server.port=8080"
|
||||
|
||||
# Pulsar Manager - Web UI
|
||||
pulsar-manager:
|
||||
image: apachepulsar/pulsar-manager:v0.4.0
|
||||
container_name: smart-city-pulsar-manager
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
pulsar:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- URL=jdbc:postgresql://127.0.0.1:5432/pulsar_manager
|
||||
- POSTGRES_PASSWORD=Digitribe972
|
||||
networks:
|
||||
- traefik-public
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "7750:7750"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:7750 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 120s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pulsar-manager.rule=Host(`pulsar.digitribe.fr`)"
|
||||
- "traefik.http.routers.pulsar-manager.entrypoints=web"
|
||||
- "traefik.http.services.pulsar-manager.loadbalancer.server.port=7750"
|
||||
|
||||
# Pulsar Distribution Service - Consumer → Republish to Brokers
|
||||
pulsar-distribution:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: smart-city-pulsar-distribution
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- pulsar
|
||||
environment:
|
||||
- PULSAR_HOST=smart-city-pulsar
|
||||
- PULSAR_PORT=6650
|
||||
- EMQX_HOST=emqx_emqx_1
|
||||
- EMQX_PORT=1883
|
||||
- MOSQUITTO_HOST=mosquitto-traefik
|
||||
- MOSQUITTO_PORT=1883
|
||||
- ORION_URL=http://fiware-gis-quickstart-orion-1:1026
|
||||
- STELLIO_URL=http://stellio-api-gateway:8080
|
||||
- FROST_URL=http://frost-api-8090:8080/FROST-Server/v1.1
|
||||
networks:
|
||||
- smartcity-shared
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "ps aux | grep -q distribution || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
@@ -41,3 +100,4 @@ networks:
|
||||
|
||||
volumes:
|
||||
pulsar-data:
|
||||
pulsar-manager-data:
|
||||
|
||||
18
pulsar/supervisord-custom.conf
Normal file
18
pulsar/supervisord-custom.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/pulsar-manager/supervisord.log
|
||||
pidfile=/pulsar-manager/supervisord.pid
|
||||
|
||||
[program:pulsar-manager-frontend]
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/tmp/pulsar-manager-frontend-stderr---supervisor-%(host_node_name)s.log
|
||||
stdout_logfile=/tmp/pulsar-manager-frontend-stdout---supervisor-%(host_node_name)s.log
|
||||
|
||||
[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.initialization-mode=never --logging.level.org.apache=%(ENV_LOG_LEVEL)s
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/tmp/pulsar-manager-backend-stderr---supervisor-%(host_node_name)s.log
|
||||
stdout_logfile=/tmp/pulsar-manager-backend-stdout---supervisor-%(host_node_name)s.log
|
||||
18
pulsar/supervisord-fixed.conf
Normal file
18
pulsar/supervisord-fixed.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/pulsar-manager/supervisord.log
|
||||
pidfile=/pulsar-manager/supervisord.pid
|
||||
|
||||
[program:pulsar-manager-frontend]
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/tmp/pulsar-manager-frontend-stderr---supervisor-%(host_node_name)s.log
|
||||
stdout_logfile=/tmp/pulsar-manager-frontend-stdout---supervisor-%(host_node_name)s.log
|
||||
|
||||
[program:pulsar-manager-backend]
|
||||
command=/pulsar-manager/pulsar-manager/bin/pulsar-manager --redirect.host=localhost --redirect.port=7750 --spring.datasource.driver-class-name=herddb.jdbc.Driver --spring.datasource.url=jdbc:herddb:server:localhost:7000?server.start=true&server.base.dir=dbdata --spring.datasource.initialization-mode=never --logging.level.org.apache=INFO --pulsar.cluster=standalone --pulsar.service-url=pulsar://smart-city-pulsar:6650 --pulsar.web-service-url=http://smart-city-pulsar:8080
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/tmp/pulsar-manager-backend-stderr---supervisor-%(host_node_name)s.log
|
||||
stdout_logfile=/tmp/pulsar-manager-backend-stdout---supervisor-%(host_node_name)s.log
|
||||
Reference in New Issue
Block a user