ruby_aem_aws 2.2.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conf/gem.yaml +1 -1
- data/lib/ruby_aem_aws/abstract/grouped_component.rb +0 -1
- data/lib/ruby_aem_aws/abstract/single_component.rb +0 -1
- data/lib/ruby_aem_aws/abstract/snapshot.rb +0 -1
- data/lib/ruby_aem_aws/architecture/full_set_stack.rb +1 -0
- data/lib/ruby_aem_aws/architecture/stack_manager.rb +1 -0
- data/lib/ruby_aem_aws/client/cloudwatch.rb +15 -4
- data/lib/ruby_aem_aws/component/author_dispatcher.rb +1 -0
- data/lib/ruby_aem_aws/component/author_primary.rb +1 -0
- data/lib/ruby_aem_aws/component/author_publish_dispatcher.rb +1 -0
- data/lib/ruby_aem_aws/component/author_standby.rb +1 -0
- data/lib/ruby_aem_aws/component/chaos_monkey.rb +1 -0
- data/lib/ruby_aem_aws/component/orchestrator.rb +1 -0
- data/lib/ruby_aem_aws/component/publish.rb +1 -0
- data/lib/ruby_aem_aws/component/publish_dispatcher.rb +1 -0
- data/lib/ruby_aem_aws/component/stack_manager_resources.rb +1 -0
- data/lib/ruby_aem_aws/constants.rb +4 -4
- data/lib/ruby_aem_aws.rb +9 -0
- metadata +121 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95cd5259db49091f98e9697a3af15805c17e41a2
|
4
|
+
data.tar.gz: d4900116bedbdd096c20d3a7f2bacaaa35a9d31c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c2e3351dceefc15ff96a2b3d5e8b9caa4629ac771e2d381e63d6ca27cff1ebd59f0d8c9331eed4388711af205e83a38bdb7a8069e8f2e44fe60e1cc3fe8ffd6
|
7
|
+
data.tar.gz: 8600e31f276230b59f5f5edb9614909b15d7d54444bddb77486515c802d13db688cf2010860486b0650001de0ff04beaeb771c8b26f3021a8a0bfb0010215275
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version: 2.
|
1
|
+
version: 2.3.1
|
@@ -18,6 +18,7 @@ module RubyAemAws
|
|
18
18
|
# Interface to interact with AEM StackManager
|
19
19
|
class StackManager
|
20
20
|
attr_reader :sm_resources, :cloudformation_client
|
21
|
+
|
21
22
|
# @param stack_prefix AWS tag: StackPrefix
|
22
23
|
# @param params Array of AWS Clients and Resource connections:
|
23
24
|
# - CloudFormationClient: AWS Cloudformation Client.
|
@@ -36,13 +36,24 @@ module RubyAemAws
|
|
36
36
|
# @param log_message Log message to filter for
|
37
37
|
# @return Cloudwatch log client filter_log_events response
|
38
38
|
def get_log_event(loggroup_name, log_stream_name, log_message)
|
39
|
+
# Initialise response as an empty response having no events and no next token
|
40
|
+
# This is needed to handle the scenario when initial filter log events returns
|
41
|
+
# a response with nil next token, ensuring the clients of this method to
|
42
|
+
# be able to identify any empty response events.
|
43
|
+
response = { events: [], next_token: nil }
|
44
|
+
|
39
45
|
filter = filter_for_cloudwatch_log_event(loggroup_name, log_stream_name, log_message)
|
40
|
-
|
46
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
41
47
|
|
42
|
-
|
43
|
-
|
48
|
+
# Since late 2021 (circa aws-sdk-cloudwatchlog 1.45.0), the last response
|
49
|
+
# is always empty (empty response events and nil next token).
|
50
|
+
# Previous to late 2021, the last response used to contain the filtered events
|
51
|
+
# with nil next token.
|
52
|
+
until curr_response.next_token.nil?
|
53
|
+
next_token = { next_token: curr_response.next_token }
|
44
54
|
filter.update(next_token)
|
45
|
-
response =
|
55
|
+
response = curr_response
|
56
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
46
57
|
end
|
47
58
|
|
48
59
|
response
|
@@ -25,6 +25,7 @@ module RubyAemAws
|
|
25
25
|
# Interface to the AWS instances playing and supporting the AuthorDispatcher role in a full-set AEM stack.
|
26
26
|
class AuthorDispatcher
|
27
27
|
attr_reader :descriptor, :ec2_resource, :asg_client, :elb_client, :cloud_watch_client, :cloud_watch_log_client
|
28
|
+
|
28
29
|
include AbstractGroupedComponent
|
29
30
|
include AbstractSnapshot
|
30
31
|
include HealthyResourceVerifier
|
@@ -23,6 +23,7 @@ module RubyAemAws
|
|
23
23
|
# Interface to the AWS instance running the Author-Primary component of a full-set AEM stack.
|
24
24
|
class AuthorPrimary
|
25
25
|
attr_reader :descriptor, :ec2_resource, :cloud_watch_client, :cloud_watch_log_client
|
26
|
+
|
26
27
|
include AbstractSingleComponent
|
27
28
|
include AbstractSnapshot
|
28
29
|
include HealthyStateVerifier
|
@@ -24,6 +24,7 @@ module RubyAemAws
|
|
24
24
|
# Interface to a single AWS instance running all three AEM components as a consolidated stack.
|
25
25
|
class AuthorPublishDispatcher
|
26
26
|
attr_reader :descriptor, :ec2_resource, :cloud_watch_client, :cloud_watch_log_client
|
27
|
+
|
27
28
|
include AbstractSingleComponent
|
28
29
|
include AbstractSnapshot
|
29
30
|
include HealthyStateVerifier
|
@@ -23,6 +23,7 @@ module RubyAemAws
|
|
23
23
|
# Interface to the AWS instance running the Author-Standby component of a full-set AEM stack.
|
24
24
|
class AuthorStandby
|
25
25
|
attr_reader :descriptor, :ec2_resource, :cloud_watch_client, :cloud_watch_log_client
|
26
|
+
|
26
27
|
include AbstractSingleComponent
|
27
28
|
include AbstractSnapshot
|
28
29
|
include HealthyStateVerifier
|
@@ -24,6 +24,7 @@ module RubyAemAws
|
|
24
24
|
# Interface to the AWS instance running the ChaosMonkey component of a full-set AEM stack.
|
25
25
|
class ChaosMonkey
|
26
26
|
attr_reader :descriptor, :ec2_resource, :asg_client, :cloud_watch_client, :cloud_watch_log_client
|
27
|
+
|
27
28
|
include AbstractGroupedComponent
|
28
29
|
include AbstractSnapshot
|
29
30
|
include HealthyResourceVerifier
|
@@ -24,6 +24,7 @@ module RubyAemAws
|
|
24
24
|
# Interface to the AWS instance running the Orchestrator component of a full-set AEM stack.
|
25
25
|
class Orchestrator
|
26
26
|
attr_reader :descriptor, :ec2_resource, :asg_client, :cloud_watch_client, :cloud_watch_log_client
|
27
|
+
|
27
28
|
include AbstractGroupedComponent
|
28
29
|
include AbstractSnapshot
|
29
30
|
include HealthyResourceVerifier
|
@@ -24,6 +24,7 @@ module RubyAemAws
|
|
24
24
|
# Interface to the AWS instance running the Publish component of a full-set AEM stack.
|
25
25
|
class Publish
|
26
26
|
attr_reader :descriptor, :ec2_resource, :cloud_watch_client, :asg_client, :cloud_watch_log_client
|
27
|
+
|
27
28
|
include AbstractGroupedComponent
|
28
29
|
include AbstractSnapshot
|
29
30
|
include HealthyResourceVerifier
|
@@ -24,6 +24,7 @@ module RubyAemAws
|
|
24
24
|
# Interface to the AWS instance running the PublishDispatcher component of a full-set AEM stack.
|
25
25
|
class PublishDispatcher
|
26
26
|
attr_reader :descriptor, :ec2_resource, :asg_client, :elb_client, :cloud_watch_client, :cloud_watch_log_client
|
27
|
+
|
27
28
|
include AbstractGroupedComponent
|
28
29
|
include AbstractSnapshot
|
29
30
|
include HealthyResourceVerifier
|
@@ -23,6 +23,7 @@ module RubyAemAws
|
|
23
23
|
# Interface to the AWS StackManager to send out commands
|
24
24
|
class StackManagerResources
|
25
25
|
attr_reader :dynamodb_client, :s3_client, :s3_resource, :cloud_watch_client, :cloud_watch_log_client
|
26
|
+
|
26
27
|
include AbstractStackManager
|
27
28
|
include DynamoDB
|
28
29
|
include MetricVerifier
|
@@ -47,10 +47,10 @@ module RubyAemAws
|
|
47
47
|
|
48
48
|
class Constants
|
49
49
|
REGION_DEFAULT = ENV['AWS_DEFAULT_REGION'] || ENV['aws_default_region'] || ENV['AWS_REGION'] || ENV['aws_region'] || 'ap-southeast-2'.freeze
|
50
|
-
ACCESS_KEY_ID = ENV['AWS_ACCESS_KEY_ID'] || ENV
|
51
|
-
SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] || ENV
|
52
|
-
SESSION_TOKEN = ENV['AWS_SESSION_TOKEN'] || ENV
|
53
|
-
PROFILE = ENV['AWS_PROFILE'] || ENV
|
50
|
+
ACCESS_KEY_ID = ENV['AWS_ACCESS_KEY_ID'] || ENV.fetch('aws_access_key_id', nil)
|
51
|
+
SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] || ENV.fetch('aws_secret_access_key', nil)
|
52
|
+
SESSION_TOKEN = ENV['AWS_SESSION_TOKEN'] || ENV.fetch('aws_session_token', nil)
|
53
|
+
PROFILE = ENV['AWS_PROFILE'] || ENV.fetch('aws_profile', nil)
|
54
54
|
INSTANCE_STATE_HEALTHY = RubyAemAws::InstanceState::RUNNING.freeze
|
55
55
|
INSTANCE_STATE_CODE_RUNNING = RubyAemAws::InstanceStateCode::RUNNING
|
56
56
|
ELB_INSTANCE_INSERVICE = RubyAemAws::ELBInstanceState::HEALTHY.freeze
|
data/lib/ruby_aem_aws.rb
CHANGED
@@ -12,6 +12,15 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
+
require 'aws-sdk-autoscaling'
|
16
|
+
require 'aws-sdk-cloudformation'
|
17
|
+
require 'aws-sdk-cloudwatch'
|
18
|
+
require 'aws-sdk-cloudwatchlogs'
|
19
|
+
require 'aws-sdk-dynamodb'
|
20
|
+
require 'aws-sdk-ec2'
|
21
|
+
require 'aws-sdk-elasticloadbalancingv2'
|
22
|
+
require 'aws-sdk-sns'
|
23
|
+
require 'aws-sdk-s3'
|
15
24
|
require_relative 'ruby_aem_aws/architecture/consolidated_stack'
|
16
25
|
require_relative 'ruby_aem_aws/architecture/full_set_stack'
|
17
26
|
require_relative 'ruby_aem_aws/architecture/stack_manager'
|
metadata
CHANGED
@@ -1,29 +1,141 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws-sdk
|
14
|
+
name: aws-sdk-autoscaling
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.80.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.80.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-sdk-cloudformation
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.70.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.70.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aws-sdk-cloudwatch
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.67.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.67.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: aws-sdk-cloudwatchlogs
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.53.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.53.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: aws-sdk-dynamodb
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.76.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.76.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: aws-sdk-ec2
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.331.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.331.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: aws-sdk-elasticloadbalancingv2
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.79.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.79.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: aws-sdk-sns
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.55.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.55.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: aws-sdk-s3
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 1.114.0
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.114.0
|
27
139
|
- !ruby/object:Gem::Dependency
|
28
140
|
name: retries
|
29
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,28 +170,28 @@ dependencies:
|
|
58
170
|
requirements:
|
59
171
|
- - '='
|
60
172
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.
|
173
|
+
version: 3.11.0
|
62
174
|
type: :development
|
63
175
|
prerelease: false
|
64
176
|
version_requirements: !ruby/object:Gem::Requirement
|
65
177
|
requirements:
|
66
178
|
- - '='
|
67
179
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.
|
180
|
+
version: 3.11.0
|
69
181
|
- !ruby/object:Gem::Dependency
|
70
182
|
name: yard
|
71
183
|
requirement: !ruby/object:Gem::Requirement
|
72
184
|
requirements:
|
73
185
|
- - '='
|
74
186
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.9.
|
187
|
+
version: 0.9.28
|
76
188
|
type: :development
|
77
189
|
prerelease: false
|
78
190
|
version_requirements: !ruby/object:Gem::Requirement
|
79
191
|
requirements:
|
80
192
|
- - '='
|
81
193
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.9.
|
194
|
+
version: 0.9.28
|
83
195
|
description: ruby_aem_aws is a Ruby client for Shine Solutions Adobe Experience Manager
|
84
196
|
(AEM) Platform on AWS
|
85
197
|
email:
|