Skip to content

Commit

Permalink
Add data space proxies.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Apr 5, 2024
1 parent cfda7e2 commit c9f1fe0
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
37 changes: 37 additions & 0 deletions docker-compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions docker-compose/orion-ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
10 changes: 10 additions & 0 deletions docker-compose/scorpio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ~
7 changes: 4 additions & 3 deletions import-data
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
Expand All @@ -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": {
Expand Down

0 comments on commit c9f1fe0

Please sign in to comment.