capistrano-autoscale 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/autoscale/version.rb +1 -1
- data/lib/capistrano/autoscale.rb +11 -7
- 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: 127f02fcf6d739818409d94afe990c2102215341
|
4
|
+
data.tar.gz: ddf451b9e07ce97e37f0343125b38d75f497f3bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba8823efdb7a5e1ca0a6a47f5df08e90646ee2d3f2d130b4f97864999c82076c02d40153ebf0c5a3bc17b161116d8a99ffa490175e3935f6226476066745cc4
|
7
|
+
data.tar.gz: 80fea5bcbd2dbdf9b0ba69c5348030d831db84412bc8c0d878676532442a6b9f9877529b2e0d7812e89bcf2218e79fbc44b5072a1f48358584b5a1dd9f0cbb2a
|
data/lib/capistrano/autoscale.rb
CHANGED
@@ -18,13 +18,17 @@ def autoscale(groupname, *args)
|
|
18
18
|
|
19
19
|
set :aws_autoscale_group, groupname
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
if autoscale_group
|
22
|
+
instances = autoscale_group.instances.select do |instance|
|
23
|
+
instance.lifecycle_state == 'InService'
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
instances.each do |instance|
|
27
|
+
hostname = ec2_instance(instance.instance_id).private_ip_address
|
28
|
+
p "Autoscale Deploying to: #{hostname}"
|
29
|
+
server(hostname, *args)
|
30
|
+
end
|
31
|
+
else
|
32
|
+
p "Error: No #{groupname} autoscale group found."
|
29
33
|
end
|
30
34
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien Glancy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|