Automate Geo Replication Password

Problem to solve

GitLab Administrators want to be able to script and automate setting the Geo Replication Password with the ability to get feedback that the password has been changed.

Example:

/usr/bin/expect <<EOD
log_user 0
spawn gitlab-ctl set-replication-password
expect "Enter password:"
send "${rep_password}\n"
expect "Confirm password:"
send "${rep_password}\n"
echo "${rep_password}" > see_password.txt
EOD

Intended users

GitLab System Administrators

User experience goal

The goal is to automate the setup and configuration of GitLab Geo.

Proposal

Create an ability to set the password through the command line and ability to acknowledge that the change was made.

Further details

Feedback from GitLab Administrator: "I currently have no way of validating that the password I'm changing (setting the replication password) is reliably changing said password. I have no knowledge of any APIs that I can access to change or check the password. All I know is it would appear that this does not seem to work and without said APIs I'm blind to knowing what the issue could be."

Edited by Gabriel Mazetto