Skip to content

Commit

Permalink
Updating scenario.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Mar 14, 2024
1 parent 1ce0d20 commit fa31e9a
Show file tree
Hide file tree
Showing 8 changed files with 599 additions and 1,023 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ORION_VERSION=3.8.1

# Orion variables
ORION_LD_PORT=1026
ORION_LD_VERSION=1.5.1
ORION_LD_VERSION=1.6.0-pre-1593

# Scorpio variables
SCORPIO_PORT=9090
Expand All @@ -35,5 +35,5 @@ IOTA_SOUTH_PORT=7896
TUTORIAL_APP_PORT=3000
TUTORIAL_DUMMY_DEVICE_PORT=3001

PIG_COUNT=20
COW_COUNT=20
PIG_COUNT=0
COW_COUNT=10

This file was deleted.

32 changes: 29 additions & 3 deletions data-models/alternate-context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"id": "@id",
"ngsi-ld": "https://uri.etsi.org/ngsi-ld/",
"fiware": "https://uri.fiware.org/ns/dataModels#",
"agrifood": "https://smartdatamodels.org/dataModel.Agrifood/",
"schema": "https://schema.org/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
Expand Down Expand Up @@ -133,9 +134,34 @@
"ein": "https://w3id.org/saref#on",
"aus": "https://w3id.org/saref#off",

"spezies": "fiware:species",
"sex": "fiware:sex",
"rechtlicheIdentität": "fiware:legalID"

"rasse": "agrifood:breed",
"gekalbtVon": "agrifood:calvedBy",
"gefüttertMit": "agrifood:fedWith",
"futtermittelverbrauch": "agrifood:feedConsumption",
"gesundheitszustand": "agrifood:healthCondition",
"rechtlicheIdentität": "agrifood:legalId",
"fortpflanzungszustand": "agrifood:reproductiveCondition",
"sex": "agrifood:sex",
"gezeugtVon": "agrifood:siredBy",
"spezies": "agrifood:species",
"tierarzt": "agrifood:veterinarian",
"kommentar": "schema:comment",

"gesunde": "agrifood:healthy",
"kranke": "agrifood:sick",
"inBehandlung": "agrifood:inTreatment",
"laktierendesBaby": "agrifood:lactatingBaby",
"grasendesBaby": "agrifood:grazingBaby",
"männlichErwachsener": "agrifood:maleAdult",
"weiblichErwachsener": "agrifood:femaleAdult",
"männlichJunge": "agrifood:maleYoung",
"weiblichJunge": "agrifood:femaleYoung",
"keinStatus": "agrifood:noStatus",
"inaktive": "agrifood:inactive",
"trächtig": "agrifood:inCalf",
"läufig": "agrifood:inHeat",
"active": "agrifood:active"
},
"@graph": [
{
Expand Down
36 changes: 28 additions & 8 deletions data-models/ngsi-context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"fiware": "https://uri.fiware.org/ns/dataModels#",
"schema": "https://schema.org/",
"tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#",
"agrifood": "https://smartdatamodels.org/dataModel.Agrifood/",
"Building": "fiware:Building",
"Device": "fiware:Device",
"Animal": "fiware:Animal",
"Animal": "agrifood:Animal",
"Female": "schema:Female",
"FillingLevelSensor": "tutorial:FillingLevelSensor",
"Herbicide": "tutorial:Product",
Expand Down Expand Up @@ -131,14 +132,33 @@
"on": "https://w3id.org/saref#on",
"off": "https://w3id.org/saref#off",
"verified": "fiware:verified",
"species": "fiware:species",
"sex": "fiware:sex",
"legalID": "fiware:legalID",

"breed": "agrifood:breed",
"calvedBy": "agrifood:calvedBy",
"fedWith": "agrifood:fedWith",
"feedConsumption": "agrifood:feedConsumption",
"healthCondition": "agrifood:healthCondition",
"legalId": "agrifood:legalId",
"reproductiveCondition": "agrifood:reproductiveCondition",
"sex": "agrifood:sex",
"siredBy": "agrifood:siredBy",
"species": "agrifood:species",
"veterinarian": "agrifood:veterinarian",
"comment": "schema:comment",

"InventoryItem" : "fiware:InventoryItem",
"Product" : "fiware:Product",
"Shelf" : "fiware:Shelf",
"Store": "fiware:Building"
"healthy": "agrifood:healthy",
"sick": "agrifood:sick",
"inTreatment": "agrifood:inTreatment",
"lactatingBaby": "agrifood:lactatingBaby",
"grazingBaby": "agrifood:grazingBaby",
"maleAdult": "agrifood:maleAdult",
"femaleAdult": "agrifood:femaleAdult",
"maleYoung": "agrifood:maleYoung",
"femaleYoung": "agrifood:femaleYoung",
"noStatus": "agrifood:noStatus",
"inactive": "agrifood:inactive",
"inCalf": "agrifood:inCalf",
"inHeat": "agrifood:inHeat",
"active": "agrifood:active"
}
}
82 changes: 0 additions & 82 deletions docker-compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,6 @@ services:
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
interval: 5s

mongo-for-orion-v2:
labels:
org.fiware: 'tutorial'
image: mongo:${MONGO_DB_VERSION}
hostname: mongo-db2
container_name: db-mongo-2
volumes:
- mongo-db2:/data
ports:
- 27018:27017 # localhost:27017
networks:
- default


mongo-for-orion-ld:
labels:
org.fiware: 'tutorial'
image: mongo:${MONGO_DB_VERSION}
hostname: mongo-db3
container_name: db-mongo-3
volumes:
- mongo-db3:/data
ports:
- 27019:27017 # localhost:27017
networks:
- default



# Tutorial acts as a series of dummy IoT Sensors over HTTP
tutorial:
Expand Down Expand Up @@ -151,67 +123,13 @@ services:
healthcheck:
interval: 5s

adapter-for-ngsi-v2:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/lepus
hostname: adapter
container_name: adapter-for-v2
networks:
- default
expose:
- "3005"
ports:
- "3005:3000"
environment:
- DEBUG=adapter:*
- NGSI_V2_CONTEXT_BROKER=http://orion2:1026/v2
- CONTEXT_URL=https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld
- NOTIFICATION_RELAY_URL=http://adapter:3000/notify

ngsi-v2:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/orion:${ORION_VERSION}
hostname: orion2
container_name: fiware-orion-v2
depends_on:
- mongo-for-orion-v2
networks:
- default
expose:
- "${ORION_PORT}"
ports:
- "${ORION_PORT}:1026" # localhost:1026
command: -dbhost mongo-db2 -logLevel DEBUG
healthcheck:
test: curl --fail -s http://orion2:1026/version || exit 1
interval: 5s

orion-ld:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/orion-ld:${ORION_LD_VERSION}
hostname: context-broker
container_name: fiware-orion-ld2
depends_on:
- mongo-for-orion-ld
networks:
- default
ports:
- "1028:1026" # localhost:1026
command: -dbhost mongo-db -logLevel DEBUG


networks:
default:
labels:
org.fiware: 'tutorial'

volumes:
mongo-db1: ~
mongo-db2: ~
mongo-db3: ~
mongo-config: ~
data-models:
driver: local
Expand Down
Loading

0 comments on commit fa31e9a

Please sign in to comment.