Class: Gitlab::QA::Component::GitalyCluster::GitalyClusterConfig
- Inherits:
-
Object
- Object
- Gitlab::QA::Component::GitalyCluster::GitalyClusterConfig
- Defined in:
- lib/gitlab/qa/component/gitaly_cluster.rb
Instance Attribute Summary collapse
-
#airgapped_network ⇒ Object
Returns the value of attribute airgapped_network.
-
#database_node_addr ⇒ Object
readonly
Returns the value of attribute database_node_addr.
-
#database_node_name ⇒ Object
Returns the value of attribute database_node_name.
-
#database_port ⇒ Object
Returns the value of attribute database_port.
-
#gitlab_name ⇒ Object
Returns the value of attribute gitlab_name.
-
#network ⇒ Object
Returns the value of attribute network.
-
#praefect_addr ⇒ Object
readonly
Returns the value of attribute praefect_addr.
-
#praefect_ip ⇒ Object
Returns the value of attribute praefect_ip.
-
#praefect_node_name ⇒ Object
Returns the value of attribute praefect_node_name.
-
#praefect_port ⇒ Object
Returns the value of attribute praefect_port.
-
#primary_node_addr ⇒ Object
readonly
Returns the value of attribute primary_node_addr.
-
#primary_node_name ⇒ Object
Returns the value of attribute primary_node_name.
-
#primary_node_port ⇒ Object
Returns the value of attribute primary_node_port.
-
#secondary_node_addr ⇒ Object
readonly
Returns the value of attribute secondary_node_addr.
-
#secondary_node_name ⇒ Object
Returns the value of attribute secondary_node_name.
-
#secondary_node_port ⇒ Object
Returns the value of attribute secondary_node_port.
-
#tertiary_node_addr ⇒ Object
readonly
Returns the value of attribute tertiary_node_addr.
-
#tertiary_node_name ⇒ Object
Returns the value of attribute tertiary_node_name.
-
#tertiary_node_port ⇒ Object
Returns the value of attribute tertiary_node_port.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ GitalyClusterConfig
constructor
rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity.
Constructor Details
#initialize(params = {}) ⇒ GitalyClusterConfig
rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
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 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 17 def initialize(params = {}) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity @gitlab_name = params[:gitlab_name] || 'gitlab-gitaly-cluster' @network = params[:network] || Runtime::Env.docker_network @airgapped_network = params[:airgapped_network] || false @praefect_node_name = params[:praefect_node_name] || 'praefect' @praefect_port = params[:praefect_port] || 2305 @primary_node_name = params[:primary_node_name] || 'gitaly1' @primary_node_port = params[:primary_node_port] || 8075 @secondary_node_name = params[:secondary_node_name] || 'gitaly2' @secondary_node_port = params[:secondary_node_port] || 8075 @tertiary_node_name = params[:tertiary_node_name] || 'gitaly3' @tertiary_node_port = params[:tertiary_node_port] || 8075 @database_node_name = params[:database_node_name] || 'postgres' @database_port = params[:database_port] || 5432 @praefect_addr = "#{praefect_node_name}.#{network}" @primary_node_addr = "#{primary_node_name}.#{network}" @secondary_node_addr = "#{secondary_node_name}.#{network}" @tertiary_node_addr = "#{tertiary_node_name}.#{network}" @database_node_addr = "#{database_node_name}.#{network}" end |
Instance Attribute Details
#airgapped_network ⇒ Object
Returns the value of attribute airgapped_network.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def airgapped_network @airgapped_network end |
#database_node_addr ⇒ Object (readonly)
Returns the value of attribute database_node_addr.
15 16 17 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 15 def database_node_addr @database_node_addr end |
#database_node_name ⇒ Object
Returns the value of attribute database_node_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def database_node_name @database_node_name end |
#database_port ⇒ Object
Returns the value of attribute database_port.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def database_port @database_port end |
#gitlab_name ⇒ Object
Returns the value of attribute gitlab_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def gitlab_name @gitlab_name end |
#network ⇒ Object
Returns the value of attribute network.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def network @network end |
#praefect_addr ⇒ Object (readonly)
Returns the value of attribute praefect_addr.
15 16 17 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 15 def praefect_addr @praefect_addr end |
#praefect_ip ⇒ Object
Returns the value of attribute praefect_ip.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def praefect_ip @praefect_ip end |
#praefect_node_name ⇒ Object
Returns the value of attribute praefect_node_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def praefect_node_name @praefect_node_name end |
#praefect_port ⇒ Object
Returns the value of attribute praefect_port.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def praefect_port @praefect_port end |
#primary_node_addr ⇒ Object (readonly)
Returns the value of attribute primary_node_addr.
15 16 17 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 15 def primary_node_addr @primary_node_addr end |
#primary_node_name ⇒ Object
Returns the value of attribute primary_node_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def primary_node_name @primary_node_name end |
#primary_node_port ⇒ Object
Returns the value of attribute primary_node_port.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def primary_node_port @primary_node_port end |
#secondary_node_addr ⇒ Object (readonly)
Returns the value of attribute secondary_node_addr.
15 16 17 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 15 def secondary_node_addr @secondary_node_addr end |
#secondary_node_name ⇒ Object
Returns the value of attribute secondary_node_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def secondary_node_name @secondary_node_name end |
#secondary_node_port ⇒ Object
Returns the value of attribute secondary_node_port.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def secondary_node_port @secondary_node_port end |
#tertiary_node_addr ⇒ Object (readonly)
Returns the value of attribute tertiary_node_addr.
15 16 17 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 15 def tertiary_node_addr @tertiary_node_addr end |
#tertiary_node_name ⇒ Object
Returns the value of attribute tertiary_node_name.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def tertiary_node_name @tertiary_node_name end |
#tertiary_node_port ⇒ Object
Returns the value of attribute tertiary_node_port.
8 9 10 |
# File 'lib/gitlab/qa/component/gitaly_cluster.rb', line 8 def tertiary_node_port @tertiary_node_port end |