All parameters of the mode live in /etc/gitlab/gitlab.rb and are applied with gitlab-ctl reconfigure. Every password marked literal below is stored as its plain value, identical on every node. gitlab-ctl reconfigure itself computes the database-side hashes. The deployment examples on Enabling and deployment use the same names.

PostgreSQL

ParameterDefaultDescription
postgresql['role']defaultRole of the node’s database: default (a single-node install), primary or standby. The HA settings take effect only with primary or standby.
postgresql['primary_host']nilAddress of the primary server a standby server streams from. Required with the standby role.
postgresql['primary_port']5432Port of the primary server for the replication connection.
postgresql['ha_peers'][]Addresses of the other database nodes: write a host IP address with the /32 mask. A bare IP address and a DNS name also work. The list renders the pg_hba.conf entries for replication and peer checks. With a port in an entry, gitlab-ctl reconfigure fails.
postgresql['ha_replication_password']nilLiteral password of the replication user, the same on every node. Required with the primary and standby roles. With postgresql['sql_replication_password'] set next to it, gitlab-ctl reconfigure fails.
postgresql['replication_application_name']nilName the standby server reports in pg_stat_replication on the primary server.
postgresql['replication_slot_name']nilPhysical replication slot the standby server consumes. The slot must exist on the primary server before the standby server starts.
postgresql['max_replication_slots']1Number of replication slots. On a cluster node the settings floor already fits every node listed in postgresql['ha_peers']. A value increased by hand applies on restart only.
postgresql['ha_check_user']nilName of the CONNECT-only user the failover peer checks and the start guard authenticate with. Required on every node with ha_peers set.
postgresql['ha_check_password']nilLiteral password of the check user, the same on every node.
postgresql['ha_rewind_user']nilName of the user pg_rewind connects to the new primary server with on a rejoin. The role is created with SUPERUSER when gitlab-ctl reconfigure runs on the primary server.
postgresql['ha_rewind_password']nilLiteral password of the postgresql['ha_rewind_user'] user.

Related settings of the package that the mode builds on: postgresql['listen_address'] (the addresses the database listens on; in this mode set * — the database must accept connections to the database virtual IP address, which exists on either node), postgresql['md5_auth_cidr_addresses'] (the networks allowed to connect with a password — include the cluster subnet and 127.0.0.1/32), postgresql['sql_user_password'] (the hash of the gitlab role password, required whenever gitlab_rails['db_password'] is set).

keepalived

Global parameters:

ParameterDefaultDescription
keepalived['enable']falseEnables the service. With false, no service or configuration is created.
keepalived['interface']nilNetwork interface the virtual IP addresses are added to. Required when enabled.
keepalived['unicast_src_ip']nilSource address of the VRRP packets. With nil, the primary address of the node is detected automatically. Set it explicitly on nodes with several interfaces.
keepalived['unicast_peers'][]Addresses of the other keepalived nodes. Required and must not be empty: VRRP runs in unicast mode.
keepalived['vrrp_version']2VRRP protocol version: 2 or 3. The authentication password applies to version 2 only and is not rendered with version 3.
keepalived['vrrp_strict']falseStrict RFC compliance. Strict mode forbids unicast peers.
keepalived['check_interval']2Seconds between the check script runs.
keepalived['check_timeout']8Time in seconds after which a still-running check counts as failed.
keepalived['check_fall']5Number of consecutive check failures before the node releases the address. A fallback for the per-address values below.
keepalived['check_rise']2Number of consecutive successful checks before the node takes the address back.
keepalived['state_log']/var/opt/gitlab/keepalived/state.logLog file of the virtual IP address transitions.

Frontend virtual IP address:

ParameterDefaultDescription
keepalived['frontend_vip']['enable']falseEnables the address for users.
keepalived['frontend_vip']['ip']nilVirtual IP address. Required when enabled.
keepalived['frontend_vip']['prefix']32Prefix length of the address.
keepalived['frontend_vip']['interface']nilInterface of the address. With nil, keepalived['interface'] applies.
keepalived['frontend_vip']['virtual_router_id']51VRRP identifier of the address. The identifier must differ from the database virtual IP address identifier.
keepalived['frontend_vip']['priority']100Node priority for the address. Spread it across the nodes, for example 100, 95 and 90.
keepalived['frontend_vip']['auth_pass']nilVRRPv2 shared secret, 1 to 8 characters, the same on all peers.
keepalived['frontend_vip']['https_check']['enable']trueEnables the web probe.
keepalived['frontend_vip']['https_check']['port']nilPort of the web probe. With nil it is derived from nginx['listen_port'] and the external_url port.
keepalived['frontend_vip']['https_check']['path']/-/healthPath of the web probe, requested through the full web chain under the external_url host name.
keepalived['frontend_vip']['ssh_check']['enable']trueEnables the SSH probe.
keepalived['frontend_vip']['ssh_check']['port']nilPort of the SSH probe. With nil it is derived from gitlab-sshd or gitlab_rails['gitlab_shell_ssh_port'], else 22.
keepalived['frontend_vip']['check_fall']5Number of consecutive check failures before the address moves: about 10 seconds of sustained failure.
keepalived['frontend_vip']['check_rise']2Number of consecutive successful checks before the node takes the address back.

Database virtual IP address:

ParameterDefaultDescription
keepalived['db_vip']['enable']falseEnables the address for PostgreSQL clients. Enable it on the database nodes only.
keepalived['db_vip']['ip']nilVirtual IP address. Required when enabled.
keepalived['db_vip']['prefix']32Prefix length of the address.
keepalived['db_vip']['interface']nilInterface of the address. With nil, keepalived['interface'] applies.
keepalived['db_vip']['virtual_router_id']52VRRP identifier of the address. The identifier must differ from the frontend virtual IP address identifier.
keepalived['db_vip']['priority']100Node priority. Keep it equal on the database nodes — which node holds the address is decided by the check.
keepalived['db_vip']['auth_pass']nilVRRPv2 shared secret, 1 to 8 characters.
keepalived['db_vip']['pg_check']['socket']nilUnix socket directory of the local database. With nil, the postgresql settings apply.
keepalived['db_vip']['pg_check']['port']nilPort of the local database. With nil, postgresql['port'] applies.
keepalived['db_vip']['pg_check']['connect_timeout']5Time in seconds the check waits for the local database to accept the connection.
keepalived['db_vip']['pg_check']['statement_timeout']5000Time in milliseconds the check query may run.
keepalived['db_vip']['check_fall']10Number of consecutive check failures before the address is released: about 20 seconds, so that short load spikes do not cause a switch.
keepalived['db_vip']['check_rise']3Number of consecutive successful checks before the node takes the address back.

Redis and Sentinel

ParameterDefaultDescription
redis['bind']0.0.0.0Addresses Redis listens on.
redis['port']6379Redis port. The replication and the Sentinel probes use it.
redis['password']nilPassword of Redis, the same on every node.
redis['master']trueRole of the local Redis: true on the current master server, false on a replica.
redis['master_name']nilName of the monitored Redis server, the same on every node.
redis['master_ip']nilAddress of the current Redis master server. The same value is set on every node. The value is static: after an actual Redis switch, update it together with redis['master'] on every node before the next run of gitlab-ctl reconfigure.
redis['master_port']6379Port of the Redis master server.
redis['master_password']nilPassword of the Redis master server. With Sentinel enabled it defaults to redis['password'].
sentinel['enable']falseEnables the Sentinel service.
sentinel['bind']0.0.0.0Address Sentinel listens on. Set the address of the node itself.
sentinel['port']26379Sentinel port.
sentinel['quorum']1Number of Sentinels that must agree to start a failover. With three nodes set 2.
sentinel['down_after_milliseconds']10000Time in milliseconds without an answer after which Sentinel considers the master server down.
sentinel['failover_timeout']60000Failover timeout in milliseconds.
sentinel['parallel_syncs']nilNumber of replicas resynchronized at once after a failover. The Sentinel default of 1 applies with nil.
gitlab_rails['redis_sentinels'][]List of Sentinel addresses for the application: hashes with host and port.
gitlab_rails['redis_sentinels_password']nilPassword of the Sentinels. Set it when sentinel['password'] is set.

Gitaly and Praefect

ParameterDefaultDescription
gitaly['configuration'][:listen_addr]nilAddress and port the local Gitaly listens on: the address of the node and port 8075.
gitaly['configuration'][:auth][:token]nilLiteral token Praefect authenticates to Gitaly with. The same value on every node.
gitaly['configuration'][:storage]defaultStorages of the node: a list of one storage with the unique name gitaly-<N> and the path /var/opt/gitlab/git-data.
praefect['enable']falseEnables the Praefect service.
praefect['auto_migrate']trueRuns the Praefect database migrations at start.
praefect['configuration'][:listen_addr]nilAddress and port the local Praefect listens on: the address of the node and port 2305. The Rails and gitlab-shell of the node connect to it.
praefect['configuration'][:auth][:token]nilLiteral token the application authenticates to Praefect with. The same value on every node.
praefect['configuration'][:failover][:enabled]falseEnables the automatic failover of the virtual storage.
praefect['configuration'][:database]{}Connection to the Praefect database: the database virtual IP address, port 5432, the praefect user with its literal password and the praefect_production database.
praefect['configuration'][:virtual_storage][]Virtual storage: the default name, the replication factor and the list of every Gitaly node of the cluster. The list is the same on every node.

The gitlab_rails['repositories_storages'] parameter of the deployment block points the application at the local Praefect: the gitaly_address with the Praefect address of the node and the gitaly_token with the Praefect token. The storage path is set by gitaly['configuration'][:storage].

Application

ParameterDefaultDescription
gitlab_rails['db_host']nilDatabase address of the application. In the mode it is the database virtual IP address on every node.
gitlab_rails['db_password']nilLiteral password the application connects to the database with. Required as soon as the application connects over TCP — with postgresql['listen_address'] or gitlab_rails['db_host'] set — together with postgresql['sql_user_password'].

Additional resources