-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmonitoring-system.yaml
129 lines (125 loc) · 3.67 KB
/
monitoring-system.yaml
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
# SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
networks:
fms-backend:
driver: overlay
attachable: true
fms-vehicle:
driver: overlay
attachable: true
configs:
influxdb_init.sh:
file: "./influxdb/init-scripts/create-fms-token.sh"
grafana_dashboards_from_fs.yaml:
file: "./grafana/provisioning/dashboards/dashboards_from_filesystem.yaml"
grafana_fms_dashboard.json:
file: "./grafana/dashboards/FMS-Fleet.json"
vss_overlay.json:
file: "./spec/overlay/vss.json"
volumes:
influxdb-data:
influxdb-config:
influxdb-auth:
grafana-datasources:
services:
influxdb:
image: "docker.io/library/influxdb:2.7"
container_name: "influxDB"
healthcheck:
test: ["CMD-SHELL", "influx ping"]
interval: 5s
timeout: 3s
start_period: 5s
cap_drop: &default-drops
- CAP_MKNOD
- CAP_NET_RAW
- CAP_AUDIT_WRITE
command: influxd
env_file: "./influxdb/fms-demo.env"
environment:
DOCKER_INFLUXDB_INIT_MODE: "setup"
DOCKER_INFLUXDB_INIT_USERNAME: "fms-demo"
DOCKER_INFLUXDB_INIT_PASSWORD: "fms-demo-secret"
DOCKER_INFLUXDB_INIT_RETENTION: "1w"
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: "fms-backend-admin-token"
networks:
- "fms-backend"
ports:
- "0.0.0.0:8086:8086"
configs:
- source: "influxdb_init.sh"
target: "/docker-entrypoint-initdb.d/influxdb_init.sh"
volumes:
- type: "volume"
source: "influxdb-data"
target: "/var/lib/influxdb2"
- type: "volume"
source: "influxdb-config"
target: "/etc/influxdb2"
- type: "volume"
source: "influxdb-auth"
target: "/tmp/out"
- type: "volume"
source: "grafana-datasources"
target: "/tmp/influxdb-datasources"
grafana:
image: "docker.io/grafana/grafana:9.5.14"
container_name: "grafana"
cap_drop: *default-drops
ports:
- "127.0.0.1:3000:3000"
networks:
- "fms-backend"
depends_on:
influxdb:
condition: service_healthy
configs:
- source: "grafana_dashboards_from_fs.yaml"
target: "/etc/grafana/provisioning/dashboards/grafana_dashboards_from_fs.yaml"
- source: "grafana_fms_dashboard.json"
target: "/etc/dashboards/grafana_fms_dashboard.json"
mode: 0644
volumes:
- type: "volume"
source: "grafana-datasources"
target: "/etc/grafana/provisioning/datasources"
read_only: true
fms-server:
image: "ghcr.io/eclipse-sdv-blueprints/fleet-management/fms-server:main"
build:
context: "./components"
dockerfile: "Dockerfile.fms-server"
container_name: "fms-server"
cap_drop: *default-drops
networks:
- "fms-backend"
ports:
- "127.0.0.1:8081:8081"
depends_on:
influxdb:
condition: service_healthy
env_file: "./influxdb/fms-demo.env"
environment:
INFLUXDB_TOKEN_FILE: "/tmp/fms-demo.token"
RUST_LOG: "info"
volumes:
- type: "volume"
source: "influxdb-auth"
target: "/tmp"
read_only: true