forked from ceph/ceph-nvmeof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
216 lines (216 loc) · 5.29 KB
/
docker-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
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
version: "3.8"
services:
spdk:
image: $QUAY_SPDK:$SPDK_VERSION
profiles:
- build
build:
context: spdk/
dockerfile: ../Dockerfile.spdk
target: spdk
args:
SPDK_VERSION:
SPDK_CEPH_VERSION:
SPDK_PKGDEP_ARGS:
SPDK_CONFIGURE_ARGS:
SPDK_MAKEFLAGS:
SPDK_NAME:
SPDK_SUMMARY:
SPDK_DESCRIPTION:
SPDK_URL:
SPDK_MAINTAINER: $MAINTAINER
BUILD_DATE:
SPDK_GIT_REPO:
SPDK_GIT_BRANCH:
SPDK_GIT_COMMIT:
labels:
io.ceph.nvmeof:
# Used to export RPM packages externally (via bind mount)
spdk-rpm-export:
extends:
service: spdk
image: spdk-rpm-export
build:
target: rpm-export
bdevperf:
extends:
service: spdk
image: bdevperf
build:
target: bdevperf
volumes:
# sudo bash -c 'echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages'
# https://spdk.io/doc/containers.html
# TODO: Pending of https://github.com/spdk/spdk/issues/2973
- /dev/hugepages:/dev/hugepages
- /dev/vfio/vfio:/dev/vfio/vfio
cap_add:
- SYS_ADMIN # huge-pages
- CAP_SYS_NICE # RTE
- SYS_PTRACE # gdb
ulimits:
nofile: $NVMEOF_NOFILE
memlock: -1
ceph:
image: $QUAY_CEPH:$CEPH_CLUSTER_VERSION
container_name: ceph
build:
context: .
dockerfile: Dockerfile.ceph
args:
CEPH_CLUSTER_VERSION:
labels:
io.ceph.nvmeof:
environment:
CEPH_VSTART_ARGS:
VSTART_ARGS: --without-dashboard --memstore
TOUCHFILE: /tmp/ceph.touch
entrypoint: >-
sh -c './vstart.sh --new $$VSTART_ARGS &&
ceph osd pool create rbd &&
sleep infinity'
healthcheck:
test: ceph osd pool stats rbd
start_period: 6s
interval: 3s
volumes:
- ceph-conf:/etc/ceph
networks:
default:
ipv4_address: 192.168.13.2
nvmeof-base:
build:
context: .
args:
NVMEOF_TARGET: gateway
NVMEOF_SPDK_VERSION:
NVMEOF_NAME:
NVMEOF_SUMMARY:
NVMEOF_DESCRIPTION:
NVMEOF_URL:
NVMEOF_VERSION:
NVMEOF_MAINTAINER: $MAINTAINER
NVMEOF_TAGS:
NVMEOF_WANTS:
NVMEOF_EXPOSE_SERVICES:
BUILD_DATE:
NVMEOF_GIT_REPO:
NVMEOF_GIT_BRANCH:
NVMEOF_GIT_COMMIT:
labels:
io.ceph.nvmeof:
volumes:
# sudo bash -c 'echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages'
# https://spdk.io/doc/containers.html
# TODO: Pending of https://github.com/spdk/spdk/issues/2973
- /dev/hugepages:/dev/hugepages
- /dev/vfio/vfio:/dev/vfio/vfio
- $NVMEOF_CONFIG:/src/ceph-nvmeof.conf
- /tmp/coredump:/tmp/coredump # core dump
- ceph-conf:/etc/ceph:ro
cap_add:
- SYS_ADMIN # huge-pages
- CAP_SYS_NICE # RTE
- SYS_PTRACE # gdb
ulimits:
nofile: $NVMEOF_NOFILE
memlock: -1
core:
soft: -1
hard: -1
ports:
- "$NVMEOF_IO_PORT" # I/O controllers
- "$NVMEOF_GW_PORT" # Gateway
- "$NVMEOF_DISC_PORT" # Discovery
nvmeof:
extends:
service: nvmeof-base
image: $QUAY_NVMEOF:$NVMEOF_VERSION
ports:
- "$NVMEOF_IO_PORT" # I/O controllers
- "$NVMEOF_GW_PORT" # Gateway
depends_on:
ceph:
condition: service_healthy
discovery:
extends:
service: nvmeof-base
image: $QUAY_NVMEOF:$NVMEOF_VERSION
ports:
- "$NVMEOF_DISC_PORT" # Discovery
depends_on:
ceph:
condition: service_healthy
entrypoint: >-
python3 -m control.discovery
# Used to update lockfile (make update-lockfile)
nvmeof-builder-base:
extends:
service: nvmeof-base
image: nvmeof-builder-base
build:
target: builder-base
args:
NVMEOF_TARGET: cli
volumes:
- .:/src
# Used to regenerate gRPC protobuf files
nvmeof-builder:
extends:
service: nvmeof-base
image: nvmeof-builder
build:
target: builder
args:
NVMEOF_TARGET: cli
volumes:
- ./control:/src/control
# Used to export Python package
nvmeof-python-export:
extends:
service: nvmeof-base
image: nvmeof-python-export
build:
target: builder
args:
NVMEOF_TARGET: cli
nvmeof-devel:
image: nvmeof-devel
# Runs from source code in current dir
extends:
service: nvmeof-base
build:
target: builder
args:
# https://daobook.github.io/pdm/usage/dependency/#add-development-only-dependencies
PDM_INSTALL_DEV: "-d"
volumes:
- ./control:/src/control
nvmeof-cli:
image: $QUAY_NVMEOFCLI:$NVMEOF_VERSION
build:
context: .
args:
NVMEOF_TARGET: cli
NVMEOF_NAME: $NVMEOF_CLI_NAME
NVMEOF_SUMMARY: $NVMEOF_CLI_SUMMARY
NVMEOF_DESCRIPTION: $NVMEOF_CLI_DESCRIPTION
NVMEOF_URL:
NVMEOF_VERSION:
NVMEOF_MAINTAINER: $MAINTAINER
NVMEOF_TAGS: ""
NVMEOF_WANTS: ""
NVMEOF_EXPOSE_SERVICES: ""
BUILD_DATE:
NVMEOF_GIT_REPO:
NVMEOF_GIT_BRANCH:
NVMEOF_GIT_COMMIT:
labels:
io.ceph.nvmeof:
volumes:
ceph-conf:
networks:
default:
ipam:
config:
- subnet: 192.168.13.0/24