class RubyAemAws::Component::Author

Interface to the AWS instances running the Author components of a full-set AEM stack.

Constants

ELB_ID
ELB_NAME

Attributes

author_primary[R]
author_standby[R]

Public Class Methods

new(stack_prefix, params) click to toggle source

@param stack_prefix AWS tag: StackPrefix @param params Array of AWS Clients and Resource connections:

  • CloudWatchClient: AWS Cloudwatch Client.

  • CloudWatchLogsClient: AWS Cloudwatch Logs Client.

  • Ec2Resource: AWS EC2 Resource connection.

  • ElbClient: AWS ElasticLoadBalancer Client.

@return new RubyAemAws::FullSet::Author

# File lib/ruby_aem_aws/component/author.rb, line 34
def initialize(stack_prefix, params)
  author_aws_clients = {
    CloudWatchClient: params[:CloudWatchClient],
    CloudWatchLogsClient: params[:CloudWatchLogsClient],
    Ec2Resource: params[:Ec2Resource]
  }

  @author_primary = Component::AuthorPrimary.new(stack_prefix, author_aws_clients)
  @author_standby = Component::AuthorStandby.new(stack_prefix, author_aws_clients)
  @ec2_resource = params[:Ec2Resource]
  @elb_client = params[:ElbClient]
end

Public Instance Methods

get_tags() click to toggle source
# File lib/ruby_aem_aws/component/author.rb, line 63
def get_tags
  tags = []
  tags.push(author_primary.get_tags)
  tags.push(author_standby.get_tags)
  tags
end
healthy?() click to toggle source

@return true, if all author instances are healthy

# File lib/ruby_aem_aws/component/author.rb, line 48
def healthy?
  instance = 0
  instance += 1 if author_primary.healthy?
  instance += 1 if author_standby.healthy?
  return true unless instance < 2
end
wait_until_healthy() click to toggle source

@return true, if all author instances are healthy

# File lib/ruby_aem_aws/component/author.rb, line 56
def wait_until_healthy
  instance = 0
  instance += 1 if author_primary.wait_until_healthy.eql? true
  instance += 1 if author_standby.wait_until_healthy.eql? true
  return true unless instance < 2
end