cloudspin-stack 0.1.1 → 0.1.3
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 +16 -39
- 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: 8ca15eb2f2ce62233b6845d2742fdc44665a474c
|
4
|
+
data.tar.gz: c75883399d4b188edd8eb437d148279d5ff918e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c072155221f78a4f38c7eb4736b2e1b11e4419ed7103bc24c7845e62750595ef243f49c6254918ce1b3a2e14b228ea9fb25d7b9ca25725d9db74bb52b8c2d4c3
|
7
|
+
data.tar.gz: 3ed7a75f7ac680a0ec9f3f93445ebc57d986b1b7ca995e1111ef30db0cb994ca526897962b7c94282ae7f98a46d0289fabb5abcc5ffac8aefc931dfc2dde553f
|
data/lib/cloudspin/cli.rb
CHANGED
@@ -4,12 +4,26 @@ require 'cloudspin/stack'
|
|
4
4
|
module Cloudspin
|
5
5
|
class CLI < Thor
|
6
6
|
|
7
|
-
class_option :file
|
7
|
+
class_option :file, :banner => 'YAML-CONFIG-FILE', :type => :array
|
8
8
|
|
9
9
|
desc 'plan', 'Print the changes that will by applied when the \'stack up\' command is run'
|
10
10
|
def plan
|
11
11
|
puts "Get configuration from #{options[:file]}" if options[:file]
|
12
|
-
instance
|
12
|
+
stack = instance
|
13
|
+
options[:file].each { |config_file|
|
14
|
+
stack.add_config_from_yaml(config_file)
|
15
|
+
}
|
16
|
+
stack.plan
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'version', 'Print the version number'
|
20
|
+
def version
|
21
|
+
puts "cloudspin-stack: #{Cloudspin::Stack::VERSION}"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'info', 'Print some info about arguments, for debugging'
|
25
|
+
def info
|
26
|
+
puts "Configuration file: #{options[:file]}"
|
13
27
|
end
|
14
28
|
|
15
29
|
no_commands do
|
@@ -21,8 +35,6 @@ module Cloudspin
|
|
21
35
|
working_folder: working_folder,
|
22
36
|
statefile_folder: statefile_folder
|
23
37
|
)
|
24
|
-
# parameter_values: parameter_values
|
25
|
-
# resource_values: resource_values
|
26
38
|
end
|
27
39
|
|
28
40
|
def stack_definition
|
@@ -45,41 +57,6 @@ module Cloudspin
|
|
45
57
|
Pathname.new(stack_project_folder + '/state').realpath.to_s
|
46
58
|
end
|
47
59
|
|
48
|
-
def parameter_values
|
49
|
-
{
|
50
|
-
'deployment_identifier' => 'my_env',
|
51
|
-
'component' => 'my_component',
|
52
|
-
'estate' => 'my_estate',
|
53
|
-
'base_dns_domain' => 'my_domain'
|
54
|
-
}
|
55
|
-
end
|
56
|
-
|
57
|
-
def resource_values
|
58
|
-
{
|
59
|
-
'assume_role_arn' => assume_role_arn
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
def assume_role_arn
|
64
|
-
configuration['assume_role_arn']
|
65
|
-
end
|
66
|
-
|
67
|
-
def configuration
|
68
|
-
@config ||= load_config
|
69
|
-
end
|
70
|
-
|
71
|
-
def load_config
|
72
|
-
default_config.merge(local_config)
|
73
|
-
end
|
74
|
-
|
75
|
-
def local_config
|
76
|
-
YAML.load_file(stack_project_folder + '/spin-local.yaml') || {}
|
77
|
-
end
|
78
|
-
|
79
|
-
def default_config
|
80
|
-
YAML.load_file(stack_project_folder + '/spin-default.yaml') || {}
|
81
|
-
end
|
82
|
-
|
83
60
|
end
|
84
61
|
|
85
62
|
def self.exit_on_failure?
|