capistrano-autoscaling 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -5
- data/capistrano-autoscaling.gemspec +1 -1
- data/lib/capistrano-autoscaling/version.rb +1 -1
- data/lib/capistrano-autoscaling.rb +21 -0
- metadata +6 -7
data/README.md
CHANGED
@@ -36,11 +36,6 @@ To enable this recipe, add following in your `config/deploy.rb`.
|
|
36
36
|
set(:autoscaling_security_groups, %w(default))
|
37
37
|
set(:autoscaling_min_size, 2)
|
38
38
|
set(:autoscaling_max_size, 10)
|
39
|
-
after "deploy:setup", "autoscaling:setup"
|
40
|
-
after "deploy", "autoscaling:update"
|
41
|
-
after "deploy:cold", "autoscaling:update"
|
42
|
-
after "deploy:rollback", "autoscaling:update"
|
43
|
-
after "autoscaling:update", "autoscaling:cleanup"
|
44
39
|
|
45
40
|
The following options are preserved to manage AutoScaling.
|
46
41
|
|
@@ -297,6 +297,12 @@ module Capistrano
|
|
297
297
|
task(:setup, :roles => :app, :except => { :no_release => true }) {
|
298
298
|
update_elb
|
299
299
|
}
|
300
|
+
_cset(:autoscaling_setup_after_hooks, ["deploy:setup"])
|
301
|
+
on(:load) {
|
302
|
+
[ autoscaling_setup_after_hooks ].flatten.each do |t|
|
303
|
+
after t, "autoscaling:setup" if t
|
304
|
+
end
|
305
|
+
}
|
300
306
|
|
301
307
|
desc("Remove AutoScaling settings.")
|
302
308
|
task(:destroy, :roles => :app, :except => { :no_release => true }) {
|
@@ -316,6 +322,12 @@ module Capistrano
|
|
316
322
|
update_alarm
|
317
323
|
resume
|
318
324
|
}
|
325
|
+
_cset(:autoscaling_update_after_hooks, ["deploy", "deploy:cold", "deploy:rollback"])
|
326
|
+
on(:load) {
|
327
|
+
[ autoscaling_update_after_hooks ].flatten.each do |t|
|
328
|
+
after t, "autoscaling:update" if t
|
329
|
+
end
|
330
|
+
}
|
319
331
|
|
320
332
|
task(:update_elb, :roles => :app, :except => { :no_release => true }) {
|
321
333
|
if autoscaling_create_elb
|
@@ -679,6 +691,9 @@ module Capistrano
|
|
679
691
|
if autoscaling_group and autoscaling_group.exists?
|
680
692
|
images = images.reject { |image| autoscaling_group.launch_configuration.image_id == image.id }
|
681
693
|
end
|
694
|
+
if autoscaling_image and autoscaling_image.exists?
|
695
|
+
images = images.reject { |image| autoscaling_image.id == image.id }
|
696
|
+
end
|
682
697
|
(images - images.last(autoscaling_keep_images-1)).each do |image|
|
683
698
|
if autoscaling_create_image and ( image and image.exists? )
|
684
699
|
snapshots = image.block_device_mappings.map { |device, block_device| block_device.snapshot_id }
|
@@ -713,6 +728,12 @@ module Capistrano
|
|
713
728
|
end
|
714
729
|
end
|
715
730
|
}
|
731
|
+
_cset(:autoscaling_cleanup_after_hooks, ["autoscaling:update"])
|
732
|
+
on(:load) {
|
733
|
+
[ autoscaling_cleanup_after_hooks ].flatten.each do |t|
|
734
|
+
after t, "autoscaling:cleanup" if t
|
735
|
+
end
|
736
|
+
}
|
716
737
|
}
|
717
738
|
}
|
718
739
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-autoscaling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - <
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - <
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '3'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: aws-sdk
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,4 +85,3 @@ specification_version: 3
|
|
85
85
|
summary: A Capistrano recipe that configures AutoScaling on Amazon Web Services infrastructure
|
86
86
|
for your application.
|
87
87
|
test_files: []
|
88
|
-
has_rdoc:
|