Skip to content
Snippets Groups Projects
Commit fad11d85 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch '2712-add-more-variables-to-repmgr-conf' into 'master'

Resolve "Add more variables to repmgr.conf"

Closes #2712

See merge request !1893
parents 6a6420f7 c62f058f
No related branches found
No related tags found
1 merge request!1893Resolve "Add more variables to repmgr.conf"
Loading
Loading
@@ -25,6 +25,9 @@ omnibus-gitlab repository.
 
- No changes
 
9.5.5
- Add more options to repmgr.conf template
9.5.0
 
- Fix the NGINX configuration for GitLab Pages with Cache-Control headers 2242884e
Loading
Loading
Loading
Loading
@@ -1575,6 +1575,7 @@ external_url 'GENERATED_EXTERNAL_URL'
################################################################################
# Repmgr (EE only)
################################################################################
# repmgr['enable'] = false
# repmgr['cluster'] = 'gitlab_cluster'
# repmgr['database'] = 'gitlab_repmgr'
# repmgr['host'] = nil
Loading
Loading
@@ -1582,6 +1583,39 @@ external_url 'GENERATED_EXTERNAL_URL'
# repmgr['port'] = 5432
# repmgr['trust_auth_cidr_addresses'] = []
# repmgr['user'] = 'gitlab_repmgr'
# repmgr['failover'] = 'automatic'
# repmgr['log_directory'] = '/var/log/gitlab/repmgrd'
# repmgr['node_name'] = nil
# repmgr['pg_bindir'] = '/opt/gitlab/embedded/bin'
# repmgr['service_start_command'] = '/opt/gitlab/bin/gitlab-ctl start postgresql'
# repmgr['service_stop_command'] = '/opt/gitlab/bin/gitlab-ctl stop postgresql'
# repmgr['service_reload_command'] = '/opt/gitlab/bin/gitlab-ctl hup postgresql'
# repmgr['service_restart_command'] = '/opt/gitlab/bin/gitlab-ctl restart postgresql'
# repmgr['service_promote_command'] = nil
# repmgr['promote_command'] = '/opt/gitlab/embedded/bin/repmgr standby promote -f /var/opt/gitlab/postgresql/repmgr.conf'
# repmgr['follow_command'] = '/opt/gitlab/embedded/bin/repmgr standby follow -f /var/opt/gitlab/postgresql/repmgr.conf'
# repmgr['upstream_node'] = nil
# repmgr['use_replication_slots'] = false
# repmgr['loglevel'] = 'INFO'
# repmgr['logfacility'] = 'STDERR'
# repmgr['logfile'] = nil
# repmgr['event_notification_command'] = nil
# repmgr['event_notifications'] = nil
# repmgr['rsync_options'] = nil
# repmgr['ssh_options'] = nil
# repmgr['priority'] = nil
# repmgr['retry_promote_interval_secs'] = 300
# repmgr['witness_repl_nodes_sync_interval_secs'] = 15
# repmgr['reconnect_attempts'] = 6
# repmgr['reconnect_interval'] = 10
# repmgr['monitor_interval_secs'] = 2
# repmgr['master_response_timeout'] = 60
# repmgr['daemon'] = true
# repmgrd['enable'] = true
 
################################################################################
# Consul (EEP only)
Loading
Loading
Loading
Loading
@@ -9,10 +9,33 @@ default['repmgr']['node_number'] = nil
default['repmgr']['port'] = 5432
default['repmgr']['trust_auth_cidr_addresses'] = []
default['repmgr']['user'] = 'gitlab_repmgr'
default['repmgr']['pg_bindir'] = '/opt/gitlab/embedded/bin'
default['repmgr']['daemon'] = true
default['repmgrd']['enable'] = true
default['repmgr']['service_start_command'] = '/opt/gitlab/bin/gitlab-ctl start postgresql'
default['repmgr']['service_stop_command'] = '/opt/gitlab/bin/gitlab-ctl stop postgresql'
default['repmgr']['service_reload_command'] = '/opt/gitlab/bin/gitlab-ctl hup postgresql'
default['repmgr']['service_restart_command'] = '/opt/gitlab/bin/gitlab-ctl restart postgresql'
default['repmgr']['service_promote_command'] = nil
default['repmgr']['promote_command'] = '/opt/gitlab/embedded/bin/repmgr standby promote -f /var/opt/gitlab/postgresql/repmgr.conf'
default['repmgr']['follow_command'] = '/opt/gitlab/embedded/bin/repmgr standby follow -f /var/opt/gitlab/postgresql/repmgr.conf'
default['repmgr']['upstream_node'] = nil
default['repmgr']['use_replication_slots'] = false
default['repmgr']['loglevel'] = 'INFO'
default['repmgr']['logfacility'] = 'STDERR'
default['repmgr']['logfile'] = nil
default['repmgr']['event_notification_command'] = nil
default['repmgr']['event_notifications'] = nil
default['repmgr']['rsync_options'] = nil
default['repmgr']['ssh_options'] = nil
default['repmgr']['priority'] = nil
default['repmgr']['retry_promote_interval_secs'] = 300
default['repmgr']['witness_repl_nodes_sync_interval_secs'] = 15
default['repmgr']['reconnect_attempts'] = 6
default['repmgr']['reconnect_interval'] = 10
default['repmgr']['monitor_interval_secs'] = 2
default['repmgr']['master_response_timeout'] = 60
Loading
Loading
@@ -2,12 +2,65 @@ cluster=<%= @cluster %>
node=<%= @node_number %>
node_name=<%= @node_name %>
conninfo='host=<%= @host %> port=<%= @port %> user=<%= @user %> dbname=<%= @database %>'
pg_bindir='/opt/gitlab/embedded/bin'
<% if @upstream_node %>
upstream_node=<%= @upstream_node %>
<% end %>
use_replication_slots=<%= @use_replication_slots ? 1 : 0 %>
loglevel=<%= @loglevel %>
logfacility=<%= @logfacility %>
<% if @logfile %>
logfile=<%= @logfile %>
<% end %>
<% if @event_notification_command %>
event_notification_command=<%= @event_notification_command %>
<% end %>
<% if @event_notifications %>
event_notifications=<%= @event_notifications %>
<% end %>
pg_bindir=<%= @pg_bindir %>
service_start_command = <%= @service_start_command %>
service_stop_command = <%= @service_stop_command %>
service_restart_command = <%= @service_restart_command %>
service_reload_command = <%= @service_reload_command %>
<% if @service_promote_command %>
service_promote_command = <%= @service_promote_command %>
<% end %>
<% if @rsync_options %>
rsync_options=<%= @rsync_options %>
<% end %>
<% if @ssh_options %>
ssh_options=<%= @ssh_options %>
<% end %>
<% if @daemon %>
failover = <%= @failover %>
promote_command = <%= @promote_command %>
follow_command = <%= @follow_command %>
<% if @daemon%>
failover = <%= @failover %>
monitor_interval_secs=<%= @monitor_interval_secs %>
master_response_timeout=<%= @master_response_timeout %>
reconnect_attempts=<%= @reconnect_attempts %>
reconnect_interval=<%= @reconnect_interval %>
<% if @priority %>
priority=<%= @priority %>
<% end %>
retry_promote_interval_secs=<%= @retry_promote_interval_secs %>
witness_repl_nodes_sync_interval_secs=<%= @witness_repl_nodes_sync_interval_secs %>
<% end %>
<% if @pg_ctl_options %>
pg_ctl_options=<%= @pg_ctl_options %>
<% end %>
<% if @pg_basebackup_options %>
pg_basebackup_options=<%= @pg_basebackup_options %>
<% end %>
<% if @barman_server %>
barman_server=<%= @barman_server %>
<% end %>
<% if @barman_config %>
barman_config=<%= @barman_config %>
<% end %>
<% if @restore_command %>
restore_command = <%= @restore_command %>
<% end %>
Loading
Loading
@@ -9,4 +9,4 @@ cd <%= node['gitlab']['postgresql']['dir'] %>
exec chpst -P \
-U <%= node['gitlab']['postgresql']['username'] %>:<%= node['gitlab']['postgresql']['username'] %> \
-u <%= node['gitlab']['postgresql']['username'] %>:<%= node['gitlab']['postgresql']['username'] %> \
/opt/gitlab/embedded/bin/repmgrd -f /var/opt/gitlab/postgresql/repmgr.conf --verbose >> <%= node['repmgr']['log_directory'] %>/repmgrd.log
/opt/gitlab/embedded/bin/repmgrd -f /var/opt/gitlab/postgresql/repmgr.conf
Loading
Loading
@@ -16,13 +16,26 @@ cluster=gitlab_cluster
node=1647392869
node_name=fauxhai.local
conninfo='host=fauxhai.local port=5432 user=gitlab_repmgr dbname=gitlab_repmgr'
pg_bindir='/opt/gitlab/embedded/bin'
use_replication_slots=0
loglevel=INFO
logfacility=STDERR
pg_bindir=/opt/gitlab/embedded/bin
service_start_command = /opt/gitlab/bin/gitlab-ctl start postgresql
service_stop_command = /opt/gitlab/bin/gitlab-ctl stop postgresql
service_restart_command = /opt/gitlab/bin/gitlab-ctl restart postgresql
service_reload_command = /opt/gitlab/bin/gitlab-ctl hup postgresql
failover = automatic
promote_command = /opt/gitlab/embedded/bin/repmgr standby promote -f /var/opt/gitlab/postgresql/repmgr.conf
follow_command = /opt/gitlab/embedded/bin/repmgr standby follow -f /var/opt/gitlab/postgresql/repmgr.conf
failover = automatic
monitor_interval_secs=2
master_response_timeout=60
reconnect_attempts=6
reconnect_interval=10
retry_promote_interval_secs=300
witness_repl_nodes_sync_interval_secs=15
EOF
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment