fix: Traefik routing OpenRemote/Ditto + QuantumLeap config (2026-05-08)

This commit is contained in:
Eric FELIXINE
2026-05-08 03:11:13 -04:00
parent dfaa240d5a
commit ae153c4e5e
16 changed files with 1224 additions and 2 deletions

26
init/iot-agent-provision.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Wait for IoT Agent to be ready
sleep 10
# Provision Service
curl -s -X POST http://localhost:4041/iot/services \
-H "Content-Type: application/json" \
-H "fiware-service: smartcity" \
-H "fiware-servicepath: /" \
-d '{
"services": [{
"apikey": "smartcity-api-key",
"cbroker": "http://smart-city-orion-ld:1026",
"entity_type": "Thing",
"resource": "/iot/json"
}]
}'
# Provision Devices (Traffic, Parking, Noise, Weather, Light)
for i in 0 1 2; do
curl -s -X POST http://localhost:4041/iot/devices \
-H "Content-Type: application/json" \
-H "fiware-service: smartcity" \
-H "fiware-servicepath: /" \
-d "{\"devices\": [{\"device_id\": \"traffic_00${i}\", \"entity_name\": \"urn:ngsi-ld:TrafficFlowObserved:traffic_00${i}\", \"entity_type\": \"TrafficFlowObserved\", \"protocol\": \"PDI-IoTA-JSON\", \"transport\": \"MQTT\"}]}";
done
# (Add other types similarly)
echo "Provisioning done"