ruby_aem_aws 1.2.0 → 1.2.1
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 +4 -4
- data/conf/gem.yaml +1 -0
- data/lib/ruby_aem_aws/abstract/single_component.rb +1 -0
- data/lib/ruby_aem_aws/component/author_dispatcher.rb +1 -0
- data/lib/ruby_aem_aws/component/chaos_monkey.rb +1 -0
- data/lib/ruby_aem_aws/component/component_descriptor.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/mixins/healthy_count_verifier.rb +6 -0
- data/lib/ruby_aem_aws/mixins/healthy_resource_verifier.rb +6 -0
- data/lib/ruby_aem_aws/mixins/healthy_state_verifier.rb +2 -0
- data/lib/ruby_aem_aws/mixins/instance_describer.rb +1 -0
- data/lib/ruby_aem_aws/mixins/metric_verifier.rb +3 -0
- data/lib/ruby_aem_aws/mixins/snapshot_verifier.rb +1 -0
- data/lib/ruby_aem_aws.rb +1 -0
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd436fe17bd51d60012cbfaa8592047980b932fb
|
4
|
+
data.tar.gz: 902bdd3b55edf1250ce74469e8b6ecd51d73a0e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943a0d8c0c3c8806e4710f7bb06205e16a04a5e09000704e19530131af0f748224d8afdb5651168531df732090ebff6c3e03d328950ac1dab9eb958f9fb30cdf
|
7
|
+
data.tar.gz: e6d7f7c2b4109aef9347de1213766d51a418ccc9c26fa78b19c900b7f6c100febcdf5ea82f8d026176be42175fb4434555201152ff0ed0746ffbe19a3e1bc88d
|
data/conf/gem.yaml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
version: 1.2.1
|
@@ -57,12 +57,14 @@ module RubyAemAws
|
|
57
57
|
return :misconfigured if desired_capacity < 1
|
58
58
|
return :recovering if elb_running_instances < desired_capacity
|
59
59
|
return :scaling if elb_running_instances > desired_capacity
|
60
|
+
|
60
61
|
:ready
|
61
62
|
end
|
62
63
|
|
63
64
|
# @return true, if all EC2 instances within the ELB are running
|
64
65
|
def wait_until_healthy
|
65
66
|
raise ELBMisconfiguration if health_state.eql?(:misconfigured)
|
67
|
+
|
66
68
|
sleep 60 while health_state.eql?(:recovering) || health_state.eql?(:scaling)
|
67
69
|
return true if health_state.eql?(:ready)
|
68
70
|
end
|
@@ -93,6 +95,7 @@ module RubyAemAws
|
|
93
95
|
if tag.key == 'StackPrefix' && tag.value == descriptor.stack_prefix
|
94
96
|
asg_matches_stack_prefix = true
|
95
97
|
break if asg_matches_component
|
98
|
+
|
96
99
|
next
|
97
100
|
end
|
98
101
|
if tag.key == 'Component' && tag.value == descriptor.ec2.component
|
@@ -119,6 +122,7 @@ module RubyAemAws
|
|
119
122
|
if tag.key == 'StackPrefix' && tag.value == descriptor.stack_prefix
|
120
123
|
elb_matches_stack_prefix = true
|
121
124
|
break if elb_matches_logical_id
|
125
|
+
|
122
126
|
next
|
123
127
|
end
|
124
128
|
if tag.key == 'aws:cloudformation:logical-id' && tag.value == descriptor.elb.id
|
@@ -136,9 +140,11 @@ module RubyAemAws
|
|
136
140
|
elb.instances.each do |i|
|
137
141
|
instance = get_instance_by_id(i.instance_id)
|
138
142
|
next if instance.nil?
|
143
|
+
|
139
144
|
instance.tags.each do |tag|
|
140
145
|
next if tag.key != 'StackPrefix'
|
141
146
|
break if tag.value != descriptor.stack_prefix
|
147
|
+
|
142
148
|
stack_prefix_instances.push(id: i.instance_id, state: instance.state.name)
|
143
149
|
end
|
144
150
|
end
|
@@ -65,6 +65,7 @@ module RubyAemAws
|
|
65
65
|
return :misconfigured if desired_capacity < 1
|
66
66
|
return :recovering if elb_running_instances < desired_capacity
|
67
67
|
return :scaling if elb_running_instances > desired_capacity
|
68
|
+
|
68
69
|
:ready
|
69
70
|
end
|
70
71
|
|
@@ -96,18 +97,21 @@ module RubyAemAws
|
|
96
97
|
return :misconfigured if desired_capacity < 1
|
97
98
|
return :recovering if instances_inservice < desired_capacity
|
98
99
|
return :scaling if instances_inservice > desired_capacity
|
100
|
+
|
99
101
|
:ready
|
100
102
|
end
|
101
103
|
|
102
104
|
# @return true, if all instances within the ELB are inService
|
103
105
|
def wait_until_healthy_elb
|
104
106
|
raise ELBMisconfiguration if health_state_elb.eql?(:misconfigured)
|
107
|
+
|
105
108
|
sleep 60 while health_state_elb.eql?(:recovering) || health_state_elb.eql?(:scaling)
|
106
109
|
return true if health_state_elb.eql?(:ready)
|
107
110
|
end
|
108
111
|
|
109
112
|
def wait_until_healthy_asg
|
110
113
|
raise ASGMisconfiguration if health_state_asg.eql?(:misconfigured)
|
114
|
+
|
111
115
|
sleep 60 while health_state_asg.eql?(:recovering) || health_state_asg.eql?(:scaling)
|
112
116
|
return true if health_state_asg.eql?(:ready)
|
113
117
|
end
|
@@ -138,6 +142,7 @@ module RubyAemAws
|
|
138
142
|
if tag.key == 'StackPrefix' && tag.value == descriptor.stack_prefix
|
139
143
|
asg_matches_stack_prefix = true
|
140
144
|
break if asg_matches_component
|
145
|
+
|
141
146
|
next
|
142
147
|
end
|
143
148
|
if tag.key == 'Component' && tag.value == descriptor.ec2.component
|
@@ -164,6 +169,7 @@ module RubyAemAws
|
|
164
169
|
if tag.key == 'StackPrefix' && tag.value == descriptor.stack_prefix
|
165
170
|
elb_matches_stack_prefix = true
|
166
171
|
break if elb_matches_logical_id
|
172
|
+
|
167
173
|
next
|
168
174
|
end
|
169
175
|
if tag.key == 'aws:cloudformation:logical-id' && tag.value == descriptor.elb.id
|
@@ -23,6 +23,7 @@ module RubyAemAws
|
|
23
23
|
has_instance = false
|
24
24
|
get_all_instances.each do |i|
|
25
25
|
next if i.nil? || i.state.code != 16
|
26
|
+
|
26
27
|
has_instance = true
|
27
28
|
return false if i.state.name != Constants::INSTANCE_STATE_HEALTHY
|
28
29
|
end
|
@@ -33,6 +34,7 @@ module RubyAemAws
|
|
33
34
|
instance_healthy = false
|
34
35
|
get_all_instances.each do |i|
|
35
36
|
next if i.nil? || i.state.code != 16
|
37
|
+
|
36
38
|
i.wait_until_running
|
37
39
|
instance_healthy = true
|
38
40
|
return false if i.state.name != Constants::INSTANCE_STATE_HEALTHY
|
@@ -48,6 +48,7 @@ module RubyAemAws
|
|
48
48
|
|
49
49
|
instances.each do |instance|
|
50
50
|
next if instance.nil?
|
51
|
+
|
51
52
|
instance_id = instance.instance_id
|
52
53
|
dimensions_value = instance.instance_id
|
53
54
|
|
@@ -73,6 +74,7 @@ module RubyAemAws
|
|
73
74
|
|
74
75
|
instances.each do |instance|
|
75
76
|
next if instance.nil?
|
77
|
+
|
76
78
|
instance_id = instance.instance_id
|
77
79
|
log_stream_name = "#{@descriptor.ec2.component}/#{instance_id}"
|
78
80
|
|
@@ -106,6 +108,7 @@ module RubyAemAws
|
|
106
108
|
|
107
109
|
instances.each do |instance|
|
108
110
|
next if instance.nil?
|
111
|
+
|
109
112
|
instance_id = instance.instance_id
|
110
113
|
log_stream_name = "#{@descriptor.ec2.component}/#{instance_id}"
|
111
114
|
|
data/lib/ruby_aem_aws.rb
CHANGED
@@ -37,6 +37,7 @@ module RubyAemAws
|
|
37
37
|
credentials = Aws::SharedCredentials.new(profile_name: conf[:aws_profile]) unless conf[:aws_profile].nil?
|
38
38
|
credentials = Aws::InstanceProfileCredentials.new if conf[:aws_profile].nil? && conf[:aws_access_key_id].nil?
|
39
39
|
raise RubyAemAws::ArgumentError unless defined? credentials
|
40
|
+
|
40
41
|
Aws.config.update(credentials: credentials)
|
41
42
|
|
42
43
|
@aws = AwsCreator.create_aws
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.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: 2019-
|
11
|
+
date: 2019-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.1
|
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: 3.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: retries
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.0.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.0.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.8.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.8.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: yard
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.9.
|
61
|
+
version: 0.9.19
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.9.
|
68
|
+
version: 0.9.19
|
69
69
|
description: ruby_aem_aws is a Ruby client for Shine Solutions Adobe Experience Manager
|
70
70
|
(AEM) Platform on AWS
|
71
71
|
email:
|
@@ -74,6 +74,7 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- conf/gem.yaml
|
77
78
|
- lib/ruby_aem_aws.rb
|
78
79
|
- lib/ruby_aem_aws/abstract/cloudwatch.rb
|
79
80
|
- lib/ruby_aem_aws/abstract/component.rb
|