rollo 0.8.0.pre.1 → 0.8.0.pre.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +793 -667
- data/README.md +1 -1
- data/Rakefile +5 -4
- 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 +62 -62
data/README.md
CHANGED
@@ -55,4 +55,4 @@ The gem is available as open source under the terms of the
|
|
55
55
|
|
56
56
|
Everyone interacting in the Rollo project’s codebases, issue trackers, chat
|
57
57
|
rooms and mailing lists is expected to follow the [code of conduct](
|
58
|
-
https://github.com/[USERNAME]/rollo/blob/
|
58
|
+
https://github.com/[USERNAME]/rollo/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -25,9 +25,8 @@ namespace :encryption do
|
|
25
25
|
namespace :passphrase do
|
26
26
|
desc 'Generate encryption passphrase used by CI.'
|
27
27
|
task generate: ['directory:ensure'] do
|
28
|
-
File.
|
29
|
-
|
30
|
-
end
|
28
|
+
File.write('config/secrets/ci/encryption.passphrase',
|
29
|
+
SecureRandom.base64(36))
|
31
30
|
end
|
32
31
|
end
|
33
32
|
end
|
@@ -104,7 +103,7 @@ end
|
|
104
103
|
RakeGithub.define_repository_tasks(
|
105
104
|
namespace: :github,
|
106
105
|
repository: 'infrablocks/rollo'
|
107
|
-
) do |t|
|
106
|
+
) do |t, args|
|
108
107
|
github_config =
|
109
108
|
YAML.load_file('config/secrets/github/config.yaml')
|
110
109
|
|
@@ -115,6 +114,8 @@ RakeGithub.define_repository_tasks(
|
|
115
114
|
public_key: File.read('config/secrets/ci/ssh.public')
|
116
115
|
}
|
117
116
|
]
|
117
|
+
t.branch_name = args.branch_name
|
118
|
+
t.commit_message = args.commit_message
|
118
119
|
end
|
119
120
|
|
120
121
|
namespace :pipeline do
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.2'
|
62
62
|
type: :runtime
|
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: '
|
68
|
+
version: '1.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: wait
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,198 +84,198 @@ dependencies:
|
|
84
84
|
name: aruba
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: gem-release
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: irbtools
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rake_circle_ci
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0
|
159
|
+
version: '0'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0
|
166
|
+
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rake_github
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - "
|
171
|
+
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0
|
173
|
+
version: '0'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - "
|
178
|
+
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0
|
180
|
+
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rake_gpg
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0
|
187
|
+
version: '0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - "
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '0
|
194
|
+
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: rake_ssh
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - "
|
199
|
+
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0
|
201
|
+
version: '0'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - "
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '0
|
208
|
+
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: rspec
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - "
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
215
|
+
version: '0'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - "
|
220
|
+
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
222
|
+
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: rubocop
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - ">="
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '
|
229
|
+
version: '0'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- - "
|
234
|
+
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '
|
236
|
+
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: rubocop-rake
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- - "
|
241
|
+
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: '0
|
243
|
+
version: '0'
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
|
-
- - "
|
248
|
+
- - ">="
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: '0
|
250
|
+
version: '0'
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
252
|
name: rubocop-rspec
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- - "
|
255
|
+
- - ">="
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version: '
|
257
|
+
version: '0'
|
258
258
|
type: :development
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- - "
|
262
|
+
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
264
|
+
version: '0'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: simplecov
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
|
-
- - "
|
269
|
+
- - ">="
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version: '0
|
271
|
+
version: '0'
|
272
272
|
type: :development
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
|
-
- - "
|
276
|
+
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version: '0
|
278
|
+
version: '0'
|
279
279
|
description: Strategies for rolling ECS container instance clusters.
|
280
280
|
email:
|
281
281
|
- maintainers@infrablocks.io
|
@@ -315,14 +315,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
315
315
|
requirements:
|
316
316
|
- - ">="
|
317
317
|
- !ruby/object:Gem::Version
|
318
|
-
version: '2.
|
318
|
+
version: '2.7'
|
319
319
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
320
320
|
requirements:
|
321
321
|
- - ">"
|
322
322
|
- !ruby/object:Gem::Version
|
323
323
|
version: 1.3.1
|
324
324
|
requirements: []
|
325
|
-
rubygems_version: 3.
|
325
|
+
rubygems_version: 3.1.6
|
326
326
|
signing_key:
|
327
327
|
specification_version: 4
|
328
328
|
summary: Cluster / service roller for AWS ECS.
|