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
1742c1e6
Commit
1742c1e6
authored
Mar 09, 2020
by
Jacob Vosmaer
Committed by
Achilleas Pipinellis
Mar 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Configure Prometheus and Grafana in Praefect setup documentation
parent
11bce289
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
3 deletions
+56
-3
doc/administration/gitaly/praefect.md
doc/administration/gitaly/praefect.md
+56
-3
No files found.
doc/administration/gitaly/praefect.md
View file @
1742c1e6
...
@@ -84,6 +84,8 @@ with secure tokens as you complete the setup process.
...
@@ -84,6 +84,8 @@ with secure tokens as you complete the setup process.
Praefect cluster directly; that could lead to data loss.
Praefect cluster directly; that could lead to data loss.
1.
`PRAEFECT_SQL_PASSWORD`
: this password is used by Praefect to connect to
1.
`PRAEFECT_SQL_PASSWORD`
: this password is used by Praefect to connect to
PostgreSQL.
PostgreSQL.
1.
`GRAFANA_PASSWORD`
: this password is used to access the
`admin`
account in the Grafana dashboards.
We will note in the instructions below where these secrets are required.
We will note in the instructions below where these secrets are required.
...
@@ -184,6 +186,10 @@ application server, or a Gitaly node.
...
@@ -184,6 +186,10 @@ application server, or a Gitaly node.
# Make Praefect accept connections on all network interfaces.
# Make Praefect accept connections on all network interfaces.
# Use firewalls to restrict access to this address/port.
# Use firewalls to restrict access to this address/port.
praefect
[
'listen_addr'
]
=
'0.0.0.0:2305'
praefect
[
'listen_addr'
]
=
'0.0.0.0:2305'
# Enable Prometheus metrics access to Praefect. You must use firewalls
# to restrict access to this address/port.
praefect
[
'prometheus_listen_addr'
]
=
'0.0.0.0:9652'
```
```
1.
Configure a strong
`auth_token`
for
**Praefect**
by editing
1.
Configure a strong
`auth_token`
for
**Praefect**
by editing
...
@@ -354,6 +360,10 @@ documentation](index.md#3-gitaly-server-configuration).
...
@@ -354,6 +360,10 @@ documentation](index.md#3-gitaly-server-configuration).
# Make Gitaly accept connections on all network interfaces.
# Make Gitaly accept connections on all network interfaces.
# Use firewalls to restrict access to this address/port.
# Use firewalls to restrict access to this address/port.
gitaly
[
'listen_addr'
]
=
'0.0.0.0:8075'
gitaly
[
'listen_addr'
]
=
'0.0.0.0:8075'
# Enable Prometheus metrics access to Gitaly. You must use firewalls
# to restrict access to this address/port.
gitaly
[
'prometheus_listen_addr'
]
=
'0.0.0.0:9236'
```
```
1.
Configure a strong
`auth_token`
for
**Gitaly**
by editing
1.
Configure a strong
`auth_token`
for
**Gitaly**
by editing
...
@@ -453,7 +463,7 @@ Particular attention should be shown to:
...
@@ -453,7 +463,7 @@ Particular attention should be shown to:
You will need to replace:
You will need to replace:
-
`PRAEFECT_
URL_OR_IP`
with the IP/host address
of the Praefect node
-
`PRAEFECT_
HOST`
with the IP address or hostname
of the Praefect node
-
`PRAEFECT_EXTERNAL_TOKEN`
with the real secret
-
`PRAEFECT_EXTERNAL_TOKEN`
with the real secret
```
ruby
```
ruby
...
@@ -462,7 +472,7 @@ Particular attention should be shown to:
...
@@ -462,7 +472,7 @@ Particular attention should be shown to:
"path"
=>
"/var/opt/gitlab/git-data"
"path"
=>
"/var/opt/gitlab/git-data"
},
},
"praefect"
=>
{
"praefect"
=>
{
"gitaly_address"
=>
"tcp://PRAEFECT_
URL_OR_IP
:2305"
,
"gitaly_address"
=>
"tcp://PRAEFECT_
HOST
:2305"
,
"gitaly_token"
=>
'PRAEFECT_EXTERNAL_TOKEN'
"gitaly_token"
=>
'PRAEFECT_EXTERNAL_TOKEN'
}
}
})
})
...
@@ -478,6 +488,38 @@ Particular attention should be shown to:
...
@@ -478,6 +488,38 @@ Particular attention should be shown to:
gitlab_shell
[
'secret_token'
]
=
'GITLAB_SHELL_SECRET_TOKEN'
gitlab_shell
[
'secret_token'
]
=
'GITLAB_SHELL_SECRET_TOKEN'
```
```
1.
Add Prometheus monitoring settings by editing
`/etc/gitlab/gitlab.rb`
.
You will need to replace:
-
`PRAEFECT_HOST`
with the IP address or hostname of the Praefect node
-
`GITALY_HOST`
with the IP address or hostname of each Gitaly node
```
ruby
prometheus
[
'scrape_configs'
]
=
[
{
'job_name'
=>
'praefect'
,
'static_configs'
=>
[
'targets'
=>
[
'PRAEFECT_HOST:9652'
# praefect
]
]
},
{
'job_name'
=>
'praefect-gitaly'
,
'static_configs'
=>
[
'targets'
=>
[
'GITALY_HOST:9236'
,
# gitaly-1
'GITALY_HOST:9236'
,
# gitaly-2
'GITALY_HOST:9236'
,
# gitaly-3
]
]
}
]
grafana
[
'disable_login_form'
]
=
false
```
1.
Save the changes to
`/etc/gitlab/gitlab.rb`
and
[
reconfigure GitLab
](
../restart_gitlab.md#omnibus-gitlab-reconfigure
)
:
1.
Save the changes to
`/etc/gitlab/gitlab.rb`
and
[
reconfigure GitLab
](
../restart_gitlab.md#omnibus-gitlab-reconfigure
)
:
```
shell
```
shell
...
@@ -490,6 +532,12 @@ Particular attention should be shown to:
...
@@ -490,6 +532,12 @@ Particular attention should be shown to:
sudo
gitlab-rake gitlab:gitaly:check
sudo
gitlab-rake gitlab:gitaly:check
```
```
1.
Set the Grafana admin password. This command will prompt you to enter a new password:
```
shell
sudo
gitlab-ctl set-grafana-password
```
1.
Update the
**Repository storage**
settings from
**
Admin Area > Settings >
1.
Update the
**Repository storage**
settings from
**
Admin Area > Settings >
Repository > Repository storage
**
to make the newly configured Praefect
Repository > Repository storage
**
to make the newly configured Praefect
cluster the storage location for new Git repositories.
cluster the storage location for new Git repositories.
...
@@ -502,7 +550,12 @@ Particular attention should be shown to:
...
@@ -502,7 +550,12 @@ Particular attention should be shown to:
repository that viewed. If the project is created, and you can see the
repository that viewed. If the project is created, and you can see the
README file, it works!
README file, it works!
Congratulations! You have configured a highly available Praefect cluster, and
1.
Inspect metrics by browsing to
`/-/grafana`
on your GitLab server.
Log in with
`admin`
/
`GRAFANA_PASSWORD`
. Go to 'Explore' and query
`gitlab_build_info`
to verify that you are getting metrics from all your
machines.
Congratulations! You have configured a highly available Praefect cluster.
## Migrating existing repositories to Praefect
## Migrating existing repositories to Praefect
...
...
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