Commit a3995840 authored by Patrick Steinhardt's avatar Patrick Steinhardt

gitlab/setup_helper: Migrate Gitaly to use runtime directory

Among other tasks, the setup helper also generates the Gitaly config.
Part of the things we configure is the internal socket directory, which
is currently being phased out by Gitaly. Instead, Gitaly provides a new
runtime directory which is intended to host all files and directories
created by Gitaly at runtime, including internal sockets.

Convert the setup helper to use the new runtime directory.

Changelog: changed
parent 2f6f00a1
......@@ -124,9 +124,9 @@ module Gitlab
config[:storage] = storages
internal_socket_dir = options[:internal_socket_dir] || File.join(gitaly_dir, 'internal_sockets')
FileUtils.mkdir(internal_socket_dir) unless File.exist?(internal_socket_dir)
config[:internal_socket_dir] = internal_socket_dir
runtime_dir = options[:runtime_dir] || File.join(gitaly_dir, 'run')
FileUtils.mkdir(runtime_dir) unless File.exist?(runtime_dir)
config[:runtime_dir] = runtime_dir
config[:'gitaly-ruby'] = { dir: File.join(gitaly_dir, 'ruby') } if gitaly_ruby
config[:'gitlab-shell'] = { dir: Gitlab.config.gitlab_shell.path }
......
......@@ -267,7 +267,7 @@ module GitalySetup
{ 'default' => repos_path },
force: true,
options: {
internal_socket_dir: File.join(gitaly_dir, "internal_gitaly2"),
runtime_dir: File.join(gitaly_dir, "run2"),
gitaly_socket: "gitaly2.socket",
config_filename: "gitaly2.config.toml"
}
......
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