2020-10-23

PatroniCluster 3 Node: Completed Guide Index

#Index:

1/ ENV
10.0.2.111 srv111
10.0.2.112 srv112
10.0.2.113 srv113

root@srv111:/# date; cat /etc/lsb-release 
Fri Oct 23 16:19:52 +07 2020
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"

root@srv111:/# date; uname -a
Fri Oct 23 16:19:46 +07 2020
Linux srv111 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


2/ /etc/systemd/system/patroni.service
REF: https://www.mgiay.com/2020/10/patronicluster-3-node-patroniservice.html

3/ /etc/patroni.yml
5/ /opt/script/patroni-stop.sh
7/ /opt/postgres/pgdata/postgresql.base.conf
9/ Patroni Controller:
#9:19 2020.10.23
root@srv078psql101:~# patronictl -c /etc/patroni.yml list postgres
+----------+------------+-----------+--------+---------+----+-----------+
| Cluster  |   Member   |   Host    |  Role  |  State  | TL | Lag in MB |
+----------+------------+-----------+--------+---------+----+-----------+
| postgres | indo_psql1 | 10.0.2.78 | Leader | running |  5 |       0.0 |
| postgres | indo_psql2 | 10.0.2.79 |        | running |  5 |       0.0 |
+----------+------------+-----------+--------+---------+----+-----------+
root@srv078psql101:~# 
root@srv078psql101:~# #patronictl -c /etc/patroni.yml edit-config postgres

No comments:

Post a Comment