ZooKeeper Management#
zkui#
A UI dashboard that allows CRUD operations on Zookeeper.
Requirements#
Requires Java 7 to run.
Setup#
mvn clean install
Copy the
config.cfg
to the folder with the jar file. Modify it to point to the zookeeper instance. Multiple zk instances are coma separated. eg:server1:2181,server2:2181
. First server should always be the leader.Run the jar. (
nohup java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar &
)http://localhost:9090
Login Info#
username: admin, pwd: manager (Admin privileges, CRUD operations supported)
username: appconfig, pwd: appconfig (Readonly privileges, Read operations supported)
REST call#
Add Node:
/appconfig/hosts
Add Property:
myhost.com
, Value:/appconfig/hosts
Eg:
http://localhost:9090/acd/appconfig?propNames=foo&host=myhost.com
http://localhost:9090/acd/appconfig?propNames=foo&cluster=cluster1&host=myhost.com
http://localhost:9090/acd/appconfig?propNames=foo&app=myapp&host=myhost.com
A shell script will call this via MY_PROPERTY=”$(curl -f -s -S -k “http://localhost:9090/acd/appconfig?propNames=foo&host=
hostname -f
” | cut -d ‘=’ -f 2)” echo $MY_PROPERTY
Screenshots#
Tips#
KeeperErrorCode = ConnectionLoss for /
zkSessionTimeout=20
Shepher#
Shepher is a management tool of ZooKeeper. In Xiaomi, we use it as the configuration management center.
Function comparison of similar products#
Product | Introduction | Visualized operation of nodes | Snapshot management | Node modified Diff and Review function | Node operated mail notification | CAS and LDAP log | Authority management | Cascade delete | System status monitor |
---|---|---|---|---|---|---|---|---|---|
Shepher | ZooKeeper management | √ | √ | √ | √ | √ | √ | ||
TaoKeeper | ZooKeeper cluster monitor and statement | √ | |||||||
Zkdash | ZooKeeper management | √ | √ | √ | |||||
Disconf | ZooKeeper management | √ | √ | √ | √ | √ | √ | ||
XDiamond | Configuration center | √ | √ | √ | √ |
Requirements#
JDK 1.8
Maven 3.2 +
MySQL 5.6
Setup#
db/init.sql
:youradmin
->root
vi conf/application-online.properties
$ mvn clean package
$ cd shepher-packaging/target/shepher-packaging-{version}-bin
$ sh bin/run.sh -c conf/application-online.properties start
http://192.168.1.110:8089