treasuremap/tools/upgrades/postgresql/patroni_endpoint_cleaner_unit.sh
Matt McEuen 16cdf842d2 Incorporate HA PostgreSQL
This change integrates changes related to the new Patroni-enabled
high availability included in the postgresql helm chart.

1. Updates the version of the postgresql chart
2. Adds users/passphrases for the postgresql replication and exporter users
3. Sets the default number of replicas to 3 (except for skiff & sloop)
4. Adds documentation/scripting for upgrading the chart

Co-Authored-By: Evgeniy L <eli@mirantis.com>
Change-Id: I51e63fb2444610cfb144bc587a6a179fa4830809
2019-07-15 19:39:38 +00:00

23 lines
506 B
Bash
Executable File

#!/bin/bash
set -ex
sudo chmod 700 patroni_endpoint_cleaner.sh
sudo cp patroni_endpoint_cleaner.sh /opt
cat > ./patroni_endpoint_cleaner.service << EOF
[Unit]
Description=Helper script for initial upgrade to HA Postgres
[Service]
ExecStart=/opt/patroni_endpoint_cleaner.sh
[Install]
WantedBy=multi-user.target
EOF
sudo mv patroni_endpoint_cleaner.service /lib/systemd/system/
sudo systemctl restart patroni_endpoint_cleaner
sudo systemctl enable patroni_endpoint_cleaner
sudo systemctl daemon-reload