Skip to content
Snippets Groups Projects
Commit 4bd6f027 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Merge branch 'git_data_dir' into 'master'

Git Data Dir
parents 33d1c979 d0cdcf74
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -98,9 +98,20 @@ Omnibus-gitlab uses four different directories.
- `/var/log/gitlab` contains all log data generated by components of
omnibus-gitlab.
 
### Storing Git data in an alternative directory
By default, omnibus-gitlab stores Git repository data in `/var/opt/gitlab/git-data`.
You can change this location by adding the following line to `/etc/gitlab/gitlab.rb`.
```ruby
git_data_dir "/mnt/nas/git-data"
```
Run `sudo gitlab-ctl reconfigure` for the change to take effect.
## Building your own package
 
See [the separate build documentation](doc/build.md).
 
[downloads]: https://www.gitlab.com/downloads
[CE README]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md
\ No newline at end of file
[CE README]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md
Loading
Loading
@@ -86,10 +86,10 @@ default['gitlab']['gitlab-rails']['ldap_method'] = "ssl"
default['gitlab']['gitlab-rails']['ldap_bind_dn'] = "_the_full_dn_of_the_user_you_will_bind_with"
default['gitlab']['gitlab-rails']['ldap_password'] = "_the_password_of_the_bind_user"
default['gitlab']['gitlab-rails']['ldap_allow_username_or_email_login'] = true
default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/gitlab-satellites"
default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/git-data/gitlab-satellites"
default['gitlab']['gitlab-rails']['backup_path'] = "tmp/backups"
default['gitlab']['gitlab-rails']['gitlab_shell_path'] = "/opt/gitlab/embedded/service/gitlab-shell/"
default['gitlab']['gitlab-rails']['gitlab_shell_repos_path'] = "/var/opt/gitlab/repositories"
default['gitlab']['gitlab-rails']['gitlab_shell_repos_path'] = "/var/opt/gitlab/git-data/repositories"
default['gitlab']['gitlab-rails']['gitlab_shell_hooks_path'] = "/opt/gitlab/embedded/service/gitlab-shell/hooks/"
default['gitlab']['gitlab-rails']['gitlab_shell_upload_pack'] = true
default['gitlab']['gitlab-rails']['gitlab_shell_receive_pack'] = true
Loading
Loading
@@ -125,6 +125,7 @@ default['gitlab']['sidekiq']['log_directory'] = "/var/log/gitlab/sidekiq"
# gitlab-shell
###
default['gitlab']['gitlab-shell']['log_directory'] = "/var/log/gitlab/gitlab-shell/"
default['gitlab']['gitlab-shell']['git_data_directory'] = "/var/opt/gitlab/git-data"
 
 
###
Loading
Loading
Loading
Loading
@@ -31,11 +31,13 @@ module Gitlab
postgresql Mash.new
redis Mash.new
gitlab_rails Mash.new
gitlab_shell Mash.new
unicorn Mash.new
sidekiq Mash.new
nginx Mash.new
node nil
external_url nil
git_data_dir nil
 
class << self
 
Loading
Loading
@@ -103,6 +105,14 @@ module Gitlab
Gitlab['gitlab_rails']['gitlab_port'] = uri.port
end
 
def parse_git_data_dir
return unless git_data_dir
Gitlab['gitlab_shell']['git_data_directory'] ||= git_data_dir
Gitlab['gitlab_rails']['gitlab_shell_repos_path'] ||= File.join(git_data_dir, "repositories")
Gitlab['gitlab_rails']['satellites_path'] ||= File.join(git_data_dir, "gitlab-satellites")
end
def generate_hash
results = { "gitlab" => {} }
[
Loading
Loading
@@ -110,6 +120,7 @@ module Gitlab
"user",
"redis",
"gitlab_rails",
"gitlab_shell",
"unicorn",
"sidekiq",
"nginx",
Loading
Loading
@@ -125,6 +136,7 @@ module Gitlab
def generate_config(node_name)
generate_secrets(node_name)
parse_external_url
parse_git_data_dir
generate_hash
end
end
Loading
Loading
Loading
Loading
@@ -44,16 +44,16 @@ execute "chcon -t ssh_home_t #{ssh_dir}" do
only_if "id -Z"
end
 
directory log_directory do
owner git_user
mode "0700"
recursive true
end
directory gitlab_shell_var_dir do
owner git_user
mode '0700'
recursive true
[
log_directory,
gitlab_shell_var_dir,
node['gitlab']['gitlab-shell']['git_data_directory']
].each do |dir|
directory dir do
owner git_user
mode "0700"
recursive true
end
end
 
template_symlink File.join(gitlab_shell_var_dir, "config.yml") do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment