Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.14 KB

migrate-to-fqdn-based-configs.md

File metadata and controls

38 lines (33 loc) · 1.14 KB

Steps to Migrate to FQDN Based Configurations

Before Changes zoo.cfg file

# ansible autogenerated server list with IP Addresses
server.111=192.168.56.111:2888:3888
server.112=192.168.56.112:2888:3888
server.113=192.168.56.113:2888:3888

After Changes zoo.cfg file

# ansible autogenerated server list with FQDN and User Defined MyID
server.111=zookeeper1.localhost:2888:3888
server.112=zookeeper2.localhost:2888:3888
server.113=zookeeper3.localhost:2888:3888

Step 1

Update Following vars in inventory/<environment>/group_vars/all.yml

# zookeeper user generated MyID + FQDN for zoo.cfg are useful incase of MTLS
zookeeperUserGeneratedMyId: true

Update inventory vars in inventory/<environment>/cluster.ini

[clusterNodes]
zookeeper1.localhost ansible_host=192.168.56.111 zookeeperMyId=111
zookeeper2.localhost ansible_host=192.168.56.112 zookeeperMyId=112
zookeeper3.localhost ansible_host=192.168.56.113 zookeeperMyId=113

Step 2

Run update playbook for zoo.cfg

ansible-playbook -i inventory/<environment>/cluster.ini clusterConfigsUpdate.yml -e zookeeperConfigFile=zoo.cfg