docs: Final session resume 2026-05-06 - 3 IoT Agents, Orion-LD, Stellio next steps
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# IoT Agent JSON - Registry in Memory (no MongoDB needed)
|
||||
# IoT Agent JSON - 3 instances (one per MQTT broker)
|
||||
# Usage: docker compose -f docker-compose.yml -f docker-compose.iot-agent.yml up -d
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
iot-agent:
|
||||
# Instance 1: EMQX
|
||||
iot-agent-emqx:
|
||||
image: fiware/iotagent-json:latest
|
||||
container_name: smart-city-iot-agent
|
||||
container_name: smart-city-iot-agent-emqx
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- smartcity-shared
|
||||
@@ -14,19 +14,19 @@ services:
|
||||
ports:
|
||||
- "4041:4041"
|
||||
environment:
|
||||
# Context Broker (Stellio)
|
||||
- IOTA_CB_HOST=stellio-api-gateway
|
||||
- IOTA_CB_PORT=8080
|
||||
- IOTA_CB_NGSI_VERSION=ld
|
||||
# Context Broker (Orion-LD)
|
||||
- IOTA_CB_HOST=orion-ld
|
||||
- IOTA_CB_PORT=1026
|
||||
- IOTA_CB_NGSI_VERSION=v2
|
||||
# IoT Agent settings
|
||||
- IOTA_NORTH_PORT=4041
|
||||
- IOTA_REGISTRY_TYPE=memory
|
||||
# MQTT Listener - connect to EMQX
|
||||
# MQTT Listener - EMQX
|
||||
- IOTA_MQTT_HOST=emqx_emqx_1
|
||||
- IOTA_MQTT_PORT=1883
|
||||
# No MongoDB needed - using memory registry
|
||||
- IOTA_PROVIDER_URL=http://smart-city-iot-agent:4041
|
||||
- IOTA_PROVIDER_URL=http://smart-city-iot-agent-emqx:4041
|
||||
- IOTA_DEFAULT_RESOURCE=/
|
||||
- IOTA_DEFAULT_APIKEY=smartcity-emqx
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:4041/version || exit 1"]
|
||||
interval: 30s
|
||||
@@ -35,10 +35,72 @@ services:
|
||||
start_period: 60s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.iot-agent.rule=Host(`iot-agent.digitribe.fr`)"
|
||||
- "traefik.http.routers.iot-agent.entrypoints=websecure"
|
||||
- "traefik.http.routers.iot-agent.tls=true"
|
||||
- "traefik.http.services.iot-agent.loadbalancer.server.port=4041"
|
||||
- "traefik.http.routers.iot-agent-emqx.rule=Host(`iot-agent-emqx.digitribe.fr`)"
|
||||
- "traefik.http.routers.iot-agent-emqx.entrypoints=websecure"
|
||||
- "traefik.http.routers.iot-agent-emqx.tls=true"
|
||||
- "traefik.http.services.iot-agent-emqx.loadbalancer.server.port=4041"
|
||||
|
||||
# Instance 2: Mosquitto
|
||||
iot-agent-mosquitto:
|
||||
image: fiware/iotagent-json:latest
|
||||
container_name: smart-city-iot-agent-mosquitto
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "4042:4042"
|
||||
environment:
|
||||
# Context Broker (Orion-LD)
|
||||
- IOTA_CB_HOST=orion-ld
|
||||
- IOTA_CB_PORT=1026
|
||||
- IOTA_CB_NGSI_VERSION=v2
|
||||
# IoT Agent settings
|
||||
- IOTA_NORTH_PORT=4042
|
||||
- IOTA_REGISTRY_TYPE=memory
|
||||
# MQTT Listener - Mosquitto
|
||||
- IOTA_MQTT_HOST=mosquitto
|
||||
- IOTA_MQTT_PORT=1883
|
||||
- IOTA_PROVIDER_URL=http://smart-city-iot-agent-mosquitto:4042
|
||||
- IOTA_DEFAULT_RESOURCE=/
|
||||
- IOTA_DEFAULT_APIKEY=smartcity-mosquitto
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:4042/version || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
# Instance 3: BunkerM
|
||||
iot-agent-bunkerm:
|
||||
image: fiware/iotagent-json:latest
|
||||
container_name: smart-city-iot-agent-bunkerm
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- smartcity-shared
|
||||
ports:
|
||||
- "4043:4043"
|
||||
environment:
|
||||
# Context Broker (Orion-LD)
|
||||
- IOTA_CB_HOST=orion-ld
|
||||
- IOTA_CB_PORT=1026
|
||||
- IOTA_CB_NGSI_VERSION=v2
|
||||
# IoT Agent settings
|
||||
- IOTA_NORTH_PORT=4043
|
||||
- IOTA_REGISTRY_TYPE=memory
|
||||
# MQTT Listener - BunkerM
|
||||
- IOTA_MQTT_HOST=bunkerm_bunkerm_1
|
||||
- IOTA_MQTT_PORT=1900
|
||||
- IOTA_MQTT_USERNAME=bunker
|
||||
- IOTA_MQTT_PASSWORD=bunker
|
||||
- IOTA_PROVIDER_URL=http://smart-city-iot-agent-bunkerm:4043
|
||||
- IOTA_DEFAULT_RESOURCE=/
|
||||
- IOTA_DEFAULT_APIKEY=smartcity-bunkerm
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:4043/version || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
networks:
|
||||
smartcity-shared:
|
||||
|
||||
Reference in New Issue
Block a user