# PostgreSQL HA Master Installer

This bundle contains one questionnaire-driven script that generates:

- per-host env files for db1, db2, db3, proxy1
- WireGuard configs for all hosts
- optional backup repo env/config references
- a start-here runbook
- /etc/hosts entries file

It also includes the previously generated scripts:
- install-node.sh
- cluster-node-haproxy.sh
- cluster-node.sh
- setup-backup.sh
- restore-example.sh

## Usage

```bash
chmod +x scripts/master-setup.sh
./scripts/master-setup.sh
```

Generated files go under:
- `output/<timestamp>/`

## Notes

- This script asks for WireGuard keys instead of generating them.
- It can optionally SSH into hosts and run the installs.
- You still need to initialize the application database and create the `pg_cron` extension on the primary.
