capistrano-autoscale 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/capistrano-autoscale.gemspec +2 -1
- data/lib/capistrano/autoscale/aws/autoscaling_group.rb +5 -5
- data/lib/capistrano/autoscale/version.rb +1 -1
- data/lib/capistrano/autoscale.rb +12 -6
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9fc9eb6335d2c4db813b5fcdc51c16aeb7a9e5
|
4
|
+
data.tar.gz: dc6ea0651f0a8211a5d205f1ae126fb6e832a223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95bb2345ad63225eb224b3d22dc12102884b2cf0e839eebeff917e543784e6328036a652c107f20cca734eca6eb5b715e71732a18e8398bf4f813f4ebac31e47
|
7
|
+
data.tar.gz: 91e96699646115910fbddcc577e303c206a943aa027817aa2dfa1ff71869e82517ebb2a95411728b5563abb8cc96d74768afffec858927c33a3dc00f52aebf4f
|
data/README.md
CHANGED
@@ -26,5 +26,5 @@ set :aws_region, ENV['AWS_REGION']
|
|
26
26
|
And set the autoscale group:
|
27
27
|
|
28
28
|
```
|
29
|
-
autoscale
|
29
|
+
autoscale [<array of auto-scale-group-names>], user: '<deployment user>', roles: [<array of cap roles>]
|
30
30
|
```
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "capistrano-autoscale"
|
8
8
|
spec.version = Capistrano::Autoscale::VERSION
|
9
9
|
spec.authors = ["Damien Glancy"]
|
10
|
-
spec.email = ["support@
|
10
|
+
spec.email = ["support@clinchtalent.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Capistrano plugin for deploying to AWS AutoScale groups.}
|
13
13
|
spec.description = %q{Deploys to all instances in a AWS AutoScale group.}
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.13"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_development_dependency "minitest", "~> 5.0"
|
24
|
+
spec.add_development_dependency "webmock"
|
24
25
|
|
25
26
|
spec.add_dependency 'aws-sdk', '~> 2'
|
26
27
|
spec.add_runtime_dependency 'capistrano', '~> 3.0', '> 3.0.0'
|
@@ -8,16 +8,16 @@ module Capistrano
|
|
8
8
|
include Capistrano::Autoscale::Aws::Credentials
|
9
9
|
include Capistrano::DSL
|
10
10
|
|
11
|
-
def
|
11
|
+
def autoscale
|
12
12
|
@autoscaling ||= ::Aws::AutoScaling::Client.new(credentials)
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
@
|
15
|
+
def autoscale_groups
|
16
|
+
@autoscale_groups ||= autoscale.describe_auto_scaling_groups({auto_scaling_group_names: [autoscale_group_names].flatten}).auto_scaling_groups
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
fetch(:
|
19
|
+
def autoscale_group_names
|
20
|
+
fetch(:aws_autoscale_groups)
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
data/lib/capistrano/autoscale.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'aws-sdk'
|
2
|
+
|
2
3
|
require 'capistrano/all'
|
3
4
|
require 'capistrano/dsl'
|
4
5
|
|
@@ -16,19 +17,24 @@ def autoscale(groupname, *args)
|
|
16
17
|
include Capistrano::Autoscale::Aws::AutoscalingGroup
|
17
18
|
include Capistrano::Autoscale::Aws::EC2
|
18
19
|
|
19
|
-
set :
|
20
|
+
set :aws_autoscale_groups, groupnames
|
20
21
|
|
21
|
-
if
|
22
|
-
instances =
|
23
|
-
|
22
|
+
if autoscale_groups
|
23
|
+
instances = []
|
24
|
+
|
25
|
+
autoscale_groups.each do |autoscale_group|
|
26
|
+
group_instances = autoscale_group.instances.select do |instance|
|
27
|
+
instance.lifecycle_state == 'InService'
|
28
|
+
end
|
29
|
+
instances += group_instances
|
24
30
|
end
|
25
31
|
|
26
32
|
instances.each do |instance|
|
27
33
|
hostname = ec2_instance(instance.instance_id).private_ip_address
|
28
|
-
p "Autoscale
|
34
|
+
p "Autoscale deploying to: #{hostname}"
|
29
35
|
server(hostname, *args)
|
30
36
|
end
|
31
37
|
else
|
32
|
-
p "Error: No #{
|
38
|
+
p "Error: No #{groupnames} autoscale group found."
|
33
39
|
end
|
34
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-autoscale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien Glancy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: aws-sdk
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,7 +102,7 @@ dependencies:
|
|
88
102
|
version: 3.0.0
|
89
103
|
description: Deploys to all instances in a AWS AutoScale group.
|
90
104
|
email:
|
91
|
-
- support@
|
105
|
+
- support@clinchtalent.com
|
92
106
|
executables: []
|
93
107
|
extensions: []
|
94
108
|
extra_rdoc_files: []
|
@@ -124,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
138
|
version: '0'
|
125
139
|
requirements: []
|
126
140
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.6.
|
141
|
+
rubygems_version: 2.6.14
|
128
142
|
signing_key:
|
129
143
|
specification_version: 4
|
130
144
|
summary: Capistrano plugin for deploying to AWS AutoScale groups.
|