Skip to content

Commit 0f59ad8

Browse files
committed
Updating docker-compose
1 parent 4b3a95e commit 0f59ad8

File tree

3 files changed

+58
-50
lines changed

3 files changed

+58
-50
lines changed

README.ja.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,18 +286,20 @@ iot-agent:
286286
ports:
287287
- "4041:4041"
288288
environment:
289-
- "IOTA_CB_HOST=orion"
290-
- "IOTA_CB_PORT=1026"
291-
- "IOTA_NORTH_PORT=4041"
292-
- "IOTA_REGISTRY_TYPE=mongodb"
293-
- "IOTA_LOG_LEVEL=DEBUG"
294-
- "IOTA_TIMESTAMP=true"
295-
- "IOTA_MONGO_HOST=mongo-db"
296-
- "IOTA_MONGO_PORT=27017"
297-
- "IOTA_MONGO_DB=iotagentul"
298-
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
299-
- "IOTA_MQTT_HOST=mosquitto"
300-
- "IOTA_MQTT_PORT=1883"
289+
- IOTA_CB_HOST=orion
290+
- IOTA_CB_PORT=1026
291+
- IOTA_NORTH_PORT=4041
292+
- IOTA_REGISTRY_TYPE=mongodb
293+
- IOTA_LOG_LEVEL=DEBUG
294+
- IOTA_TIMESTAMP=true
295+
- IOTA_CB_NGSI_VERSION=v2
296+
- IOTA_AUTOCAST=true
297+
- IOTA_MONGO_HOST=mongo-db
298+
- IOTA_MONGO_PORT=27017
299+
- IOTA_MONGO_DB=iotagentul
300+
- IOTA_PROVIDER_URL=http://iot-agent:4041
301+
- IOTA_MQTT_HOST=mosquitto
302+
- IOTA_MQTT_PORT=1883
301303
```
302304

303305
`iot-agent` コンテナは、Orion Context Broker の 存在に依存し、そのようなデバイス

README.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,20 @@ iot-agent:
246246
ports:
247247
- "4041:4041"
248248
environment:
249-
- "IOTA_CB_HOST=orion"
250-
- "IOTA_CB_PORT=1026"
251-
- "IOTA_NORTH_PORT=4041"
252-
- "IOTA_REGISTRY_TYPE=mongodb"
253-
- "IOTA_LOG_LEVEL=DEBUG"
254-
- "IOTA_TIMESTAMP=true"
255-
- "IOTA_MONGO_HOST=mongo-db"
256-
- "IOTA_MONGO_PORT=27017"
257-
- "IOTA_MONGO_DB=iotagentul"
258-
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
259-
- "IOTA_MQTT_HOST=mosquitto"
260-
- "IOTA_MQTT_PORT=1883"
249+
- IOTA_CB_HOST=orion
250+
- IOTA_CB_PORT=1026
251+
- IOTA_NORTH_PORT=4041
252+
- IOTA_REGISTRY_TYPE=mongodb
253+
- IOTA_LOG_LEVEL=DEBUG
254+
- IOTA_TIMESTAMP=true
255+
- IOTA_CB_NGSI_VERSION=v2
256+
- IOTA_AUTOCAST=true
257+
- IOTA_MONGO_HOST=mongo-db
258+
- IOTA_MONGO_PORT=27017
259+
- IOTA_MONGO_DB=iotagentul
260+
- IOTA_PROVIDER_URL=http://iot-agent:4041
261+
- IOTA_MQTT_HOST=mosquitto
262+
- IOTA_MQTT_PORT=1883
261263
```
262264

263265
The `iot-agent` container relies on the presence of the Orion Context Broker and uses a MongoDB database to hold device
@@ -268,20 +270,22 @@ information such as device URLs and Keys. The container is listening on a single
268270

269271
The `iot-agent` container is driven by environment variables as shown:
270272

271-
| Key | Value | Description |
272-
| ------------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
273-
| IOTA_CB_HOST | `orion` | Hostname of the context broker to update context |
274-
| IOTA_CB_PORT | `1026` | Port that context broker listens on to update context |
275-
| IOTA_NORTH_PORT | `4041` | Port used for Configuring the IoT Agent and receiving context updates from the context broker |
276-
| IOTA_REGISTRY_TYPE | `mongodb` | Whether to hold IoT device info in memory or in a database |
277-
| IOTA_LOG_LEVEL | `DEBUG` | The log level of the IoT Agent |
278-
| IOTA_TIMESTAMP | `true` | Whether to supply timestamp information with each measurement received from attached devices |
279-
| IOTA_MONGO_HOST | `context-db` | The hostname of mongoDB - used for holding device information |
280-
| IOTA_MONGO_PORT | `27017` | The port mongoDB is listening on |
281-
| IOTA_MONGO_DB | `iotagentul` | The name of the database used in mongoDB |
282-
| IOTA_PROVIDER_URL | `http://iot-agent:4041` | URL passed to the Context Broker when commands are registered, used as a forwarding URL location when the Context Broker issues a command to a device |
283-
| IOTA_MQTT_HOST | `mosquitto` | The hostname of the MQTT Broker |
284-
| IOTA_MQTT_PORT | `1883` | The port the MQTT Broker is listening on to receive topics |
273+
| Key | Value | Description |
274+
| -------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
275+
| IOTA_CB_HOST | `orion` | Hostname of the context broker to update context |
276+
| IOTA_CB_PORT | `1026` | Port that context broker listens on to update context |
277+
| IOTA_NORTH_PORT | `4041` | Port used for Configuring the IoT Agent and receiving context updates from the context broker |
278+
| IOTA_REGISTRY_TYPE | `mongodb` | Whether to hold IoT device info in memory or in a database |
279+
| IOTA_LOG_LEVEL | `DEBUG` | The log level of the IoT Agent |
280+
| IOTA_TIMESTAMP | `true` | Whether to supply timestamp information with each measurement received from attached devices |
281+
| IOTA_CB_NGSI_VERSION | `v2` | Whether to supply use NGSIv2 when sending updates for active attributes |
282+
| IOTA_AUTOCAST | `true` | Ensure Ultralight number values are read as numbers not strings |
283+
| IOTA_MONGO_HOST | `context-db` | The hostname of mongoDB - used for holding device information |
284+
| IOTA_MONGO_PORT | `27017` | The port mongoDB is listening on |
285+
| IOTA_MONGO_DB | `iotagentul` | The name of the database used in mongoDB |
286+
| IOTA_PROVIDER_URL | `http://iot-agent:4041` | URL passed to the Context Broker when commands are registered, used as a forwarding URL location when the Context Broker issues a command to a device |
287+
| IOTA_MQTT_HOST | `mosquitto` | The hostname of the MQTT Broker |
288+
| IOTA_MQTT_PORT | `1883` | The port the MQTT Broker is listening on to receive topics |
285289

286290
As you can see, use of the MQTT transport is driven by only two environment variables `IOTA_MQTT_HOST` and
287291
`IOTA_MQTT_PORT`

docker-compose.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,20 @@ services:
5959
ports:
6060
- "4041:4041"
6161
environment:
62-
- "IOTA_CB_HOST=orion" # name of the context broker to update context
63-
- "IOTA_CB_PORT=1026" # port the context broker listens on to update context
64-
- "IOTA_NORTH_PORT=4041"
65-
- "IOTA_REGISTRY_TYPE=mongodb" #Whether to hold IoT device info in memory or in a database
66-
- "IOTA_LOG_LEVEL=DEBUG" #The log level of the IoT Agent
67-
- "IOTA_TIMESTAMP=true"
68-
- "IOTA_MONGO_HOST=mongo-db" # The host name of ongoDB
69-
- "IOTA_MONGO_PORT=27017" # The port mongoDB is listening on
70-
- "IOTA_MONGO_DB=iotagentul" # The name of the database used in mongoDB
71-
- "IOTA_MQTT_HOST=mosquitto" # The host name of the MQTT Broker
72-
- "IOTA_MQTT_PORT=1883" # The port the MQTT Broker is listening on to receive topics
73-
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
62+
- IOTA_CB_HOST=orion # name of the context broker to update context
63+
- IOTA_CB_PORT=1026 # port the context broker listens on to update context
64+
- IOTA_NORTH_PORT=4041
65+
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database
66+
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
67+
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
68+
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
69+
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
70+
- IOTA_MONGO_HOST=mongo-db # The host name of MongoDB
71+
- IOTA_MONGO_PORT=27017 # The port mongoDB is listening on
72+
- IOTA_MONGO_DB=iotagentul # The name of the database used in mongoDB
73+
- IOTA_MQTT_HOST=mosquitto # The host name of the MQTT Broker
74+
- IOTA_MQTT_PORT=1883 # The port the MQTT Broker is listening on to receive topics
75+
- IOTA_PROVIDER_URL=http://iot-agent:4041
7476
healthcheck:
7577
test: curl --fail -s http://localhost:4041/iot/about || exit 1
7678

0 commit comments

Comments
 (0)