PostgreSQL for On-Premises
Deploy PostgreSQL for the Aurva Control Plane in on-premises environments.
Overview
The Aurva Control Plane uses PostgreSQL as its primary metadata store. In on-premises deployments, PostgreSQL is installed directly on dedicated VMs using Aurva's installer script, which can provision either a single standalone instance or a primary + replica cluster for high availability.
Networking Prerequisites
The following inbound access is required on the PostgreSQL VMs:
| Source → Destination | Port | Purpose |
|---|---|---|
| Aurva Control Plane application VMs → all PostgreSQL VMs | 5432 | Control Plane reads/writes Aurva metadata |
| All PostgreSQL VMs ↔ each other | 5432 | Streaming replication between primary and replicas |
The following outbound access is required from the PostgreSQL VMs:
| Destination | Port | Purpose |
|---|---|---|
resources.deployment.aurva.io | 443 | Download installer packages |
Deployment Steps
Aurva provides a shell installer that acts as a CLI tool for deploying PostgreSQL as either a primary or replica server.
Step 1 — Download the installer
mkdir -p /opt/aurva
cd /opt/aurva
curl -O https://resources.deployment.aurva.io/manifests/main/install-standalone-postgresql-server.tar.gz
tar -xzvf install-standalone-postgresql-server.tar.gz
After extraction:
install-standalone-postgresql-server/
├── config/
├── templates/
├── install.sh
├── uninstall.sh
└── README.md
Step 2 — Configure variables
cd install-standalone-postgresql-server/config
vi postgresql_env
For replicated deployments, set the following:
| Variable | Description |
|---|---|
REPLICA_IP_ADDRESSES | Comma-separated list of replica server IPs |
PRIMARY_HOST | IP or hostname of the primary PostgreSQL server |
PRIMARY_PORT | Primary PostgreSQL port (e.g. 5432) |
For a standalone primary, leave REPLICA_IP_ADDRESSES empty:
REPLICA_IP_ADDRESSES=""
Replication can be enabled later on a standalone primary by re-running the installer with --primary --update-replica.
Step 3 — Run the installer
The installer accepts the following options:
| Option | Description |
|---|---|
--primary | Provision the primary database |
--replica | Provision a replica connected to the primary |
--control-plane (default) | Tune PostgreSQL for Control Plane use |
--data-plane | Tune PostgreSQL for Data Plane use |
cd ..
chmod +x install.sh
./install.sh --help
# Primary
./install.sh --primary
# Replica
./install.sh --replica
Step 4 — Post-install setup
The installer prompts you to set a database user and password — these credentials are used for future psql operations. After installation completes, refresh your shell to load the psql CLI:
source /etc/profile.d/postgresql.sh