mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
add kafka cluster
This commit is contained in:
parent
2140797770
commit
b1042969ea
@ -17,6 +17,7 @@ kafka:
|
||||
environment:
|
||||
- KAFKA_ADVERTISED_HOST_NAME=10.0.0.13
|
||||
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
|
||||
- JMX_PORT=9999
|
||||
links:
|
||||
- zookeeper
|
||||
restart: always
|
||||
|
17
kafka/cluster/docker-compose-kafka-manager.yml
Normal file
17
kafka/cluster/docker-compose-kafka-manager.yml
Normal file
@ -0,0 +1,17 @@
|
||||
kafka-manager:
|
||||
image: vimagick/kafka-manager
|
||||
ports:
|
||||
- "9000:9000"
|
||||
environment:
|
||||
- ZK_HOSTS=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
|
||||
- KAFKA_MANAGER_AUTH_ENABLED=true
|
||||
- KAFKA_MANAGER_USERNAME=admin
|
||||
- KAFKA_MANAGER_PASSWORD=admin
|
||||
extra_hosts:
|
||||
- zookeeper1:10.0.0.21
|
||||
- zookeeper2:10.0.0.22
|
||||
- zookeeper3:10.0.0.23
|
||||
- kafka1:10.0.0.21
|
||||
- kafka2:10.0.0.22
|
||||
- kafka3:10.0.0.23
|
||||
restart: always
|
27
kafka/cluster/docker-compose-kafka1.yml
Normal file
27
kafka/cluster/docker-compose-kafka1.yml
Normal file
@ -0,0 +1,27 @@
|
||||
kafka:
|
||||
image: wurstmeister/kafka
|
||||
ports:
|
||||
- "9092:9092"
|
||||
- "9999:9999"
|
||||
hostname: kafka1
|
||||
volumes:
|
||||
- /data/kafka:/kafka
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- KAFKA_ADVERTISED_HOST_NAME=kafka1
|
||||
- KAFKA_ADVERTISED_PORT=9092
|
||||
- KAFKA_BROKER_ID=1
|
||||
- KAFKA_ZOOKEEPER_CONNECT=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
|
||||
- KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote
|
||||
-Dcom.sun.management.jmxremote.authenticate=false
|
||||
-Dcom.sun.management.jmxremote.ssl=false
|
||||
-Dcom.sun.management.jmxremote.rmi.port=9999
|
||||
-Dcom.sun.management.jmxremote.port=9999
|
||||
extra_hosts:
|
||||
- zookeeper1:10.0.0.21
|
||||
- zookeeper2:10.0.0.22
|
||||
- zookeeper3:10.0.0.23
|
||||
- kafka1:10.0.0.21
|
||||
- kafka2:10.0.0.22
|
||||
- kafka3:10.0.0.23
|
||||
restart: always
|
18
kafka/cluster/docker-compose-zookeeper1.yml
Normal file
18
kafka/cluster/docker-compose-zookeeper1.yml
Normal file
@ -0,0 +1,18 @@
|
||||
zookeeper:
|
||||
image: zookeeper
|
||||
ports:
|
||||
- "2181:2181"
|
||||
- "2888:2888"
|
||||
- "3888:3888"
|
||||
hostname: zookeeper1
|
||||
volumes:
|
||||
- /data/zookeeper/data:/data
|
||||
- /data/zookeeper/datalog:/datalog
|
||||
environment:
|
||||
- ZOO_MY_ID=1
|
||||
- ZOO_SERVERS=server.1=0.0.0.0:2888:3888 server.2=zookeeper2:2888:3888 server.3=zookeeper3:2888:3888
|
||||
extra_hosts:
|
||||
- zookeeper1:10.0.0.21
|
||||
- zookeeper2:10.0.0.22
|
||||
- zookeeper3:10.0.0.23
|
||||
restart: always
|
Loading…
Reference in New Issue
Block a user