Commit 092e81e549eabe8ad51d89ec84c5c3b61cc31502
1 parent
519a518a
Exists in
master
and in
17 other branches
Rename existing gitlab-rails attributes
Showing
5 changed files
with
17 additions
and
23 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/attributes/default.rb
| ... | ... | @@ -43,24 +43,18 @@ default['gitlab']['gitlab-rails']['dir'] = "/var/opt/gitlab/gitlab-rails" |
| 43 | 43 | default['gitlab']['gitlab-rails']['log_directory'] = "/var/log/gitlab/gitlab-rails" |
| 44 | 44 | default['gitlab']['gitlab-rails']['environment'] = 'production' |
| 45 | 45 | |
| 46 | -default['gitlab']['gitlab-rails']['repositories_path'] = "/var/opt/gitlab/repositories" | |
| 47 | -default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/gitlab-satellites" | |
| 48 | 46 | default['gitlab']['gitlab-rails']['internal_api_url'] = "http://localhost:8080" |
| 49 | -default['gitlab']['gitlab-rails']['external_fqdn'] = node['fqdn'] | |
| 50 | -default['gitlab']['gitlab-rails']['external_port'] = 80 | |
| 51 | -default['gitlab']['gitlab-rails']['external_https'] = false | |
| 52 | -default['gitlab']['gitlab-rails']['notification_email'] = "gitlab@#{node['fqdn']}" | |
| 53 | -default['gitlab']['gitlab-rails']['support_email'] = "support@example.com" | |
| 54 | 47 | default['gitlab']['gitlab-rails']['uploads_directory'] = "/var/opt/gitlab/uploads" |
| 55 | 48 | default['gitlab']['gitlab-rails']['rate_limit_requests_per_period'] = 10 |
| 56 | 49 | default['gitlab']['gitlab-rails']['rate_limit_period'] = 60 |
| 57 | 50 | |
| 58 | -default['gitlab']['gitlab-rails']['gitlab_host'] = "localhost" | |
| 51 | +default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn'] | |
| 59 | 52 | default['gitlab']['gitlab-rails']['gitlab_port'] = 80 |
| 60 | 53 | default['gitlab']['gitlab-rails']['gitlab_https'] = false |
| 61 | 54 | default['gitlab']['gitlab-rails']['gitlab_user'] = "git" |
| 62 | -default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@localhost" | |
| 55 | +default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}" | |
| 63 | 56 | default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost" |
| 57 | +default['gitlab']['gitlab-rails']['support_email'] = "support@example.com" | |
| 64 | 58 | default['gitlab']['gitlab-rails']['gitlab_default_projects_limit'] = 10 |
| 65 | 59 | default['gitlab']['gitlab-rails']['gitlab_default_can_create_group'] = true |
| 66 | 60 | default['gitlab']['gitlab-rails']['gitlab_username_changing_enabled'] = true |
| ... | ... | @@ -96,7 +90,7 @@ default['gitlab']['gitlab-rails']['omniauth_enabled'] = false |
| 96 | 90 | default['gitlab']['gitlab-rails']['omniauth_allow_single_sign_on'] = false |
| 97 | 91 | default['gitlab']['gitlab-rails']['omniauth_block_auto_created_users'] = true |
| 98 | 92 | default['gitlab']['gitlab-rails']['omniauth_providers'] = |
| 99 | -default['gitlab']['gitlab-rails']['satellites_path'] = "/home/git/gitlab-satellites/" | |
| 93 | +default['gitlab']['gitlab-rails']['satellites_path'] = "/var/opt/gitlab/gitlab-satellites" | |
| 100 | 94 | default['gitlab']['gitlab-rails']['backup_path'] = "tmp/backups" |
| 101 | 95 | default['gitlab']['gitlab-rails']['gitlab_shell_path'] = "/home/git/gitlab-shell/" |
| 102 | 96 | default['gitlab']['gitlab-rails']['gitlab_shell_repos_path'] = "/home/git/repositories/" | ... | ... |
files/gitlab-cookbooks/gitlab/libraries/gitlab.rb
| ... | ... | @@ -84,14 +84,14 @@ module Gitlab |
| 84 | 84 | raise "External URL must include a FQDN" |
| 85 | 85 | end |
| 86 | 86 | Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}" |
| 87 | - Gitlab['gitlab_rails']['external_fqdn'] = uri.host | |
| 88 | - Gitlab['gitlab_rails']['notification_email'] ||= "gitlab@#{uri.host}" | |
| 87 | + Gitlab['gitlab_rails']['gitlab_host'] = uri.host | |
| 88 | + Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}" | |
| 89 | 89 | |
| 90 | 90 | case uri.scheme |
| 91 | 91 | when "http" |
| 92 | - Gitlab['gitlab_rails']['external_https'] = false | |
| 92 | + Gitlab['gitlab_rails']['gitlab_https'] = false | |
| 93 | 93 | when "https" |
| 94 | - Gitlab['gitlab_rails']['external_https'] = true | |
| 94 | + Gitlab['gitlab_rails']['gitlab_https'] = true | |
| 95 | 95 | else |
| 96 | 96 | raise "Unsupported external URL scheme: #{uri.scheme}" |
| 97 | 97 | end |
| ... | ... | @@ -100,7 +100,7 @@ module Gitlab |
| 100 | 100 | raise "Unsupported external URL path: #{uri.path}" |
| 101 | 101 | end |
| 102 | 102 | |
| 103 | - Gitlab['gitlab_rails']['external_port'] = uri.port | |
| 103 | + Gitlab['gitlab_rails']['gitlab_port'] = uri.port | |
| 104 | 104 | end |
| 105 | 105 | |
| 106 | 106 | def generate_hash | ... | ... |
files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb
| ... | ... | @@ -20,7 +20,7 @@ git_user = node['gitlab']['user']['username'] |
| 20 | 20 | git_group = node['gitlab']['user']['group'] |
| 21 | 21 | gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" |
| 22 | 22 | gitlab_shell_var_dir = "/var/opt/gitlab/gitlab-shell" |
| 23 | -repositories_path = node['gitlab']['gitlab-rails']['repositories_path'] | |
| 23 | +repositories_path = node['gitlab']['gitlab-rails']['gitlab_shell_repos_path'] | |
| 24 | 24 | ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") |
| 25 | 25 | log_directory = node['gitlab']['gitlab-shell']['log_directory'] |
| 26 | 26 | ... | ... |
files/gitlab-cookbooks/gitlab/recipes/nginx.rb
| ... | ... | @@ -44,7 +44,7 @@ template nginx_vars[:gitlab_http_config] do |
| 44 | 44 | mode "0644" |
| 45 | 45 | variables(nginx_vars.merge( |
| 46 | 46 | { |
| 47 | - :fqdn => node['gitlab']['gitlab-rails']['external_fqdn'], | |
| 47 | + :fqdn => node['gitlab']['gitlab-rails']['gitlab_host'], | |
| 48 | 48 | :socket => node['gitlab']['unicorn']['socket'] |
| 49 | 49 | } |
| 50 | 50 | )) | ... | ... |
files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
| ... | ... | @@ -15,9 +15,9 @@ production: &base |
| 15 | 15 | ## GitLab settings |
| 16 | 16 | gitlab: |
| 17 | 17 | ## Web server settings (note: host is the FQDN, do not include http://) |
| 18 | - host: <%= node['gitlab']['gitlab-rails']['external_fqdn'] %> | |
| 19 | - port: <%= node['gitlab']['gitlab-rails']['external_port'] %> | |
| 20 | - https: <%= node['gitlab']['gitlab-rails']['external_https'] %> | |
| 18 | + host: <%= node['gitlab']['gitlab-rails']['gitlab_host'] %> | |
| 19 | + port: <%= node['gitlab']['gitlab-rails']['gitlab_port'] %> | |
| 20 | + https: <%= node['gitlab']['gitlab-rails']['gitlab_https'] %> | |
| 21 | 21 | |
| 22 | 22 | # Uncomment and customize the last line to run in a non-root path |
| 23 | 23 | # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. |
| ... | ... | @@ -35,10 +35,10 @@ production: &base |
| 35 | 35 | |
| 36 | 36 | ## Email settings |
| 37 | 37 | # Email address used in the "From" field in mails sent by GitLab |
| 38 | - email_from: <%= node['gitlab']['gitlab-rails']['notification_email'] %> | |
| 38 | + email_from: <%= node['gitlab']['gitlab-rails']['gitlab_email_from'] %> | |
| 39 | 39 | |
| 40 | 40 | # Email address of your support contact (default: same as email_from) |
| 41 | - support_email: <%= node['gitlab']['gitlab-rails']['support_email'] %> | |
| 41 | + support_email: <%= node['gitlab']['gitlab-rails']['gitlab_support_email'] %> | |
| 42 | 42 | |
| 43 | 43 | ## User settings |
| 44 | 44 | default_projects_limit: 10 |
| ... | ... | @@ -187,7 +187,7 @@ production: &base |
| 187 | 187 | path: /opt/gitlab/embedded/service/gitlab-shell/ |
| 188 | 188 | |
| 189 | 189 | # REPOS_PATH MUST NOT BE A SYMLINK!!! |
| 190 | - repos_path: <%= node['gitlab']['gitlab-rails']['repositories_path'] %> | |
| 190 | + repos_path: <%= node['gitlab']['gitlab-rails']['gitlab_shell_repos_path'] %> | |
| 191 | 191 | hooks_path: /opt/gitlab/embedded/service/gitlab-shell/hooks/ |
| 192 | 192 | |
| 193 | 193 | # Git over HTTP | ... | ... |