elbas 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elbas/capistrano.rb +9 -3
- data/lib/elbas/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140ada691d91ac700a8ff21a4215b2460b15e668
|
4
|
+
data.tar.gz: 09b1414917cb47ee09853b36d831c94e10738b3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2997b9111453d11d8b8509ebf73ed2b677135012f38978f884227188c832c1d0ec100893f0e8835c8740b3d4ae096c4d4ff459055743f5098dba6709aea3c67
|
7
|
+
data.tar.gz: 93ec65251ddd31cede0c68c8be24731b1abef52ce2257d01bd94c8fb5d0d5c6a38aa48fa6a03f0be5a9fe29453ff31d06da2ce0eb44c1701bf53adf9e2086ba4
|
data/lib/elbas/capistrano.rb
CHANGED
@@ -7,14 +7,20 @@ def autoscale(groupname, *args)
|
|
7
7
|
include Capistrano::DSL
|
8
8
|
include Elbas::AWS::AutoScaling
|
9
9
|
|
10
|
-
autoscale_group
|
10
|
+
autoscale_group = autoscaling.groups[groupname]
|
11
|
+
running_instances = autoscale_group.ec2_instances.filter('instance-state-name', 'running')
|
12
|
+
|
11
13
|
set :aws_autoscale_group, groupname
|
12
14
|
|
13
|
-
|
15
|
+
running_instances.each do |instance|
|
14
16
|
hostname = instance.dns_name || instance.private_ip_address
|
15
17
|
p "ELBAS: Adding server: #{hostname}"
|
16
18
|
server(hostname, *args)
|
17
19
|
end
|
18
20
|
|
19
|
-
|
21
|
+
if running_instances.size > 0
|
22
|
+
after('deploy', 'elbas:scale')
|
23
|
+
else
|
24
|
+
p "ELBAS: AMI could not be created because no running instances were found. Is your autoscale group name correct?"
|
25
|
+
end
|
20
26
|
end
|
data/lib/elbas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elbas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logan Serman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -188,3 +188,4 @@ test_files:
|
|
188
188
|
- spec/support/stubs/DescribeTags.200.xml
|
189
189
|
- spec/support/stubs/UpdateAutoScalingGroup.200.xml
|
190
190
|
- spec/support/stubs/security-credentials.200.json
|
191
|
+
has_rdoc:
|