ZooKeeper in ASAB Maestro¶
ZooKeeper is the consensus technology for ASAB Maestro. All other services need to communicate with ZooKeeper to access cluster-level data. Thus, ZooKeeper Server string is provided as parameter to all services and ASAB services get [zoookeeper] configuration section from the ZooKeeper Tech.
Parameters¶
- ZOOKEEPER_SERVERS
-
Comma separated addresses to all ZooKeeper instances. In a three-node cluste (with nodes named lm1, lm2, lm3) the
ZOOKEEPER_SERVERS
parameter would be replaced withlm1:2181,lm2:2181,lm3:2181
string.Example
define: type: rc/descriptor name: Web-based ZooKeeper UI url: https://zoonavigator.elkozmon.com/ descriptor: image: elkozmon/zoonavigator volumes: - "{{SLOW_STORAGE}}/{{INSTANCE_ID}}/logs:/app/logs" environment: HTTP_PORT: "9001" CONNECTION_ZK_NAME: Local ZooKeeper CONNECTION_ZK_CONN: "{{ZOOKEEPER_SERVERS}}" AUTO_CONNECT_CONNECTION_ID: ZK BASE_HREF: /zoonavigator
Configuration of ASAB Services¶
Every ASAB Service obtains zookeeper
configuration section.
[zookeeper]
servers=lmc01:2181,lmc02:2181,lmc03:2181
Environment variables¶
Available for the respective ZooKeeper instance only.
- ZOO_MY_ID
-
Instance number of each ZooKeeper instance becomes
ZOO_MY_ID
environment variable of the ZooKeeper (Docker) container. That's why renaming of the ZooKeeper instances in the model could be problematic.