-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.integration.yaml
154 lines (153 loc) · 4.09 KB
/
docker-compose.test.integration.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
version: '3.7'
#THIS environment sets up all of PCS
# All dependencies -> HSM (vault, hm-collector, kafka), RTS (red fish sims) are all setup and active.
# The PCS binary is active
# NO ports are exposed to the local system.
# This will be used for integration testing
networks:
pcs:
services:
integration-tests:
build:
context: .
dockerfile: Dockerfile.integration.tests.Dockerfile
environment:
- API_URL=http://power-control
- API_SERVER_PORT=:28007
depends_on:
- power-control
networks:
- pcs
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
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
depends_on:
- smd
- etcd
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
zookeeper:
image: docker.io/confluentinc/cp-zookeeper:7.8.0
hostname: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- pcs
kafka:
image: docker.io/confluentinc/cp-kafka:7.8.0
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:
- pcs
# TODO replace simulated BMC with RIE