gitlab-org--gitlab-foss/doc/administration/high_availability/gitaly.md
Achilleas Pipinellis b4eeaee38e SSoT for administration/high_availability docs
- Make sure we have type defined in the frontmatter
- Add troubleshooting sections where absent
- Meaningful intros where absent
2019-07-16 03:32:29 +00:00

2.6 KiB

type
reference

Configuring Gitaly for Scaled and High Availability

Gitaly does not yet support full high availability. However, Gitaly is quite stable and is in use on GitLab.com. Scaled and highly available GitLab environments should consider using Gitaly on a separate node.

See the Gitaly HA Epic to track plans and progress toward high availability support.

This document is relevant for Scaled Architecture environments and High Availability Architecture.

Running Gitaly on its own server

See Running Gitaly on its own server in Gitaly documentation.

Continue configuration of other components by going back to:

Enable Monitoring

Introduced in GitLab 12.0.

  1. Make sure to collect CONSUL_SERVER_NODES, which are the IP addresses or DNS records of the Consul server nodes, for the next step. Note they are presented as Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z

  2. Create/edit /etc/gitlab/gitlab.rb and add the following configuration:

    # Enable service discovery for Prometheus
    consul['enable'] = true
    consul['monitoring_service_discovery'] =  true
    
    # Replace placeholders
    # Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z
    # with the addresses of the Consul server nodes
    consul['configuration'] = {
       retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z),
    }
    
    # Set the network addresses that the exporters will listen on
    node_exporter['listen_address'] = '0.0.0.0:9100'
    gitaly['prometheus_listen_addr'] = "0.0.0.0:9236"
    
  3. Run sudo gitlab-ctl reconfigure to compile the configuration.