Deploying EDB Postgres Distributed¶
The following steps setup EDB Postgres Distributed with the Always On Silverarchitecture using Amazon EC2.
Generate a configuration file:
$ tpaexec configure myedbdpcluster --architecture BDR-Always-ON --layout Silver --platform aws --bdr-version 4 --2q --2Q-repositories products/2ndqpostgres/release
This creates a subdirectory directory in current working directory
called myedbdpcluster containing the config.yml configuration
file TPAexec uses to create the cluster. Edit the config.yml as
needed, for example to change the IP address range used for servers or
adjust locations of nodes.
We included options to specify using BDR 4 (the default version) and the
2ndQuadrant repositories to install EDB Postgres Extended Server. By
default, TPAexec installs the 2ndQuadrant public repository and adds on
any product repositories that the architecture requires. In this
example, we specified --2Q-repositories so the complete list of
2ndQuadrant repositories is installed on each instance in addition to
the 2ndQuadrant public repository. Since we did this, before the
provisioning step, you must first export TPA_2Q_SUBSCRIPTION_TOKEN=xxx.
You can get a subscription token from the EnterpriseDB customer portal (
Support>Softwaresubscriptions>Add ).
cd ~/clusters/myedbdpcluster
export TPA_2Q_SUBSCRIPTION_TOKEN=<token>
Provision the cluster:
tpaexec provision myedbdpcluster
Since we specified AWS as the platform (the default platform), TCAexec provisions EC2 instances, VPCs, subnets, routing tables, internet gateways, security groups, EBS volumes, elastic IPs, and so on.
Deploy the needed packages, configuration and setup the actual EDB Postgres Distributed cluster:
tpaexec deploy myedbdpcluster
After the successful run of the deploy command the cluster is ready
to use. You can connect to it via psql or any other database client.
It’s also possible to run a test that ensures the cluster is running as expected:
tpaexec test myedbdpcluster