Skip to content

Commit aaa0ed5

Browse files
committed
Split IoT Devices and Tutorial Web-App
1 parent 787845a commit aaa0ed5

File tree

2 files changed

+40
-16
lines changed

2 files changed

+40
-16
lines changed

docker-compose/common.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,38 +119,59 @@ services:
119119
- TENANT=openiot
120120
- DEBUG=broker:*
121121

122-
# Tutorial acts as a series of dummy IoT Sensors over HTTP
122+
# A series of dummy IoT Sensors over HTTP
123+
iot-sensors:
124+
labels:
125+
org.fiware: 'tutorial'
126+
image: quay.io/fiware/tutorials.iot-devices
127+
hostname: iot-sensors
128+
container_name: fiware-iot-devices
129+
networks:
130+
- default
131+
expose:
132+
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
133+
ports:
134+
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
135+
environment:
136+
- DEBUG=devices:*
137+
- WEB_APP_HOST=tutorial
138+
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
139+
- IOTA_HTTP_HOST=iot-agent
140+
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
141+
- MOVE_TRACTOR=-1
142+
- IOTA_DEFAULT_RESOURCE=/iot/json
143+
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
144+
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
145+
- DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov
146+
- DUMMY_DEVICES_PAYLOAD=JSON
147+
148+
149+
# Tutorial acts as a Farm Management Information System
123150
tutorial:
124151
labels:
125152
org.fiware: 'tutorial'
126153
image: quay.io/fiware/tutorials.ngsi-ld
127-
hostname: iot-sensors
154+
hostname: tutorial
128155
container_name: fiware-tutorial
129156
depends_on:
130157
- mongo-db
131158
networks:
132-
default:
133-
aliases:
134-
- tutorial
135-
- context-provider
159+
- default
136160
expose:
137161
- "${TUTORIAL_APP_PORT}"
138-
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
139162
ports:
140163
- "${TUTORIAL_APP_PORT}:${TUTORIAL_APP_PORT}" # localhost:3000
141-
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
142164
environment:
143165
- DEBUG=tutorial:*
144166
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
145167
- IOTA_HTTP_HOST=iot-agent
146168
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
147-
- OPENWEATHERMAP_KEY_ID=<ADD_YOUR_KEY_ID>
148-
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
149-
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>
169+
- DUMMY_DEVICES=http://iot-sensors:3001
170+
- DUMMY_DEVICES_TRANSPORT=HTTP
171+
- DUMMY_DEVICES_PAYLOAD=JSON
150172
- MONGO_URL=mongodb://mongo-db:27017
151173
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
152-
- MOVE_TRACTOR=-1
153-
174+
- NGSI_LD_TENANT=openiot
154175

155176
networks:
156177
default:

services

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ case "${command}" in
192192
echo -e "Starting containers: \033[1;34mOrion\033[0m, \033[1;36mIoT-Agent\033[0m, \033[1mTutorial\033[0m, a linked data \033[1mContext\033[0m and a \033[1mMongoDB\033[0m database."
193193
echo -e "- \033[1;34mOrion\033[0m is the context broker"
194194
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the JSON Protocol"
195-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
195+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
196+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
196197
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
197198
echo ""
198199
${dockerCmd} -f docker-compose/common.yml -f docker-compose/orion-ld.yml up -d --remove-orphans --renew-anon-volumes
@@ -212,7 +213,8 @@ case "${command}" in
212213
echo -e "Starting containers: \033[1;34mScorpio\033[0m, and a \033[1mPostgres\033[0m database, \033[1;36mIoT-Agent\033[0m, \033[1mTutorial\033[0m and a \033[1mMongoDB\033[0m database."
213214
echo -e "- \033[1;34mScorpio\033[0m is the context broker"
214215
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the JSON Protocol"
215-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
216+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
217+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
216218
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
217219
echo ""
218220
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml up -d --remove-orphans --renew-anon-volumes
@@ -232,7 +234,8 @@ case "${command}" in
232234
echo -e "Starting containers: \033[1;34mStellio\033[0m, \033[1mKafka\033[0m, \033[1mZookeeper\033[0m and a \033[1mPostgres\033[0m database, \033[1;36mIoT-Agent\033[0m, \033[1mTutorial\033[0m and a \033[1mMongoDB\033[0m database."
233235
echo -e "- \033[1;34mStellio\033[0m is the context broker"
234236
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the JSON Protocol"
235-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
237+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
238+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
236239
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
237240
echo ""
238241
${dockerCmd} -f docker-compose/common.yml -f docker-compose/stellio.yml up -d --remove-orphans --renew-anon-volumes

0 commit comments

Comments
 (0)