diff --git a/kafka/cluster/docker-compose-zookeeper1.yml b/kafka/cluster/docker-compose-zookeeper1.yml index 990e250..88e6856 100644 --- a/kafka/cluster/docker-compose-zookeeper1.yml +++ b/kafka/cluster/docker-compose-zookeeper1.yml @@ -8,9 +8,11 @@ zookeeper: volumes: - /data/zookeeper/data:/data - /data/zookeeper/datalog:/datalog + - /data/zookeeper/logs:/logs environment: - ZOO_MY_ID=1 - ZOO_SERVERS=server.1=0.0.0.0:2888:3888;2181 server.2=zookeeper2:2888:3888;2181 server.3=zookeeper3:2888:3888;2181 + - ZOO_LOG4J_PROP=INFO,ROLLINGFILE extra_hosts: - zookeeper1:10.0.0.21 - zookeeper2:10.0.0.22 diff --git a/zookeeper/README.md b/zookeeper/README.md index ef63c7f..9fed9cf 100644 --- a/zookeeper/README.md +++ b/zookeeper/README.md @@ -15,8 +15,11 @@ zookeeper: ports: - "2181:2181" volumes: - - ./data:/data - - ./datalog:/datalog + - ./data/data:/data + - ./data/datalog:/datalog + - ./data/logs:/logs + environment: + - ZOO_LOG4J_PROP=INFO,ROLLINGFILE restart: always ``` @@ -28,7 +31,8 @@ $ docker-compose up -d $ docker-compose exec zookeeper zkServer.sh status ZooKeeper JMX enabled by default Using config: /conf/zoo.cfg -Mode: leader +Client port found: 2181. Client address: localhost. +Mode: standalone $ docker-compose exec zookeeper zkCli.sh >>> help @@ -40,7 +44,9 @@ $ docker-compose exec zookeeper zkCli.sh Click [this][2] to learn more. -## Cluster Mode [TODO] +## Cluster Mode + +See: https://github.com/vimagick/dockerfiles/tree/master/kafka [1]: http://zookeeper.apache.org/ [2]: https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html diff --git a/zookeeper/docker-compose.yml b/zookeeper/docker-compose.yml index da741d3..00fc89c 100644 --- a/zookeeper/docker-compose.yml +++ b/zookeeper/docker-compose.yml @@ -3,6 +3,9 @@ zookeeper: ports: - "2181:2181" volumes: - - ./data:/data - - ./datalog:/datalog + - ./data/data:/data + - ./data/datalog:/datalog + - ./data/logs:/logs + environment: + - ZOO_LOG4J_PROP=INFO,ROLLINGFILE restart: always