Class: Gitlab::QA::Scenario::Test::Integration::Praefect

Inherits:
GitalyCluster show all
Defined in:
lib/gitlab/qa/scenario/test/integration/praefect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GitalyCluster

#perform

Methods inherited from Gitlab::QA::Scenario::Template

perform, #perform

Constructor Details

#initializePraefect

Returns a new instance of Praefect.



9
10
11
12
13
14
# File 'lib/gitlab/qa/scenario/test/integration/praefect.rb', line 9

def initialize
  super

  @tag = nil
  @env = { QA_PRAEFECT_REPOSITORY_STORAGE: 'default' }
end

Instance Attribute Details

#gitlab_nameObject (readonly)

Returns the value of attribute gitlab_name.



7
8
9
# File 'lib/gitlab/qa/scenario/test/integration/praefect.rb', line 7

def gitlab_name
  @gitlab_name
end

#spec_suiteObject (readonly)

Returns the value of attribute spec_suite.



7
8
9
# File 'lib/gitlab/qa/scenario/test/integration/praefect.rb', line 7

def spec_suite
  @spec_suite
end

Instance Method Details

#gitlab_omnibus_configurationObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/gitlab/qa/scenario/test/integration/praefect.rb', line 16

def gitlab_omnibus_configuration
  <<~OMNIBUS
    external_url 'http://#{@gitlab_name}.#{@network}';

    git_data_dirs({
      'default' => {
        'gitaly_address' => 'tcp://#{@praefect_node_name}.#{@network}:2305',
        'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
      },
      'gitaly' => {
        'gitaly_address' => 'tcp://#{@gitlab_name}.#{@network}:8075',
        'path' => '/var/opt/gitlab/git-data'
      }
    });
    gitaly['listen_addr'] = '0.0.0.0:8075';
    gitaly['auth_token'] = 'secret-token';
    gitaly['storage'] = [
      {
        'name' => 'gitaly',
        'path' => '/var/opt/gitlab/git-data/repositories'
      }
    ];
    gitlab_rails['gitaly_token'] = 'secret-token';
    gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
    prometheus['scrape_configs'] = [
      {
        'job_name' => 'praefect',
        'static_configs' => [
          'targets' => [
            '#{@praefect_node_name}.#{@network}:9652'
          ]
        ]
      },
      {
        'job_name' => 'praefect-gitaly',
        'static_configs' => [
          'targets' => [
            '#{@primary_node_name}.#{@network}:9236',
            '#{@secondary_node_name}.#{@network}:9236',
            '#{@tertiary_node_name}.#{@network}:9236'
          ]
        ]
      }
    ];
    grafana['disable_login_form'] = false;
    grafana['admin_password'] = 'GRAFANA_ADMIN_PASSWORD';
  OMNIBUS
end