This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-test.yml
223 lines (190 loc) · 5.62 KB
/
docker-compose-test.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
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
# ------------------------------------------------------------------------------
# Config file for ALL TESTING containers:
#
# * Aether Kernel
# * Entity Extractor
# * Aether Kernel Client
# * ODK Module
# * Aether UI
# * Zookeeper & Kafka
# * Aether Kafka Producer
# * Aether Integration Tests
# ------------------------------------------------------------------------------
volumes:
db_data_test: {}
redis_data_test: {}
services:
# ---------------------------------
# Database containers
# ---------------------------------
db-test:
extends:
file: ./docker-compose-base.yml
service: postgres-base
volumes:
- db_data_test:/var/lib/postgresql/data
redis-test:
extends:
file: ./docker-compose-base.yml
service: redis-base
volumes:
- redis_data_test:/var/lib/redis/data
# ---------------------------------
# Aether Kernel
# ---------------------------------
kernel-test:
extends:
file: ./docker-compose-base.yml
service: kernel-base
environment:
APP_URL: /
BUCKET_NAME: test-kernel
# use a different database when testing the integration with another container
DB_NAME: ${TEST_KERNEL_DB_NAME:-test-kernel}
DEFAULT_REALM: ${CLIENT_REALM}
DJANGO_USE_CACHE: null
ENABLE_CONNECTION_POOL: null
MULTITENANCY: "true"
PGHOST: db-test
PROFILING_ENABLED: null
STATIC_URL: /static/
TEST_PARALLEL: ${TEST_PARALLEL}
TESTING: "true"
UWSGI_PROCESSES: "1"
WEB_SERVER_PORT: 9100
REDIS_HOST: redis-test
command: start
# ---------------------------------
# Entity Extractor Tests
# ---------------------------------
exm-test:
extends:
file: ./docker-compose-base.yml
service: exm-base
environment:
AETHER_KERNEL_URL: http://kernel-test:9100
DEFAULT_REALM: ${CLIENT_REALM}
LOGGING_LEVEL: CRITICAL
REDIS_HOST: redis-test
WAIT_INTERVAL: 0.01
command: start
# ---------------------------------
# Aether Kernel Client
# ---------------------------------
client-test:
extends:
file: ./aether-client-library/docker-compose.yml
service: client
environment:
KERNEL_URL: http://kernel-test:9100
KERNEL_USERNAME: ${CLIENT_USERNAME}
KERNEL_PASSWORD: ${CLIENT_PASSWORD}
KERNEL_REALM: ${CLIENT_REALM}
KERNEL_REALM_HEADER: ${REALM_COOKIE}
command: test
# ---------------------------------
# ODK module
# ---------------------------------
odk-test:
extends:
file: ./docker-compose-base.yml
service: odk-base
environment:
AETHER_KERNEL_URL: http://kernel-test:9100
APP_URL: /
BUCKET_NAME: test-odk
DB_NAME: test-odk
DEFAULT_REALM: ${CLIENT_REALM}
DJANGO_USE_CACHE: null
ENABLE_CONNECTION_POOL: null
MULTITENANCY: "true"
ODK_COLLECT_ENDPOINT: collect-test/
PGHOST: db-test
PROFILING_ENABLED: null
STATIC_URL: /static/
TEST_PARALLEL: ${TEST_PARALLEL}
TESTING: "true"
WEB_SERVER_PORT: 9102
command: test
# ---------------------------------
# Aether UI
# ---------------------------------
ui-test:
extends:
file: ./docker-compose-base.yml
service: ui-base
environment:
AETHER_KERNEL_URL: http://kernel-test:9100
APP_URL: /
DB_NAME: test-ui
DJANGO_USE_CACHE: null
DEFAULT_REALM: ${CLIENT_REALM}
ENABLE_CONNECTION_POOL: null
MULTITENANCY: "true"
PGHOST: db-test
PROFILING_ENABLED: null
STATIC_URL: /static/
TEST_PARALLEL: ${TEST_PARALLEL}
TESTING: "true"
WEB_SERVER_PORT: 9104
command: test
ui-assets-test:
extends:
file: docker-compose-base.yml
service: ui-assets-base
command: test
# ---------------------------------
# Kafka & Zookeeper
# ---------------------------------
zookeeper-test:
extends:
file: ./docker-compose-base.yml
service: zookeeper-base
kafka-test:
extends:
file: ./docker-compose-base.yml
service: kafka-base
links:
- zookeeper-test
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper-test:32181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-test:29092
ADVERTISED_HOST_NAME: kafka-test
# ---------------------------------
# Aether Kafka Producer
# ---------------------------------
producer-test:
extends:
file: ./docker-compose-base.yml
service: producer-base
environment:
PRODUCER_SETTINGS_FILE: /code/tests/conf/producer.json
# These variables will override the ones indicated in the settings file
AETHER_KERNEL_URL: http://kernel-test:9100
KAFKA_URL: kafka-test:29092
KERNEL_ACCESS_TYPE: ${KERNEL_ACCESS_TYPE:-api}
OFFSET_DB_HOST: db-test
OFFSET_DB_NAME: producer_offset_db_test
POSTGRES_HOST: db-test
POSTGRES_DBNAME: ${TEST_KERNEL_DB_NAME:-test-kernel}
# ---------------------------------
# Aether Integration Tests
# ---------------------------------
integration-test:
image: aether-integration-test
build: ./test-aether-integration-module
environment:
KAFKA_URL: kafka-test:29092
KERNEL_URL: http://kernel-test:9100
KERNEL_USERNAME: ${CLIENT_USERNAME}
KERNEL_PASSWORD: ${CLIENT_PASSWORD}
KERNEL_REALM: ${CLIENT_REALM}
KERNEL_REALM_HEADER: ${REALM_COOKIE}
PRODUCER_URL: http://producer-test:9005
PRODUCER_ADMIN_PW: ${PRODUCER_ADMIN_PW}
PRODUCER_ADMIN_USER: ${PRODUCER_ADMIN_USER}
PRODUCER_MODE: ${KERNEL_ACCESS_TYPE:-api}
volumes:
- ./test-aether-integration-module:/code
command: test