Commit 554d8256 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-ref-arch-gitaly-update' into 'master'

Update Gitaly section for refinement

See merge request gitlab-org/gitlab!40875
parents efd14c49 e0756b24
...@@ -348,50 +348,51 @@ are supported and can be added if needed. ...@@ -348,50 +348,51 @@ are supported and can be added if needed.
## Configure Gitaly ## Configure Gitaly
Deploying Gitaly in its own server can benefit GitLab installations that are [Gitaly](../gitaly/index.md) server node requirements are dependent on data,
larger than a single machine. Gitaly node requirements are dependent on data, specifically the number of projects and those projects' sizes. It's recommended
specifically the number of projects and their sizes. It's recommended that each that a Gitaly server node stores no more than 5TB of data. Although this
Gitaly node store no more than 5TB of data. Your 2K setup may require one or more reference architecture includes a single Gitaly server node, you may require
nodes depending on your repository storage requirements. additional nodes depending on your repository storage requirements.
We strongly recommend that all Gitaly nodes should be set up with SSD disks with a throughput of at least Due to Gitaly having notable input and output requirements, we strongly
8,000 IOPS for read operations and 2,000 IOPS for write, as Gitaly has heavy I/O. recommend that all Gitaly nodes use solid-state drives (SSDs). These SSDs
These IOPS values are recommended only as a starter as with time they may be should have a throughput of at least 8,000
adjusted higher or lower depending on the scale of your environment's workload. input/output operations per second (IOPS) for read operations and 2,000 IOPS
If you're running the environment on a Cloud provider for write operations. These IOPS values are initial recommendations, and may be
you may need to refer to their documentation on how configure IOPS correctly. adjusted to greater or lesser values depending on the scale of your
environment's workload. If you're running the environment on a Cloud provider,
Some things to note: refer to their documentation about how to configure IOPS correctly.
- The GitLab Rails application shards repositories into [repository storages](../repository_storage_paths.md). Be sure to note the following items:
- A Gitaly server can host one or more storages.
- A GitLab server can use one or more Gitaly servers. - The GitLab Rails application shards repositories into
- Gitaly addresses must be specified in such a way that they resolve [repository storage paths](../repository_storage_paths.md).
correctly for ALL Gitaly clients. - A Gitaly server can host one or more storage paths.
- A GitLab server can use one or more Gitaly server nodes.
- Gitaly addresses must be specified to be correctly resolvable for *all*
Gitaly clients.
- Gitaly servers must not be exposed to the public internet, as Gitaly's network - Gitaly servers must not be exposed to the public internet, as Gitaly's network
traffic is unencrypted by default. The use of a firewall is highly recommended traffic is unencrypted by default. The use of a firewall is highly recommended
to restrict access to the Gitaly server. Another option is to to restrict access to the Gitaly server. Another option is to
[use TLS](#gitaly-tls-support). [use TLS](#gitaly-tls-support).
TIP: **Tip:** NOTE: **Note:**
For more information about Gitaly's history and network architecture see the The token referred to throughout the Gitaly documentation is an arbitrary
[standalone Gitaly documentation](../gitaly/index.md). password selected by the administrator. This token is unrelated to tokens
created for the GitLab API or other similar web API tokens.
Note: **Note:** The token referred to throughout the Gitaly documentation is
just an arbitrary password selected by the administrator. It is unrelated to
tokens created for the GitLab API or other similar web API tokens.
Below we describe how to configure one Gitaly server `gitaly1.internal` with The following procedure describes how to configure a single Gitaly server named
secret token `gitalysecret`. We assume your GitLab installation has two `gitaly1.internal` with the secret token `gitalysecret`. We assume your GitLab
repository storages: `default` and `storage1`. installation has two repository storages: `default` and `storage1`.
To configure the Gitaly server: To configure the Gitaly server:
1. [Download/Install](https://about.gitlab.com/install/) the Omnibus GitLab 1. On the server node you want to use for Gitaly,
package you want using **steps 1 and 2** from the GitLab downloads page but [download and install](https://about.gitlab.com/install/) your selected
**without** providing the `EXTERNAL_URL` value. Omnibus GitLab package using *steps 1 and 2* from the GitLab downloads page,
1. Edit `/etc/gitlab/gitlab.rb` to configure storage paths, enable but *without* providing the `EXTERNAL_URL` value.
the network listener and configure the token: 1. Edit the Gitaly server node's `/etc/gitlab/gitlab.rb` file to configure
storage paths, enable the network listener, and to configure the token:
<!-- <!--
updates to following example must also be made at updates to following example must also be made at
...@@ -440,11 +441,7 @@ To configure the Gitaly server: ...@@ -440,11 +441,7 @@ To configure the Gitaly server:
# Set the network addresses that the exporters used for monitoring will listen on # Set the network addresses that the exporters used for monitoring will listen on
node_exporter['listen_address'] = '0.0.0.0:9100' node_exporter['listen_address'] = '0.0.0.0:9100'
```
1. Append the following to `/etc/gitlab/gitlab.rb` on `gitaly1.internal`:
```ruby
git_data_dirs({ git_data_dirs({
'default' => { 'default' => {
'path' => '/var/opt/gitlab/git-data' 'path' => '/var/opt/gitlab/git-data'
...@@ -455,12 +452,7 @@ To configure the Gitaly server: ...@@ -455,12 +452,7 @@ To configure the Gitaly server:
}) })
``` ```
<!-- 1. Save the file, and then [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure).
updates to following example must also be made at
https://gitlab.com/gitlab-org/charts/gitlab/blob/master/doc/advanced/external-gitaly/external-omnibus-gitaly.md#configure-omnibus-gitlab
-->
1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure).
1. Confirm that Gitaly can perform callbacks to the internal API: 1. Confirm that Gitaly can perform callbacks to the internal API:
```shell ```shell
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment