cloudspin-stack 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudspin/cli.rb +15 -20
- data/lib/cloudspin/stack/version.rb +1 -1
- 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: 6270c0e9737073233d8762c0b9ba46f1705ae47d
|
4
|
+
data.tar.gz: a47fa583aa4bed7df2b768426724dfa278871074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0add6911d011e494c8b9270383adc5001c6e08f316b2e0c14ebcaa2141637073162319ed22bbf9bcf081039c8ecaa138e031f062cbf54ef4a59fe09d9fc61f
|
7
|
+
data.tar.gz: 49e34de90b325df00c5bc791db6612823883c1a52375c6525104a01ee124be013164fa13bd3214a5504c24d59bcf546860db3ea038d5e4d9d3a6baee04911893
|
data/lib/cloudspin/cli.rb
CHANGED
@@ -30,33 +30,33 @@ module Cloudspin
|
|
30
30
|
:default => './state',
|
31
31
|
:desc => 'Folder to create and store local state'
|
32
32
|
|
33
|
-
desc 'up
|
33
|
+
desc 'up', 'Create or update the stack instance'
|
34
34
|
option :dry, :type => :boolean, :default => false
|
35
35
|
option :plan, :type => :boolean, :default => false
|
36
|
-
def up
|
36
|
+
def up
|
37
37
|
if options[:plan] && options[:dry]
|
38
|
-
puts instance
|
38
|
+
puts instance.plan_dry
|
39
39
|
elsif options[:plan] && ! options[:dry]
|
40
|
-
puts instance
|
40
|
+
puts instance.plan
|
41
41
|
elsif ! options[:plan] && options[:dry]
|
42
|
-
puts instance
|
42
|
+
puts instance.up_dry
|
43
43
|
else
|
44
|
-
instance
|
44
|
+
instance.up
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
desc 'down
|
48
|
+
desc 'down', 'Destroy the stack instance'
|
49
49
|
option :dry, :type => :boolean, :default => false
|
50
50
|
option :plan, :type => :boolean, :default => false
|
51
|
-
def down
|
51
|
+
def down
|
52
52
|
if options[:plan] && options[:dry]
|
53
|
-
puts instance
|
53
|
+
puts instance.plan_dry(plan_destroy: true)
|
54
54
|
elsif options[:plan] && ! options[:dry]
|
55
|
-
puts instance
|
55
|
+
puts instance.plan(plan_destroy: true)
|
56
56
|
elsif ! options[:plan] && options[:dry]
|
57
|
-
puts instance
|
57
|
+
puts instance.down_dry
|
58
58
|
else
|
59
|
-
instance
|
59
|
+
instance.down
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -72,19 +72,14 @@ module Cloudspin
|
|
72
72
|
|
73
73
|
no_commands do
|
74
74
|
|
75
|
-
def instance
|
76
|
-
|
77
|
-
|
75
|
+
def instance
|
76
|
+
Cloudspin::Stack::Instance.from_files(
|
77
|
+
options[:file],
|
78
78
|
stack_definition: stack_definition,
|
79
79
|
backend_config: {},
|
80
80
|
working_folder: options[:work],
|
81
81
|
statefile_folder: options[:state]
|
82
82
|
)
|
83
|
-
options[:file].each { |config_file|
|
84
|
-
stack.add_config_from_yaml(config_file)
|
85
|
-
}
|
86
|
-
stack.add_parameter_values({ :instance_identifier => id })
|
87
|
-
stack
|
88
83
|
end
|
89
84
|
|
90
85
|
def stack_definition
|