-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
201 lines (183 loc) · 6.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
version: '3.8'
services:
zookeeper:
container_name: zookeeper
image: zookeeper:3.5.8
environment:
ZOO_MY_ID: 1
JVMFLAGS: "-Xms64m -Xmx128m"
ZOO_4LW_COMMANDS_WHITELIST: "srvr,ruok"
volumes:
- storage_zookeeper_datalog:/datalog
- storage_zookeeper_data:/data
healthcheck:
test: ["CMD-SHELL", 'echo "ruok" | nc -w 2 -q 2 localhost 2181 | grep imok']
interval: 5s
retries: 5
kafka:
container_name: kafka
# It is used for kafka logs.dir - can't be randomly changed
hostname: kafka
image: wurstmeister/kafka:2.13-2.8.1
ports:
- "3032:3032"
environment:
HOSTNAME_COMMAND: "docker info | grep ^Name: | cut -d' ' -f 2"
KAFKA_LISTENERS: INTERNAL://0.0.0.0:9092,EXTERNAL://0.0.0.0:3032
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://localhost:3032
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "tweets:1:1"
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_HEAP_OPTS: -Xms128m -Xmx512m
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- storage_kafka_data:/kafka
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --topic tweets --describe"]
interval: 10s
retries: 5
depends_on:
- zookeeper
akhq:
container_name: akhq
image: tchiotludo/akhq:0.22.0
environment:
AKHQ_CONFIGURATION: |
akhq:
security:
default-group: admin
connections:
kafka:
properties:
bootstrap.servers: "kafka:9092"
schema-registry:
url: "http://schemaregistry:8081"
connect:
- name: connect
url: "http://connect:8083"
ports:
- 8085:8080
links:
- kafka
- schemaregistry
- connect
schemaregistry:
container_name: schemaregistry
image: confluentinc/cp-schema-registry:7.2.3
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:9092
SCHEMA_REGISTRY_HOST_NAME: schemaregistry
ports:
- "3082:8081"
depends_on:
- kafka
healthcheck:
test: ["CMD-SHELL", "curl localhost:8081/subjects"]
interval: 20s
retries: 5
connect:
image: ghcr.io/touk/kafka-connect-twitter:7.2.3
container_name: connect
depends_on:
- zookeeper
- kafka
ports:
- 8083:8083
environment:
CONNECT_BOOTSTRAP_SERVERS: "kafka:9092"
CONNECT_LISTENERS: http://0.0.0.0:8083
CONNECT_GROUP_ID: "connect-cluster"
CONNECT_PRODUCER_CLIENT_ID: "connect-worker-producer"
CONNECT_PRODUCER_ENABLE_IDEMPOTENCE: 'true'
CONNECT_CONFIG_STORAGE_TOPIC: connect-configs
CONNECT_OFFSET_STORAGE_TOPIC: connect-offsets
CONNECT_STATUS_STORAGE_TOPIC: connect-statuses
CONNECT_REPLICATION_FACTOR: 1
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: 'true'
CONNECT_KEY_CONVERTER: 'io.confluent.connect.avro.AvroConverter'
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schemaregistry:8081'
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: 'true'
CONNECT_VALUE_CONVERTER: 'io.confluent.connect.avro.AvroConverter'
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schemaregistry:8081'
CONNECT_INTERNAL_KEY_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_INTERNAL_VALUE_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_REST_ADVERTISED_HOST_NAME: connect
CONNECT_PLUGIN_PATH: /usr/share/java,/usr/share/confluent-hub-components,/data/connect-jars
CONNECT_LOG4J_ROOT_LOGLEVEL: INFO
CONNECT_LOG4J_LOGGERS: org.reflections=ERROR
# Reduce Connect memory utilization
KAFKA_JVM_PERFORMANCE_OPTS: -server -XX:+UseG1GC -XX:GCTimeRatio=1
-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20
-XX:MaxGCPauseMillis=10000 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent
-XX:MaxInlineLevel=15 -Djava.awt.headless=true
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:8083"]
interval: 10s
retries: 5
designer:
container_name: designer
image: touk/nussknacker:1.6.1
ports:
- "3081:8080"
environment:
JDK_JAVA_OPTIONS: -Xmx256M
INFLUXDB_URL: http://influxdb:8086
KAFKA_ADDRESS: kafka:9092
SCHEMA_REGISTRY_URL: http://schemaregistry:8081
DEFAULT_SCENARIO_TYPE: streaming-lite-embedded
USAGE_REPORTS_FINGERPRINT: twitter-example
volumes:
- storage_designer:/opt/nussknacker/storage
influxdb:
container_name: influxdb
hostname: influxdb
image: influxdb:1.8.10
ports:
- "3086:8086"
environment:
INFLUXDB_DB: esp
INFLUXDB_DATA_QUERY_LOG_ENABLED: "false"
INFLUXDB_HTTP_LOG_ENABLED: "false"
volumes:
- storage_influxdb:/var/lib/influxdb
grafana:
container_name: grafana
image: grafana/grafana:8.4.2
volumes:
- ./grafana:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:/grafana
- GF_SECURITY_ALLOW_EMBEDDING=true
depends_on:
- influxdb
nginx:
container_name: nginx
image: nginx:1.17.6
ports:
- "8081:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
#we restart over 30s to let additional services (grafana etc.) come up
deploy:
restart_policy:
condition: on-failure
max_attempts: 6
volumes:
storage_zookeeper_datalog:
name: storage_zookeeper_datalog
storage_zookeeper_data:
name: storage_zookeeper_data
storage_kafka_data:
name: storage_kafka_data
storage_influxdb:
name: storage_influxdb
storage_designer:
name: storage_designer