How to deploy¶
The basic requirements for deploying a charm are the Juju client and a machine cloud . For more details, see System requirements.
If you are not sure where to start, or would like a more guided walkthrough for setting up your environment, start with the Tutorial.
Quickstart¶
Charmed PostgreSQL can be deployed using the Juju CLI directly, or via Terraform.
To deploy via the Juju CLI, you need to first bootstrap a cloud controller and create a model :
juju bootstrap <cloud name> <controller name>
juju add-model <model name>
Then, use the juju deploy command:
juju deploy postgresql --channel 16/stable
See all available config options for the charm with juju config postgresql --format json.
juju deploy postgresql-k8s --channel 16/stable --trust
See all available config options for the charm with juju config postgresql-k8s --format json.
See all available Juju flags in the juju deploy CLI reference . For example, you can set CPU and memory constraints with --constraints.
To deploy via Terraform, see the Terraform guide.
Clouds¶
Charmed PostgreSQL can be deployed on several machine and Kubernetes cloud services.
Deploy a cluster on a cloud using different availability zones, using Google Cloud as an example:
Terraform¶
Deploy PostgreSQL and automate your infrastructure with the Juju Terraform Provider:
Airgapped¶
Install PostgreSQL in an airgapped environment via Charmhub and the Snap Store Proxy:
Networking and TLS encryption¶
Example setup of external TLS/SSL access via Virtual IP (VIP):
Configure Juju spaces to separate network traffic:
Juju storage¶
Use volume provided by different clouds via Juju storage :
High availability¶
Deploy a two-node cluster with a lightweight watcher that supplies a third Raft vote: