diff --git a/docker-compose/common.yml b/docker-compose/common.yml index 97b44d4..4e563db 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -120,9 +120,46 @@ services: - IOTA_CB_NGSI_VERSION=ld # use NGSI-LD when sending updates for active attributes - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld - IOTA_FALLBACK_TENANT=openiot + - IOTA_MULTI_CORE=true healthcheck: interval: 5s + farmer: + labels: + org.fiware: 'tutorial' + image: quay.io/fiware/tutorials.forwarder + hostname: 'farmer' + container_name: cb-farmer + ports: + - 1027:80 + environment: + - TENANT=farmer + - DEBUG=broker:* + + labourer: + labels: + org.fiware: 'tutorial' + image: quay.io/fiware/tutorials.forwarder + hostname: 'labourer' + container_name: cb-labourer + ports: + - 1028:80 + environment: + - TENANT=labourer + - DEBUG=broker:* + + vet: + labels: + org.fiware: 'tutorial' + image: quay.io/fiware/tutorials.forwarder + hostname: 'vet' + container_name: cb-vet + ports: + - 1029:80 + environment: + - TENANT=vet + - DEBUG=broker:* + networks: default: labels: diff --git a/docker-compose/orion-ld.yml b/docker-compose/orion-ld.yml index 017b6d7..f2ff157 100644 --- a/docker-compose/orion-ld.yml +++ b/docker-compose/orion-ld.yml @@ -45,3 +45,13 @@ services: - DUMMY_DEVICES_PAYLOAD=ULTRALIGHT - CONTEXT_BROKER=http://orion:${ORION_LD_PORT}/ngsi-ld/v1 # URL of the context broker to update context + + farmer: + environment: + - CONTEXT_BROKER=http://orion:${ORION_LD_PORT} + labourer: + environment: + - CONTEXT_BROKER=http://orion:${ORION_LD_PORT} + vet: + environment: + - CONTEXT_BROKER=http://orion:${ORION_LD_PORT} \ No newline at end of file diff --git a/docker-compose/scorpio.yml b/docker-compose/scorpio.yml index ea25a75..c01a902 100644 --- a/docker-compose/scorpio.yml +++ b/docker-compose/scorpio.yml @@ -66,5 +66,15 @@ services: - DUMMY_DEVICES_PAYLOAD=ULTRALIGHT - CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context + farmer: + environment: + - CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT} + labourer: + environment: + - CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT} + vet: + environment: + - CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT} + volumes: postgres-db: ~ \ No newline at end of file diff --git a/import-data b/import-data index abf2909..15813fb 100755 --- a/import-data +++ b/import-data @@ -530,7 +530,8 @@ curl -s -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOperations/upsert "type": "Property", "value": 20, "unitCode": "KGM" }, "comment": { - "type": "Property", "value": "Buttercup was born today." + "type": "Property", "value": "Buttercup was born today.", + "observedAt": "2024-01-01T15:00:00.000Z" } }, { @@ -633,7 +634,7 @@ curl -s -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOperations/upsert "type": "Animal", "heartRate": { "type": "Property", - "value": 10.4, "unitCode": "CEL", + "value": 10.4, "unitCode": "5K", "observedAt": "2024-02-02T15:00:00.000Z", "providedBy": { "object": "urn:ngsi-ld:Device:cow001", "type": "Relationship" @@ -642,7 +643,7 @@ curl -s -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOperations/upsert "location": { "type": "GeoProperty", "value": { - "type": "Point", "coordinates": [13.404, 52.47, 0.0] + "type": "Point", "coordinates": [13.404, 52.47] }, "observedAt": "2024-02-02T15:00:00.000Z", "providedBy": {