hako 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/hako/schedulers/ecs.rb +21 -14
- data/lib/hako/schedulers/ecs_service_comparator.rb +1 -1
- data/lib/hako/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20b7ac14cb0c43d0fd104551f6669ffbbd75af221dc3e91a368b64c9f6ce7dc6
|
4
|
+
data.tar.gz: f4190fad69152de31d7956eb7dd2eaf40f211b71cd51f07c1777c3d1e5ca7e99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1b7c1b877933e45b2c3b1c03a3467ea68cc6c442614f668ba89cab109bef13544598b41c82cc5cc1a82148f1c31d4ffdcfa4135532dd132fadb301760b0d62e
|
7
|
+
data.tar.gz: 657efc57b3d085f51e37090004a62b64df963cb3010f16b73ee176f07a64fc0d3f3a8258dd5f1b13af3923c91137381d3599290f6944046f3008b19a999df360
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 2.6.1 (2018-12-17)
|
2
|
+
## Bug fixes
|
3
|
+
- Avoid updating service when `platform_version` is not specified
|
4
|
+
- Keep essential parameter in `hako oneshot`
|
5
|
+
|
6
|
+
## Improvements
|
7
|
+
- Show more information about tasks in `hako status`
|
8
|
+
|
1
9
|
# 2.6.0 (2018-12-13)
|
2
10
|
## New features
|
3
11
|
- Support `essential` parameter for each container
|
data/lib/hako/schedulers/ecs.rb
CHANGED
@@ -183,9 +183,6 @@ module Hako
|
|
183
183
|
# @return [Integer] Returns exit code
|
184
184
|
def oneshot(containers, commands, env, no_wait: false)
|
185
185
|
definitions = create_definitions(containers)
|
186
|
-
definitions.each do |definition|
|
187
|
-
definition.delete(:essential)
|
188
|
-
end
|
189
186
|
|
190
187
|
if @dry_run
|
191
188
|
volumes_definition.each do |d|
|
@@ -251,24 +248,34 @@ module Hako
|
|
251
248
|
ecs_client.list_tasks(cluster: @cluster, service_name: service.service_arn).each do |page|
|
252
249
|
unless page.task_arns.empty?
|
253
250
|
tasks = ecs_client.describe_tasks(cluster: @cluster, tasks: page.task_arns).tasks
|
251
|
+
container_instance_arns = tasks.map(&:container_instance_arn).compact
|
254
252
|
container_instances = {}
|
255
|
-
|
256
|
-
container_instances
|
253
|
+
unless container_instance_arns.empty?
|
254
|
+
ecs_client.describe_container_instances(cluster: @cluster, container_instances: container_instance_arns).container_instances.each do |ci|
|
255
|
+
container_instances[ci.container_instance_arn] = ci
|
256
|
+
end
|
257
257
|
end
|
258
258
|
ec2_instances = {}
|
259
|
-
|
260
|
-
|
261
|
-
|
259
|
+
unless container_instances.empty?
|
260
|
+
ec2_client.describe_instances(instance_ids: container_instances.values.map(&:ec2_instance_id)).reservations.each do |r|
|
261
|
+
r.instances.each do |i|
|
262
|
+
ec2_instances[i.instance_id] = i
|
263
|
+
end
|
262
264
|
end
|
263
265
|
end
|
264
266
|
tasks.each do |task|
|
267
|
+
task_id = task.task_arn.slice(%r{task/(.+)\z}, 1)
|
268
|
+
task_definition = task.task_definition_arn.slice(%r{task-definition/(.+)\z}, 1)
|
269
|
+
print " [#{task.last_status}] #{task_id} task_definition=#{task_definition}, desired_status=#{task.desired_status}"
|
265
270
|
ci = container_instances[task.container_instance_arn]
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
271
|
+
if ci
|
272
|
+
print ", instance_id=#{ci.ec2_instance_id}"
|
273
|
+
instance = ec2_instances[ci.ec2_instance_id]
|
274
|
+
if instance
|
275
|
+
name_tag = instance.tags.find { |t| t.key == 'Name' }
|
276
|
+
if name_tag
|
277
|
+
print " (#{name_tag.value})"
|
278
|
+
end
|
272
279
|
end
|
273
280
|
end
|
274
281
|
puts
|
@@ -23,7 +23,7 @@ module Hako
|
|
23
23
|
struct.member(:desired_count, Schema::Integer.new)
|
24
24
|
struct.member(:task_definition, Schema::String.new)
|
25
25
|
struct.member(:deployment_configuration, Schema::WithDefault.new(deployment_configuration_schema, default_configuration))
|
26
|
-
struct.member(:platform_version, Schema::String.new)
|
26
|
+
struct.member(:platform_version, Schema::WithDefault.new(Schema::String.new, 'LATEST'))
|
27
27
|
struct.member(:network_configuration, Schema::Nullable.new(network_configuration_schema))
|
28
28
|
struct.member(:health_check_grace_period_seconds, Schema::Nullable.new(Schema::Integer.new))
|
29
29
|
end
|
data/lib/hako/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-applicationautoscaling
|