-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
153 lines (142 loc) · 4.81 KB
/
docker-compose.yml
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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.
---
version: "3.7"
services:
spdk:
image: docker.io/opiproject/spdk:v23.09
volumes:
- /dev/hugepages:/dev/hugepages
- /dev/shm:/dev/shm
- /proc:/proc
ports:
- "9009:9009"
privileged: true
networks:
- opi
command: |
sh -x -c 'sync; echo 1 > /proc/sys/vm/drop_caches && \
echo 1024 > /proc/sys/vm/nr_hugepages && \
grep "" /sys/kernel/mm/hugepages/hugepages-*/nr_hugepages && \
/usr/local/bin/spdk_tgt -m 0x1 -s 512 --no-pci 2>&1 & \
echo wait 5s... && sleep 5s && cd /usr/libexec/spdk/scripts && \
for i in {1..10}; do ./rpc.py spdk_get_version && break || sleep 1; done && \
./rpc.py bdev_malloc_create -b Malloc0 64 512 && \
./rpc.py bdev_malloc_create -b Malloc1 64 512 && \
./rpc.py nvmf_create_transport -t TCP -u 8192 -m 4 -c 0 && \
./rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1 && \
./rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t tcp -a 127.0.0.1 -s 4420 && \
./rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 -n 1 && \
./rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1 -n 2 && \
./rpc_http_proxy.py 0.0.0.0 9009 spdkuser spdkpass'
healthcheck:
test: ["CMD-SHELL", "curl --fail --insecure --user spdkuser:spdkpass -X POST -H 'Content-Type: application/json' -d '{\"id\": 1, \"method\": \"bdev_get_bdevs\"}' http://localhost:9009 || exit 1"]
interval: 6s
retries: 5
start_period: 20s
timeout: 10s
telegraf:
image: docker.io/library/telegraf:1.29
volumes:
- /:/hostfs:ro
- ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro
environment:
- HOST_MOUNT_PREFIX=/hostfs
- HOST_PROC=/hostfs/proc
depends_on:
- spdk
- influxdb
networks:
- opi
cap_add:
- SYS_ADMIN
healthcheck:
test: cat /proc/1/status || exit 1
interval: 6s
retries: 5
start_period: 20s
timeout: 10s
web:
image: docker.io/library/nginx:1.25.3-alpine
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- opi
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost || exit 1"]
timeout: 10s
bmc:
image: docker.io/dmtf/redfish-mockup-server:1.2.4
networks:
- opi
grafana:
image: docker.io/grafana/grafana:10.2.3
depends_on:
- influxdb
volumes:
- ./config/grafana.ini:/etc/grafana/grafana.ini
- ./config/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasource.yaml
- ./config/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/default.yaml
- ./config/grafana-dashboard.json:/var/lib/grafana/dashboards/myexample.json
ports:
- "3000:3000"
networks:
- opi
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
interval: 6s
timeout: 10s
retries: 3
influxdb:
image: docker.io/library/influxdb:2.7-alpine
ports:
- "8086:8086"
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=my-user
- DOCKER_INFLUXDB_INIT_PASSWORD=my-password
- DOCKER_INFLUXDB_INIT_ORG=my-org
- DOCKER_INFLUXDB_INIT_BUCKET=my-bucket
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=YourInfluxDBAuthToken
networks:
- opi
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8086/ping || exit 1
interval: 6s
timeout: 10s
retries: 5
otel-gw-collector:
image: docker.io/otel/opentelemetry-collector:0.92.0
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./config/otel-collector-config.yaml:/etc/otel-collector-config.yaml:z
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55679:55679" # zpages extension
networks:
- opi
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:13133/ping || exit 1
prometheus:
image: docker.io/prom/prometheus:v2.48.1
volumes:
- ./config/prometheus.yaml:/etc/prometheus/prometheus.yml:z
ports:
- "9091:9090"
networks:
- opi
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:9090 || exit 1
interval: 6s
timeout: 10s
retries: 5
volumes:
influxdb-storage:
networks:
opi: