Skip to content

Commit 16c9aad

Browse files
committed
Split IoT Devices and Tutorial Web-App
1 parent a0de913 commit 16c9aad

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

docker-compose/common.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,37 +80,55 @@ services:
8080
- TENANT=openiot
8181
- DEBUG=broker:*
8282

83-
# Tutorial acts as a series of dummy IoT Sensors over HTTP
83+
84+
# A series of dummy IoT Sensors over HTTP
85+
iot-sensors:
86+
labels:
87+
org.fiware: 'tutorial'
88+
image: quay.io/fiware/tutorials.iot-devices
89+
hostname: iot-sensors
90+
container_name: fiware-iot-devices
91+
networks:
92+
- default
93+
expose:
94+
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
95+
ports:
96+
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
97+
environment:
98+
- DEBUG=devices:*
99+
- WEB_APP_HOST=tutorial
100+
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
101+
- IOTA_HTTP_HOST=iot-agent
102+
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
103+
- MOVE_TRACTOR=-1
104+
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
105+
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
106+
- DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov
107+
108+
# Tutorial acts as a Farm Management Information System
84109
tutorial:
85110
labels:
86111
org.fiware: 'tutorial'
87112
image: quay.io/fiware/tutorials.ngsi-ld
88-
hostname: iot-sensors
113+
hostname: tutorial
89114
container_name: fiware-tutorial
90115
depends_on:
91116
- mongo-db
92117
networks:
93-
default:
94-
aliases:
95-
- tutorial
96-
- context-provider
118+
- default
97119
expose:
98120
- "${TUTORIAL_APP_PORT}"
99-
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
100121
ports:
101122
- "${TUTORIAL_APP_PORT}:${TUTORIAL_APP_PORT}" # localhost:3000
102-
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
103123
environment:
104124
- DEBUG=tutorial:*
105125
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
106126
- IOTA_HTTP_HOST=iot-agent
107127
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
108-
- OPENWEATHERMAP_KEY_ID=<ADD_YOUR_KEY_ID>
109-
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
110-
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>
128+
- DUMMY_DEVICES=http://iot-sensors:3001
111129
- MONGO_URL=mongodb://mongo-db:27017
112130
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
113-
- MOVE_TRACTOR=-1
131+
- NGSI_LD_TENANT=openiot
114132

115133

116134
# IoT-Agent is configured for the UltraLight Protocol

services

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ case "${command}" in
194194
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."
195195
echo -e "- \033[1;34mOrion\033[0m is the context broker"
196196
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
197-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
197+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
198+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
198199
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
199200
echo ""
200201
${dockerCmd} -f docker-compose/common.yml -f docker-compose/orion-ld.yml up -d --remove-orphans --renew-anon-volumes
@@ -214,7 +215,8 @@ case "${command}" in
214215
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, a linked data \033[1mContext\033[0m and a \033[1mMongoDB\033[0m database."
215216
echo -e "- \033[1;34mScorpio\033[0m is the context broker"
216217
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
217-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
218+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
219+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
218220
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
219221
echo ""
220222
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml up -d --remove-orphans --renew-anon-volumes
@@ -234,7 +236,8 @@ case "${command}" in
234236
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, a linked data \033[1mContext\033[0m and a \033[1mMongoDB\033[0m database."
235237
echo -e "- \033[1;34mStellio\033[0m is the context broker"
236238
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
237-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
239+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
240+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
238241
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
239242
echo ""
240243
${dockerCmd} -f docker-compose/common.yml -f docker-compose/stellio.yml up -d --remove-orphans --renew-anon-volumes

0 commit comments

Comments
 (0)