forked from Iskuskov/kafka_mirror_maker_2_poc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
74 lines (73 loc) · 2.28 KB
/
docker-compose.yaml
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
version: "2.2"
services:
srcZookeeper:
image: ${REPOSITORY}/cp-zookeeper:${CONFLUENT_DOCKER_TAG}
restart: always
hostname: srcZookeeper
container_name: srcZookeeper
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: "2181"
ZOOKEEPER_TICK_TIME: "2000"
ports:
- "2181:2181"
destZookeeper:
image: ${REPOSITORY}/cp-zookeeper:${CONFLUENT_DOCKER_TAG}
restart: always
hostname: destZookeeper
container_name: destZookeeper
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: "2281"
ZOOKEEPER_TICK_TIME: "2000"
ports:
- "2281:2281"
srcKafka1:
image: ${REPOSITORY}/cp-kafka:${CONFLUENT_DOCKER_TAG}
hostname: srcKafka1
container_name: srcKafka1
depends_on:
- srcZookeeper
ports:
- "10091:10091"
environment:
KAFKA_ZOOKEEPER_CONNECT: "srcZookeeper:2181"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://srcKafka1:10091
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
destKafka1:
image: ${REPOSITORY}/cp-kafka:${CONFLUENT_DOCKER_TAG}
hostname: destKafka1
container_name: destKafka1
depends_on:
- destZookeeper
ports:
- "11091:11091"
environment:
KAFKA_ZOOKEEPER_CONNECT: "destZookeeper:2281"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://destKafka1:11091
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
mirror:
image: wurstmeister/kafka:2.13-2.6.0
entrypoint: connect-mirror-maker.sh /mm2.properties
environment:
KAFKA_ADVERTISED_HOST_NAME: mirror
# KAFKA_LOG4J_OPTS: "-Dlog4j.configuration=file:/connect-log4j.properties"
depends_on:
- srcKafka1
- destKafka1
volumes:
- ./mm2.properties:/mm2.properties
- ./connect-log4j.properties:/connect-log4j.properties
kafkacat:
image: confluentinc/cp-kafkacat
command: sleep infinity