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
| Parameter | Default | Description |
|---|---|---|
postgresql['role'] | default | Role 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'] | nil | Address of the primary server a standby server streams from. Required with the standby role. |
postgresql['primary_port'] | 5432 | Port 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'] | nil | Literal 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'] | nil | Name the standby server reports in pg_stat_replication on the primary server. |
postgresql['replication_slot_name'] | nil | Physical replication slot the standby server consumes. The slot must exist on the primary server before the standby server starts. |
postgresql['max_replication_slots'] | 1 | Number 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'] | nil | Name 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'] | nil | Literal password of the check user, the same on every node. |
postgresql['ha_rewind_user'] | nil | Name 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'] | nil | Literal 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:
| Parameter | Default | Description |
|---|---|---|
keepalived['enable'] | false | Enables the service. With false, no service or configuration is created. |
keepalived['interface'] | nil | Network interface the virtual IP addresses are added to. Required when enabled. |
keepalived['unicast_src_ip'] | nil | Source 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'] | 2 | VRRP protocol version: 2 or 3. The authentication password applies to version 2 only and is not rendered with version 3. |
keepalived['vrrp_strict'] | false | Strict RFC compliance. Strict mode forbids unicast peers. |
keepalived['check_interval'] | 2 | Seconds between the check script runs. |
keepalived['check_timeout'] | 8 | Time in seconds after which a still-running check counts as failed. |
keepalived['check_fall'] | 5 | Number of consecutive check failures before the node releases the address. A fallback for the per-address values below. |
keepalived['check_rise'] | 2 | Number of consecutive successful checks before the node takes the address back. |
keepalived['state_log'] | /var/opt/gitlab/keepalived/state.log | Log file of the virtual IP address transitions. |
Frontend virtual IP address:
| Parameter | Default | Description |
|---|---|---|
keepalived['frontend_vip']['enable'] | false | Enables the address for users. |
keepalived['frontend_vip']['ip'] | nil | Virtual IP address. Required when enabled. |
keepalived['frontend_vip']['prefix'] | 32 | Prefix length of the address. |
keepalived['frontend_vip']['interface'] | nil | Interface of the address. With nil, keepalived['interface'] applies. |
keepalived['frontend_vip']['virtual_router_id'] | 51 | VRRP identifier of the address. The identifier must differ from the database virtual IP address identifier. |
keepalived['frontend_vip']['priority'] | 100 | Node priority for the address. Spread it across the nodes, for example 100, 95 and 90. |
keepalived['frontend_vip']['auth_pass'] | nil | VRRPv2 shared secret, 1 to 8 characters, the same on all peers. |
keepalived['frontend_vip']['https_check']['enable'] | true | Enables the web probe. |
keepalived['frontend_vip']['https_check']['port'] | nil | Port of the web probe. With nil it is derived from nginx['listen_port'] and the external_url port. |
keepalived['frontend_vip']['https_check']['path'] | /-/health | Path of the web probe, requested through the full web chain under the external_url host name. |
keepalived['frontend_vip']['ssh_check']['enable'] | true | Enables the SSH probe. |
keepalived['frontend_vip']['ssh_check']['port'] | nil | Port 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'] | 5 | Number of consecutive check failures before the address moves: about 10 seconds of sustained failure. |
keepalived['frontend_vip']['check_rise'] | 2 | Number of consecutive successful checks before the node takes the address back. |
Database virtual IP address:
| Parameter | Default | Description |
|---|---|---|
keepalived['db_vip']['enable'] | false | Enables the address for PostgreSQL clients. Enable it on the database nodes only. |
keepalived['db_vip']['ip'] | nil | Virtual IP address. Required when enabled. |
keepalived['db_vip']['prefix'] | 32 | Prefix length of the address. |
keepalived['db_vip']['interface'] | nil | Interface of the address. With nil, keepalived['interface'] applies. |
keepalived['db_vip']['virtual_router_id'] | 52 | VRRP identifier of the address. The identifier must differ from the frontend virtual IP address identifier. |
keepalived['db_vip']['priority'] | 100 | Node priority. Keep it equal on the database nodes — which node holds the address is decided by the check. |
keepalived['db_vip']['auth_pass'] | nil | VRRPv2 shared secret, 1 to 8 characters. |
keepalived['db_vip']['pg_check']['socket'] | nil | Unix socket directory of the local database. With nil, the postgresql settings apply. |
keepalived['db_vip']['pg_check']['port'] | nil | Port of the local database. With nil, postgresql['port'] applies. |
keepalived['db_vip']['pg_check']['connect_timeout'] | 5 | Time in seconds the check waits for the local database to accept the connection. |
keepalived['db_vip']['pg_check']['statement_timeout'] | 5000 | Time in milliseconds the check query may run. |
keepalived['db_vip']['check_fall'] | 10 | Number 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'] | 3 | Number of consecutive successful checks before the node takes the address back. |
Redis and Sentinel
| Parameter | Default | Description |
|---|---|---|
redis['bind'] | 0.0.0.0 | Addresses Redis listens on. |
redis['port'] | 6379 | Redis port. The replication and the Sentinel probes use it. |
redis['password'] | nil | Password of Redis, the same on every node. |
redis['master'] | true | Role of the local Redis: true on the current master server, false on a replica. |
redis['master_name'] | nil | Name of the monitored Redis server, the same on every node. |
redis['master_ip'] | nil | Address 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'] | 6379 | Port of the Redis master server. |
redis['master_password'] | nil | Password of the Redis master server. With Sentinel enabled it defaults to redis['password']. |
sentinel['enable'] | false | Enables the Sentinel service. |
sentinel['bind'] | 0.0.0.0 | Address Sentinel listens on. Set the address of the node itself. |
sentinel['port'] | 26379 | Sentinel port. |
sentinel['quorum'] | 1 | Number of Sentinels that must agree to start a failover. With three nodes set 2. |
sentinel['down_after_milliseconds'] | 10000 | Time in milliseconds without an answer after which Sentinel considers the master server down. |
sentinel['failover_timeout'] | 60000 | Failover timeout in milliseconds. |
sentinel['parallel_syncs'] | nil | Number 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'] | nil | Password of the Sentinels. Set it when sentinel['password'] is set. |
Gitaly and Praefect
| Parameter | Default | Description |
|---|---|---|
gitaly['configuration'][:listen_addr] | nil | Address and port the local Gitaly listens on: the address of the node and port 8075. |
gitaly['configuration'][:auth][:token] | nil | Literal token Praefect authenticates to Gitaly with. The same value on every node. |
gitaly['configuration'][:storage] | default | Storages of the node: a list of one storage with the unique name gitaly-<N> and the path /var/opt/gitlab/git-data. |
praefect['enable'] | false | Enables the Praefect service. |
praefect['auto_migrate'] | true | Runs the Praefect database migrations at start. |
praefect['configuration'][:listen_addr] | nil | Address 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] | nil | Literal token the application authenticates to Praefect with. The same value on every node. |
praefect['configuration'][:failover][:enabled] | false | Enables 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
| Parameter | Default | Description |
|---|---|---|
gitlab_rails['db_host'] | nil | Database address of the application. In the mode it is the database virtual IP address on every node. |
gitlab_rails['db_password'] | nil | Literal 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']. |