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