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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
173384f8
Commit
173384f8
authored
Apr 06, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gitaly-config-toml' into 'master'
Use config.toml to configure Gitaly See merge request !10496
parents
86d5f1f8
2f7ff6ea
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
28 deletions
+44
-28
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
doc/administration/gitaly/index.md
doc/administration/gitaly/index.md
+15
-17
doc/install/installation.md
doc/install/installation.md
+8
-6
doc/update/9.0-to-9.1.md
doc/update/9.0-to-9.1.md
+18
-1
lib/gitlab/gitaly_client/ref.rb
lib/gitlab/gitaly_client/ref.rb
+1
-1
lib/support/init.d/gitlab
lib/support/init.d/gitlab
+1
-2
No files found.
GITALY_SERVER_VERSION
View file @
173384f8
0.
5
.0
0.
6
.0
doc/administration/gitaly/index.md
View file @
173384f8
...
...
@@ -2,7 +2,7 @@
[
Gitaly
](
https://gitlab.com/gitlab-org/gitlay
)
(
introduced
in GitLab
9.
0) is a service that provides high-level RPC access to Git
repositories. As of GitLab 9.
0
it is still an optional component with
repositories. As of GitLab 9.
1
it is still an optional component with
limited scope.
GitLab components that access Git repositories (gitlab-rails,
...
...
@@ -11,28 +11,26 @@ not have direct access to Gitaly.
## Configuring Gitaly
The Gitaly service itself is configured via
environment variables
.
Th
ese variables are
documented
[
in the gitaly
The Gitaly service itself is configured via
a TOML configuration file
.
Th
is file is
documented
[
in the gitaly
repository
](
https://gitlab.com/gitlab-org/gitaly/blob/master/doc/configuration/README.md
)
.
To change a Gitaly
environment variable
in Omnibus you can use
`gitaly['
env
']`
in
`/etc/gitlab/gitlab.rb`
. Changes will be applied
To change a Gitaly
setting
in Omnibus you can use
`gitaly['
my_setting
']`
in
`/etc/gitlab/gitlab.rb`
. Changes will be applied
when you run
`gitlab-ctl reconfigure`
.
```
ruby
gitaly
[
'env'
]
=
{
'GITALY_MY_VARIABLE'
=>
'value'
}
gitaly
[
'prometheus_listen_addr'
]
=
'localhost:9236'
```
To change a Gitaly
environment variable in installations from source
you can edit
`/home/git/gitaly/env
`
.
To change a Gitaly
setting in installations from source you can edit
`/home/git/gitaly/config.toml
`
.
```
shel
l
GITALY_MY_VARIABLE
=
'value'
```
tom
l
prometheus_listen_addr
=
"localhost:9236"
```
Changes to
`/home/git/gitaly/
env
`
are applied when you run
`service
Changes to
`/home/git/gitaly/
config.toml
`
are applied when you run
`service
gitlab restart`
.
## Configuring GitLab to not use Gitaly
...
...
@@ -49,15 +47,15 @@ gitaly['enable'] = false
```
In source installations, edit
`/home/git/gitlab/config/gitlab.yml`
and
make sure
`
socket_path`
in the
`gitaly`
section is commented out
. This
does not disable the Gitaly service
; it only prevents it from being
used.
make sure
`
enabled`
in the
`gitaly`
section is set to 'false'
. This
does not disable the Gitaly service
in your init script; it only
prevents it from being
used.
Apply the change with
`service gitlab restart`
.
```
yaml
gitaly
:
# socket_path: tmp/sockets/private/gitlay.socket
enabled
:
false
```
## Disabling or enabling the Gitaly service
...
...
doc/install/installation.md
View file @
173384f8
...
...
@@ -459,9 +459,9 @@ Make GitLab start on boot:
### Install Gitaly
As of GitLab 9.
0
Gitaly is an
**optional**
component. Its
configuration is
expected to change in GitLab 9.1
. It is OK to wait
with setting up Gitaly until you upgrade to GitLab 9.
1
or later.
As of GitLab 9.
1
Gitaly is an
**optional**
component. Its
configuration is
still changing regularly
. It is OK to wait
with setting up Gitaly until you upgrade to GitLab 9.
2
or later.
# Fetch Gitaly source with Git and compile with Go
sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly]" RAILS_ENV=production
...
...
@@ -471,8 +471,10 @@ with setting up Gitaly until you upgrade to GitLab 9.1 or later.
sudo chown git /home/git/gitlab/tmp/sockets/private
# Configure Gitaly
echo 'GITALY_SOCKET_PATH=/home/git/gitlab/tmp/sockets/private/gitaly.socket' | \
sudo -u git tee -a /home/git/gitaly/env
cd /home/git/gitaly
sudo -u git cp config.toml.example config.toml
# If you are using non-default settings you need to update config.toml
sudo -u git -H editor config.toml
# Enable Gitaly in the init script
echo 'gitaly_enabled=true' | sudo tee -a /etc/default/gitlab
...
...
doc/update/9.0-to-9.1.md
View file @
173384f8
...
...
@@ -297,7 +297,10 @@ during your 9.1 upgrade **you can skip this step**.
If you have not yet set up Gitaly then follow
[
Gitaly section of the installation
guide
](
../install/installation.md#install-gitaly
)
.
If you installed Gitaly in GitLab 9.0 you need to make some changes in gitlab.yml.
If you installed Gitaly in GitLab 9.0 you need to make some changes in
gitlab.yml, and create a new config.toml file.
#### Gitaly gitlab.yml changes
Look for
`socket_path:`
the
`gitaly:`
section. Its value is usually
`/home/git/gitlab/tmp/sockets/private/gitaly.socket`
. Note what socket
...
...
@@ -318,6 +321,20 @@ the socket path, but with `unix:` in front.
Each entry under
`storages:`
should use the same
`gitaly_address`
.
#### Gitaly config.toml
In GitLab 9.1 we are replacing environment variables in Gitaly with a
TOML configuration file.
```
shell
cd
/home/git/gitaly
sudo mv env
env.old
sudo
-u
git
cp
config.toml.example config.toml
# If you are using custom repository storage paths they need to be in config.toml
sudo
-u
git
-H
editor config.toml
```
### 11. Start application
```
bash
...
...
lib/gitlab/gitaly_client/ref.rb
View file @
173384f8
lib/support/init.d/gitlab
View file @
173384f8
...
...
@@ -326,8 +326,7 @@ start_gitlab() {
echo
"Gitaly is already running with pid
$gapid
, not restarting"
else
$app_root
/bin/daemon_with_pidfile
$gitaly_pid_path
\
$app_root
/bin/with_env
$gitaly_dir
/env
\
$gitaly_dir
/gitaly
>>
$gitaly_log
2>&1 &
$gitaly_dir
/gitaly
$gitaly_dir
/config.toml
>>
$gitaly_log
2>&1 &
fi
fi
...
...
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