Once the Primary cluster has been initialized using Patroni, the next step is to add the standby servers to the cluster for the purpose of a quorum and high availability. In this recipe, we shall discuss the steps involved in adding one or more standby servers to an existing Patroni cluster.
Getting ready...
You need to have completed the previous recipe before you attempt this one. The steps in this recipe can be performed on one or more standby servers that are also part of the same etcd cluster with watchdog/softdog configured.
In this recipe, the IP address of the example standby server is 192.168.10.2 and the primary's IP is 192.168.10.1.
How to do it...
Follow these steps to complete this recipe:
- Copy the patroni.yml service file from the primary server to the standby server, if it does not already exist:
# scp /usr/lib/systemd/system/patroni.service vagrant@192.168.10.2:/usr/lib/systemd/system/patroni.service
- Enable patroni so that...