-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.ct.yaml
356 lines (334 loc) · 8.32 KB
/
docker-compose.test.ct.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
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
356
version: '3.7'
networks:
pcs:
services:
#
# Required services
#
etcd:
image: quay.io/coreos/etcd:v3.5.17
environment:
- ETCD_UNSUPPORTED_ARCH=arm64
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
networks:
- pcs
vault:
hostname: vault
image: docker.io/library/vault:1.5.5
environment:
- VAULT_DEV_ROOT_TOKEN_ID=hms
- VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200
- VAULT_ADDR=http://127.0.0.1:8200
cap_add:
- IPC_LOCK
networks:
- pcs
vault-kv-enabler:
build:
context: .
dockerfile: vault-kv-enabler.dockerfile
environment:
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=hms
- KV_STORES=hms-creds
depends_on:
- vault
networks:
- pcs
postgres:
hostname: postgres
image: docker.io/library/postgres:11-alpine
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_DB=hmsds
networks:
- pcs
smd-init:
image: ghcr.io/openchami/smd:2.17
environment:
- SMD_DBHOST=postgres
- SMD_DBPORT=5432
- SMD_DBNAME=hmsds
- SMD_DBUSER=${POSTGRES_USER:-postgres}
- SMD_DBPASS=${POSTGRES_PASSWORD:-postgres}
- SMD_DBOPTS=sslmode=disable
depends_on:
- postgres
networks:
- pcs
command: /smd-init
smd:
image: ghcr.io/openchami/smd:2.17
environment:
- SMD_DBHOST=postgres
- SMD_DBPORT=5432
- SMD_DBNAME=hmsds
- SMD_DBUSER=${POSTGRES_USER:-postgres}
- SMD_DBPASS=${POSTGRES_PASSWORD:-postgres}
- SMD_DBOPTS=sslmode=disable
- SMD_JWKS_URL=
- RF_MSG_HOST=kafka:9092:cray-dmtf-resource-event
- CRAY_VAULT_AUTH_PATH=auth/token/create
- CRAY_VAULT_ROLE_FILE=configs/namespace
- CRAY_VAULT_JWT_FILE=configs/token
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=hms
- VAULT_KEYPATH=hms-creds
- SMD_WVAULT=true
- SMD_RVAULT=true
- SMD_SLS_HOST=
- SMD_HBTD_HOST=
volumes:
- ./configs/namespace:/configs/namespace
- ./configs/token:/configs/token
hostname: smd
depends_on:
- smd-init
- vault
networks:
- pcs
#
# Emulated hardware
#
# Note: Several PCS power-cap tests assume that all compute nodes in HSM
# have Node Power Limit controls and do not have Accelerator Power Limit
# controls, so the following RIE instances should only emulate node types
# that fit this criteria. Otherwise test failures may occur.
#
emulator-loader:
image: docker.io/library/golang:1.23-alpine
command: >
sh -c "apk add curl && sleep 10 &&
curl -X POST -d '{\"RedfishEndpoints\":[{
\"ID\":\"x0c0b0\",
\"FQDN\":\"x0c0b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s0b0\",
\"FQDN\":\"x0c0s0b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s1b0\",
\"FQDN\":\"x0c0s1b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s2b0\",
\"FQDN\":\"x0c0s2b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s3b0\",
\"FQDN\":\"x0c0s3b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s4b0\",
\"FQDN\":\"x0c0s4b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s5b0\",
\"FQDN\":\"x0c0s5b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s6b0\",
\"FQDN\":\"x0c0s6b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s7b0\",
\"FQDN\":\"x0c0s7b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
}]}' http://smd:27779/hsm/v2/Inventory/RedfishEndpoints"
depends_on:
- smd
- rfemulator0
- rfemulator1
- rfemulator2
- rfemulator3
- rfemulator4
- rfemulator5
- rfemulator6
- rfemulator7
- rfemulator8
networks:
- pcs
rfemulator0:
hostname: x0c0s0b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s0b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s0b0
rfemulator1:
hostname: x0c0s1b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s1b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s1b0
rfemulator2:
hostname: x0c0s2b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s2b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s2b0
rfemulator3:
hostname: x0c0s3b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s3b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s3b0
rfemulator4:
hostname: x0c0s4b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s4b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s4b0
rfemulator5:
hostname: x0c0s5b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s5b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s5b0
rfemulator6:
hostname: x0c0s6b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s6b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s6b0
rfemulator7:
hostname: x0c0s7b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=EX425
- MAC_SCHEMA=Mountain
- XNAME=x0c0s7b0
- PORT=443
networks:
pcs:
aliases:
- x0c0s7b0
rfemulator8:
hostname: x0c0b0
image: ghcr.io/openchami/csm-rie:v1.6.7
environment:
- MOCKUPFOLDER=CMM
- XNAME=x0c0b0
- PORT=443
networks:
pcs:
aliases:
- x0c0b0
#
# Service under test
#
power-control:
build:
context: .
dockerfile: Dockerfile.integration.Dockerfile
environment:
- SMS_SERVER=http://smd:27779
- CRAY_VAULT_AUTH_PATH=auth/token/create
- CRAY_VAULT_ROLE_FILE=configs/namespace
- CRAY_VAULT_JWT_FILE=configs/token
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=hms
- VAULT_KEYPATH=hms-creds
- VAULT_SKIP_VERIFY=true
- VAULT_ENABLED=true
- LOG_LEVEL=DEBUG
- TRS_IMPLEMENTATION=LOCAL
- HSMLOCK_ENABLED=true
- STORAGE=ETCD
- ETCD_HOST=etcd
- ETCD_PORT=2379
- PCS_POWER_SAMPLE_INTERVAL=5
depends_on:
- etcd # needed to bring up PCS
- smd # needed to bring up PCS
- vault-kv-enabler # needed for discovery of emulated hardware to succeed
- emulator-loader # needed to bring up emulated hardware
- wait-for-smd # needed to give PCS time for its initial hardware scan
networks:
- pcs
#
# Tests
#
wait-for-smd:
build:
context: test/ct/
dockerfile: Dockerfile.wait-for-smd.Dockerfile
networks:
- pcs
tavern:
build:
context: test/ct/
dockerfile: Dockerfile
entrypoint: entrypoint.sh tavern -c /src/app/tavern_global_config_ct_test_emulated_hardware.yaml -p /src/app/api
networks:
- pcs
smoke:
build:
context: test/ct/
dockerfile: Dockerfile
entrypoint: entrypoint.sh smoke -f /src/app/smoke.json -u http://power-control:28007
networks:
- pcs