moonshot 1.1.0.beta3 → 1.1.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moonshot/tools/asg_rollout.rb +14 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcd7bf169cbf27f74b4e6e4f16c59905fb8ed42c
|
4
|
+
data.tar.gz: 5ba58bf877dbbc8e339ef7ff0241633fa1ab5fc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46ed5758422fcad2d667c00936c776fb98f9215e4adfee08595a209bba25101db5414cc0dbcc9b074df1be8693f1ac15abdbb628e59cb1ec8c88b4513f1f7fae
|
7
|
+
data.tar.gz: 1ba2463d5e468c8564d6c07b75b736d4ff69d3454f7ec5a2a260ffcd3f446e83305576e95d8d127c39d6a7a3dc42c21e74dd4e0a21fb71e1c4397422898a6a8f
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Moonshot
|
2
2
|
module Tools
|
3
|
-
class ASGRollout
|
3
|
+
class ASGRollout # rubocop:disable ClassLength
|
4
4
|
attr_accessor :config
|
5
5
|
|
6
6
|
def initialize(controller:, logical_id:)
|
@@ -12,9 +12,15 @@ module Moonshot
|
|
12
12
|
|
13
13
|
def run!
|
14
14
|
increase_max_and_desired
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
loop do
|
16
|
+
new_instance = wait_for_new_instance
|
17
|
+
begin
|
18
|
+
wait_for_in_service(new_instance)
|
19
|
+
rescue
|
20
|
+
next
|
21
|
+
end
|
22
|
+
break
|
23
|
+
end
|
18
24
|
targets = asg.non_conforming_instances
|
19
25
|
last_instance = targets.last
|
20
26
|
|
@@ -34,7 +40,6 @@ module Moonshot
|
|
34
40
|
ensure
|
35
41
|
log.start_threaded 'Restoring MaxSize/DesiredCapacity values to normal...' do |s|
|
36
42
|
asg.set_max_and_desired(@max, @desired)
|
37
|
-
|
38
43
|
s.success 'Restored MaxSize/DesiredCapacity values to normal!'
|
39
44
|
end
|
40
45
|
end
|
@@ -44,7 +49,6 @@ module Moonshot
|
|
44
49
|
def increase_max_and_desired
|
45
50
|
log.start_threaded 'Increasing MaxSize/DesiredCapacity by 1.' do |s|
|
46
51
|
@max, @desired = asg.current_max_and_desired
|
47
|
-
|
48
52
|
asg.set_max_and_desired(@max + 1, @desired + 1)
|
49
53
|
s.success 'Increased MaxSize/DesiredCapacity by 1.'
|
50
54
|
end
|
@@ -65,10 +69,12 @@ module Moonshot
|
|
65
69
|
|
66
70
|
loop do
|
67
71
|
instance_health = asg.instance_health(new_instance)
|
72
|
+
if instance_health.out_of_service?
|
73
|
+
s.failure "Instance #{new_instance.blue} went OutOfService while waiting to join..."
|
74
|
+
raise "Instance #{new_instance.blue} went OutOfService while waiting to join..."
|
75
|
+
end
|
68
76
|
break if instance_health.in_service?
|
69
|
-
|
70
77
|
s.continue "Instance #{new_instance.blue} is #{instance_health}..."
|
71
|
-
|
72
78
|
sleep @config.instance_health_delay
|
73
79
|
end
|
74
80
|
|
@@ -109,9 +115,7 @@ module Moonshot
|
|
109
115
|
loop do
|
110
116
|
instance_health = asg.instance_health(instance)
|
111
117
|
break if instance_health.out_of_service?
|
112
|
-
|
113
118
|
s.continue "Instance #{instance.blue} is #{instance_health}..."
|
114
|
-
|
115
119
|
sleep @config.instance_health_delay
|
116
120
|
end
|
117
121
|
|
@@ -128,7 +132,6 @@ module Moonshot
|
|
128
132
|
loop do
|
129
133
|
break if @config.terminate_when.call(he)
|
130
134
|
sleep @config.terminate_when_delay
|
131
|
-
|
132
135
|
if Time.now.to_f - start > timeout
|
133
136
|
s.failure "TerminateWhen for #{instance.blue} did not complete in #{timeout} seconds!"
|
134
137
|
raise "TerminateWhen for #{instance.blue} did not complete in #{timeout} seconds!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moonshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.
|
4
|
+
version: 1.1.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloud Engineering <engineering@acquia.com>
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|