ecs-easy-cluster 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -2
- data/ecs-easy-cluster.gemspec +1 -1
- data/lib/ecs/easy/cluster/base.rb +1 -1
- data/lib/ecs/easy/cluster/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bcec23995ea382d6ff35cb552d19c2cda0caaf7
|
4
|
+
data.tar.gz: 403d90d69f4d3c542d4acd65a3ed1793ed1c5605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3fffc6fa55cf01cf665ef56e9e11c14227a7bf23269c5f74d631cc00a477527bfb99d64496bbe1cdcde2bd9a215a04f5e66ca7f09c7a3b5e91fcc559bb1e7d4
|
7
|
+
data.tar.gz: 18c4c09e1f574f4cfc9489146fa1fe30da1bd6a6fb811b1434575666d50d522bec3be4cc082a713c7f24561208e0ed19b59678495e27893d9835bcf0e9f00a83
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
## Usage
|
21
21
|
|
22
22
|
```
|
23
|
-
require "ecs
|
23
|
+
require "ecs/easy/cluster"
|
24
24
|
|
25
25
|
#
|
26
26
|
# Set basic info: credentials and region
|
@@ -55,7 +55,17 @@ end
|
|
55
55
|
#
|
56
56
|
# Make your task running
|
57
57
|
#
|
58
|
-
cluster.make_task_running!("your-task-definition-name")
|
58
|
+
res = cluster.make_task_running!("your-task-definition-name")
|
59
|
+
|
60
|
+
#
|
61
|
+
# You can call aws-sdk Aws::ECS::Client method with: cluster.ecs_client
|
62
|
+
# http://docs.aws.amazon.com/sdkforruby/api/Aws/ECS/Client.html
|
63
|
+
#
|
64
|
+
task_arns = res["tasks"].map{|t| t["task_arn"]}
|
65
|
+
cluster.ecs_client.wait_until(:tasks_stopped, cluster: "cluster-name", tasks: task_arns) do |w|
|
66
|
+
w.max_attempts = 100
|
67
|
+
w.delay = 6
|
68
|
+
end
|
59
69
|
|
60
70
|
#
|
61
71
|
# Shrink your scaled instances
|
@@ -69,4 +79,5 @@ cluster.shrink!
|
|
69
79
|
## Memo
|
70
80
|
|
71
81
|
ecs/easy/cluster/cloudformation_template.json.erb is refered from the link below.
|
82
|
+
|
72
83
|
https://github.com/aws/amazon-ecs-cli/blob/master/ecs-cli/modules/aws/clients/cloudformation/template.go
|
data/ecs-easy-cluster.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["pigmybank@gmail.com"]
|
11
11
|
spec.summary = %q{easy-to-use AWS ECS Cluster.}
|
12
12
|
spec.description = %q{easy-to-use AWS ECS Cluster.}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/metheglin/ecs-easy-cluster"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Ecs::Easy::Cluster
|
2
2
|
class Base
|
3
3
|
|
4
|
-
TEMPLATE_PATH = File.expand_path("../config/
|
4
|
+
TEMPLATE_PATH = File.expand_path("../config/cloudformation_template.json", __FILE__)
|
5
5
|
TEMPLATE_BODY = File.read( TEMPLATE_PATH )
|
6
6
|
|
7
7
|
attr_reader :name, :configure, :ecs_client, :stack_name, :cfn_client
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs-easy-cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- metheglin
|
@@ -73,7 +73,7 @@ files:
|
|
73
73
|
- lib/ecs/easy/cluster/version.rb
|
74
74
|
- lib/ecs/easy/configure.rb
|
75
75
|
- lib/ecs/easy/instance.rb
|
76
|
-
homepage:
|
76
|
+
homepage: https://github.com/metheglin/ecs-easy-cluster
|
77
77
|
licenses:
|
78
78
|
- MIT
|
79
79
|
metadata: {}
|