docker-compose.yml
version: '2.1'
services:
zookeeper-1:
hostname: zookeeper-1
container_name: zookeeper-1
image: zookeeper:3.6
restart: always
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zookeeper-1:2888:3888;2181 server.2=zookeeper-2:2888:3888;2181 server.3=zookeeper-3:2888:3888;2181
volumes:
- type: bind
source: ./data/zk-cluster/zookeeper-1/data
target: /data
read_only: false
zookeeper-2:
hostname: zookeeper-2
container_name: zookeeper-2
image: zookeeper:3.6
restart: always
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zookeeper-1:2888:3888;2181 server.2=zookeeper-2:2888:3888;2181 server.3=zookeeper-3:2888:3888;2181
volumes:
- type: bind
source: ./data/zk-cluster/zookeeper-2/data
target: /data
read_only: false
zookeeper-3:
hostname: zookeeper-3
container_name: zookeeper-3
image: zookeeper:3.6
restart: always
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zookeeper-1:2888:3888;2181 server.2=zookeeper-2:2888:3888;2181 server.3=zookeeper-3:2888:3888;2181
volumes:
- type: bind
source: ./data/zk-cluster/zookeeper-3/data
target: /data
read_only: false
zookeeper-navigator:
hostname: zookeeper-navigator
container_name: zookeeper-navigator
image: elkozmon/zoonavigator:1.1.2
restart: always
ports:
- 9000:9000
environment:
HTTP_PORT: 9000
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
docker-compose up -d
localhost:9000 접속
zookeeper-1:2181 에 접속
접속완료
왼쪽에 zookeeper 클릭
config 클릭
'Data Engineering > Kafka' 카테고리의 다른 글
[Zookeeper] 주키퍼에 어떤 znode가 들어있는지 확인하는 방법 (0) | 2022.06.08 |
---|---|
[Zookeeper] 주키퍼 마스터 찾는 방법 (0) | 2022.06.08 |
[Zookeeper] Zookeeper Cluster (docker-compose) (0) | 2022.06.08 |
[kafka] 카프카 클러스터 만드는 방법 (0) | 2022.01.31 |
[kafka] 카프카 토픽 생성하는 방법 (0) | 2022.01.31 |