Example: Deploying EDB Postgres Distributed v5

The following steps set up EDB Postgres Distributed with an Always On Single Location architecture using Amazon EC2.

  1. Install TPA. Follow the installation instructions in the Trusted Postgres Architect documentation.

  2. Generate a configuration file:

    tpaexec configure myedbdpcluster --architecture PGD-Always-ON --platform aws --location-names eu-west-1 --data-nodes-per-location 3 

    This creates a subdirectory directory in current working directory called myedbdpcluster containing the config.yml configuration file TPA 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 AWS, a single location, and three data nodes. By default, PGD will also configure two PGD Proxy nodes and a Barman node for backup.

  3. Provision the cluster:

    tpaexec provision myedbdpcluster

    Since we specified AWS as the platform (the default platform), TPA provisions EC2 instances, VPCs, subnets, routing tables, internet gateways, security groups, EBS volumes, elastic IPs, and so on.

  4. Deploy the cluster:

    tpaexec deploy myedbdpcluster

    TPA installs the needed packages, applies the configuration and sets up the actual EDB Postgres Distributed cluster

  5. Test the cluster:

    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