forked from open-edge-platform/edge-ai-suites
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
355 lines (346 loc) · 11.8 KB
/
docker-compose.yml
File metadata and controls
355 lines (346 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
#
# Apache v2 license
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
version: '3.6'
services:
ia-telegraf:
user: "${TIMESERIES_UID}:${TIMESERIES_UID}"
container_name: ia-telegraf
hostname: ia-telegraf
image: telegraf:1.34.3
restart: unless-stopped
depends_on:
- ia-influxdb
security_opt:
- no-new-privileges
read_only: true
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
environment:
no_proxy: "ia-influxdb,ia-mqtt-broker,ia-opcua-server,ia-time-series-analytics-microservice"
NO_PROXY: "ia-influxdb,ia-mqtt-broker,ia-opcua-server,ia-time-series-analytics-microservice"
MQTT_BROKER_HOST: "ia-mqtt-broker"
INFLUX_SERVER: "ia-influxdb"
INFLUXDB_PORT: 8086
INFLUXDB_USERNAME: ${INFLUXDB_USERNAME}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_DBNAME: datain
TELEGRAF_CONFIG_PATH: /etc/telegraf/Telegraf_devmode.conf
OPCUA_SERVER: opc.tcp://ia-opcua-server:4840/freeopcua/server/
LOG_LEVEL: ${LOG_LEVEL}
TELEGRAF_INPUT_PLUGIN: ${TELEGRAF_INPUT_PLUGIN}
# The Telegraf metric_batch_size specifies the number of metrics or data points
# that are grouped together and sent in a single batch to the InfluxDB.
TELEGRAF_METRIC_BATCH_SIZE: 100
TS_MS_SERVER_URL: http://ia-time-series-analytics-microservice:${KAPACITOR_PORT}
entrypoint: ["/bin/sh", "-c", "/entrypoint.sh"]
networks:
- timeseries_network
volumes:
- ./telegraf/entrypoint.sh:/entrypoint.sh
- "./telegraf/config/:/etc/telegraf"
- ./telegraf/input_data:/tmp/input_data:ro
ia-influxdb:
user: "${TIMESERIES_UID}:${TIMESERIES_UID}"
image: influxdb:1.11.8
container_name: ia-influxdb
hostname: ia-influxdb
restart: unless-stopped
read_only: true
security_opt:
- no-new-privileges
networks:
- timeseries_network
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
environment:
INFLUXDB_DB: datain
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_USER : ${INFLUXDB_USERNAME}
INFLUXDB_USER_PASSWORD: ${INFLUXDB_PASSWORD}
# The InfluxDB retention policy durations can be configured using a combination
# of time units such as hours(h), minutes(m), and seconds(s), eg., 1h0m0s for 1 hour.
RETENTION_DURATION: 1h0m0s
no_proxy: ${timeseries_no_proxy}, ia-time-series-analytics-microservice
NO_PROXY: ${timeseries_no_proxy}, ia-time-series-analytics-microservice
INFLUXDB_CONFIG_PATH: "/etc/influxdb/influxdb_devmode.conf"
INFLUXDB_LOGGING_LEVEL: ${LOG_LEVEL}
INFLUXDB_TLS_CIPHERS: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
volumes:
# Mount for influxdb data directory and configuration
- vol_influxdb_conf:/var/lib/influxdb:rw
- ./influxdb/config:/etc/influxdb
- ./influxdb/init-influxdb.sh:/docker-entrypoint-initdb.d/init-influxdb.sh
ia-time-series-analytics-microservice:
container_name: ia-time-series-analytics-microservice
hostname: ia-time-series-analytics-microservice
image: ${DOCKER_REGISTRY}intel/ia-time-series-analytics-microservice:1.0.0
restart: unless-stopped
depends_on:
- ia-influxdb
- ia-mqtt-broker
security_opt:
- no-new-privileges
read_only: true
healthcheck:
test: ["CMD-SHELL", "if [ \"$SECURE_MODE\" = \"true\" ]; then curl -f https://localhost:9092/kapacitor/v1/ping; else curl -f http://localhost:9092/kapacitor/v1/ping; fi"]
interval: 10s
timeout: 5s
retries: 20
environment:
no_proxy: "ia-time-series-analytics-microservice,ia-influxdb,ia-mqtt-broker,ia-opcua-server,localhost,model-registry"
NO_PROXY: "ia-time-series-analytics-microservice,ia-influxdb,ia-mqtt-broker,ia-opcua-server,localhost,model-registry"
KAPACITOR_PORT: ${KAPACITOR_PORT}
INFLUX_SERVER: "ia-influxdb"
KAPACITOR_INFLUXDB_0_USERNAME: ${INFLUXDB_USERNAME}
KAPACITOR_INFLUXDB_0_PASSWORD: ${INFLUXDB_PASSWORD}
PROFILING_MODE: "false"
KAPACITOR_URL: http://ia-time-series-analytics-microservice:$KAPACITOR_PORT/
KAPACITOR_UNSAFE_SSL: "true"
KAPACITOR_INFLUXDB_0_URLS_0: http://ia-influxdb:8086/
INFLUXDB_PORT: 8086
KAPACITOR_LOGGING_LEVEL: ${LOG_LEVEL}
INFLUXDB_DBNAME: datain
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
SSL_CERT_FILE: /run/secrets/ca_certificate.pem
MODEL_REGISTRY_URL: http://model-registry:8111
networks:
- timeseries_network
volumes:
- "vol_temp_time_series_analytics_microservice:/tmp/"
- ./time_series_analytics_microservice/udfs/:/tmp/windturbine_anomaly_detector/udfs/
- ./time_series_analytics_microservice/tick_scripts/:/tmp/windturbine_anomaly_detector/tick_scripts/
- ./time_series_analytics_microservice/config.json:/app/config.json
- ./time_series_analytics_microservice/models/:/tmp/windturbine_anomaly_detector/models/
ia-grafana:
image: grafana/grafana-oss:12.0.0-ubuntu
container_name: ia-grafana
hostname: ia-grafana
user: "${TIMESERIES_UID}:${TIMESERIES_UID}"
restart: unless-stopped
read_only: true
depends_on:
- ia-influxdb
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
environment:
no_proxy: ia-influxdb
NO_PROXY: ia-influxdb
INFLUX_SERVER: "ia-influxdb"
GRAFANA_SERVER: '0.0.0.0'
INFLUXDB_USERNAME: ${INFLUXDB_USERNAME}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_DB: datain
GF_SECURITY_ADMIN_USER: ${VISUALIZER_GRAFANA_USER}
GF_SECURITY_ADMIN_PASSWORD: ${VISUALIZER_GRAFANA_PASSWORD}
GF_PROVISIONING_ENABLE: "true"
GF_PROVISIONING_DASHBOARDS: /etc/grafana/provisioning/dashboards
GF_SERVER_PROTOCOL: http
GF_LOG_LEVEL: ${LOG_LEVEL}
networks:
- timeseries_network
volumes:
- "vol_temp_grafana:/tmp"
- vol_grafana_data:/var/lib/grafana
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/dashboards/datasources_dev.yml:/etc/grafana/provisioning/datasources/datasources.yml
- ./grafana/entrypoint.sh:/entrypoint.sh
ports:
- ${GRAFANA_PORT}:3000
ia-mqtt-broker:
user: "${TIMESERIES_UID}:${TIMESERIES_UID}"
container_name: ia-mqtt-broker
hostname: ia-mqtt-broker
read_only: true
image: eclipse-mosquitto:2.0.21
restart: unless-stopped
depends_on:
- ia-influxdb
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
networks:
- timeseries_network
ports:
- "1883:1883"
volumes:
- ./mqtt-broker/mosquitto_devmode.conf:/mosquitto/config/mosquitto.conf:ro
ia-opcua-server:
build:
context: $PWD/simulator
dockerfile: $PWD/simulator/opcua-server/Dockerfile
args:
TIMESERIES_USER_NAME: ${TIMESERIES_USER_NAME}
TIMESERIES_UID: ${TIMESERIES_UID}
hostname: ia-opcua-server
read_only: true
image: ${DOCKER_REGISTRY}intel/ia-opcua-server:1.0.0
environment:
LOG_LEVEL: ${LOG_LEVEL}
no_proxy: "ia-time-series-analytics-microservice"
NO_PROXY: "ia-time-series-analytics-microservice"
TS_MS_SERVER: "ia-time-series-analytics-microservice"
TS_MS_PORT: ${KAPACITOR_PORT}
restart: unless-stopped
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
networks:
- timeseries_network
volumes:
- ./simulator/simulation_data/windturbine_data.csv:/app/windturbine_data.csv
ia-mqtt-publisher:
build:
context: $PWD/simulator
dockerfile: $PWD/simulator/mqtt-publisher/Dockerfile
args:
TIMESERIES_USER_NAME: ${TIMESERIES_USER_NAME}
TIMESERIES_UID: ${TIMESERIES_UID}
container_name: ia-mqtt-publisher
hostname: ia-mqtt-publisher
read_only: true
image: ${DOCKER_REGISTRY}intel/ia-mqtt-publisher:1.0.0
restart: unless-stopped
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
environment:
AppName: "mqtt-publisher"
HOST_IP: ia-mqtt-broker
no_proxy: "ia-mqtt-broker,ia-time-series-analytics-microservice"
NO_PROXY: "ia-mqtt-broker,ia-time-series-analytics-microservice"
TS_MS_SERVER: "ia-time-series-analytics-microservice"
TS_MS_PORT: ${KAPACITOR_PORT}
networks:
- timeseries_network
command: ["--csv", "/windturbine_data.csv"]
volumes:
- ./simulator/simulation_data/windturbine_data.csv:/windturbine_data.csv
# Model Registry Service
model-registry:
image: intel/model-registry:1.0.3
container_name: model-registry
hostname: model-registry
ipc: "none"
ports:
- "${MR_SERVER_PORT}:8111"
restart: unless-stopped
tmpfs:
- /tmp
security_opt:
- no-new-privileges
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
environment:
AppName: "ModelRegistry"
MIN_LOG_LEVEL: ${LOG_LEVEL}
ENABLE_DEV_MODE: ${ENABLE_DEV_MODE}
ENABLE_HTTPS_MODE: false
GETI_HOST: ${GETI_HOST}
GETI_TOKEN: ${GETI_TOKEN}
GETI_SERVER_API_VERSION: ${GETI_SERVER_API_VERSION}
GETI_ORGANIZATION_ID: ${GETI_ORGANIZATION_ID}
GETI_WORKSPACE_ID: ${GETI_WORKSPACE_ID}
GETI_SERVER_SSL_VERIFY: ${GETI_SERVER_SSL_VERIFY}
MLFLOW_TRACKING_URI: postgresql+psycopg2://${MR_USER_NAME}:${MR_PSQL_PASSWORD}@mr_postgres:5432/model_registry_db
MLFLOW_S3_ENDPOINT_URL: ${MR_MLFLOW_S3_ENDPOINT_URL}
MINIO_HOSTNAME: mr_minio
MINIO_SERVER_PORT: 8000
MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY}
MINIO_BUCKET_NAME: model-registry
SERVER_PORT: 8111
LSHOST: host.docker.internal
SERVER_CERT: /run/secrets/ModelRegistry_Server/public.crt
CA_CERT: /run/secrets/ModelRegistry_Server/server-ca.crt
SERVER_PRIVATE_KEY: /run/secrets/ModelRegistry_Server/private.key
no_proxy: mr_postgres,mr_minio
NO_PROXY: mr_postgres,mr_minio
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- timeseries_network
mr_postgres:
image: postgres:13
container_name: mr_postgres
hostname: mr_postgres
restart: unless-stopped
security_opt:
- no-new-privileges
environment:
AppName: "ModelRegistry"
POSTGRES_USER: ${MR_USER_NAME}
POSTGRES_PASSWORD: ${MR_PSQL_PASSWORD}
POSTGRES_DB: model_registry_db
volumes:
- mr_postgres_data:/var/lib/postgresql/data:rw
networks:
- timeseries_network
mr_minio:
image: minio/minio:RELEASE.2020-12-12T08-39-07Z
container_name: mr_minio
hostname: mr_minio
ipc: "none"
volumes:
- mr_minio_data:/data
networks:
- timeseries_network
restart: unless-stopped
security_opt:
- no-new-privileges
environment:
MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY}
command: server --address ":8000" --certs-dir /certs /data
networks:
timeseries_network:
driver: bridge
volumes:
vol_influxdb_conf:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
vol_temp_time_series_analytics_microservice:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
vol_temp_grafana:
name: "visualization_grafana_vol"
driver: local
driver_opts:
type: tmpfs
device: tmpfs
vol_grafana_data:
name: "visualization_var_grafana_vol"
driver: local
driver_opts:
type: tmpfs
device: tmpfs
mr_minio_data:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
mr_postgres_data:
driver: local
driver_opts:
type: tmpfs
device: tmpfs