feat(simulator): real-time (1s), fix ENABLE_PULSAR, add Pulsar/Redpanda publish, fix InfluxDB URL
- Change INTERVAL to 1s for real-time sensor data - Fix ENABLE_PULSAR comparison (accept 'true'/'false' strings) - Add publish_pulsar() and publish_redpanda() functions - Fix InfluxDB URL (smart-city-influxdb instead of digital-twin-influxdb) - Add docker-compose.yml with simulator service - Add redpanda config and start script - Add session_resume_2026-05-05.md
This commit is contained in:
42
redpanda/docker-compose.yml
Normal file
42
redpanda/docker-compose.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
# Redpanda (Kafka-compatible) — Single Node for Smart City Digital Twin Martinique
|
||||
# Usage: docker compose -p smart-city -f redpanda/docker-compose.yml up -d
|
||||
# Ports: 19092=Kafka (host), 9644=Admin API
|
||||
services:
|
||||
redpanda:
|
||||
image: redpandadata/redpanda:v24.3.14
|
||||
container_name: smart-city-redpanda
|
||||
entrypoint: ["/bin/bash", "/start.sh"]
|
||||
volumes:
|
||||
- redpanda-data:/var/lib/redpanda/data
|
||||
- ./start.sh:/start.sh:ro
|
||||
ports:
|
||||
- "19092:9092"
|
||||
- "19644:9644"
|
||||
networks:
|
||||
- traefik-public
|
||||
- smartcity-shared
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2G
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:9644/v1/status/ready 2>/dev/null || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 60s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.redpanda.rule=Host(`redpanda.digitribe.fr`)"
|
||||
- "traefik.http.routers.redpanda.entrypoints=websecure"
|
||||
- "traefik.http.routers.redpanda.tls=true"
|
||||
- "traefik.http.services.redpanda.loadbalancer.server.port=9644"
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
smartcity-shared:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
redpanda-data:
|
||||
29
redpanda/redpanda.yaml
Normal file
29
redpanda/redpanda.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
# Redpanda configuration for Smart City Digital Twin Martinique
|
||||
# Minimal working config - Kafka + Admin API only
|
||||
|
||||
redpanda:
|
||||
node_id: 0
|
||||
data_directory: /var/lib/redpanda/data
|
||||
|
||||
kafka_api:
|
||||
- name: internal
|
||||
address: 0.0.0.0
|
||||
port: 9092
|
||||
|
||||
advertised_kafka_api:
|
||||
- name: internal
|
||||
address: smart-city-redpanda
|
||||
port: 9092
|
||||
|
||||
admin:
|
||||
- address: 0.0.0.0
|
||||
port: 9644
|
||||
|
||||
# Seastar settings
|
||||
seastar:
|
||||
smp: 1
|
||||
memory: 1G
|
||||
reserve_memory: 256M
|
||||
overprovisioned: true
|
||||
|
||||
developer_mode: true
|
||||
12
redpanda/start.sh
Executable file
12
redpanda/start.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Start Redpanda with minimal dev config
|
||||
exec /usr/bin/rpk redpanda start \
|
||||
--mode dev \
|
||||
--smp 1 \
|
||||
--memory 1G \
|
||||
--overprovisioned \
|
||||
--kafka-addr 0.0.0.0:9092 \
|
||||
--advertise-kafka-addr smart-city-redpanda:9092 \
|
||||
--rpc-addr 0.0.0.0:33145 \
|
||||
--advertise-rpc-addr smart-city-redpanda:33145 \
|
||||
--check=false
|
||||
Reference in New Issue
Block a user