Skip to the content.

Apache Zookeeper Ansible

It is group of playbooks to manage apache zookeeper.

Requirements

Notes*

1. All tasks like jvm/logging/downgrade/removeOldVersion will be done in serial order.

Development Environment Setup

Generate MTLS Certs/JKS Files

mkdir files/certs/

cd files/certs/

../vagrant-generate-tls-certs.sh
ansible-playbook -i inventory/development/cluster.ini clusterSetup.yml

Apache Zookeeper Playbooks

Cloud Infra Using Terraform

AWS Cloud PreSetup for cluster

It will enable following things on all nodes.

  1. /zookeeper mount point from ebs created by terraform.
  2. Install and configure awslogs agent for kafka-logs.
  3. Install python3 packages

ansible-playbook -i inventory/<environment>/cluster.ini clusterAwsPreSetup.yml

To start new cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterSetup.yml

Monitoring Setup

ansible-playbook -i inventory/<environment>/cluster.ini clusterCustomMetricExporter.yml

ansible-playbook -i inventory/<environment>/cluster.ini clusterNewRelicSetup.yml

Rolling restart cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterRollingRestart.yml

To update jvm/logging/zoo.cg/jaas.conf settings of cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterConfigsUpdate.yml -e zookeeperConfigFile=zoo.cfg
ansible-playbook -i inventory/<environment>/cluster.ini clusterConfigsUpdate.yml -e zookeeperConfigFile=java.env
ansible-playbook -i inventory/<environment>/cluster.ini clusterConfigsUpdate.yml -e zookeeperConfigFile=jaas.conf
ansible-playbook -i inventory/<environment>/cluster.ini clusterConfigsUpdate.yml -e zookeeperConfigFile=logback.xml

To upgrade zookeeper version of cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterUpgrade.yml

To upgrade java version of cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterJava.yml

To upgrade OS version of cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterOSUpgrade.yml

To remove old version files of zookeeper from cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterRemoveOldVersion.yml

To remove zookeeper cluster

ansible-playbook -i inventory/<environment>/cluster.ini clusterRemoveNodes.yml

Migration Playbooks

Migrate Zookeeper to FQDN based Configurations

Migrate Zookeeper to SASL Cluster

Migrate Zookeeper to MTLS Quorum Cluster

Tested Zookeeper Versions

Tested OS

Tested Ansible Version

ansible==9.2.0
ansible-core==2.16.3