Skip to content

Commit

Permalink
Split IoT Devices and Tutorial Web-App
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Feb 3, 2025
1 parent 42f470a commit 151c494
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
43 changes: 28 additions & 15 deletions docker-compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,40 +112,53 @@ services:
- TENANT=openiot
- DEBUG=broker:*

# Tutorial acts as a series of dummy IoT Sensors over HTTP
# A series of dummy IoT Sensors over HTTP
iot-sensors:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/tutorials.iot-devices
hostname: iot-sensors
container_name: fiware-iot-devices
networks:
- default
expose:
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
ports:
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
environment:
- DEBUG=devices:*
- WEB_APP_HOST=tutorial
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
- IOTA_HTTP_HOST=iot-agent
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
- PIG_COUNT=${PIG_COUNT}
- COW_COUNT=${COW_COUNT}

# Tutorial acts as a Farm Management Information System
tutorial:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/tutorials.ngsi-ld
hostname: iot-sensors
hostname: tutorial
container_name: fiware-tutorial
depends_on:
- mongo-db
networks:
default:
aliases:
- tutorial
- context-provider
- default
expose:
- "${TUTORIAL_APP_PORT}"
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
ports:
- "${TUTORIAL_APP_PORT}:${TUTORIAL_APP_PORT}" # localhost:3000
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
environment:
- DEBUG=tutorial:*
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
- IOTA_HTTP_HOST=iot-agent
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
- OPENWEATHERMAP_KEY_ID=<ADD_YOUR_KEY_ID>
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>
- DUMMY_DEVICES=http://iot-sensors:3001
- MONGO_URL=mongodb://mongo-db:27017
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
- "CRATE_DB_SERVICE_URL=http://crate-db:4200/_sql"

- PIG_COUNT=${PIG_COUNT}
- COW_COUNT=${COW_COUNT}
- CRATE_DB_SERVICE_URL=http://crate-db:4200/_sql
- NGSI_LD_TENANT=openiot


# Quantum Leap is persisting Short Term History to Crate-DB
Expand Down
6 changes: 6 additions & 0 deletions services
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ case "${command}" in
echo -e "- \033[1;34mOrion\033[0m is the context broker"
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
echo ""
${dockerCmd} -f docker-compose/common.yml -f docker-compose/orion-ld.yml -p fiware up -d --renew-anon-volumes
Expand All @@ -216,6 +218,8 @@ case "${command}" in
echo -e "- \033[1;Scorpio\033[0m is the context broker"
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
echo ""
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml -p fiware up -d --remove-orphans --renew-anon-volumes
Expand All @@ -235,6 +239,8 @@ case "${command}" in
echo -e "- \033[1;Stellio\033[0m is the context broker"
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
echo ""
${dockerCmd} -f docker-compose/common.yml -f docker-compose/stellio.yml -p fiware up -d --remove-orphans --renew-anon-volumes
Expand Down

0 comments on commit 151c494

Please sign in to comment.