forked from eclipse-sdv-blueprints/fleet-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fms-blueprint-compose.yaml
189 lines (185 loc) · 5.61 KB
/
fms-blueprint-compose.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
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
# 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
databroker:
image: "ghcr.io/eclipse/kuksa.val/databroker:0.4.1"
container_name: "databroker"
cap_drop: *default-drops
networks:
- "fms-vehicle"
ports:
- "127.0.0.1:55555:55556"
configs:
- "vss_overlay.json"
environment:
KUKSA_DATA_BROKER_ADDR: "0.0.0.0"
KUKSA_DATA_BROKER_PORT: "55556"
KUKSA_DATA_BROKER_METADATA_FILE: "/vss_overlay.json"
RUST_LOG: "info"
# for the time being, we do not use TLS secured connections to Databroker
command: "--insecure"
fms-forwarder:
image: "ghcr.io/eclipse-sdv-blueprints/fleet-management/fms-forwarder:main"
build: &fms-forwarder-build
context: "./components"
dockerfile: "Dockerfile.fms-forwarder"
container_name: "fms-forwarder"
cap_drop: *default-drops
networks:
- "fms-backend"
- "fms-vehicle"
depends_on:
influxdb:
condition: service_healthy
databroker:
condition: service_started
command: "influx"
env_file: "${FMS_FORWARDER_PROPERTIES_FILE:-./influxdb/fms-demo.env}"
environment:
INFLUXDB_TOKEN_FILE: "/etc/forwarder/fms-demo.token"
KUKSA_DATA_BROKER_URI: "http://databroker:55556"
RUST_LOG: "${FMS_FORWARDER_LOG_CONFIG:-info,fms_forwarder=info,influx_client=info}"
TRUST_STORE_PATH: "${FMS_FORWARDER_TRUST_STORE_PATH:-/etc/ssl/certs/ca-certificates.crt}"
volumes:
- type: "volume"
source: "influxdb-auth"
target: "/etc/forwarder"
read_only: true
csv-provider:
image: "ghcr.io/eclipse/kuksa.val.feeders/csv-provider:main"
container_name: "csv-provider"
cap_drop: *default-drops
networks:
- "fms-vehicle"
depends_on:
databroker:
condition: service_started
volumes:
- "./csv-provider/signalsFmsRecording.csv:/dist/signals.csv"
environment:
PROVIDER_INFINITE: 1
PROVIDER_LOG_LEVEL: "INFO"
KUKSA_DATA_BROKER_ADDR: "databroker"
KUKSA_DATA_BROKER_PORT: "55556"