forked from Cray-HPE/hms-bss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.ct.yaml
280 lines (260 loc) · 6.81 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
version: '3.7'
networks:
bss:
services:
#
# Required services
#
s3:
image: artifactory.algol60.net/docker.io/minio/minio:latest
hostname: s3
environment:
MINIO_ACCESS_KEY: s3-access-key
MINIO_SECRET_KEY: s3-secret-key
command: server /data
networks:
- bss
vault:
hostname: vault
image: artifactory.algol60.net/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:
- bss
vault-kv-enabler:
image: artifactory.algol60.net/csm-docker/stable/vault-kv-enabler:1.13.4
environment:
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=hms
- KV_STORES=hms-creds
depends_on:
- vault
networks:
- bss
hmsds-postgres:
hostname: hmsds-postgres
image: artifactory.algol60.net/docker.io/library/postgres:11-alpine
environment:
- POSTGRES_PASSWORD=hmsdsuser
- POSTGRES_USER=hmsdsuser
- POSTGRES_DB=hmsds
networks:
- bss
cray-smd-init:
image: artifactory.algol60.net/csm-docker/stable/cray-smd:1.48.0
environment:
- SMD_DBHOST=hmsds-postgres
- SMD_DBPORT=5432
depends_on:
- hmsds-postgres
networks:
- bss
command: /entrypoint.sh smd-init
cray-smd:
image: artifactory.algol60.net/csm-docker/stable/cray-smd:1.48.0
environment:
- POSTGRES_HOST=hmsds-postgres
- POSTGRES_PORT=5432
- 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
hostname: cray-smd
depends_on:
- cray-smd-init
- vault
networks:
- bss
zookeeper:
image: artifactory.algol60.net/docker.io/confluentinc/cp-zookeeper:6.1.1
hostname: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- bss
kafka:
image: artifactory.algol60.net/docker.io/confluentinc/cp-kafka:6.1.1
hostname: kafka
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
networks:
- bss
cray-hms-hmcollector:
image: artifactory.algol60.net/csm-docker/stable/hms-hmcollector:2.12.4
environment:
- LOG_LEVEL=TRACE
- SM_URL=http://cray-smd:27779
- POLLING_ENABLED=false
- RF_SUBSCRIBE_ENABLED=false
- REST_PORT=80
- VAULT_TOKEN=hms
- CRAY_VAULT_JWT_FILE=configs/token
- CRAY_VAULT_ROLE_FILE=configs/namespace
- CRAY_VAULT_AUTH_PATH=auth/token/create
- VAULT_ADDR=http://vault:8200
volumes:
- ./configs/kafka_brokers.json:/configs/kafka_brokers.json
- ./configs/namespace:/configs/namespace
- ./configs/token:/configs/token
networks:
- bss
depends_on:
- kafka
cray-hmnfd-etcd:
image: artifactory.algol60.net/quay.io/coreos/etcd:v3.4.7
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://cray-hmnfd-etcd:2379
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
networks:
- bss
cray-hmnfd:
hostname: cray-hmnfd
image: artifactory.algol60.net/csm-docker/stable/cray-hmnfd:1.13.0
environment:
- DEBUG=0
- SM_URL=http://cray-smd:27779/hsm/v2
- INBOUND_SCN_URL=https://cray-hmnfd:28600/hmi/v1/scn
- SM_RETRIES=3
- SM_TIMEOUT=10
- PORT=28600
- ETCD_HOST=cray-hmnfd-etcd
- ETCD_PORT=2379
- TELEMETRY_HOST=kafka:9092:cray-hmsstatechange-notifications
depends_on:
- kafka
- cray-hmnfd-etcd
networks:
- bss
#
# Emulated hardware
#
emulator-loader:
image: artifactory.algol60.net/docker.io/library/golang:1.16-alpine
command: >
sh -c "apk add curl && sleep 10 &&
curl -X POST -d '{\"RedfishEndpoints\":[{
\"ID\":\"x0c0s1b0\",
\"FQDN\":\"x0c0s1b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
},{
\"ID\":\"x0c0s2b0\",
\"FQDN\":\"x0c0s2b0\",
\"RediscoverOnUpdate\":true,
\"User\":\"root\",
\"Password\":\"root_password\"
}]}' http://cray-smd:27779/hsm/v2/Inventory/RedfishEndpoints"
depends_on:
- cray-smd
- rfemulator0
- rfemulator1
networks:
- bss
rfemulator0:
hostname: x0c0s1b0
image: artifactory.algol60.net/csm-docker/stable/csm-rie:1.3.0
environment:
- MOCKUPFOLDER=EX235a
- MAC_SCHEMA=Mountain
- XNAME=x0c0s1b0
- PORT=443
networks:
bss:
aliases:
- x0c0s1b0
rfemulator1:
hostname: x0c0s2b0
image: artifactory.algol60.net/csm-docker/stable/csm-rie:1.3.0
environment:
- MOCKUPFOLDER=EX235a
- MAC_SCHEMA=Mountain
- XNAME=x0c0s2b0
- PORT=443
networks:
bss:
aliases:
- x0c0s2b0
#
# Service under test
#
cray-bss-etcd:
image: artifactory.algol60.net/quay.io/coreos/etcd:v3.4.7
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://cray-bss-etcd:2379
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
networks:
- bss
cray-bss:
build:
context: .
dockerfile: Dockerfile
environment:
- BSS_ADVERTISE_ADDRESS=cray-bss:27778
- ETCD_HOST=cray-bss-etcd
- ETCD_PORT=2379
- HSM_URL=http://cray-smd:27779
- NFD_URL=http://cray-hmnfd:28600
- S3_ACCESS_KEY=foo
- S3_SECRET_KEY=foo
- S3_BUCKET=images
- S3_ENDPOINT=s3
depends_on:
- cray-bss-etcd
- cray-smd
- cray-hmnfd
- cray-hms-hmcollector
- emulator-loader
- vault-kv-enabler
networks:
- bss
#
# Tests
#
wait-for-smd:
build:
context: test/ct/
dockerfile: Dockerfile.wait-for-smd.Dockerfile
depends_on:
- cray-bss
- cray-smd
- cray-hmnfd
networks:
- bss
tavern:
build:
context: test/ct/
dockerfile: Dockerfile
depends_on:
- cray-bss
entrypoint: entrypoint.sh tavern -c /src/app/tavern_global_config_ct_test.yaml -p /src/app/api
networks:
- bss
smoke:
build:
context: test/ct/
dockerfile: Dockerfile
depends_on:
- cray-bss
entrypoint: entrypoint.sh smoke -f smoke.json -u http://cray-bss:27778
networks:
- bss