How to deploy

This page introduces the Charmed PostgreSQL deployment process and all related guides.

General deployment instructions

The basic requirements for deploying a charm are the Juju client and a machine cloud.

First, bootstrap the cloud controller and create a model:

juju bootstrap <cloud name> <controller name>
juju add-model <model name>

Then, either continue with the juju client or use the terraform juju client to deploy the PostgreSQL charm.

To deploy with the juju client:

juju deploy postgresql --channel 14/stable -n <number_of_replicas>

To deploy with terraform juju, follow the guide How to deploy using Terraform.

If you are not sure where to start or would like a more guided walkthrough for setting up your environment, see the Charmed PostgreSQL tutorial.

Clouds

How to bootstrap and configure different cloud services:

Networking

How to deploy for external TLS VIP access goes over an example deployment of PostgreSQL, PgBouncer and HAcluster that require external TLS/SSL access via Virtual IP (VIP).

See also:

Airgapped

How to deploy in an offline or air-gapped environment goes over the special configuration steps for installing PostgreSQL in an airgapped environment via CharmHub and the Snap Store Proxy.

Cluster-cluster replication

Cluster-cluster, cross-regional, or multi-server asynchronous replication focuses on disaster recovery by distributing data across different servers.

The Cross-regional async replication guide goes through the steps to set up clusters for cluster-cluster replication, integrate with a client, and remove or recover a failed cluster.

Juju storage

Charmed PostgreSQL uses the Juju storage abstraction to utilize data volume provided by different clouds while keeping the same UI/UX for end users.

See: How to deploy on juju storage