ecs-easy-cluster 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6deb5e083c0a0a6c90456bb28a6538ecb009b87a
4
- data.tar.gz: d14a41c0c460cef5c5cb1c466b36ff4352d27a34
3
+ metadata.gz: 3bcec23995ea382d6ff35cb552d19c2cda0caaf7
4
+ data.tar.gz: 403d90d69f4d3c542d4acd65a3ed1793ed1c5605
5
5
  SHA512:
6
- metadata.gz: 332a2068fbfe7169e026d490182b22dbef5fc70c45211660054585f33abe92254dbe10cca8493761da0733b5fb3aa8cd90613317441acf8234592c0f82cb58ca
7
- data.tar.gz: 4fbdfe7f61a815c8339b695a58fa19edb20f802160dd581695441587fd2e9a3c1d99258f28debe10a80b757ad1abf79be6e42687026cd7ada9e62691b65e4fae
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-easy-cluster"
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
@@ -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/cloudFormation_template.json", __FILE__)
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
@@ -1,7 +1,7 @@
1
1
  module Ecs
2
2
  module Easy
3
3
  module Cluster
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
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.1
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: {}