ruby_aem_aws 2.4.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 563e45dbba5908af4bccb5a279edf930df123c4c
|
4
|
+
data.tar.gz: 813c38abbd83d7c02064e2a889579d211f8f272b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 918bd9a4f5e3c19020363fdf6671cf6da669a38cd9cc40945d8af73d0dcc5555e56ac84fc0a53fad9761303e4f0b8d217a476ccd35d33f1c93f65246c5a0ecc1
|
7
|
+
data.tar.gz: 0465f367501ebff030c27998e7f289de114d05c202378e483c39c74343482712ba0e712b761727f1152ebc751b3f7fb93e9a206d1319488c705640c7334b7e3b
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version:
|
1
|
+
version: 3.0.0
|
@@ -18,6 +18,8 @@ require_relative '../component/chaos_monkey'
|
|
18
18
|
require_relative '../component/orchestrator'
|
19
19
|
require_relative '../component/publish_dispatcher'
|
20
20
|
require_relative '../component/publish'
|
21
|
+
require_relative '../component/preview_publish_dispatcher'
|
22
|
+
require_relative '../component/preview_publish'
|
21
23
|
require_relative '../mixins/metric_verifier'
|
22
24
|
|
23
25
|
module RubyAemAws
|
@@ -96,9 +98,19 @@ module RubyAemAws
|
|
96
98
|
RubyAemAws::Component::Publish.new(@stack_prefix, @publish_aws_clients)
|
97
99
|
end
|
98
100
|
|
101
|
+
# @return new RubyAemAws::Component::PreviewPublish instance
|
102
|
+
def preview_publish
|
103
|
+
RubyAemAws::Component::PreviewPublish.new(@stack_prefix, @publish_aws_clients)
|
104
|
+
end
|
105
|
+
|
99
106
|
# @return new RubyAemAws::Component::PublishDispatcher instance
|
100
107
|
def publish_dispatcher
|
101
108
|
RubyAemAws::Component::PublishDispatcher.new(@stack_prefix, @dispatcher_aws_clients)
|
102
109
|
end
|
110
|
+
|
111
|
+
# @return new RubyAemAws::Component::PreviewPublishDispatcher instance
|
112
|
+
def preview_publish_dispatcher
|
113
|
+
RubyAemAws::Component::PreviewPublishDispatcher.new(@stack_prefix, @dispatcher_aws_clients)
|
114
|
+
end
|
103
115
|
end
|
104
116
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Copyright 2018-2021 Shine Solutions Group
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require_relative '../abstract/grouped_component'
|
16
|
+
require_relative '../abstract/snapshot'
|
17
|
+
require_relative '../constants'
|
18
|
+
require_relative '../mixins/healthy_resource_verifier'
|
19
|
+
require_relative '../mixins/metric_verifier'
|
20
|
+
require_relative '../mixins/snapshot_verifier'
|
21
|
+
|
22
|
+
module RubyAemAws
|
23
|
+
module Component
|
24
|
+
# Interface to the AWS instance running the Preview Publish component of a full-set AEM stack.
|
25
|
+
class PreviewPublish
|
26
|
+
attr_reader :descriptor, :ec2_resource, :cloud_watch_client, :asg_client, :cloud_watch_log_client
|
27
|
+
|
28
|
+
include AbstractGroupedComponent
|
29
|
+
include AbstractSnapshot
|
30
|
+
include HealthyResourceVerifier
|
31
|
+
include MetricVerifier
|
32
|
+
include SnapshotVerifier
|
33
|
+
|
34
|
+
EC2_COMPONENT = 'preview-publish'.freeze
|
35
|
+
EC2_NAME = 'AEM Preview Publish'.freeze
|
36
|
+
|
37
|
+
# @param stack_prefix AWS tag: StackPrefix
|
38
|
+
# @param params Array of AWS Clients and Resource connections:
|
39
|
+
# - AutoScalingClient: AWS AutoScalingGroup Client.
|
40
|
+
# - CloudWatchClient: AWS Cloudwatch Client.
|
41
|
+
# - CloudWatchLogsClient: AWS Cloudwatch Logs Client.
|
42
|
+
# - Ec2Resource: AWS EC2 Resource connection.
|
43
|
+
# @return new RubyAemAws::FullSet::PreviewPublish
|
44
|
+
def initialize(stack_prefix, params)
|
45
|
+
@descriptor = ComponentDescriptor.new(stack_prefix,
|
46
|
+
EC2Descriptor.new(EC2_COMPONENT, EC2_NAME))
|
47
|
+
@asg_client = params[:AutoScalingClient]
|
48
|
+
@cloud_watch_client = params[:CloudWatchClient]
|
49
|
+
@cloud_watch_log_client = params[:CloudWatchLogsClient]
|
50
|
+
@ec2_resource = params[:Ec2Resource]
|
51
|
+
end
|
52
|
+
|
53
|
+
def terminate_all_instances
|
54
|
+
get_all_instances.each do |i|
|
55
|
+
next if i.nil? || i.state.code != Constants::INSTANCE_STATE_CODE_RUNNING
|
56
|
+
|
57
|
+
i.terminate
|
58
|
+
i.wait_until_terminated
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def terminate_random_instance
|
63
|
+
instance = get_random_instance
|
64
|
+
instance.terminate
|
65
|
+
instance.wait_until_terminated
|
66
|
+
end
|
67
|
+
|
68
|
+
def get_tags
|
69
|
+
tags = []
|
70
|
+
get_all_instances.each do |i|
|
71
|
+
next if i.nil? || i.state.code != Constants::INSTANCE_STATE_CODE_RUNNING
|
72
|
+
|
73
|
+
tags.push(i.tags)
|
74
|
+
end
|
75
|
+
tags
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Copyright 2018-2021 Shine Solutions Group
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require_relative '../abstract/grouped_component'
|
16
|
+
require_relative '../abstract/snapshot'
|
17
|
+
require_relative '../constants'
|
18
|
+
require_relative '../mixins/healthy_resource_verifier'
|
19
|
+
require_relative '../mixins/metric_verifier'
|
20
|
+
require_relative '../mixins/snapshot_verifier'
|
21
|
+
|
22
|
+
module RubyAemAws
|
23
|
+
module Component
|
24
|
+
# Interface to the AWS instance running the Preview PublishDispatcher component of a full-set AEM stack.
|
25
|
+
class PreviewPublishDispatcher
|
26
|
+
attr_reader :descriptor, :ec2_resource, :asg_client, :elb_client, :cloud_watch_client, :cloud_watch_log_client
|
27
|
+
|
28
|
+
include AbstractGroupedComponent
|
29
|
+
include AbstractSnapshot
|
30
|
+
include HealthyResourceVerifier
|
31
|
+
include MetricVerifier
|
32
|
+
include SnapshotVerifier
|
33
|
+
|
34
|
+
EC2_COMPONENT = 'preview-publish-dispatcher'.freeze
|
35
|
+
EC2_NAME = 'AEM Preview Publish Dispatcher'.freeze
|
36
|
+
ELB_ID = 'PreviewPublishDispatcherLoadBalancer'.freeze
|
37
|
+
ELB_NAME = 'AEM Preview Publish Dispatcher Load Balancer'.freeze
|
38
|
+
|
39
|
+
# @param stack_prefix AWS tag: StackPrefix
|
40
|
+
# @param params Array of AWS Clients and Resource connections:
|
41
|
+
# - AutoScalingClient: AWS AutoScalingGroup Client.
|
42
|
+
# - CloudWatchClient: AWS Cloudwatch Client.
|
43
|
+
# - CloudWatchLogsClient: AWS Cloudwatch Logs Client.
|
44
|
+
# - Ec2Resource: AWS EC2 Resource connection.
|
45
|
+
# - ElbClient: AWS ElasticLoadBalancer v2 Client.
|
46
|
+
# @return new RubyAemAws::FullSet::PreviewPublishDispatcher
|
47
|
+
def initialize(stack_prefix, params)
|
48
|
+
@descriptor = ComponentDescriptor.new(stack_prefix,
|
49
|
+
EC2Descriptor.new(EC2_COMPONENT, EC2_NAME),
|
50
|
+
ELBDescriptor.new(ELB_ID, ELB_NAME))
|
51
|
+
@asg_client = params[:AutoScalingClient]
|
52
|
+
@cloud_watch_client = params[:CloudWatchClient]
|
53
|
+
@cloud_watch_log_client = params[:CloudWatchLogsClient]
|
54
|
+
@ec2_resource = params[:Ec2Resource]
|
55
|
+
@elb_client = params[:ElbClient]
|
56
|
+
end
|
57
|
+
|
58
|
+
def terminate_all_instances
|
59
|
+
get_all_instances.each do |i|
|
60
|
+
next if i.nil? || i.state.code != Constants::INSTANCE_STATE_CODE_RUNNING
|
61
|
+
|
62
|
+
i.terminate
|
63
|
+
i.wait_until_terminated
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def terminate_random_instance
|
68
|
+
instance = get_random_instance
|
69
|
+
instance.terminate
|
70
|
+
instance.wait_until_terminated
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_tags
|
74
|
+
tags = []
|
75
|
+
get_all_instances.each do |i|
|
76
|
+
next if i.nil? || i.state.code != Constants::INSTANCE_STATE_CODE_RUNNING
|
77
|
+
|
78
|
+
tags.push(i.tags)
|
79
|
+
end
|
80
|
+
tags
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -40,7 +40,7 @@ module RubyAemAws
|
|
40
40
|
# - CloudWatchClient: AWS Cloudwatch Client.
|
41
41
|
# - CloudWatchLogsClient: AWS Cloudwatch Logs Client.
|
42
42
|
# - Ec2Resource: AWS EC2 Resource connection.
|
43
|
-
# @return new RubyAemAws::FullSet::
|
43
|
+
# @return new RubyAemAws::FullSet::Publish
|
44
44
|
def initialize(stack_prefix, params)
|
45
45
|
@descriptor = ComponentDescriptor.new(stack_prefix,
|
46
46
|
EC2Descriptor.new(EC2_COMPONENT, EC2_NAME))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-autoscaling
|
@@ -223,6 +223,8 @@ files:
|
|
223
223
|
- lib/ruby_aem_aws/component/chaos_monkey.rb
|
224
224
|
- lib/ruby_aem_aws/component/component_descriptor.rb
|
225
225
|
- lib/ruby_aem_aws/component/orchestrator.rb
|
226
|
+
- lib/ruby_aem_aws/component/preview_publish.rb
|
227
|
+
- lib/ruby_aem_aws/component/preview_publish_dispatcher.rb
|
226
228
|
- lib/ruby_aem_aws/component/publish.rb
|
227
229
|
- lib/ruby_aem_aws/component/publish_dispatcher.rb
|
228
230
|
- lib/ruby_aem_aws/component/stack_manager_resources.rb
|