Add zk cluster

pull/135/head
Baohua Yang 2020-02-12 10:28:10 -08:00
parent acde825d06
commit 7e2eb2da3a
1 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@
# * kafka: kafka service, will default to connect to zookeeper # * kafka: kafka service, will default to connect to zookeeper
# * cli: client to test kafka service # * cli: client to test kafka service
version: '2' version: '3'
services: services:
zookeeper1: zookeeper1:
@ -16,8 +16,8 @@ services:
- "2182:2181" # zk connection port - "2182:2181" # zk connection port
environment: environment:
- ZK_ID=1 # when bootup, will read this and update the /tmp/zookeeper/myid file - ZK_ID=1 # when bootup, will read this and update the /tmp/zookeeper/myid file
volumes: #volumes:
- ${PWD}/zookeeper1:/tmp/zookeeper #- ${PWD}/zookeeper1:/tmp/zookeeper
command: bash -c 'bash /tmp/start_zk.sh' command: bash -c 'bash /tmp/start_zk.sh'
zookeeper2: zookeeper2:
@ -28,8 +28,8 @@ services:
- "2183:2181" # zk connection port - "2183:2181" # zk connection port
environment: environment:
- ZK_ID=2 # when bootup, will read this and update the /tmp/zookeeper/myid file - ZK_ID=2 # when bootup, will read this and update the /tmp/zookeeper/myid file
volumes: #volumes:
- ${PWD}/zookeeper2:/tmp/zookeeper # - ${PWD}/zookeeper2:/tmp/zookeeper
command: bash -c 'bash /tmp/start_zk.sh' command: bash -c 'bash /tmp/start_zk.sh'
zookeeper3: zookeeper3:
@ -40,8 +40,8 @@ services:
- "2181:2181" # zk connection port - "2181:2181" # zk connection port
environment: environment:
- ZK_ID=3 # when bootup, will read this and update the /tmp/zookeeper/myid file - ZK_ID=3 # when bootup, will read this and update the /tmp/zookeeper/myid file
volumes: #volumes:
- ${PWD}/zookeeper3:/tmp/zookeeper # - ${PWD}/zookeeper3:/tmp/zookeeper
command: bash -c 'bash /tmp/start_zk.sh' command: bash -c 'bash /tmp/start_zk.sh'
kafka0: # kafka service kafka0: # kafka service