Skip to content

Commit c49245c

Browse files
committed
Split IoT Devices and Tutorial Web-App
1 parent 59ce3f8 commit c49245c

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

docker-compose/common.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,39 +112,52 @@ 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-
146-
- PIG_COUNT=${PIG_COUNT}
147-
- COW_COUNT=${COW_COUNT}
160+
- NGSI_LD_TENANT=openiot
148161

149162

150163
networks:

services

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ case "${command}" in
198198
echo -e "- \033[1;34mOrion\033[0m is the context broker - writes to Timescale"
199199
echo -e "- \033[1;34mMintaka\033[0m offers temporal functions - reads from Timescale"
200200
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
201-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
201+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
202+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
202203
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
203204
echo ""
204205
${dockerCmd} -f docker-compose/mintaka.yml -p fiware up -d --remove-orphans --renew-anon-volumes
@@ -219,7 +220,8 @@ case "${command}" in
219220
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."
220221
echo -e "- \033[1;34mScorpio\033[0m is the context broker"
221222
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
222-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
223+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
224+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
223225
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
224226
echo ""
225227
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml -p fiware up -d --remove-orphans --renew-anon-volumes
@@ -238,7 +240,8 @@ case "${command}" in
238240
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."
239241
echo -e "- \033[1;34mStellio\033[0m is the context broker"
240242
echo -e "- \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
241-
echo -e "- \033[1mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
243+
echo -e "- \033[1mTutorial\033[0m displays a web app to manipulate the context directly"
244+
echo -e "- \033[1mIoT Devices\033[0m acts as a series of dummy IoT Sensors over HTTP"
242245
echo -e "- Data models \033[1m@context\033[0m (Smart Farm) is supplied externally"
243246
echo ""
244247
${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)