docker-compose.yml
version: '3.1'
services:
zoo1:
image: zookeeper:3.8.0
container_name: zoo1
hostname: zoo1
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
volumes:
- zoo1-data:/data
- zoo1-datalog:/datalog
- zoo1-logs:/logs
zoo2:
image: zookeeper:3.8.0
container_name: zoo2
hostname: zoo2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
volumes:
- zoo2-data:/data
- zoo2-datalog:/datalog
- zoo2-logs:/logs
zoo3:
image: zookeeper:3.8.0
container_name: zoo3
hostname: zoo3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
volumes:
- zoo3-data:/data
- zoo3-datalog:/datalog
- zoo3-logs:/logs
volumes:
zoo1-data:
zoo1-datalog:
zoo1-logs:
zoo2-data:
zoo2-datalog:
zoo2-logs:
zoo3-data:
zoo3-datalog:
zoo3-logs:
먼저 도커 가상볼륨을 모두 제거하자
docker volume prune
y
도커 컴포즈 실행
docker-compose up -d
도커 볼륨 확인
docker volume ls
도커 컴포즈 재실행
docker-compose down
docker-compose up -d
도커 볼륨 확인
docker volume ls
'Data Engineering > Kafka' 카테고리의 다른 글
[Kafka] 카프카의 장단점 (0) | 2023.04.17 |
---|---|
[Kafka] log.cleanup.policy 이란 (0) | 2022.12.25 |
[Zookeeper] 주키퍼 도커 컴포즈 실행시 가상볼륨 생성되는 문제 (0) | 2022.08.14 |
[kafka] kafka-producer-perf-test 의 --record-size 옵션 확인해보기 (0) | 2022.06.18 |
[kafka] 컨슈머 성능 테스트 하는 방법 (0) | 2022.06.17 |