diff --git a/CHANGELOG.md b/CHANGELOG.md index f9132c22f385e3bdeac55f2348ba46b3297ca758..143a109ab680915359a5e878f5c2c7fee968a69f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,18 @@ omnibus-gitlab repository. - Bump rsync to 3.1.3 f539aa946 - Patch bzip2 against CVE-2016-3189 552730bfa +10.7.3 + +- Add support for the `-daemon-inplace-chroot` command-line flag to GitLab Pages + +10.7.2 + +- No changes + +10.7.1 + +- No changes + 10.7.0 - Geo: Increase default WAL standby settings from 30s to 60s diff --git a/files/gitlab-config-template/gitlab.rb.template b/files/gitlab-config-template/gitlab.rb.template index 79137310a3d3376449ef820a9d87241ab6649f1f..89c747479575bc6ed07f335f96997ed220fa7636 100644 --- a/files/gitlab-config-template/gitlab.rb.template +++ b/files/gitlab-config-template/gitlab.rb.template @@ -1094,6 +1094,10 @@ external_url 'GENERATED_EXTERNAL_URL' # gitlab_pages['artifacts_server_url'] = nil # Defaults to external_url + '/api/v4' # gitlab_pages['artifacts_server_timeout'] = 10 +##! Environments that do not support bind-mounting should set this parameter to +##! true. This is incompatible with the artifacts server +# gitlab_pages['inplace_chroot'] = false + ##! Prometheus metrics for Pages docs: https://gitlab.com/gitlab-org/gitlab-pages/#enable-prometheus-metrics # gitlab_pages['metrics_address'] = ":9235" diff --git a/files/gitlab-cookbooks/gitlab/attributes/default.rb b/files/gitlab-cookbooks/gitlab/attributes/default.rb index ae015762caa7e52174adef0ca4edd62bf084b799..6ca05d64f003e2da662418e6f3b19836b075485b 100644 --- a/files/gitlab-cookbooks/gitlab/attributes/default.rb +++ b/files/gitlab-cookbooks/gitlab/attributes/default.rb @@ -579,6 +579,7 @@ default['gitlab']['gitlab-pages']['log_format'] = nil default['gitlab']['gitlab-pages']['artifacts_server'] = true default['gitlab']['gitlab-pages']['artifacts_server_url'] = nil default['gitlab']['gitlab-pages']['artifacts_server_timeout'] = 10 +default['gitlab']['gitlab-pages']['inplace_chroot'] = false #### # Nginx diff --git a/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb b/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb index 93f1313032ec274c25c85cfe4321eadd01b27ae3..b3705a6f25c1ca16a981f2e27c6ed8010a739782 100644 --- a/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb +++ b/files/gitlab-cookbooks/gitlab/templates/default/sv-gitlab-pages-run.erb @@ -31,6 +31,7 @@ exec /usr/bin/env SSL_CERT_FILE=/opt/gitlab/embedded/ssl/certs/cacert.pem \ <% end %> -daemon-uid="$(id -u "<%= node['gitlab']['user']['username'] %>")" \ -daemon-gid="$(id -g "<%= node['gitlab']['user']['username'] %>")" \ + -daemon-inplace-chroot=<%= node['gitlab']['gitlab-pages']['inplace_chroot'] %> \ \ -pages-domain="<%= node['gitlab']['gitlab-pages']['domain'] %>" \ -pages-root="<%= node['gitlab']['gitlab-pages']['pages_root'] %>" \ diff --git a/spec/chef/recipes/gitlab-pages_spec.rb b/spec/chef/recipes/gitlab-pages_spec.rb index b65e803083d371bab2e454d65d499659c8249dbe..dd94a826d2c66e600bd5b514243062263eb99a33 100644 --- a/spec/chef/recipes/gitlab-pages_spec.rb +++ b/spec/chef/recipes/gitlab-pages_spec.rb @@ -25,6 +25,7 @@ describe 'gitlab::gitlab-pages' do expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-use-http2=true}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server="https://gitlab.example.com/api/v4"}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server-timeout=10}) + expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-daemon-inplace-chroot=false}) expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-listen-http}) expect(chef_run).not_to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-listen-https}) @@ -54,6 +55,7 @@ describe 'gitlab::gitlab-pages' do artifacts_server_url: "https://gitlab.elsewhere.com/api/v5", artifacts_server_timeout: 60, status_uri: '/@status', + inplace_chroot: true, log_format: 'json' } ) @@ -77,6 +79,7 @@ describe 'gitlab::gitlab-pages' do expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server="https://gitlab.elsewhere.com/api/v5"}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-artifacts-server-timeout=60}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-pages-status="/@status"}) + expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-daemon-inplace-chroot=true}) expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-pages/run").with_content(%r{-log-format="json"}) end