rollo 0.3.0 → 0.8.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +4 -2
- data/Gemfile.lock +1128 -524
- data/LICENSE.txt +1 -1
- data/Rakefile +134 -10
- data/bin/console +4 -3
- data/lib/rollo.rb +3 -1
- data/lib/rollo/commands.rb +2 -0
- data/lib/rollo/commands/hosts.rb +232 -0
- data/lib/rollo/commands/main.rb +78 -48
- data/lib/rollo/commands/services.rb +173 -0
- data/lib/rollo/model.rb +2 -0
- data/lib/rollo/model/host.rb +4 -2
- data/lib/rollo/model/host_cluster.rb +34 -23
- data/lib/rollo/model/scaling_activity.rb +8 -6
- data/lib/rollo/model/service.rb +37 -24
- data/lib/rollo/model/service_cluster.rb +19 -14
- data/lib/rollo/version.rb +3 -1
- metadata +145 -43
- data/.envrc +0 -5
- data/.gitignore +0 -31
- data/.rspec +0 -3
- data/.ruby-version +0 -1
- data/.travis.yml +0 -5
- data/exe/rollo +0 -5
- data/go +0 -61
- data/lib/rollo/commands/host_cluster.rb +0 -184
- data/lib/rollo/commands/service_cluster.rb +0 -124
- data/rollo.gemspec +0 -37
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'aws-sdk'
|
2
4
|
require 'hollerback'
|
3
5
|
|
@@ -10,7 +12,7 @@ module Rollo
|
|
10
12
|
@region = region
|
11
13
|
@ecs_cluster_name = ecs_cluster_name
|
12
14
|
@ecs_resource = ecs_resource || Aws::ECS::Resource.new(region: region)
|
13
|
-
@ecs_cluster =
|
15
|
+
@ecs_cluster = ecs_cluster
|
14
16
|
end
|
15
17
|
|
16
18
|
def name
|
@@ -18,9 +20,9 @@ module Rollo
|
|
18
20
|
end
|
19
21
|
|
20
22
|
def replica_services
|
21
|
-
|
22
|
-
|
23
|
-
|
23
|
+
ecs_service_arns
|
24
|
+
.collect { |arn| Service.new(@ecs_cluster_name, arn, @region) }
|
25
|
+
.select(&:replica?)
|
24
26
|
end
|
25
27
|
|
26
28
|
def with_replica_services(&block)
|
@@ -28,7 +30,8 @@ module Rollo
|
|
28
30
|
|
29
31
|
callbacks = Hollerback::Callbacks.new(block)
|
30
32
|
callbacks.try_respond_with(
|
31
|
-
|
33
|
+
:start, all_replica_services
|
34
|
+
)
|
32
35
|
|
33
36
|
all_replica_services.each do |service|
|
34
37
|
callbacks.try_respond_with(:each_service, service)
|
@@ -37,17 +40,19 @@ module Rollo
|
|
37
40
|
|
38
41
|
private
|
39
42
|
|
40
|
-
def
|
41
|
-
@ecs_resource
|
42
|
-
|
43
|
-
|
43
|
+
def ecs_cluster
|
44
|
+
@ecs_resource
|
45
|
+
.client
|
46
|
+
.describe_clusters(clusters: [@ecs_cluster_name])
|
47
|
+
.clusters[0]
|
44
48
|
end
|
45
49
|
|
46
|
-
def
|
47
|
-
@ecs_resource
|
48
|
-
|
49
|
-
|
50
|
+
def ecs_service_arns
|
51
|
+
@ecs_resource
|
52
|
+
.client
|
53
|
+
.list_services(cluster: @ecs_cluster.cluster_name)
|
54
|
+
.inject([]) { |arns, response| arns + response.service_arns }
|
50
55
|
end
|
51
56
|
end
|
52
57
|
end
|
53
|
-
end
|
58
|
+
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.
|
4
|
+
version: 0.8.0.pre.1
|
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: 2021-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -39,119 +39,217 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.22'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: hollerback
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.1'
|
48
48
|
type: :runtime
|
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: '0.
|
54
|
+
version: '0.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.20'
|
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: '0.
|
68
|
+
version: '0.20'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: wait
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.5'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: aruba
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.14'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.14'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '2.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '2.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gem-release
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: irbtools
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.2'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.2'
|
97
139
|
- !ruby/object:Gem::Dependency
|
98
140
|
name: rake
|
99
141
|
requirement: !ruby/object:Gem::Requirement
|
100
142
|
requirements:
|
101
143
|
- - "~>"
|
102
144
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
145
|
+
version: '13.0'
|
104
146
|
type: :development
|
105
147
|
prerelease: false
|
106
148
|
version_requirements: !ruby/object:Gem::Requirement
|
107
149
|
requirements:
|
108
150
|
- - "~>"
|
109
151
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
152
|
+
version: '13.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake_circle_ci
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.9'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.9'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rake_github
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.5'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0.5'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rake_gpg
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.12'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.12'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rake_ssh
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0.4'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0.4'
|
111
209
|
- !ruby/object:Gem::Dependency
|
112
210
|
name: rspec
|
113
211
|
requirement: !ruby/object:Gem::Requirement
|
114
212
|
requirements:
|
115
213
|
- - "~>"
|
116
214
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
215
|
+
version: '3.9'
|
118
216
|
type: :development
|
119
217
|
prerelease: false
|
120
218
|
version_requirements: !ruby/object:Gem::Requirement
|
121
219
|
requirements:
|
122
220
|
- - "~>"
|
123
221
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
222
|
+
version: '3.9'
|
125
223
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
224
|
+
name: rubocop
|
127
225
|
requirement: !ruby/object:Gem::Requirement
|
128
226
|
requirements:
|
129
227
|
- - "~>"
|
130
228
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
229
|
+
version: '1.12'
|
132
230
|
type: :development
|
133
231
|
prerelease: false
|
134
232
|
version_requirements: !ruby/object:Gem::Requirement
|
135
233
|
requirements:
|
136
234
|
- - "~>"
|
137
235
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
236
|
+
version: '1.12'
|
139
237
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
238
|
+
name: rubocop-rake
|
141
239
|
requirement: !ruby/object:Gem::Requirement
|
142
240
|
requirements:
|
143
241
|
- - "~>"
|
144
242
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
243
|
+
version: '0.5'
|
146
244
|
type: :development
|
147
245
|
prerelease: false
|
148
246
|
version_requirements: !ruby/object:Gem::Requirement
|
149
247
|
requirements:
|
150
248
|
- - "~>"
|
151
249
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
250
|
+
version: '0.5'
|
153
251
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
252
|
+
name: rubocop-rspec
|
155
253
|
requirement: !ruby/object:Gem::Requirement
|
156
254
|
requirements:
|
157
255
|
- - "~>"
|
@@ -164,19 +262,27 @@ dependencies:
|
|
164
262
|
- - "~>"
|
165
263
|
- !ruby/object:Gem::Version
|
166
264
|
version: '2.2'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: simplecov
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0.21'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0.21'
|
167
279
|
description: Strategies for rolling ECS container instance clusters.
|
168
280
|
email:
|
169
|
-
-
|
170
|
-
executables:
|
171
|
-
- rollo
|
281
|
+
- maintainers@infrablocks.io
|
282
|
+
executables: []
|
172
283
|
extensions: []
|
173
284
|
extra_rdoc_files: []
|
174
285
|
files:
|
175
|
-
- ".envrc"
|
176
|
-
- ".gitignore"
|
177
|
-
- ".rspec"
|
178
|
-
- ".ruby-version"
|
179
|
-
- ".travis.yml"
|
180
286
|
- CODE_OF_CONDUCT.md
|
181
287
|
- Gemfile
|
182
288
|
- Gemfile.lock
|
@@ -185,13 +291,11 @@ files:
|
|
185
291
|
- Rakefile
|
186
292
|
- bin/console
|
187
293
|
- bin/setup
|
188
|
-
- exe/rollo
|
189
|
-
- go
|
190
294
|
- lib/rollo.rb
|
191
295
|
- lib/rollo/commands.rb
|
192
|
-
- lib/rollo/commands/
|
296
|
+
- lib/rollo/commands/hosts.rb
|
193
297
|
- lib/rollo/commands/main.rb
|
194
|
-
- lib/rollo/commands/
|
298
|
+
- lib/rollo/commands/services.rb
|
195
299
|
- lib/rollo/model.rb
|
196
300
|
- lib/rollo/model/host.rb
|
197
301
|
- lib/rollo/model/host_cluster.rb
|
@@ -199,7 +303,6 @@ files:
|
|
199
303
|
- lib/rollo/model/service.rb
|
200
304
|
- lib/rollo/model/service_cluster.rb
|
201
305
|
- lib/rollo/version.rb
|
202
|
-
- rollo.gemspec
|
203
306
|
homepage: https://github.com/infrablocks/rollo
|
204
307
|
licenses:
|
205
308
|
- MIT
|
@@ -212,15 +315,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
315
|
requirements:
|
213
316
|
- - ">="
|
214
317
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
318
|
+
version: '2.6'
|
216
319
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
320
|
requirements:
|
218
|
-
- - "
|
321
|
+
- - ">"
|
219
322
|
- !ruby/object:Gem::Version
|
220
|
-
version:
|
323
|
+
version: 1.3.1
|
221
324
|
requirements: []
|
222
|
-
|
223
|
-
rubygems_version: 2.5.2.3
|
325
|
+
rubygems_version: 3.0.1
|
224
326
|
signing_key:
|
225
327
|
specification_version: 4
|
226
328
|
summary: Cluster / service roller for AWS ECS.
|
data/.envrc
DELETED
data/.gitignore
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
## Standard stuff:
|
2
|
-
*.gem
|
3
|
-
*.rbc
|
4
|
-
/.config
|
5
|
-
/coverage/
|
6
|
-
/InstalledFiles
|
7
|
-
/pkg/
|
8
|
-
.rspec_status
|
9
|
-
/spec/reports/
|
10
|
-
/spec/examples.txt
|
11
|
-
/test/tmp/
|
12
|
-
/test/version_tmp/
|
13
|
-
/tmp/
|
14
|
-
.rakeTasks
|
15
|
-
|
16
|
-
## Documentation cache and generated files:
|
17
|
-
/.yardoc/
|
18
|
-
/_yardoc/
|
19
|
-
/doc/
|
20
|
-
/rdoc/
|
21
|
-
|
22
|
-
## Environment normalization:
|
23
|
-
/.bundle/
|
24
|
-
/vendor/bundle
|
25
|
-
/lib/bundler/man/
|
26
|
-
|
27
|
-
## IDE:
|
28
|
-
.idea
|
29
|
-
*.ipr
|
30
|
-
*.iws
|
31
|
-
*.iml
|
data/.rspec
DELETED