Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2a33c760
Commit
2a33c760
authored
Oct 23, 2019
by
John Cai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update praefect git_data_dirs setup
parent
a9e800e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
9 deletions
+38
-9
doc/administration/gitaly/praefect.md
doc/administration/gitaly/praefect.md
+38
-9
No files found.
doc/administration/gitaly/praefect.md
View file @
2a33c760
...
...
@@ -50,10 +50,9 @@ In their own machine, configure the Gitaly server as described in the
#### Praefect
Next, Praefect has to be enabled on its own node. Disable all other services,
and add each Gitaly node that will be connected to Praefect. In the example below,
the Gitaly nodes are named
`praefect-git-X`
. Note that one node is designated as
primary, by setting the primary to
`true`
:
Next, Praefect has to be enabled on its own node.
##### Disable other services
```
ruby
# /etc/gitlab/gitlab.rb
...
...
@@ -67,27 +66,36 @@ unicorn['enable'] = false
sidekiq
[
'enable'
]
=
false
gitlab_workhorse
[
'enable'
]
=
false
gitaly
[
'enable'
]
=
false
```
##### Set up Praefect and its Gitaly nodes
In the example below, the Gitaly nodes are named
`praefect-git-X`
. Note that one node is designated as
primary, by setting the primary to
`true`
:
```
ruby
# /etc/gitlab/gitlab.rb
# virtual_storage_name must match the same storage name given to praefect in git_data_dirs
praefect
[
'virtual_storage_name'
]
=
'praefect'
praefect
[
'auth_token'
]
=
'
super_secret_abc
'
praefect
[
'auth_token'
]
=
'
abc123secret
'
praefect
[
'enable'
]
=
true
praefect
[
'storage_nodes'
]
=
[
{
'storage'
=>
'praefect-git-1'
,
'address'
=>
'tcp://praefect-git-1.internal'
,
'token'
=>
'
token1
'
,
'token'
=>
'
xyz123secret
'
,
'primary'
=>
true
},
{
'storage'
=>
'praefect-git-2'
,
'address'
=>
'tcp://praefect-git-2.internal'
,
'token'
=>
'
token2'
'token'
=>
'
xyz456secret'
,
},
{
'storage'
=>
'praefect-git-3'
,
'address'
=>
'tcp://praefect-git-3.internal'
,
'token'
=>
'
token3'
'token'
=>
'
xyz789secret'
,
}
]
```
...
...
@@ -97,7 +105,28 @@ Save the file and [reconfigure Praefect](../restart_gitlab.md#omnibus-gitlab-rec
#### GitLab
When Praefect is running, it should be exposed as a storage to GitLab. This
is done through setting the
`git_data_dirs`
. Assuming the default storage
is done through setting the
`git_data_dirs`
.
##### On a fresh GitLab installation
On a fresh Gitlab installation, set up the
`default`
storage to point to praefect:
```
ruby
git_data_dirs
({
"default"
=>
{
"gitaly_address"
=>
"tcp://praefect.internal:2305"
},
})
```
##### On an existing GitLab instance
On an existing GitLab instance, the
`default`
storage is already being served by a
Gitaly node, so an additional storage can be added.
`praefect`
is chosen in the example
below, but it can be any name as long as it matches the
`virtual_storage_name`
in the
praefect attributes above.
Assuming the default storage
configuration is used, there would be two storages available to GitLab:
```
ruby
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment