docs/deploy/byoc.mdx
ParadeDB BYOC (Bring Your Own Cloud) is a managed deployment of ParadeDB within your cloud environment. It combines the benefits of a managed platform with the security posture of a self-hosted deployment.
ParadeDB BYOC is supported on GCP and AWS, including GovCloud regions and airgapped environments. To request access for Azure, Oracle Cloud, or another cloud platform please contact [email protected].
ParadeDB BYOC provisions a Kubernetes cluster in your cloud environment with high availability preconfigured. It also configures logical replication with your primary Postgres, backups, connection pooling, monitoring, access control, and audit logging.
ParadeDB BYOC can be deployed and managed in one of two ways:
This section assumes that you have received access to the ParadeDB BYOC module and are deploying it yourself on AWS or GCP. In a fully managed deployment, these steps will be performed by ParadeDB on your behalf.
First, ensure that you are in the BYOC module repository. Next, install Terraform, Kubectl, PostgreSQL, and the CLI for your desired cloud provider:
<CodeGroup>brew install terraform kubectl postgresql
sudo apt-get install -y terraform kubectl postgresql
Install and authenticate with either the AWS CLI or GCP CLI.
<CodeGroup>aws configure
gcloud init
gcloud auth application-default login
Our Terraform project will provision a Kubernetes cluster (EKS or GKE) along with all the necessary infrastructure to run ParadeDB.
First, copy either aws.example.tfvars or gcp.example.tfvars into a new file called byoc.tfvars.
cp aws.example.tfvars byoc.tfvars
cp gcp.example.tfvars byoc.tfvars
Next, open and configure byoc.tfvars. Configuration instructions can be found directly within the file.
open byoc.tfvars || xdg-open byoc.tfvars
First, initialize Terraform.
<CodeGroup>terraform -chdir=infrastructure/aws init
terraform -chdir=infrastructure/gcp init
Next, run Terraform apply.
terraform -chdir=infrastructure/aws apply -var-file=../../byoc.tfvars
terraform -chdir=infrastructure/gcp apply -var-file=../../byoc.tfvars
When this command is complete, you will see a kubectl command printed as Terraform output to the terminal.
Run this command, which will add the EKS or GKE cluster configuration to your local .kubeconfig file.
That's it! You're now ready to connect to ParadeDB.
First, port-forward the Grafana service to localhost.
kubectl --namespace monitoring port-forward service/prometheus-grafana 8080:80
Then, go to http://localhost:8080. Your Grafana credentials have been printed in the terminal output of the above Terraform apply command.
You can find the ParadeDB dashboard by typing CloudNativePG in the search bar, and selecting paradedb for the Database Namespace.
By default, the dashboard will display metrics over the last 7 days. If you've just spun up the cluster, change it to the last 15 minutes to start seeing results immediately.
First, retrieve the database credentials.
kubectl --namespace paradedb get secrets paradedb-superuser -o json | jq -r '.data | map_values(@base64d) | .uri |= sub("\\*"; "paradedb") | .dbname = "paradedb"'
Next, port-forward the ParadeDB service to localhost.
kubectl --namespace paradedb port-forward service/paradedb-rw 5432:5432
Now you can connect to the ParadeDB instance using the credentials you've retrieved.
PGPASSWORD=<your-password> psql -h localhost -d paradedb -p 5432 -U <your-user>