2023-09-01 15:42:19 -04:00
|
|
|
# PVC Zookeeper configuration
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2023-09-01 15:42:26 -04:00
|
|
|
# Put all data in /var/lib/zookeeper
|
2023-09-01 15:42:19 -04:00
|
|
|
dataDir=/var/lib/zookeeper
|
2023-09-01 15:42:26 -04:00
|
|
|
# Set our tick time to 1 second
|
|
|
|
tickTime=1000
|
|
|
|
# Initialization can take up to 30 ticks
|
|
|
|
initLimit=30
|
|
|
|
# Syncing can take up to 15 ticks
|
|
|
|
syncLimit=15
|
|
|
|
# Lower snapshot count from 100k to 10k
|
|
|
|
snapCount=10000
|
|
|
|
# Halve the snapshot size to 2GB
|
|
|
|
snapSizeLimitInKb=2097152
|
|
|
|
# Configure a max of 200 client connections
|
|
|
|
maxClientCnxns=200
|
2023-09-01 15:42:26 -04:00
|
|
|
# Auto purge: keep 3 snapshots and evaluate every hour
|
2023-09-01 15:42:26 -04:00
|
|
|
autopurge.snapRetainCount=3
|
2023-09-01 15:42:26 -04:00
|
|
|
autopurge.purgeInterval=1
|
2023-09-01 15:42:19 -04:00
|
|
|
|
2023-09-01 15:42:26 -04:00
|
|
|
# Listen on port 2181 on the cluster IP
|
2023-09-01 15:42:19 -04:00
|
|
|
clientPort=2181
|
2023-09-01 15:42:28 -04:00
|
|
|
clientPortAddress={% for node in pvc_nodes if node.hostname == this_node %}{{ node.cluster_ip }}{% endfor %}
|
2023-09-01 15:42:19 -04:00
|
|
|
|
2023-09-01 15:42:26 -04:00
|
|
|
# Node list - all coordinators
|
2023-09-01 15:42:19 -04:00
|
|
|
{% for node in pvc_nodes if node.is_coordinator %}
|
2023-09-01 15:42:26 -04:00
|
|
|
server.{{ node.node_id }}={{ node.cluster_ip }}:2888:3888
|
2023-09-01 15:42:19 -04:00
|
|
|
{% endfor %}
|