일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Test
- zip 파일 암호화
- aggs
- high level client
- flask
- 차트
- Python
- plugin
- matplotlib
- Mac
- zip 암호화
- 900gle
- Elasticsearch
- TensorFlow
- 파이썬
- licence delete curl
- MySQL
- license delete
- docker
- springboot
- Kafka
- analyzer test
- API
- token filter test
- License
- sort
- query
- Java
- ELASTIC
- aggregation
Archives
- Today
- Total
개발잡부
[kafka] docker compose kafka 본문
반응형
cd ~/docker/kafka
docker compose up -d --build
kafka 설치하고 kafka manager 설치
접속 : localhost:9000
Configuring the Kafka Manager
To setup Kafka Manager, navigate to http://localhost:9000 and complete the following steps:
- Select Cluster and Add Cluster
- Enter a cluster name e.g. 900gle
- Enter a cluster ZooKeeper Host e.g. zookeeper:2181
- Select a Kafka version matching the kafka image e.g. 0.10.1 or the highest available.
- Save changes
1. Add Cluster
2. Cluster Name : 900gle
3. Cluster Zookeeper Hosts : zookeeper:2181
4. Save
docker-compose.yml
version: '3.6'
services:
zookeeper:
container_name: zookeeper
image: wurstmeister/zookeeper:3.4.6
volumes:
- "./zookeeper/data:/data"
- "./zookeeper/logs:/datalog"
ports:
- "2181:2181"
kafka1:
container_name: kafka1
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9095:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}:9095
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper
kafka2:
container_name: kafka2
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9096:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}:9096
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper
kafka3:
container_name: kafka3
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9097:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}:9097
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper
kafka-manager:
container_name: kafka-manager
image: hlebalbau/kafka-manager:2.0.0.2
restart: on-failure
depends_on:
- kafka1
- kafka2
- kafka3
- zookeeper
environment:
ZK_HOSTS: zookeeper:2181
APPLICATION_SECRET: "random-secret"
KM_ARGS: -Djava.net.preferIPv4Stack=true
ports:
- "9000:9000"
반응형
'Kafka' 카테고리의 다른 글
Error response from daemon: Container 2c8318196be216b730907022eccaffc314fdd7e5d8e0286ea3f6b1d219acd5c0 is restarting, wait until the container is running (0) | 2022.08.27 |
---|---|
[kafka] docker dompose multi broker kafka 3.6 (0) | 2022.08.27 |
[kafka] docker dompose multi broker kafka (0) | 2022.08.26 |
[kafka] CMAK 3.0.0.5 설치 for Mac OS (0) | 2022.04.27 |
[kafka] MacOs Kafka install / test (0) | 2022.03.01 |
Comments