vaporware 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vaporware.rb +17 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c8dd20bc503251f0a2db40374f6509711e35ae2
|
4
|
+
data.tar.gz: 81483a099efb4c1c0a07db426c242a0f5b2441fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd3f0412f1cfb62407e58bea88684f5ec96739ae6995b6cb55526150a545d5fe1ff1b7a2a6b1547d54db209059b208fbadb9ceb959e77f7baa72912a9108b1d6
|
7
|
+
data.tar.gz: ba8a5132753e15c666f5d910490f24866cbbaa3103eca9d6cf9927e78c1a28cc93c9da420cf4bf8c777deb3911b921066819b947ca4c9c5ae8e71f312cc95b61
|
data/lib/vaporware.rb
CHANGED
@@ -9,7 +9,9 @@ class Vaporware
|
|
9
9
|
parameters: {},
|
10
10
|
timeout: 40, # minutes
|
11
11
|
tags: {},
|
12
|
-
on_failure: "ROLLBACK" # or: DO_NOTHING, DELETE
|
12
|
+
on_failure: "ROLLBACK", # or: DO_NOTHING, DELETE
|
13
|
+
status_max_attempts: 360,
|
14
|
+
status_delay: 10
|
13
15
|
}.merge opts
|
14
16
|
fail "You must specify a template filename!" unless options[:template_filename]
|
15
17
|
|
@@ -20,6 +22,8 @@ class Vaporware
|
|
20
22
|
@timeout = options[:timeout]
|
21
23
|
@tags = build_tags options[:tags]
|
22
24
|
@on_failure = options[:on_failure]
|
25
|
+
@status_max_attempts = options[:status_max_attempts]
|
26
|
+
@status_delay = options[:status_delay]
|
23
27
|
end
|
24
28
|
|
25
29
|
def apply
|
@@ -29,21 +33,30 @@ class Vaporware
|
|
29
33
|
def create_stack
|
30
34
|
with_progress "creation" do
|
31
35
|
@client.create_stack(stack_create_params)
|
32
|
-
@client.wait_until(:stack_create_complete, stack_name: @stack_name)
|
36
|
+
@client.wait_until(:stack_create_complete, stack_name: @stack_name) do |w|
|
37
|
+
w.max_attempts = @status_max_attempts
|
38
|
+
w.delay = @status_delay
|
39
|
+
end
|
33
40
|
end
|
34
41
|
end
|
35
42
|
|
36
43
|
def update_stack
|
37
44
|
with_progress "update" do
|
38
45
|
@client.update_stack(stack_update_params)
|
39
|
-
@client.wait_until(:stack_update_complete, stack_name: @stack_name)
|
46
|
+
@client.wait_until(:stack_update_complete, stack_name: @stack_name) do |w|
|
47
|
+
w.max_attempts = @status_max_attempts
|
48
|
+
w.delay = @status_delay
|
49
|
+
end
|
40
50
|
end
|
41
51
|
end
|
42
52
|
|
43
53
|
def delete_stack
|
44
54
|
with_progress "deletion" do
|
45
55
|
@client.delete_stack(stack_name: @stack_name)
|
46
|
-
@client.wait_until(:stack_delete_complete, stack_name: @stack_name)
|
56
|
+
@client.wait_until(:stack_delete_complete, stack_name: @stack_name) do |w|
|
57
|
+
w.max_attempts = @status_max_attempts
|
58
|
+
w.delay = @status_delay
|
59
|
+
end
|
47
60
|
end
|
48
61
|
end
|
49
62
|
|