-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
287 lines (268 loc) · 7.66 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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
name: nussknacker
services:
### Quickstart setup container
quickstart-setup:
image: touk/nussknacker-example-scenarios-library:latest
depends_on:
nginx:
condition: service_healthy
designer:
condition: service_healthy
kafka:
condition: service_healthy
schema-registry:
condition: service_healthy
environment:
NU_DESIGNER_ADDRESS: "nginx:8080"
NU_REQUEST_RESPONSE_OPEN_API_SERVICE_ADDRESS: "nginx:8181"
KAFKA_ADDRESS: "kafka:9092"
SCHEMA_REGISTRY_ADDRESS: "schema-registry:8081"
volumes:
- nussknacker_designer_shared_configuration:/opt/nussknacker/conf/
deploy:
resources:
limits:
memory: 256M
cpus: '0.5'
### Nussknacker-related services
nginx:
image: nginx:1.26.0-alpine
restart: unless-stopped
ports:
- 8080:8080
- 8181:8181
depends_on:
grafana:
condition: service_healthy
designer:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8080 || exit 1" ]
interval: 10s
retries: 10
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/additional:/etc/nginx/additional
deploy:
resources:
limits:
memory: 64M
### Nussknacker designer service
designer:
image: touk/nussknacker:${NUSSKNACKER_VERSION:?NUSSKNACKER_VERSION must be defined}_scala-2.12
restart: unless-stopped
environment:
EXAMPLE_SCENARIOS_LIBRARY_SERVICE_NAME: quickstart-setup
CONFIG_FILE: "/opt/nussknacker/conf/application.conf,/opt/nussknacker/conf/additional-configuration.conf,/opt/nussknacker/conf/application-customizations.conf"
DB_URL: "jdbc:postgresql://postgres:5432/nu-db"
DB_DRIVER: "org.postgresql.Driver"
DB_USER: "nu"
DB_PASSWORD: "nupassword"
NUSSKNACKER_LOG_LEVEL: "INFO"
KAFKA_ADDRESS: "kafka:9092"
SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
INFLUXDB_URL: "http://influxdb:8086"
FLINK_REST_URL: "http://flink-jobmanager:8081"
JDK_JAVA_OPTIONS: "-Xmx1024M"
USAGE_REPORTS_SOURCE: "quickstart-docker-compose"
depends_on:
postgres:
condition: service_healthy
grafana:
condition: service_healthy
kafka:
condition: service_healthy
schema-registry:
condition: service_healthy
flink-jobmanager:
condition: service_healthy
flink-taskmanager:
condition: service_started
expose:
- 8181
healthcheck:
test: [ "CMD-SHELL", "curl localhost:8080/api/app/healthCheck" ]
interval: 10s
retries: 10
volumes:
- nussknacker_designer_shared_configuration:/opt/nussknacker/conf
- ./designer/application-customizations.conf:/opt/nussknacker/conf/application-customizations.conf
volumes_from:
- flink-jobmanager
deploy:
resources:
limits:
memory: 1024M
postgres:
image: postgres:13
restart: unless-stopped
environment:
POSTGRES_DB: "nu-db"
POSTGRES_USER: "nu"
POSTGRES_PASSWORD: "nupassword"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d nu-db -U nu"]
interval: 10s
retries: 10
volumes:
- nussknacker_designer_data:/var/lib/postgresql/data
deploy:
resources:
limits:
memory: 256M
### Nussknacker metrics-related services:
grafana:
image: grafana/grafana:10.1.10
restart: unless-stopped
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:/grafana"
GF_SECURITY_ALLOW_EMBEDDING: "true"
depends_on:
influxdb:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 3000"]
interval: 10s
retries: 10
volumes:
- ./grafana:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
deploy:
resources:
limits:
memory: 256M
influxdb:
image: influxdb:1.8.10
restart: unless-stopped
environment:
INFLUXDB_DB: "nussknacker_metrics"
healthcheck:
test: [ "CMD-SHELL", "influx -execute 'SHOW DATABASES'" ]
interval: 10s
retries: 10
deploy:
resources:
limits:
memory: 128M
### KAFKA-related services:
kafka:
image: bitnami/kafka:3.7.0
restart: unless-stopped
hostname: nu-kafka
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: "controller,broker"
KAFKA_CFG_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT"
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093"
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
healthcheck:
test: [ "CMD-SHELL", "kafka-topics.sh --bootstrap-server localhost:9092 --list" ]
interval: 10s
retries: 10
deploy:
resources:
limits:
memory: 512M
schema-registry:
image: bitnami/schema-registry:7.6.1
restart: unless-stopped
environment:
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081"
SCHEMA_REGISTRY_KAFKA_BROKERS: "PLAINTEXT://kafka:9092"
depends_on:
kafka:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", 'echo -e "GET /subjects HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n" | nc localhost 8081 | grep -q "HTTP/1.1 200 OK" | exit 0']
interval: 10s
retries: 10
deploy:
resources:
limits:
memory: 384M
akhq:
image: tchiotludo/akhq:0.24.0
restart: unless-stopped
environment:
AKHQ_CONFIGURATION: |
micronaut:
server:
context-path: /akhq
akhq:
connections:
nussknacker-kafka:
properties:
bootstrap.servers: "kafka:9092"
schema-registry:
url: "http://schema-registry:8081"
depends_on:
kafka:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8080" ]
interval: 10s
retries: 10
deploy:
resources:
limits:
memory: 512M
### FLINK-related services
flink-jobmanager:
build:
context: ./flink/
args:
FLINK_VERSION: "1.19.1-scala_2.12-java11"
no_cache: true
restart: unless-stopped
command: jobmanager
environment:
JOB_MANAGER_RPC_ADDRESS: "flink-jobmanager"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8081/jobs/overview" ]
interval: 10s
retries: 10
volumes:
- nussknacker_flink_data:/opt/flink/data
flink-taskmanager:
build:
context: ./flink/
args:
FLINK_VERSION: "1.19.1-scala_2.12-java11"
no_cache: true
restart: unless-stopped
command: taskmanager
environment:
JOB_MANAGER_RPC_ADDRESS: "flink-jobmanager"
depends_on:
flink-jobmanager:
condition: service_healthy
telegraf:
condition: service_healthy
volumes_from:
- flink-jobmanager
deploy:
resources:
limits:
memory: 1024M
telegraf:
image: telegraf:1.30.2
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8087/write" ]
interval: 10s
retries: 10
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
deploy:
resources:
limits:
memory: 256M
volumes:
nussknacker_designer_data:
name: nussknacker_designer_data
nussknacker_designer_shared_configuration:
name: nussknacker_designer_shared_configuration
nussknacker_flink_data:
name: nussknacker_flink_data