-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
267 lines (251 loc) · 10.1 KB
/
docker-compose.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
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
---
version: '3.2'
services:
#---------------------------------------------------------------------------#
# Zookeeper Cluster #
#---------------------------------------------------------------------------#
zookeeper-1:
image: confluentinc/cp-zookeeper:5.3.0
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 1000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888
zookeeper-2:
image: confluentinc/cp-zookeeper:5.3.0
environment:
ZOOKEEPER_SERVER_ID: 2
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 1000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888
zookeeper-3:
image: confluentinc/cp-zookeeper:5.3.0
environment:
ZOOKEEPER_SERVER_ID: 3
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 1000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888
#---------------------------------------------------------------------------#
# Kafka Cluster #
#---------------------------------------------------------------------------#
kafka-1:
image: confluentinc/cp-kafka:5.3.0
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
environment:
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_LOG4J_LOGGERS: kafka.producer.async.DefaultEventHandler=INFO,kafka.controller=INFO,state.change.logger=INFO
KAFKA_COMPRESSION_TYPE: lz4
KAFKA_INTER_BROKER_PROTOCOL_VERSION: "2.0"
KAFKA_LOG_MESSAGE_FORMAT_VERSION: "2.0"
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
kafka-2:
image: confluentinc/cp-kafka:5.3.0
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
environment:
KAFKA_BROKER_ID: 2
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_LOG4J_LOGGERS: kafka.producer.async.DefaultEventHandler=INFO,kafka.controller=INFO,state.change.logger=INFO
KAFKA_COMPRESSION_TYPE: lz4
KAFKA_INTER_BROKER_PROTOCOL_VERSION: "2.0"
KAFKA_LOG_MESSAGE_FORMAT_VERSION: "2.0"
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
kafka-3:
image: confluentinc/cp-kafka:5.3.0
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
environment:
KAFKA_BROKER_ID: 3
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_LOG4J_LOGGERS: kafka.producer.async.DefaultEventHandler=INFO,kafka.controller=INFO,state.change.logger=INFO
KAFKA_COMPRESSION_TYPE: lz4
KAFKA_INTER_BROKER_PROTOCOL_VERSION: "2.0"
KAFKA_LOG_MESSAGE_FORMAT_VERSION: "2.0"
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
#---------------------------------------------------------------------------#
# Schema Registry #
#---------------------------------------------------------------------------#
schema-registry-1:
image: confluentinc/cp-schema-registry:5.3.0
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
restart: always
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka-1:9092,PLAINTEXT://kafka-2:9092,PLAINTEXT://kafka-3:9092
SCHEMA_REGISTRY_HOST_NAME: schema-registry-1
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_AVRO_COMPATIBILITY_LEVEL: none
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
#---------------------------------------------------------------------------#
# REST proxy #
#---------------------------------------------------------------------------#
rest-proxy-1:
image: confluentinc/cp-kafka-rest:5.3.0
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
- schema-registry-1
ports:
- "8082:8082"
environment:
KAFKA_REST_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
KAFKA_REST_LISTENERS: http://0.0.0.0:8082
KAFKA_REST_SCHEMA_REGISTRY_URL: http://schema-registry-1:8081
KAFKA_REST_HOST_NAME: rest-proxy-1
KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS: 5000
KAFKA_AUTO_COMMIT_INTERVAL_MS: 300
KAFKA_REST_COMPRESSION_TYPE: lz4
#---------------------------------------------------------------------------#
# Management Portal #
#---------------------------------------------------------------------------#
managementportal-app:
image: radarbase/management-portal:0.5.8
depends_on:
- radarbase-postgresql
ports:
- "8090:8080"
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:postgresql://radarbase-postgresql:5432/managementportal
SPRING_DATASOURCE_USERNAME: radarcns
SPRING_DATASOURCE_PASSWORD: radarcns
MANAGEMENTPORTAL_FRONTEND_CLIENT_SECRET: "testMe"
MANAGEMENTPORTAL_COMMON_BASE_URL: http://localhost:8080/managementportal
MANAGEMENTPORTAL_COMMON_MANAGEMENT_PORTAL_BASE_URL: http://localhost:8080/managementportal
MANAGEMENTPORTAL_OAUTH_CLIENTS_FILE: /mp-includes/config/oauth_client_details.csv
MANAGEMENTPORTAL_CATALOGUE_SERVER_ENABLE_AUTO_IMPORT: 'false'
MANAGEMENTPORTAL_OAUTH_SIGNING_KEY_ALIAS: 'radarbase-managementportal-ec'
JAVA_OPTS: -Xmx256m # maximum heap size for the JVM running ManagementPortal, increase this as necessary
volumes:
- ./etc/mp-config/:/mp-includes/config
radarbase-postgresql:
image: radarbase/radarbase-postgres:latest
ports:
- "5434:5432"
environment:
- POSTGRES_USER=radarcns
- POSTGRES_PASSWORD=radarcns
- POSTGRES_MULTIPLE_DATABASES=managementportal,uploadconnector
#---------------------------------------------------------------------------#
# RADAR Upload Source connector #
#---------------------------------------------------------------------------#
radar-upload-connector:
build:
context: .
dockerfile: kafka-connect-upload-source/Dockerfile
image: radarbase/radar-connect-upload-source:0.5.1
restart: on-failure
volumes:
- ./etc/source-upload.properties:/etc/kafka-connect/source-upload.properties
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
- schema-registry-1
- radar-upload-backend
environment:
CONNECT_BOOTSTRAP_SERVERS: PLAINTEXT://kafka-1:9092,PLAINTEXT://kafka-2:9092,PLAINTEXT://kafka-3:9092
CONNECT_REST_PORT: 8083
CONNECT_GROUP_ID: "default"
CONNECT_CONFIG_STORAGE_TOPIC: "default.config"
CONNECT_OFFSET_STORAGE_TOPIC: "default.offsets"
CONNECT_STATUS_STORAGE_TOPIC: "default.status"
CONNECT_KEY_CONVERTER: "io.confluent.connect.avro.AvroConverter"
CONNECT_VALUE_CONVERTER: "io.confluent.connect.avro.AvroConverter"
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry-1:8081"
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry-1:8081"
CONNECT_VALUE_CONVERTER_CONNECT_META_DATA: "false"
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_OFFSET_STORAGE_FILE_FILENAME: "/var/lib/kafka-connect-upload-source/logs/connect.offsets"
CONNECT_REST_ADVERTISED_HOST_NAME: "radar-upload-connector"
CONNECT_ZOOKEEPER_CONNECT: zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
CONNECTOR_PROPERTY_FILE_PREFIX: "source-upload"
KAFKA_HEAP_OPTS: "-Xms256m -Xmx768m"
KAFKA_BROKERS: 3
CONNECT_LOG4J_LOGGERS: "org.reflections=ERROR"
radar-upload-backend:
build:
context: .
dockerfile: radar-upload-backend/Dockerfile
image: radarbase/radar-upload-connect-backend:0.5.1
ports:
- "8085:8085"
depends_on:
- managementportal-app
- radarbase-postgresql
volumes:
- ./etc/upload.yml:/etc/upload-backend/upload.yml
- ./etc/logback.xml:/etc/upload-backend/logback.xml
environment:
JAVA_OPTS: "-Dlogback.configurationFile=/etc/upload-backend/logback.xml"
command: ["radar-upload-backend", "/etc/upload-backend/upload.yml"]
radar-upload-frontend:
build:
context: radar-upload-frontend
dockerfile: Dockerfile
image: radarbase/radar-upload-connect-frontend:0.5.1
depends_on:
- radar-upload-backend
- managementportal-app
environment:
VUE_APP_BASE_URL: "/upload"
VUE_APP_API_BASE_URL: "http://localhost:8080/upload/api/"
VUE_APP_AUTH_API: "http://localhost:8080/managementportal/oauth"
VUE_APP_AUTH_CALLBACK: "http://localhost:8080/upload/login"
VUE_APP_CLIENT_ID: "radar_upload_frontend"
minio:
image: minio/minio
command:
- server
- /data
webserver:
image: nginx:1.17.3-alpine
ports:
- "8080:8080"
depends_on:
- radar-upload-backend
- managementportal-app
- radar-upload-frontend
volumes:
- ./etc/nginx-proxy.conf:/etc/nginx/nginx.conf