Class: RubyAemAws::FullSetStack

Inherits:
Object
  • Object
show all
Includes:
MetricVerifier
Defined in:
lib/ruby_aem_aws/architecture/full_set_stack.rb

Overview

Factory for the full-set AEM stack component interfaces.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MetricVerifier

#alarm?, #component_alarm?, #component_ec2_metric?, #component_log_event?, #component_log_stream?, #component_loggroup?, #component_metric?, #log_event?, #log_stream?, #loggroup?, #metric?

Methods included from CloudwatchClient

#get_alarm, #get_log_event, #get_log_streams, #get_metrics

Constructor Details

#initialize(stack_prefix, params) ⇒ Object

  • AutoScalingClient: AWS AutoScalingGroup Client.

  • CloudFormationClient: AWS Cloudformation Client.

  • CloudWatchClient: AWS Cloudwatch Client.

  • CloudWatchLogsClient: AWS Cloudwatch Logs Client.

  • Ec2Resource: AWS EC2 Resource connection.

  • ElbClient: AWS ElasticLoadBalancer v2 Client.

Parameters:

  • stack_prefix

    AWS tag: StackPrefix

  • params

    Array of AWS Clients and Resource connections:



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
64
65
66
67
68
69
70
71
72
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 39

def initialize(stack_prefix, params)
  @author_aws_clients = {
    CloudWatchClient: params[:CloudWatchClient],
    CloudWatchLogsClient: params[:CloudWatchLogsClient],
    Ec2Resource: params[:Ec2Resource],
    ElbClient: params[:ElbClient]
  }

  @dispatcher_aws_clients = {
    AutoScalingClient: params[:AutoScalingClient],
    CloudWatchClient: params[:CloudWatchClient],
    CloudWatchLogsClient: params[:CloudWatchLogsClient],
    Ec2Resource: params[:Ec2Resource],
    ElbClient: params[:ElbClient]
  }

  @publish_aws_clients = {
    AutoScalingClient: params[:AutoScalingClient],
    CloudWatchClient: params[:CloudWatchClient],
    CloudWatchLogsClient: params[:CloudWatchLogsClient],
    Ec2Resource: params[:Ec2Resource]
  }

  @aem_java_aws_clients = {
    AutoScalingClient: params[:AutoScalingClient],
    CloudWatchClient: params[:CloudWatchClient],
    CloudWatchLogsClient: params[:CloudWatchLogsClient],
    Ec2Resource: params[:Ec2Resource]
  }

  @cloudformation_client = params[:CloudFormationClient]
  @cloud_watch_client = params[:CloudWatchClient]
  @stack_prefix = stack_prefix
end

Instance Attribute Details

#cloud_watch_clientObject (readonly)

Returns the value of attribute cloud_watch_client.



26
27
28
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 26

def cloud_watch_client
  @cloud_watch_client
end

#cloudformation_clientObject (readonly)

Returns the value of attribute cloudformation_client.



26
27
28
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 26

def cloudformation_client
  @cloudformation_client
end

Instance Method Details

#authorObject

Returns new RubyAemAws::Component::Author instance.

Returns:

  • new RubyAemAws::Component::Author instance



80
81
82
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 80

def author
  RubyAemAws::Component::Author.new(@stack_prefix, @author_aws_clients)
end

#author_dispatcherObject

Returns new RubyAemAws::Component::AuthorDispatcher instance.

Returns:

  • new RubyAemAws::Component::AuthorDispatcher instance



75
76
77
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 75

def author_dispatcher
  RubyAemAws::Component::AuthorDispatcher.new(@stack_prefix, @dispatcher_aws_clients)
end

#chaos_monkeyObject

Returns new RubyAemAws::Component::ChaosMonkey instance.

Returns:

  • new RubyAemAws::Component::ChaosMonkey instance



85
86
87
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 85

def chaos_monkey
  RubyAemAws::Component::ChaosMonkey.new(@stack_prefix, @aem_java_aws_clients)
end

#orchestratorObject

Returns new RubyAemAws::Component::Orchestrator instance.

Returns:

  • new RubyAemAws::Component::Orchestrator instance



90
91
92
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 90

def orchestrator
  RubyAemAws::Component::Orchestrator.new(@stack_prefix, @aem_java_aws_clients)
end

#publishObject

Returns new RubyAemAws::Component::Publish instance.

Returns:

  • new RubyAemAws::Component::Publish instance



95
96
97
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 95

def publish
  RubyAemAws::Component::Publish.new(@stack_prefix, @publish_aws_clients)
end

#publish_dispatcherObject

Returns new RubyAemAws::Component::PublishDispatcher instance.

Returns:

  • new RubyAemAws::Component::PublishDispatcher instance



100
101
102
# File 'lib/ruby_aem_aws/architecture/full_set_stack.rb', line 100

def publish_dispatcher
  RubyAemAws::Component::PublishDispatcher.new(@stack_prefix, @dispatcher_aws_clients)
end