-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkafka-single.yml
58 lines (52 loc) · 1.17 KB
/
kafka-single.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
version: '3.3'
services:
kafka1:
image: confluentinc/cp-kafka
environment:
- KAFKA_BROKER_ID=1
- KAFKA_ZOOKEEPER_CONNECT=zookeeper1:2181
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
deploy:
endpoint_mode: dnsrr
placement:
constraints:
- node.role == manager
networks:
net:
hostname: "{{.Service.Name}}"
zookeeper1:
image: confluentinc/cp-zookeeper
environment:
- ZOOKEEPER_SERVER_ID=1
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
- ZOOKEEPER_INIT_LIMIT=5
- ZOOKEEPER_SYNC_LIMIT=2
- ZOOKEEPER_SERVERS=zookeeper1:2888:3888
deploy:
endpoint_mode: dnsrr
placement:
constraints:
- node.role == manager
networks:
net:
hostname: "{{.Service.Name}}"
kafka-manager:
image: sheepkiller/kafka-manager
environment:
- ZK_HOSTS=zookeeper1:2181
- APPLICATION_SECRET=letmein
deploy:
placement:
constraints:
- node.role == manager
networks:
net:
hostname: "{{.Service.Name}}"
ports:
- 9000:9000
networks:
net:
driver: overlay
driver_opts:
encrypted: "true"