forked from confluentinc/demo-scene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
103 lines (99 loc) · 3.69 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
---
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.4.1
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- ./data/container_data/zk-data:/var/lib/zookeeper/data
- ./data/container_data/zk-txn-logs:/var/lib/zookeeper/log
kafka-1:
image: confluentinc/cp-kafka:5.4.1
container_name: kafka-1
depends_on:
- zookeeper
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:39092,HOST://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:39092,HOST://localhost:9092
volumes:
- ./data/container_data/kafka-1-data:/var/lib/kafka/data
kafka-2:
image: confluentinc/cp-kafka:5.4.1
container_name: kafka-2
depends_on:
- zookeeper
ports:
- 19092:19092
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:49092,HOST://0.0.0.0:19092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:49092,HOST://localhost:19092
volumes:
- ./data/container_data/kafka-2-data:/var/lib/kafka/data
kafka-3:
image: confluentinc/cp-kafka:5.4.1
container_name: kafka-3
depends_on:
- zookeeper
ports:
- 29092:29092
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:59092,HOST://0.0.0.0:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:59092,HOST://localhost:29092
volumes:
- ./data/container_data/kafka-3-data:/var/lib/kafka/data
replicator:
image: confluentinc/cp-enterprise-replicator:5.4.1
container_name: replicator
depends_on:
- kafka-1
- kafka-2
- kafka-3
ports:
- 58083:58083
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka-1:39092,kafka-2:49092,kafka-3:59092'
CONNECT_REST_ADVERTISED_HOST_NAME: 'replicator'
CONNECT_REST_PORT: 58083
CONNECT_GROUP_ID: replicator
CONNECT_CONFIG_STORAGE_TOPIC: _replicator-configs
CONNECT_OFFSET_STORAGE_TOPIC: _replicator-offsets
CONNECT_STATUS_STORAGE_TOPIC: _replicator-status
CONNECT_KEY_CONVERTER: io.confluent.connect.replicator.util.ByteArrayConverter
CONNECT_VALUE_CONVERTER: io.confluent.connect.replicator.util.ByteArrayConverter
CONNECT_INTERNAL_KEY_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_INTERNAL_VALUE_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_LOG4J_ROOT_LOGLEVEL: 'INFO'
CONNECT_LOG4J_LOGGERS: 'org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR'
CONNECT_LOG4J_APPENDER_STDOUT_LAYOUT_CONVERSIONPATTERN: "[%d] %p %X{connector.context}%m (%c:%L)%n"
CONNECT_CONFIG_PROVIDERS: 'file'
CONNECT_CONFIG_PROVIDERS_FILE_CLASS: 'org.apache.kafka.common.config.provider.FileConfigProvider'
volumes:
- ./.env:/opt/config
# command:
# - bash
# - -c
# - |
# echo "Installing connector plugins"
# confluent-hub install --no-prompt confluentinc/connect-transforms:latest
# #
# echo "Launching Kafka Connect worker"
# /etc/confluent/docker/run &
# #
# sleep infinity