diff --git a/docs/enable-extensions.md b/docs/enable-extensions.md index a7f49777d..2fc52c072 100644 --- a/docs/enable-extensions.md +++ b/docs/enable-extensions.md @@ -10,7 +10,7 @@ While setting up a high availability PostgreSQL cluster with Patroni, you will n - Patroni installed on every ``postresql`` node. -- Distributed Configuration Store (DCS). Patroni supports such DCSs as ETCD, zookeeper, Kubernetes though [ETCD](https://etcd.io/) is the most popular one. It is available within Percona Distribution for PostgreSQL for all supported operating systems. +- Distributed Configuration Store (DCS). Patroni supports such DCSs as etcd, zookeeper, Kubernetes though [etcd](https://etcd.io/) is the most popular one. It is available within Percona Distribution for PostgreSQL for all supported operating systems. - [HAProxy](http://www.haproxy.org/). diff --git a/docs/how-to.md b/docs/how-to.md index e68fa0548..457ca183b 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -1,14 +1,14 @@ # How to -## How to configure ETCD nodes simultaneously +## How to configure etcd nodes simultaneously !!! note - We assume you have a deeper knowledge of how ETCD works. Otherwise, refer to the configuration where you add ETCD nodes one by one. + We assume you have a deeper knowledge of how etcd works. Otherwise, refer to the configuration where you add etcd nodes one by one. Instead of adding `etcd` nodes one by one, you can configure and start all nodes in parallel. -1. Create ETCD configuration file on every node. You can edit the sample configuration file `/etc/etcd/etcd.conf.yaml` or create your own one. Replace the node names and IP addresses with the actual names and IP addresses of your nodes: +1. Create etcd configuration file on every node. You can edit the sample configuration file `/etc/etcd/etcd.conf.yaml` or create your own one. Replace the node names and IP addresses with the actual names and IP addresses of your nodes: === "node1" @@ -58,7 +58,7 @@ Instead of adding `etcd` nodes one by one, you can configure and start all nodes $ sudo systemctl enable --now etcd ``` - During the node start, ETCD searches for other cluster nodes defined in the configuration. If the other nodes are not yet running, the start may fail by a quorum timeout. This is expected behavior. Try starting all nodes again at the same time for the ETCD cluster to be created. + During the node start, etcd searches for other cluster nodes defined in the configuration. If the other nodes are not yet running, the start may fail by a quorum timeout. This is expected behavior. Try starting all nodes again at the same time for the etcd cluster to be created. 3. Check the etcd cluster members. Connect to one of the nodes and run the following command: diff --git a/docs/release-notes-v13.10.md b/docs/release-notes-v13.10.md index 43bdb6852..c99e02ae4 100644 --- a/docs/release-notes-v13.10.md +++ b/docs/release-notes-v13.10.md @@ -39,13 +39,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | diff --git a/docs/release-notes-v13.11.md b/docs/release-notes-v13.11.md index e667cd0f0..762a7a9f2 100644 --- a/docs/release-notes-v13.11.md +++ b/docs/release-notes-v13.11.md @@ -35,13 +35,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | diff --git a/docs/release-notes-v13.12.md b/docs/release-notes-v13.12.md index a0889b571..9f0eb3d81 100644 --- a/docs/release-notes-v13.12.md +++ b/docs/release-notes-v13.12.md @@ -38,13 +38,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.5 | A Python client for ETCD +| RHEL 7 |`python3-python-etcd` | 0.4.5 | A Python client for etcd | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.5 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.5 | A Python client for etcd | diff --git a/docs/release-notes-v13.13.md b/docs/release-notes-v13.13.md index d78345fea..3cffaf719 100644 --- a/docs/release-notes-v13.13.md +++ b/docs/release-notes-v13.13.md @@ -36,13 +36,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.5 | A Python client for ETCD +| RHEL 7 |`python3-python-etcd` | 0.4.5 | A Python client for etcd | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.5 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.5 | A Python client for etcd | diff --git a/docs/release-notes-v13.14.md b/docs/release-notes-v13.14.md index 11a3a4e1d..70c2c301e 100644 --- a/docs/release-notes-v13.14.md +++ b/docs/release-notes-v13.14.md @@ -34,12 +34,12 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| | RHEL 8 | `etcd` | 3.5.12 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.5 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.5 | A Python client for etcd | diff --git a/docs/release-notes-v13.15.md b/docs/release-notes-v13.15.md index 8a631f5c0..e51d5fd28 100644 --- a/docs/release-notes-v13.15.md +++ b/docs/release-notes-v13.15.md @@ -8,7 +8,7 @@ This release of Percona Distribution for PostgreSQL is based on [PostgreSQL 13.1 ## Release Highlights -* Percona Distribution for PostgreSQL now includes the ETCD distributed configuration store version 3.5.x for all supported operating systems. This enhancement simplifies deploying high-availability solutions because you can install all necessary components from a single source, ensuring their seamless compatibility. +* Percona Distribution for PostgreSQL now includes the etcd distributed configuration store version 3.5.x for all supported operating systems. This enhancement simplifies deploying high-availability solutions because you can install all necessary components from a single source, ensuring their seamless compatibility. * Percona Distribution for PostgreSQL is now available on Ubuntu 24.04 LTS Noble Numbat. * Percona Distribution for PostgreSQL on Red Hat Enterprise Linux 8 and compatible derivatives is now fully compatible with upstream `llvm` packages and includes the latest version 16.0.6 of them. @@ -21,7 +21,7 @@ The following is the list of extensions available in Percona Distribution for Po | Extension | Version | Description | | ------------------- | -------------- | ---------------------------- | -| [ETCD](https://etcd.io/)| 3.5.13 | A distributed, reliable key-value store for setting up high available Patroni clusters | +| [etcd](https://etcd.io/)| 3.5.13 | A distributed, reliable key-value store for setting up high available Patroni clusters | |[HAProxy](http://www.haproxy.org/) | 2.8.9 | a high-availability and load-balancing solution | | [Patroni](https://patroni.readthedocs.io/en/latest/) | 3.3.0 | a HA (High Availability) solution for PostgreSQL | | [PgAudit](https://www.pgaudit.org/) | 1.5.2 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | diff --git a/docs/release-notes-v13.3.upd3.md b/docs/release-notes-v13.3.upd3.md index 100099d0a..ea127dc9e 100644 --- a/docs/release-notes-v13.3.upd3.md +++ b/docs/release-notes-v13.3.upd3.md @@ -19,4 +19,4 @@ -This update of Percona Distribution for PostgreSQL, includes the RPM package for ``python3-python-etcd`` for CentOS 7. This package is a Python client for ETCD and is used by Patroni to communicate with ETCD storage. For how to set up Patroni clusters, see [Patroni documentation](https://patroni.readthedocs.io/en/latest/README.html#running-configuring). +This update of Percona Distribution for PostgreSQL, includes the RPM package for ``python3-python-etcd`` for CentOS 7. This package is a Python client for etcd and is used by Patroni to communicate with etcd storage. For how to set up Patroni clusters, see [Patroni documentation](https://patroni.readthedocs.io/en/latest/README.html#running-configuring). diff --git a/docs/release-notes-v13.4.md b/docs/release-notes-v13.4.md index f55627a1f..4e85386a6 100644 --- a/docs/release-notes-v13.4.md +++ b/docs/release-notes-v13.4.md @@ -39,15 +39,15 @@ The following is the list of extensions available in Percona Distribution for Po | [pg_stat_monitor](https://github.com/percona/pg_stat_monitor)| 0.9.2 - Beta1 | collects and aggregates statistics for PostgreSQL and provides histogram information. | |[`wal2json`](https://github.com/eulerto/wal2json) |2.3 | a PostgreSQL logical decoding JSON output plugin.| -Percona Distribution for PostgreSQL also includes the ETCD packages which are used for Patroni cluster setup. These packages are available for the following operating systems: +Percona Distribution for PostgreSQL also includes the etcd packages which are used for Patroni cluster setup. These packages are available for the following operating systems: | Operating System |Package | Description | | ------------------- | ---------------------| ---------------------------- | -| CentOS 7 |`python3-python-etcd` | A Python client for ETCD | +| CentOS 7 |`python3-python-etcd` | A Python client for etcd | | CentOS 8 | `etcd` | A consistent, distributed key-value store| -| | `python3-python-etcd`| A Python client for ETCD | +| | `python3-python-etcd`| A Python client for etcd | | Debian 9 ('stretch')| `etcd` | A consistent, distributed key-value store| -| | `python3-etcd` | A Python client for ETCD | +| | `python3-etcd` | A Python client for etcd | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/13/libpq.html) library. It contains "a set of diff --git a/docs/release-notes-v13.5.md b/docs/release-notes-v13.5.md index 305565a54..2f2cd5cc1 100644 --- a/docs/release-notes-v13.5.md +++ b/docs/release-notes-v13.5.md @@ -42,15 +42,15 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 / CentOS 8. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| CentOS 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| CentOS 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | CentOS 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | | Debian 9 ('stretch')| `etcd` | 3.3.11 |A consistent, distributed key-value store| -| | `python3-etcd` | 0.4.3 | A Python client for ETCD | +| | `python3-etcd` | 0.4.3 | A Python client for etcd | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/13/libpq.html) library. It contains "a set of diff --git a/docs/release-notes-v13.6.md b/docs/release-notes-v13.6.md index beab5c50f..894cc042d 100644 --- a/docs/release-notes-v13.6.md +++ b/docs/release-notes-v13.6.md @@ -43,15 +43,15 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | | Debian 9 ('stretch')| `etcd` | 3.3.11 |A consistent, distributed key-value store| -| | `python3-etcd` | 0.4.3 | A Python client for ETCD | +| | `python3-etcd` | 0.4.3 | A Python client for etcd | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/13/libpq.html) library. It contains "a set of diff --git a/docs/release-notes-v13.7.md b/docs/release-notes-v13.7.md index 6f2f14cd3..b986d41a4 100644 --- a/docs/release-notes-v13.7.md +++ b/docs/release-notes-v13.7.md @@ -36,15 +36,15 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | | Debian 9 ('stretch')| `etcd` | 3.3.11 |A consistent, distributed key-value store| -| | `python3-etcd` | 0.4.3 | A Python client for ETCD | +| | `python3-etcd` | 0.4.3 | A Python client for etcd | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/13/libpq.html) library. It contains "a set of diff --git a/docs/release-notes-v13.8.md b/docs/release-notes-v13.8.md index 914ad3da0..7deb5e509 100644 --- a/docs/release-notes-v13.8.md +++ b/docs/release-notes-v13.8.md @@ -31,13 +31,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | diff --git a/docs/release-notes-v13.9.md b/docs/release-notes-v13.9.md index 173d19238..2e6386e9d 100644 --- a/docs/release-notes-v13.9.md +++ b/docs/release-notes-v13.9.md @@ -33,13 +33,13 @@ The following is the list of extensions available in Percona Distribution for Po Percona Distribution for PostgreSQL also includes the following packages: - `llvm` 12.0.1 packages for Red Hat Enterprise Linux 8 and compatible derivatives. These fix compatibility issues with LLVM from upstream. -- supplemental ETCD packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: +- supplemental etcd packages which can be used for setting up Patroni clusters. These packages are available for the following operating systems: | Operating System |Package | Version | Description | | ------------------- | ---------------------| --------| -------------------| -| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for ETCD | +| RHEL 7 |`python3-python-etcd` | 0.4.3 | A Python client for etcd | | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| -| | `python3-python-etcd`| 0.4.3 | A Python client for ETCD | +| | `python3-python-etcd`| 0.4.3 | A Python client for etcd | diff --git a/docs/repo-overview.md b/docs/repo-overview.md index 6e7910705..1c256e75d 100644 --- a/docs/repo-overview.md +++ b/docs/repo-overview.md @@ -50,7 +50,7 @@ The `percona-ppg-server-ha` meta-package installs high-availability components t | `percona-patroni`| A high-availability solution for PostgreSQL. | | `percona-haproxy`| A high-availability and load-balancing solution | | `etcd` | A consistent, distributed key-value store | -| `python3-python-etcd` | A Python client for ETCD.[^1] | +| `python3-python-etcd` | A Python client for etcd.[^1] | | `etcd-client`, `etcd-server` | The client/server of the distributed key-value store. [^2]| diff --git a/docs/solutions/ha-setup-apt.md b/docs/solutions/ha-setup-apt.md index 76cafdbba..c850f08ae 100644 --- a/docs/solutions/ha-setup-apt.md +++ b/docs/solutions/ha-setup-apt.md @@ -5,23 +5,23 @@ This guide provides instructions on how to set up a highly available PostgreSQL ## Considerations -1. This is an example deployment where ETCD runs on the same host machines as the Patroni and PostgreSQL and there is a single dedicated HAProxy host. Alternatively ETCD can run on different set of nodes. +1. This is an example deployment where etcd runs on the same host machines as the Patroni and PostgreSQL and there is a single dedicated HAProxy host. Alternatively etcd can run on different set of nodes. - If ETCD is deployed on the same host machine as Patroni and PostgreSQL, separate disk system for ETCD and PostgreSQL is recommended due to performance reasons. + If etcd is deployed on the same host machine as Patroni and PostgreSQL, separate disk system for etcd and PostgreSQL is recommended due to performance reasons. 2. For this setup, we will use the nodes running on Ubuntu 22.04 as the base operating system:: | Node name | Application | IP address |---------------|-------------------|-------------------- - | node1 | Patroni, PostgreSQL, ETCD | 10.104.0.1 - | node2 | Patroni, PostgreSQL, ETCD | 10.104.0.2 - | node3 | Patroni, PostgreSQL, ETCD | 10.104.0.3 + | node1 | Patroni, PostgreSQL, etcd | 10.104.0.1 + | node2 | Patroni, PostgreSQL, etcd | 10.104.0.2 + | node3 | Patroni, PostgreSQL, etcd | 10.104.0.3 | HAProxy-demo | HAProxy | 10.104.0.6 !!! note - We recommend not to expose the hosts/nodes where Patroni / ETCD / PostgreSQL are running to public networks due to security risks. Use Firewalls, Virtual networks, subnets or the like to protect the database hosts from any kind of attack. + We recommend not to expose the hosts/nodes where Patroni / etcd / PostgreSQL are running to public networks due to security risks. Use Firewalls, Virtual networks, subnets or the like to protect the database hosts from any kind of attack. ## Initial setup @@ -93,13 +93,13 @@ Run the following commands on node1`, `node2` and `node3`: * [Install Percona Distribution for PostgreSQL packages](../apt.md). -2. Install some Python and auxiliary packages to help with Patroni and ETCD +2. Install some Python and auxiliary packages to help with Patroni and etcd ```{.bash data-prompt="$"} $ sudo apt install python3-pip python3-dev binutils ``` -3. Install ETCD, Patroni, pgBackRest packages: +3. Install etcd, Patroni, pgBackRest packages: ```{.bash data-prompt="$"} $ sudo apt install percona-patroni \ @@ -121,22 +121,22 @@ Run the following commands on node1`, `node2` and `node3`: $ sudo rm -rf /var/lib/postgresql/13/main ``` -## Configure ETCD distributed store +## Configure etcd distributed store -The distributed configuration store provides a reliable way to store data that needs to be accessed by large scale distributed systems. The most popular implementation of the distributed configuration store is ETCD. ETCD is deployed as a cluster for fault-tolerance and requires an odd number of members (n/2+1) to agree on updates to the cluster state. An ETCD cluster helps establish a consensus among nodes during a failover and manages the configuration for the three PostgreSQL instances. +The distributed configuration store provides a reliable way to store data that needs to be accessed by large scale distributed systems. The most popular implementation of the distributed configuration store is etcd. etcd is deployed as a cluster for fault-tolerance and requires an odd number of members (n/2+1) to agree on updates to the cluster state. An etcd cluster helps establish a consensus among nodes during a failover and manages the configuration for the three PostgreSQL instances. -This document provides configuration for ETCD version 3.5.x. For how to configure ETCD cluster with earlier versions of ETCD, read the blog post by _Fernando Laudares Camargos_ and _Jobin Augustine_ [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios](https://www.percona.com/blog/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) +This document provides configuration for etcd version 3.5.x. For how to configure etcd cluster with earlier versions of etcd, read the blog post by _Fernando Laudares Camargos_ and _Jobin Augustine_ [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios](https://www.percona.com/blog/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) The `etcd` cluster is first started in one node and then the subsequent nodes are added to the first node using the `add `command. !!! note - Users with deeper understanding of how ETCD works can configure and start all ETCD nodes at a time and bootstrap the cluster using one of the following methods: + Users with deeper understanding of how etcd works can configure and start all etcd nodes at a time and bootstrap the cluster using one of the following methods: * Static in the case when the IP addresses of the cluster nodes are known * Discovery service - for cases when the IP addresses of the cluster are not known ahead of time. - See the [How to configure ETCD nodes simultaneously](../how-to.md#how-to-configure-etcd-nodes-simultaneously) section for details. + See the [How to configure etcd nodes simultaneously](../how-to.md#how-to-configure-etcd-nodes-simultaneously) section for details. ### Configure `node1` @@ -184,9 +184,9 @@ The `etcd` cluster is first started in one node and then the subsequent nodes ar ```{.text .no-copy} Added member named node2 with ID 10042578c504d052 to cluster - ETCD_NAME="node2" - ETCD_INITIAL_CLUSTER="node2=http://10.104.0.2:2380,node1=http://10.104.0.1:2380" - ETCD_INITIAL_CLUSTER_STATE="existing" + etcd_NAME="node2" + etcd_INITIAL_CLUSTER="node2=http://10.104.0.2:2380,node1=http://10.104.0.1:2380" + etcd_INITIAL_CLUSTER_STATE="existing" ``` ### Configure `node2` diff --git a/docs/solutions/ha-setup-yum.md b/docs/solutions/ha-setup-yum.md index 0b341d281..6b07edb6c 100644 --- a/docs/solutions/ha-setup-yum.md +++ b/docs/solutions/ha-setup-yum.md @@ -5,23 +5,23 @@ This guide provides instructions on how to set up a highly available PostgreSQL ## Preconditions -1. This is an example deployment where ETCD runs on the same host machines as the Patroni and PostgreSQL and there is a single dedicated HAProxy host. Alternatively ETCD can run on different set of nodes. +1. This is an example deployment where etcd runs on the same host machines as the Patroni and PostgreSQL and there is a single dedicated HAProxy host. Alternatively etcd can run on different set of nodes. - If ETCD is deployed on the same host machine as Patroni and PostgreSQL, separate disk system for ETCD and PostgreSQL is recommended due to performance reasons. + If etcd is deployed on the same host machine as Patroni and PostgreSQL, separate disk system for etcd and PostgreSQL is recommended due to performance reasons. 2. For this setup, we use the nodes running on Red Hat Enterprise Linux 8 as the base operating system: | Node name | Application | IP address |---------------|-------------------|-------------------- - | node1 | Patroni, PostgreSQL, ETCD | 10.104.0.1 - | node2 | Patroni, PostgreSQL, ETCD | 10.104.0.2 - | node3 | Patroni, PostgreSQL, ETCD | 10.104.0.3 + | node1 | Patroni, PostgreSQL, etcd | 10.104.0.1 + | node2 | Patroni, PostgreSQL, etcd | 10.104.0.2 + | node3 | Patroni, PostgreSQL, etcd | 10.104.0.3 | HAProxy-demo | HAProxy | 10.104.0.6 !!! note - We recommend not to expose the hosts / nodes where Patroni / ETCD / PostgreSQL are running to public networks due to security risks. Use Firewalls, Virtual networks, subnets or the like to protect the database hosts from any kind of attack. + We recommend not to expose the hosts / nodes where Patroni / etcd / PostgreSQL are running to public networks due to security risks. Use Firewalls, Virtual networks, subnets or the like to protect the database hosts from any kind of attack. ## Initial setup @@ -93,13 +93,13 @@ It's not necessary to have name resolution, but it makes the whole setup more re **Don't** initialize the cluster and start the `postgresql` service. The cluster initialization and setup are handled by Patroni during the bootsrapping stage. -2. Install some Python and auxiliary packages to help with Patroni and ETCD +2. Install some Python and auxiliary packages to help with Patroni and etcd ```{.bash data-prompt="$"} $ sudo yum install python3-pip python3-devel binutils ``` -3. Install ETCD, Patroni, pgBackRest packages. Check [platform specific notes for Patroni](../yum.md#for-percona-patroni-package): +3. Install etcd, Patroni, pgBackRest packages. Check [platform specific notes for Patroni](../yum.md#for-percona-patroni-package): ```{.bash data-prompt="$"} $ sudo yum install percona-patroni \ @@ -114,22 +114,22 @@ It's not necessary to have name resolution, but it makes the whole setup more re $ systemctl disable {etcd,patroni,postgresql} ``` -## Configure ETCD distributed store +## Configure etcd distributed store The distributed configuration store helps establish a consensus among nodes during a failover and will manage the configuration for the three PostgreSQL instances. Although Patroni can work with other distributed consensus stores (i.e., Zookeeper, Consul, etc.), the most commonly used one is `etcd`. -This document provides configuration for ETCD version 3.5.x. For how to configure ETCD cluster with earlier versions of ETCD, read the blog post by _Fernando Laudares Camargos_ and _Jobin Augustine_ [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios](https://www.percona.com/blog/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) +This document provides configuration for etcd version 3.5.x. For how to configure etcd cluster with earlier versions of etcd, read the blog post by _Fernando Laudares Camargos_ and _Jobin Augustine_ [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios](https://www.percona.com/blog/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) The `etcd` cluster is first started in one node and then the subsequent nodes are added to the first node using the `add `command. !!! note - Users with deeper understanding of how ETCD works can configure and start all ETCD nodes at a time and bootstrap the cluster using one of the following methods: + Users with deeper understanding of how etcd works can configure and start all etcd nodes at a time and bootstrap the cluster using one of the following methods: * Static in the case when the IP addresses of the cluster nodes are known * Discovery service - for cases when the IP addresses of the cluster are not known ahead of time. - See the [How to configure ETCD nodes simultaneously](../how-to.md#how-to-configure-etcd-nodes-simultaneously) section for details. + See the [How to configure etcd nodes simultaneously](../how-to.md#how-to-configure-etcd-nodes-simultaneously) section for details. ### Configure `node1` @@ -166,7 +166,7 @@ The `etcd` cluster is first started in one node and then the subsequent nodes ar 21d50d7f768f153a: name=default peerURLs=http://10.104.0.5:2380 clientURLs=http://10. 104.0.5:2379 isLeader=true ``` -6. Configure ETCD on **node2** and **node3**: +6. Configure etcd on **node2** and **node3**: This is important to note that even though the procedures are the same, only changing the hosts, each node needs to be individually fully configured before proceeding to the next node. @@ -183,9 +183,9 @@ The `etcd` cluster is first started in one node and then the subsequent nodes ar ```{.text .no-copy} Added member named node2 with ID 10042578c504d052 to cluster - ETCD_NAME="node2" - ETCD_INITIAL_CLUSTER="node2=http://10.104.0.2:2380,node1=http://10.104.0.1:2380" - ETCD_INITIAL_CLUSTER_STATE="existing" + etcd_NAME="node2" + etcd_INITIAL_CLUSTER="node2=http://10.104.0.2:2380,node1=http://10.104.0.1:2380" + etcd_INITIAL_CLUSTER_STATE="existing" ``` ### Configure `node2` diff --git a/docs/solutions/high-availability.md b/docs/solutions/high-availability.md index 1510e8f30..1c348865f 100644 --- a/docs/solutions/high-availability.md +++ b/docs/solutions/high-availability.md @@ -63,7 +63,7 @@ The components in this architecture are: - PostgreSQL nodes - Patroni - a template for configuring a highly available PostgreSQL cluster. -- ETCD - a Distributed Configuration store that stores the state of the PostgreSQL cluster. +- etcd - a Distributed Configuration store that stores the state of the PostgreSQL cluster. - HAProxy - the load balancer for the cluster and is the single point of entry to client applications. @@ -73,9 +73,9 @@ The components in this architecture are: ### How components work together -Each PostgreSQL instance in the cluster maintains consistency with other members through streaming replication. Each instance hosts Patroni - a cluster manager that monitors the cluster health. Patroni relies on the operational ETCD cluster to store the cluster configuration and sensitive data about the cluster health there. +Each PostgreSQL instance in the cluster maintains consistency with other members through streaming replication. Each instance hosts Patroni - a cluster manager that monitors the cluster health. Patroni relies on the operational etcd cluster to store the cluster configuration and sensitive data about the cluster health there. -Patroni periodically sends heartbeat requests with the cluster status to ETCD. ETCD writes this information to disk and sends the response back to Patroni. If the current primary fails to renew its status as leader within the specified timeout, Patroni updates the state change in ETCD, which uses this information to elect the new primary and keep the cluster up and running. +Patroni periodically sends heartbeat requests with the cluster status to etcd. etcd writes this information to disk and sends the response back to Patroni. If the current primary fails to renew its status as leader within the specified timeout, Patroni updates the state change in etcd, which uses this information to elect the new primary and keep the cluster up and running. The connections to the cluster do not happen directly to the database nodes but are routed via a connection proxy like HAProxy. This proxy determines the active node by querying the Patroni REST API. diff --git a/docs/third-party.md b/docs/third-party.md index bd8f29ceb..b9e3253af 100644 --- a/docs/third-party.md +++ b/docs/third-party.md @@ -5,6 +5,7 @@ Percona Distribution for PostgreSQL is supplied with the set of third-party open | Name | Superuser privileges | Description | |------|---------------------|-------------| +| [etcd](https://etcd.io/)| Required | A distributed, reliable key-value store for setting up high available Patroni clusters | | [HAProxy](http://www.haproxy.org/) | Required | A high-availability and load-balancing solution | | [Patroni](https://patroni.readthedocs.io/en/latest/) | Required | An HA (High Availability) solution for PostgreSQL | | [pgAudit](https://www.pgaudit.org/) | Required | Provides detailed session or object audit logging via the standard PostgreSQL logging facility |