Skip to content

Commit 151c494

Browse files
committed
Split IoT Devices and Tutorial Web-App
1 parent 42f470a commit 151c494

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

docker-compose/common.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,40 +112,53 @@ services:
112112
- TENANT=openiot
113113
- DEBUG=broker:*
114114

115-
# Tutorial acts as a series of dummy IoT Sensors over HTTP
115+
# A series of dummy IoT Sensors over HTTP
116+
iot-sensors:
117+
labels:
118+
org.fiware: 'tutorial'
119+
image: quay.io/fiware/tutorials.iot-devices
120+
hostname: iot-sensors
121+
container_name: fiware-iot-devices
122+
networks:
123+
- default
124+
expose:
125+
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
126+
ports:
127+
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
128+
environment:
129+
- DEBUG=devices:*
130+
- WEB_APP_HOST=tutorial
131+
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
132+
- IOTA_HTTP_HOST=iot-agent
133+
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
134+
- PIG_COUNT=${PIG_COUNT}
135+
- COW_COUNT=${COW_COUNT}
136+
137+
# Tutorial acts as a Farm Management Information System
116138
tutorial:
117139
labels:
118140
org.fiware: 'tutorial'
119141
image: quay.io/fiware/tutorials.ngsi-ld
120-
hostname: iot-sensors
142+
hostname: tutorial
121143
container_name: fiware-tutorial
122144
depends_on:
123145
- mongo-db
124146
networks:
125-
default:
126-
aliases:
127-
- tutorial
128-
- context-provider
147+
- default
129148
expose:
130149
- "${TUTORIAL_APP_PORT}"
131-
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
132150
ports:
133151
- "${TUTORIAL_APP_PORT}:${TUTORIAL_APP_PORT}" # localhost:3000
134-
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
135152
environment:
136153
- DEBUG=tutorial:*
137154
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
138155
- IOTA_HTTP_HOST=iot-agent
139156
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
140-
- OPENWEATHERMAP_KEY_ID=<ADD_YOUR_KEY_ID>
141-
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
142-
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>
157+
- DUMMY_DEVICES=http://iot-sensors:3001
143158
- MONGO_URL=mongodb://mongo-db:27017
144159
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
145-
- "CRATE_DB_SERVICE_URL=http://crate-db:4200/_sql"
146-
147-
- PIG_COUNT=${PIG_COUNT}
148-
- COW_COUNT=${COW_COUNT}
160+
- CRATE_DB_SERVICE_URL=http://crate-db:4200/_sql
161+
- NGSI_LD_TENANT=openiot
149162

150163

151164
# Quantum Leap is persisting Short Term History to Crate-DB

services

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ case "${command}" in
197197
echo -e "- \033[1;34mOrion\033[0m is the context broker"
198198
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
199199
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
200+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
201+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
200202
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
201203
echo ""
202204
${dockerCmd} -f docker-compose/common.yml -f docker-compose/orion-ld.yml -p fiware up -d --renew-anon-volumes
@@ -216,6 +218,8 @@ case "${command}" in
216218
echo -e "- \033[1;Scorpio\033[0m is the context broker"
217219
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
218220
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
221+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
222+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
219223
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
220224
echo ""
221225
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml -p fiware up -d --remove-orphans --renew-anon-volumes
@@ -235,6 +239,8 @@ case "${command}" in
235239
echo -e "- \033[1;Stellio\033[0m is the context broker"
236240
echo -e "- \033[1;34mQuantumLeap\033[0m will write to CrateDB"
237241
echo -e "- \033[1mGrafana\033[0m will read from CrateDB"
242+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
243+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
238244
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
239245
echo ""
240246
${dockerCmd} -f docker-compose/common.yml -f docker-compose/stellio.yml -p fiware up -d --remove-orphans --renew-anon-volumes

0 commit comments

Comments
 (0)