-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (105 loc) · 3.15 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
version: "3.1"
services:
zoo1:
build:
context: "."
dockerfile: ./Dockerfile
environment:
ZOO_4LW_COMMANDS_WHITELIST: "*"
ZOO_MY_ID: 1
ZOO_SERVERS: "server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181"
ZOO_STANDALONE_ENABLED: "false"
hostname: zoo1
ports:
- "2191:2181"
restart: always
zoo2:
build:
context: "."
dockerfile: ./Dockerfile
environment:
ZOO_4LW_COMMANDS_WHITELIST: "*"
ZOO_MY_ID: 2
ZOO_SERVERS: "server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181"
ZOO_STANDALONE_ENABLED: "false"
hostname: zoo2
ports:
- "2192:2181"
restart: always
zoo3:
build:
context: "."
dockerfile: ./Dockerfile
environment:
ZOO_4LW_COMMANDS_WHITELIST: "*"
ZOO_MY_ID: 3
ZOO_SERVERS: "server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181"
ZOO_STANDALONE_ENABLED: "false"
hostname: zoo3
ports:
- "2193:2181"
restart: always
kafka1:
depends_on:
- zoo1
- zoo2
- zoo3
environment:
KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://kafka1:6667,PLAINTEXT_HOST://kafka1:6668"
KAFKA_CFG_BROKER_ID: 1
KAFKA_CFG_LISTENERS: "PLAINTEXT://:6667,PLAINTEXT_HOST://:6668"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_CFG_PORT: 6667
KAFKA_CFG_ZOOKEEPER_CONNECT: "zoo1:2181,zoo2:2181,zoo3:2181"
ALLOW_PLAINTEXT_LISTENER: "yes"
hostname: kafka1
image: "bitnami/kafka:2.4.0"
ports:
- "4448:6668"
- "4447:6667"
kafka2:
depends_on:
- zoo1
- zoo2
- zoo3
environment:
KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://kafka2:6667,PLAINTEXT_HOST://kafka2:6668"
KAFKA_CFG_BROKER_ID: 2
KAFKA_CFG_LISTENERS: "PLAINTEXT://:6667,PLAINTEXT_HOST://:6668"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_CFG_PORT: 6667
KAFKA_CFG_ZOOKEEPER_CONNECT: "zoo1:2181,zoo2:2181,zoo3:2181"
ALLOW_PLAINTEXT_LISTENER: "yes"
hostname: kafka2
image: "bitnami/kafka:2.4.0"
ports:
- "5558:6668"
- "5557:6667"
kafka3:
depends_on:
- zoo1
- zoo2
- zoo3
environment:
KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://kafka3:6667,PLAINTEXT_HOST://kafka3:6668"
KAFKA_CFG_BROKER_ID: 3
KAFKA_CFG_LISTENERS: "PLAINTEXT://:6667,PLAINTEXT_HOST://:6668"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_CFG_PORT: 6667
KAFKA_CFG_ZOOKEEPER_CONNECT: "zoo1:2181,zoo2:2181,zoo3:2181"
ALLOW_PLAINTEXT_LISTENER: "yes"
hostname: kafka3
image: "bitnami/kafka:2.4.0"
ports:
- "7778:6668"
- "7777:6667"
kafka_manager:
depends_on:
- zoo1
- zoo2
- zoo3
image: "sheepkiller/kafka-manager:latest"
environment:
ZK_HOSTS: "zoo1:2181,zoo2:2181,zoo3:2181"
ports:
- "9000:9000"