Commit 8627ebcd authored by Sami Hiltunen's avatar Sami Hiltunen Committed by Evan Read

Document updated Praefect virtual storage configuration format

Praefect's virtual storage configuration format in omnibus left no
room for other virtual storage related configuration values as the
nodes were configured directly in the root of the virtual storage's
configuration object. The format was changed to address this by
moving the node configuration under the 'nodes' key. This commit
updates the documentation to use the updated format.

The change was made in a backwards compatible manner. If nodes are
configured in the root of the object, Omnibus corrects this by moving
unknown keys under the 'nodes' key.
parent bb5eea20
...@@ -477,25 +477,31 @@ application server, or a Gitaly node. ...@@ -477,25 +477,31 @@ application server, or a Gitaly node.
```ruby ```ruby
# Name of storage hash must match storage name in git_data_dirs on GitLab # Name of storage hash must match storage name in git_data_dirs on GitLab
# server ('praefect') and in git_data_dirs on Gitaly nodes ('gitaly-1') # server ('default') and in git_data_dirs on Gitaly nodes ('gitaly-1')
praefect['virtual_storages'] = { praefect['virtual_storages'] = {
'default' => { 'default' => {
'gitaly-1' => { 'nodes' => {
'address' => 'tcp://GITALY_HOST_1:8075', 'gitaly-1' => {
'token' => 'PRAEFECT_INTERNAL_TOKEN', 'address' => 'tcp://GITALY_HOST_1:8075',
}, 'token' => 'PRAEFECT_INTERNAL_TOKEN',
'gitaly-2' => { },
'address' => 'tcp://GITALY_HOST_2:8075', 'gitaly-2' => {
'token' => 'PRAEFECT_INTERNAL_TOKEN' 'address' => 'tcp://GITALY_HOST_2:8075',
}, 'token' => 'PRAEFECT_INTERNAL_TOKEN'
'gitaly-3' => { },
'address' => 'tcp://GITALY_HOST_3:8075', 'gitaly-3' => {
'token' => 'PRAEFECT_INTERNAL_TOKEN' 'address' => 'tcp://GITALY_HOST_3:8075',
'token' => 'PRAEFECT_INTERNAL_TOKEN'
}
} }
} }
} }
``` ```
NOTE:
In [GitLab 13.8 and earlier](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4988),
Gitaly nodes were configured directly under the virtual storage, and not under the `nodes` key.
1. [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2013) in GitLab 13.1 and later, enable [distribution of reads](#distributed-reads). 1. [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2013) in GitLab 13.1 and later, enable [distribution of reads](#distributed-reads).
1. Save the changes to `/etc/gitlab/gitlab.rb` and [reconfigure 1. Save the changes to `/etc/gitlab/gitlab.rb` and [reconfigure
...@@ -686,7 +692,7 @@ because we rely on Praefect to route operations correctly. ...@@ -686,7 +692,7 @@ because we rely on Praefect to route operations correctly.
Particular attention should be shown to: Particular attention should be shown to:
- The `gitaly['auth_token']` configured in this section must match the `token` - The `gitaly['auth_token']` configured in this section must match the `token`
value under `praefect['virtual_storages']` on the Praefect node. This was set value under `praefect['virtual_storages']['nodes']` on the Praefect node. This was set
in the [previous section](#praefect). This document uses the placeholder in the [previous section](#praefect). This document uses the placeholder
`PRAEFECT_INTERNAL_TOKEN` throughout. `PRAEFECT_INTERNAL_TOKEN` throughout.
- The storage names in `git_data_dirs` configured in this section must match the - The storage names in `git_data_dirs` configured in this section must match the
...@@ -1140,11 +1146,7 @@ You can configure: ...@@ -1140,11 +1146,7 @@ You can configure:
praefect['virtual_storages'] = { praefect['virtual_storages'] = {
'default' => { 'default' => {
'default_replication_factor' => 1, 'default_replication_factor' => 1,
# nodes... # ...
'gitaly-1' => {
'address' => 'tcp://GITALY_HOST_1:8075',
'token' => 'PRAEFECT_INTERNAL_TOKEN',
},
} }
} }
``` ```
......
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