2019-09-30 21:07:59 +05:30
---
type: reference
---
2019-07-31 22:56:46 +05:30
# 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
2019-09-30 21:07:59 +05:30
should consider using Gitaly on a separate node.
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
See the [Gitaly HA Epic ](https://gitlab.com/groups/gitlab-org/-/epics/289 ) to
track plans and progress toward high availability support.
2019-07-31 22:56:46 +05:30
2019-09-04 21:01:54 +05:30
This document is relevant for [Scaled Architecture ](README.md#scalable-architecture-examples )
2019-09-30 21:07:59 +05:30
environments and [High Availability Architecture ](README.md#high-availability-architecture-examples ).
2019-07-31 22:56:46 +05:30
## Running Gitaly on its own server
2019-09-04 21:01:54 +05:30
See [Running Gitaly on its own server ](../gitaly/index.md#running-gitaly-on-its-own-server )
in Gitaly documentation.
2019-07-31 22:56:46 +05:30
2019-09-04 21:01:54 +05:30
Continue configuration of other components by going back to:
2019-07-31 22:56:46 +05:30
2019-09-04 21:01:54 +05:30
- [Scaled Architectures ](README.md#scalable-architecture-examples )
- [High Availability Architectures ](README.md#high-availability-architecture-examples )
2019-07-31 22:56:46 +05:30
2019-09-04 21:01:54 +05:30
## Enable Monitoring
2019-07-31 22:56:46 +05:30
2019-09-04 21:01:54 +05:30
> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0.
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
1. Make sure to collect [`CONSUL_SERVER_NODES` ](database.md#consul-information ), 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`
1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration:
```ruby
# 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"
```
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
1. Run `sudo gitlab-ctl reconfigure` to compile the configuration.
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
<!-- ## Troubleshooting
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
2019-07-31 22:56:46 +05:30
2019-09-30 21:07:59 +05:30
Each scenario can be a third-level heading, e.g. `### Getting error message X` .
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->