Skip to content

Instantly share code, notes, and snippets.

View targetpark's full-sized avatar

Target Park Group Inc. targetpark

View GitHub Profile
@targetpark
targetpark / postgresql-ha.sh
Last active April 26, 2026 04:30
postgresql-ha.sh
#!/usr/bin/env bash
# ==============================================================================
# PostgreSQL HA Cluster Installer for Proxmox VE
# ------------------------------------------------------------------------------
# Provisions a production-ready highly-available PostgreSQL cluster:
# * 3x VMs running PostgreSQL + etcd + Patroni (Ubuntu 24.04 cloud-init)
# * 2x LXCs running HAProxy + keepalived (Ubuntu 24.04, privileged)
# * Floating VIP for application traffic
# * Fully TLS'd etcd (self-signed CA generated for the cluster)
#