rollo 0.8.0.pre.1 → 0.8.0.pre.2
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/Gemfile.lock +660 -603
- data/lib/rollo/commands/hosts.rb +15 -15
- data/lib/rollo/commands/main.rb +2 -2
- data/lib/rollo/commands/services.rb +9 -9
- data/lib/rollo/version.rb +1 -1
- metadata +2 -2
data/lib/rollo/commands/hosts.rb
CHANGED
@@ -40,19 +40,19 @@ module Rollo
|
|
40
40
|
on.prepare do |current, target|
|
41
41
|
say(
|
42
42
|
"Changing desired capacity from #{current} to " \
|
43
|
-
|
43
|
+
"#{target}..."
|
44
44
|
)
|
45
45
|
end
|
46
46
|
on.waiting_for_start do |attempt|
|
47
47
|
say(
|
48
48
|
'Waiting for capacity change to start ' \
|
49
|
-
|
49
|
+
"(attempt #{attempt})..."
|
50
50
|
)
|
51
51
|
end
|
52
52
|
on.waiting_for_end do |attempt|
|
53
53
|
say(
|
54
54
|
'Waiting for capacity change to complete ' \
|
55
|
-
|
55
|
+
"(attempt #{attempt})..."
|
56
56
|
)
|
57
57
|
end
|
58
58
|
on.waiting_for_health do |attempt|
|
@@ -97,25 +97,25 @@ module Rollo
|
|
97
97
|
on.prepare do |current, target|
|
98
98
|
say(
|
99
99
|
"Changing desired capacity from #{current} to " \
|
100
|
-
|
100
|
+
"#{target}..."
|
101
101
|
)
|
102
102
|
end
|
103
103
|
on.waiting_for_start do |attempt|
|
104
104
|
say(
|
105
105
|
'Waiting for capacity change to start ' \
|
106
|
-
|
106
|
+
"(attempt #{attempt})..."
|
107
107
|
)
|
108
108
|
end
|
109
109
|
on.waiting_for_end do |attempt|
|
110
110
|
say(
|
111
111
|
'Waiting for capacity change to complete ' \
|
112
|
-
|
112
|
+
"(attempt #{attempt})..."
|
113
113
|
)
|
114
114
|
end
|
115
115
|
on.waiting_for_health do |attempt|
|
116
116
|
say(
|
117
117
|
'Waiting for host cluster to reach healthy state ' \
|
118
|
-
|
118
|
+
"(attempt #{attempt})..."
|
119
119
|
)
|
120
120
|
end
|
121
121
|
end
|
@@ -125,7 +125,7 @@ module Rollo
|
|
125
125
|
on.waiting_for_health do |attempt|
|
126
126
|
say(
|
127
127
|
"Waiting for service #{service.name} to reach a " \
|
128
|
-
|
128
|
+
"steady state (attempt #{attempt})..."
|
129
129
|
)
|
130
130
|
end
|
131
131
|
end
|
@@ -178,22 +178,22 @@ module Rollo
|
|
178
178
|
|
179
179
|
say(
|
180
180
|
'Terminating old hosts in host cluster in batches of ' \
|
181
|
-
|
181
|
+
"#{batch_size}..."
|
182
182
|
)
|
183
183
|
# rubocop:disable Metrics/BlockLength
|
184
184
|
with_padding do
|
185
185
|
host_batches.each_with_index do |host_batch, index|
|
186
186
|
say(
|
187
187
|
"Batch #{index + 1} contains hosts: " \
|
188
|
-
|
189
|
-
|
188
|
+
"\n\t\t[#{host_batch.map(&:id).join(",\n\t\t ")}]\n" \
|
189
|
+
'Terminating...'
|
190
190
|
)
|
191
191
|
host_batch.each(&:terminate)
|
192
192
|
host_cluster.wait_for_capacity_health do |on|
|
193
193
|
on.waiting_for_health do |attempt|
|
194
194
|
say(
|
195
195
|
'Waiting for host cluster to reach healthy state ' \
|
196
|
-
|
196
|
+
"(attempt #{attempt})"
|
197
197
|
)
|
198
198
|
end
|
199
199
|
end
|
@@ -203,7 +203,7 @@ module Rollo
|
|
203
203
|
on.waiting_for_health do |attempt|
|
204
204
|
say(
|
205
205
|
"Waiting for service #{service.name} to reach a " \
|
206
|
-
|
206
|
+
"steady state (attempt #{attempt})..."
|
207
207
|
)
|
208
208
|
end
|
209
209
|
end
|
@@ -211,12 +211,12 @@ module Rollo
|
|
211
211
|
end
|
212
212
|
say(
|
213
213
|
"Waiting #{service_start_wait_minutes} minute(s) for " \
|
214
|
-
|
214
|
+
'services to finish starting...'
|
215
215
|
)
|
216
216
|
sleep(service_start_wait_seconds)
|
217
217
|
say(
|
218
218
|
"Waited #{service_start_wait_minutes} minute(s). " \
|
219
|
-
|
219
|
+
'Continuing...'
|
220
220
|
)
|
221
221
|
end
|
222
222
|
end
|
data/lib/rollo/commands/main.rb
CHANGED
@@ -34,7 +34,7 @@ module Rollo
|
|
34
34
|
default: 3,
|
35
35
|
desc:
|
36
36
|
'The number of hosts / service instances to add / remove at ' \
|
37
|
-
|
37
|
+
'a time.'
|
38
38
|
)
|
39
39
|
method_option(
|
40
40
|
:maximum_service_instances,
|
@@ -59,7 +59,7 @@ module Rollo
|
|
59
59
|
|
60
60
|
say(
|
61
61
|
"Rolling instances in host cluster #{host_cluster.name} for " \
|
62
|
-
|
62
|
+
"service cluster #{service_cluster.name}..."
|
63
63
|
)
|
64
64
|
# rubocop:disable Metrics/BlockLength
|
65
65
|
with_padding do
|
@@ -58,13 +58,13 @@ module Rollo
|
|
58
58
|
on.start do |services|
|
59
59
|
say(
|
60
60
|
'Service cluster contains services:' \
|
61
|
-
|
61
|
+
"\n\t\t[#{services.map(&:name).join(",\n\t\t ")}]"
|
62
62
|
)
|
63
63
|
end
|
64
64
|
on.each_service do |service|
|
65
65
|
say(
|
66
66
|
"Increasing instance count by #{batch_size} " \
|
67
|
-
|
67
|
+
"for #{service.name}"
|
68
68
|
)
|
69
69
|
# rubocop:disable Lint/ShadowingOuterLocalVariable
|
70
70
|
with_padding do
|
@@ -74,13 +74,13 @@ module Rollo
|
|
74
74
|
on.prepare do |current, target|
|
75
75
|
say(
|
76
76
|
"Changing instance count from #{current} " \
|
77
|
-
|
77
|
+
"to #{target}..."
|
78
78
|
)
|
79
79
|
end
|
80
80
|
on.waiting_for_health do |attempt|
|
81
81
|
say(
|
82
82
|
'Waiting for service to reach a steady state ' \
|
83
|
-
|
83
|
+
"(attempt #{attempt})..."
|
84
84
|
)
|
85
85
|
end
|
86
86
|
end
|
@@ -92,13 +92,13 @@ module Rollo
|
|
92
92
|
# rubocop:enable Metrics/BlockLength
|
93
93
|
say(
|
94
94
|
"Waiting #{service_start_wait_minutes} minute(s) for " \
|
95
|
-
|
95
|
+
'services to finish starting...'
|
96
96
|
)
|
97
97
|
with_padding do
|
98
98
|
sleep(service_start_wait_seconds)
|
99
99
|
say(
|
100
100
|
"Waited #{service_start_wait_minutes} minute(s). " \
|
101
|
-
|
101
|
+
'Continuing...'
|
102
102
|
)
|
103
103
|
end
|
104
104
|
say('Service instance counts increased, continuing...')
|
@@ -140,7 +140,7 @@ module Rollo
|
|
140
140
|
on.each_service do |service|
|
141
141
|
say(
|
142
142
|
"Decreasing instance count by #{batch_size} " \
|
143
|
-
|
143
|
+
"for #{service.name}"
|
144
144
|
)
|
145
145
|
# rubocop:disable Lint/ShadowingOuterLocalVariable
|
146
146
|
with_padding do
|
@@ -148,13 +148,13 @@ module Rollo
|
|
148
148
|
on.prepare do |current, target|
|
149
149
|
say(
|
150
150
|
"Changing instance count from #{current} " \
|
151
|
-
|
151
|
+
"to #{target}..."
|
152
152
|
)
|
153
153
|
end
|
154
154
|
on.waiting_for_health do |attempt|
|
155
155
|
say(
|
156
156
|
'Waiting for service to reach a steady state ' \
|
157
|
-
|
157
|
+
"(attempt #{attempt})..."
|
158
158
|
)
|
159
159
|
end
|
160
160
|
end
|
data/lib/rollo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0.pre.
|
4
|
+
version: 0.8.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|