Before you manually deploy EDB Postgres Distributed (PGD), complete the following tasks to prepare your environment:
- Choose a deployment pattern that fits your availability and location requirements.
- Provision a Linux host for each node in your pattern, running a supported operating system.
- Create an admin user on each host, with superuser or
sudoprivileges, that you can reach over Secure Shell (SSH). - Ensure network connectivity between all hosts, with the Postgres and Connection Manager ports open.
- Obtain your EDB subscription token to access the EDB software repositories.
Choosing a deployment pattern
Choose the deployment pattern you want to deploy. The pattern determines how many hosts you need, how many locations they span, which groups the cluster contains, and whether each node is a data, witness, or subscriber-only node.
The examples in this section deploy a single data group with three data nodes. Other patterns add groups, witness nodes, or subscriber-only nodes to that foundation.
Provisioning Linux hosts
Provision one Linux host for each PGD node in your pattern, as a cloud virtual machine, an on-premises virtual machine, or on-premises physical hardware. Each host must run a supported Linux operating system and be accessible over SSH.
To provision hosts in the cloud, follow your vendor's guide for creating a Linux virtual machine:
| Vendor | Platform | Guide |
|---|---|---|
| Amazon | AWS | Tutorial: Get started with Amazon EC2 Linux instances |
| Microsoft | Azure | Quickstart: Create a Linux virtual machine in the Azure portal |
| GCP | Create a Linux VM instance in Compute Engine |
Creating an admin user
Configure an admin user on each host. You use the admin user to install the software and to switch to the Postgres user. The admin user must have superuser privileges or the ability to use sudo to become superuser, and you must be able to reach it over SSH. We recommend configuring the admin user for passwordless SSH access from your workstation using SSH keys.
For example, to create an admin user named admin with passwordless sudo and your SSH key, run the following commands on every host in the cluster as a user that already has sudo privileges:
sudo useradd -m -s /bin/bash admin echo 'admin ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/admin sudo chmod 440 /etc/sudoers.d/admin sudo visudo -cf /etc/sudoers.d/admin sudo mkdir -p /home/admin/.ssh sudo cp ~/.ssh/authorized_keys /home/admin/.ssh/authorized_keys sudo chown -R admin:admin /home/admin/.ssh sudo chmod 700 /home/admin/.ssh sudo chmod 600 /home/admin/.ssh/authorized_keys
Ensuring network connectivity
Ensure that every host can connect to every other host in the cluster, over the public network or a virtual private cloud (VPC) in the cloud, or over the local network on-premises. Open the Postgres port and the Connection Manager port to all hosts in the cluster. The default ports depend on your Postgres distribution:
| Distribution | Postgres port | Connection Manager port |
|---|---|---|
| EDB Postgres Advanced Server | 5444 | 6444 |
| EDB Postgres Extended Server | 5432 | 6432 |
| Community Postgres | 5432 | 6432 |
If your hosts have both public and private IP addresses, use the private addresses for the cluster. To refer to the hosts by name, map the host names to the IP addresses in the /etc/hosts file on every host. For example, for a cluster of three hosts:
192.168.254.166 host-1 192.168.254.247 host-2 192.168.254.135 host-3
Obtaining your EDB subscription token
Locate the token you received when you registered for your EDB subscription. Use it to configure the EDB repositories.
Next steps
Continue to Installing the database and PGD.