read-s-N 1 -p"Press [y] to continue, any other key to abort." key
if["$key"=="y"]
then
do_step "$step"
fi
done
}
function print_steps(){
echo"001_check_gcp_replication_delay Ensure the prospective failover target in GCP is up to date"
echo"002_disable-automatic-failover Disable chef on all nodes and shut down repmgr"
#This step should convert old master to headless standby
echo"003_forbid-writes-to-current-master Forbid writes to the currect master (Azure) – do not allow any connections except replication and administrative (local via socket) ones."
echo"004_perform-regular-switchover Perform regular switchover to the main replica on GCP"
echo"005_check_gcp_has_master Check the database is now read-write"
echo"006_configure-pgbouncer-for-gcp Configure pgbouncer to point to new master in GCP"
echo"007_convert-wal-e-node-to-standby Convert the WAL-E node to a standby node in repmgr"
echo"008_ensure-priority-is-updated-in-repmgr Ensure priority is updated in repmgr configuration"
echo"009_update_chef_cookbook Update in chef cookbooks by removing the setting entirely"
echo"010_update_master_repmgr_priority Update in the running database (On the primary server)"
echo"011_reduce_statement_timeout Reduce statement_timeout to 15s"