tsudura 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tsudura/aws/ami.rb +10 -5
- data/lib/tsudura/aws/launch_config.rb +8 -6
- data/lib/tsudura/version.rb +1 -1
- 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: 43796bc36b9e1a032dd012d5c9690f28d674c223
|
4
|
+
data.tar.gz: f2e32cccffba733d2ccd58740b327db2ce4565c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6db4e83555d4c901e8fc21158eb9c732c6d6ec6eb7f21158e0d3cc450e5061607ae67aea6d203968cb0b2f9715955b4b38ce88cae86e6cef4609e0457ebbdf13
|
7
|
+
data.tar.gz: 28b3f604d193bc6dd3d4669e5f9077450e297efc407d790d13932d1ffb8566b20415c4a109bfaa117ba085dfeee92c9d64e09ae003f01516fe123d3a55eb9574
|
data/lib/tsudura/aws/ami.rb
CHANGED
@@ -28,7 +28,7 @@ module Tsudura::Aws
|
|
28
28
|
result = ec2.create_image(name: "#{@config[:service]}-#{short_env}-#{@timestamp}", instance_id: @instance_id)
|
29
29
|
result[:image_id]
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
#
|
33
33
|
# stateがavailableになるまで待ち
|
34
34
|
#
|
@@ -56,16 +56,21 @@ module Tsudura::Aws
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def all_images
|
59
|
+
tmp = []
|
60
|
+
|
59
61
|
ec2.describe_images(
|
60
62
|
owners: ["#{@config[:owner]}"],
|
61
63
|
filters: [ { name: "name", values: ["#{@config[:service]}-#{short_env}*"] }]
|
62
|
-
)
|
64
|
+
).each_page { |i| tmp.concat i.images }
|
65
|
+
|
66
|
+
tmp.map(&:image_id)
|
63
67
|
end
|
64
68
|
|
65
69
|
def available_images
|
66
|
-
|
67
|
-
|
68
|
-
|
70
|
+
tmp = []
|
71
|
+
|
72
|
+
launch_config.describe_launch_configurations.each_page { |i| tmp.concat i.launch_configurations }
|
73
|
+
tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:image_id).uniq
|
69
74
|
end
|
70
75
|
end
|
71
76
|
end
|
@@ -38,15 +38,17 @@ module Tsudura::Aws
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def available_launch_configurations
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
tmp = []
|
42
|
+
|
43
|
+
autoscaling.describe_auto_scaling_groups.each_page { |i| tmp.concat i.launch_configurations }
|
44
|
+
tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:launch_configuration_name).uniq
|
44
45
|
end
|
45
46
|
|
46
47
|
def all_launch_configurations
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
tmp = []
|
49
|
+
|
50
|
+
autoscaling.describe_launch_configurations.each_page { |i| tmp.concat i.launch_configurations }
|
51
|
+
tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:launch_configuration_name)
|
50
52
|
end
|
51
53
|
end
|
52
54
|
end
|
data/lib/tsudura/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tsudura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- onigra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|