Add `gitlab-ctl set-replication-password` EE command
Description
To setup Geo we ask users to execute a command like su gitlab-psql -c "/opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d template1 -c \"ALTER USER gitlab_replicator WITH ENCRYPTED PASSWORD 'YOURPASSWORD'\""
on primary node.
This command already makes some assumptions about gitlab_replicator
user being present, etc.
We can make it easier for people to setup Geo by wrapping this up into gitlab-ctl set-replication-password
.
We can then check if we are doing this on primary, and ask for password in both interactive / non-interactive mode which is going to make QA test much easier.
/cc @nick.thomas @marin
Edited by Grzegorz Bizon