diff --git a/files/gitlab-cookbooks/gitlab/recipes/default.rb b/files/gitlab-cookbooks/gitlab/recipes/default.rb index 878a333f4b9c204dc518317dba8f7ac1388e2cc8_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvcmVjaXBlcy9kZWZhdWx0LnJi..04a88759d9c54ffe1ff56f261ee7a5da28e6a24f_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRsYWIvcmVjaXBlcy9kZWZhdWx0LnJi 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/default.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/default.rb @@ -122,5 +122,6 @@ # Postgresql depends on Redis because of `rake db:seed_fu` # Gitaly and/or Praefect must be available before migrations %w( + logrotate redis gitaly @@ -125,3 +126,4 @@ redis gitaly + postgresql praefect @@ -127,5 +129,4 @@ praefect - postgresql gitlab-kas ).each do |service| if node[service]['enable'] @@ -137,12 +138,6 @@ include_recipe "gitlab::database_migrations" if node['gitlab']['gitlab-rails']['enable'] && !(node.key?('pgbouncer') && node['pgbouncer']['enable']) -include_recipe "praefect::database_migrations" if node['praefect']['enable'] && node['praefect']['auto_migrate'] - -# Always create logrotate folders and configs, even if the service is not enabled. -# https://gitlab.com/gitlab-org/omnibus-gitlab/issues/508 -include_recipe "logrotate::folders_and_configs" - # Configure Services %w[ unicorn @@ -170,8 +165,7 @@ end %w( - logrotate gitlab-pages registry mattermost gitlab-kas @@ -174,7 +168,8 @@ gitlab-pages registry mattermost gitlab-kas + letsencrypt ).each do |service| if node[service]["enable"] include_recipe "#{service}::enable" @@ -188,12 +183,6 @@ # Recipe which handles all prometheus related services include_recipe "monitoring" -if node['letsencrypt']['enable'] - include_recipe 'letsencrypt::enable' -else - include_recipe 'letsencrypt::disable' -end - if node['gitlab']['gitlab-rails']['database_reindexing']['enable'] include_recipe 'gitlab::database_reindexing_enable' else diff --git a/files/gitlab-cookbooks/logrotate/recipes/disable.rb b/files/gitlab-cookbooks/logrotate/recipes/disable.rb index 878a333f4b9c204dc518317dba8f7ac1388e2cc8_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9sb2dyb3RhdGUvcmVjaXBlcy9kaXNhYmxlLnJi..04a88759d9c54ffe1ff56f261ee7a5da28e6a24f_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9sb2dyb3RhdGUvcmVjaXBlcy9kaXNhYmxlLnJi 100644 --- a/files/gitlab-cookbooks/logrotate/recipes/disable.rb +++ b/files/gitlab-cookbooks/logrotate/recipes/disable.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +include_recipe "logrotate::folders_and_configs" runit_service "logrotate" do action :disable diff --git a/files/gitlab-cookbooks/logrotate/recipes/enable.rb b/files/gitlab-cookbooks/logrotate/recipes/enable.rb index 878a333f4b9c204dc518317dba8f7ac1388e2cc8_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9sb2dyb3RhdGUvcmVjaXBlcy9lbmFibGUucmI=..04a88759d9c54ffe1ff56f261ee7a5da28e6a24f_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9sb2dyb3RhdGUvcmVjaXBlcy9lbmFibGUucmI= 100644 --- a/files/gitlab-cookbooks/logrotate/recipes/enable.rb +++ b/files/gitlab-cookbooks/logrotate/recipes/enable.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +include_recipe "logrotate::folders_and_configs" runit_service "logrotate" do start_down node['logrotate']['ha'] diff --git a/files/gitlab-cookbooks/praefect/recipes/enable.rb b/files/gitlab-cookbooks/praefect/recipes/enable.rb index 878a333f4b9c204dc518317dba8f7ac1388e2cc8_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9yZWNpcGVzL2VuYWJsZS5yYg==..04a88759d9c54ffe1ff56f261ee7a5da28e6a24f_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9yZWNpcGVzL2VuYWJsZS5yYg== 100644 --- a/files/gitlab-cookbooks/praefect/recipes/enable.rb +++ b/files/gitlab-cookbooks/praefect/recipes/enable.rb @@ -92,3 +92,5 @@ socket_address node['praefect']['prometheus_listen_addr'] reload_service false unless node['consul']['enable'] end + +include_recipe "praefect::database_migrations" if node['praefect']['auto_migrate']