ecs_compose 0.1.0.pre8 → 0.1.0.pre9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/ecs-compose +1 -1
- data/lib/ecs_compose/ecs.rb +4 -8
- data/lib/ecs_compose/task_definition.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97bee1ba4d301b7508fda9f624e739a4ba411929
|
4
|
+
data.tar.gz: 104f5b9e4f4ea8c0da05b8b530157b49826d4e9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e2a62625471bebdfb4ebde7811543b5086ede67c28e6e5c0563420f9d353f155f71271503f95f4ce2b188361cd5246f1a50c692f84fd0f893749542445a4dea
|
7
|
+
data.tar.gz: 1a76b2dbdb523e95bff256958e25f476c20796b401951898bfeecba912f9888dba71507d4760662724981fc9b432d6adfbfcd53d688e957da0d0b10bd0f16c57
|
data/exe/ecs-compose
CHANGED
@@ -78,7 +78,7 @@ class App
|
|
78
78
|
def command_up
|
79
79
|
available = manifest.task_definitions.select {|td| td.type == :service }
|
80
80
|
chosen = all_or_specified(available, options.fetch('<service>'))
|
81
|
-
chosen.each {|td| td.
|
81
|
+
chosen.each {|td| td.update }
|
82
82
|
end
|
83
83
|
|
84
84
|
def command_run
|
data/lib/ecs_compose/ecs.rb
CHANGED
@@ -10,6 +10,10 @@ module EcsCompose
|
|
10
10
|
# package from Amazon. There might be a Ruby gem (like fog) that can do
|
11
11
|
# some of this now, but Amazon keeps the awscli tool up to date, and ECS
|
12
12
|
# is still very new.
|
13
|
+
#
|
14
|
+
# These are intended to be very low-level wrappers around the actual
|
15
|
+
# command-line tool. Higher-level logic mostly belongs in
|
16
|
+
# TaskDefinition.
|
13
17
|
module Ecs
|
14
18
|
# Run `aws ecs` with the specified arguments.
|
15
19
|
def self.run(*args)
|
@@ -43,13 +47,5 @@ module EcsCompose
|
|
43
47
|
"--service", service,
|
44
48
|
"--task-definition", task_definition)
|
45
49
|
end
|
46
|
-
|
47
|
-
# Update the specified service, passing in a new task definition in
|
48
|
-
# JSON format.
|
49
|
-
def self.update_service_with_json(service, json)
|
50
|
-
reg = register_task_definition(json)["taskDefinition"]
|
51
|
-
task_def = "#{reg.fetch('family')}:#{reg.fetch('revision')}"
|
52
|
-
update_service(service, task_def)
|
53
|
-
end
|
54
50
|
end
|
55
51
|
end
|
@@ -24,8 +24,10 @@ module EcsCompose
|
|
24
24
|
|
25
25
|
# Register this task definition with ECS, and update the corresponding
|
26
26
|
# service.
|
27
|
-
def
|
28
|
-
|
27
|
+
def update
|
28
|
+
reg = register["taskDefinition"]
|
29
|
+
task_def = "#{reg.fetch('family')}:#{reg.fetch('revision')}"
|
30
|
+
EcsCompose::Ecs.update_service(name, task_def)
|
29
31
|
end
|
30
32
|
|
31
33
|
# Run this task definition as a one-shot ECS task, with the specified
|