Sha256: c47502624993db9febeb5be1e83b81e355d912b9c93c75eaffa526ac2e2391a6

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

module Gitlab
  module QA
    module Runtime
      module OmnibusConfigurations
        class DecompositionMultipleDb < Default
          def configuration
            # HACK: commenting commands out as these commands should be run *after* the first
            # reconfiguration (see first command in #exec_commands)
            <<~OMNIBUS
              #gitlab_rails['databases']['main']['enable'] = true
              #gitlab_rails['databases']['ci']['enable'] = true
              #gitlab_rails['databases']['ci']['db_database'] = 'gitlabhq_production_ci'
            OMNIBUS
          end

          def exec_commands
            [
              "sed -i 's/#gitlab_rails/gitlab_rails/g' /etc/gitlab/gitlab.rb",
              "gitlab-ctl reconfigure",
              "gitlab-psql -c 'create database gitlabhq_production_ci owner gitlab'",
              "gitlab-psql -d gitlabhq_production_ci -c 'create extension btree_gist'",
              "gitlab-psql -d gitlabhq_production_ci -c 'create extension pg_trgm'",
              "gitlab-rake db:structure:load:ci",
              "gitlab-ctl restart"
            ].freeze
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gitlab-qa-8.11.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.10.2 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.10.1 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.10.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.9.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.8.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.7.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.6.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.5.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.4.2 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.4.1 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.4.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.3.2 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.3.1 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.3.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.2.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.1.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-8.0.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-7.36.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
gitlab-qa-7.35.0 lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb