TPA installation¶
To use TPA, you need to install tpaexec and run the tpaexec setup
command. This document explains how to install TPA packages.
TPA packages are available to prospects (for a 60 day trial), EDB customers with a valid Extreme HA subscription, or by prior arrangement. Please contact your account manager to request access.
We publish TPA packages for Debian 10 (buster), Ubuntu 22.04 (jammy), Ubuntu 20.04 (focal), Ubuntu 18.04 (bionic), RHEL/CentOS 7.x and 8.x, Rocky 8.x and AlmaLinux 8.x. These distributions provide a usable Python 3.6+ environment out of the box, which TPA requires. However, TPA supports a wider range of distributions on target instances .
Quickstart¶
Login to Configuring EDB Repos 2.0 repositories
to obtain your token. Then execute the following command, substituting
your token for <your-token> .
# Add repository (Debian, Ubuntu)
$ curl -1sLf https://downloads.enterprisedb.com/<your-token>/postgres_distributed/setup.deb.sh | sudo -E bash
# Add repository (RedHat, Rocky or AlmaLinux)
$ curl -1sLf https://downloads.enterprisedb.com/<your-token>/postgres_distributed/setup.rpm.sh | sudo -E bash
Then run the following commands:
# Install packages (Debian, Ubuntu)
$ sudo apt-get install tpaexec
# Install packages (RedHat, Rocky or AlmaLinux)
$ sudo yum install tpaexec
# Install additional dependencies
$ sudo /opt/EDB/TPA/bin/tpaexec setup
# Verify installation (run as a normal user)
$ /opt/EDB/TPA/bin/tpaexec selftest
More detailed explanations are given below.
What time is it?¶
Please make absolutely sure that your system has the correct date and time set, because various things will fail otherwise. For example:
$ sudo ntpdate pool.ntp.org
Packages¶
To install TPA, you must first subscribe to an EDB repository that provides it. The preferred source for repositories is EDB Repos 2.0.
Login to Configuring EDB Repos 2.0 repositories
to obtain your token. Then execute the following command, substituting
your token for <your-token> .
# Debian or Ubuntu
$ curl -1sLf https://downloads.enterprisedb.com/<your-token>/postgres_distributed/setup.deb.sh | sudo -E bash
# RedHat, Rocky or AlmaLinux
$ curl -1sLf https://downloads.enterprisedb.com/<your-token>/postgres_distributed/setup.rpm.sh | sudo -E bash
Alternatively, you may obtain TPA from the legacy 2ndQuadrant repository. To do so, login to the EDB Customer Support Portal and subscribe to the products/tpa/release
by adding a subscription under Support/Software/Subscriptions, and following the instructions to enable the repository on your system.
Once you have enabled one of these repositories, you may install TPA as follows:
# Debian or Ubuntu
$ sudo apt-get install tpaexec
# RedHat, Rocky or AlmaLinux
$ sudo yum install tpaexec
This will install TPA into /opt/EDB/TPA . It will also ensure that
other required packages (e.g., Python 3.6 or later) are installed.
We mention sudo here only to indicate which commands need root
privileges. You may use any other means to run the commands as root.
Python environment¶
Next, run tpaexec setup to create an isolated Python environment and
install the correct versions of all required modules.
Note
On Ubuntu versions prior to 20.04, please use sudo -H tpaexec setup (to avoid subsequent permission errors during tpaexec configure )
$ sudo /opt/EDB/TPA/bin/tpaexec setup
You must run this as root because it writes to /opt/EDB/TPA , but
the process will not affect any system-wide Python modules you may have
installed (including Ansible).
Add /opt/EDB/TPA/bin to the PATH of the user who will normally
run tpaexec commands. For example, you could add this to your
.bashrc or equivalent shell configuration file:
$ export PATH=$PATH:/opt/EDB/TPA/bin
Installing without network access¶
When you run tpaexec setup , it will ordinarily download the Python
packages from the network. The tpaexec-deps package (available from
the same repository as tpaexec) bundles everything that would have been
downloaded, so that they can be installed without network access. Just
install the package before you run tpaexec setup and the bundled
copies will be used automatically.
Verification¶
Once you’re done with all of the above steps, run the following command to verify your local installation:
$ tpaexec selftest
If that command completes without any errors, your TPA installation is ready for use.
Upgrading¶
To upgrade to a later release of TPA, you must:
Install the latest
tpaexecpackageInstall the latest
tpaexec-depspackage (if required; see above)Run
tpaexec setupagain
If you have subscribed to the TPA package repository as described above,
running apt-get update && apt-get upgrade or yum update should
install the latest available versions of these packages. If not, you can
install the packages by any means available.
We recommend that you run tpaexec setup again whenever a new version
of tpaexec is installed. Some new releases may not strictly require
this, but others will not work without it.
Ansible community support¶
TPA now supports ansible community, you may choose to use it by using
--use-community-ansible option during tpaexec setup , default
will be to use the legacy 2ndQuadrant/ansible fork. This will change in
a future release, support for 2ndQuadrant/ansible will be dropped and
community ansible will become the new default.
notable difference:
change the
--skip-flagsoptions to community behavior where a task will be skipped if part of the list given to the--skip-tagsoption even if it is also tagged with special tagalways. TPA expects all tasks tagged withalwaysto be run to ensure a complete deployment, therefor--skip-tagsshould not be used when using community ansible.