Class: Automan::Cli::Stacker
- Inherits:
-
Base
- Object
- Thor
- Base
- Automan::Cli::Stacker
show all
- Includes:
- Thor::Actions
- Defined in:
- lib/automan/cli/stacker.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #version
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
113
114
115
|
# File 'lib/automan/cli/stacker.rb', line 113
def app_name
@app_name
end
|
Class Method Details
.source_root ⇒ Object
107
108
109
|
# File 'lib/automan/cli/stacker.rb', line 107
def self.source_root
File.join(File.dirname(__FILE__),'..','..', '..')
end
|
Instance Method Details
#launch ⇒ Object
46
47
48
|
# File 'lib/automan/cli/stacker.rb', line 46
def launch
Automan::Cloudformation::Launcher.new(options).launch_or_update
end
|
#params ⇒ Object
101
102
103
104
|
# File 'lib/automan/cli/stacker.rb', line 101
def params
h = Automan::Cloudformation::Launcher.new(options).parse_template_parameters
say JSON.pretty_generate h
end
|
#project(app_name) ⇒ Object
115
116
117
118
119
120
121
122
123
|
# File 'lib/automan/cli/stacker.rb', line 115
def project(app_name)
@app_name = app_name
say "\nCreating stacker project: #{app_name}\n", :yellow
directory 'templates/stacker', app_name
[app_name, "launch_#{app_name}.sh"].each do |file|
chmod File.join(app_name, 'bin', file), 0755
end
end
|
#replace_instances ⇒ Object
74
75
76
|
# File 'lib/automan/cli/stacker.rb', line 74
def replace_instances
Automan::Cloudformation::Replacer.new(options).replace_instances
end
|
#terminate ⇒ Object
63
64
65
|
# File 'lib/automan/cli/stacker.rb', line 63
def terminate
Automan::Cloudformation::Terminator.new(options).terminate
end
|
#upload_templates ⇒ Object
90
91
92
|
# File 'lib/automan/cli/stacker.rb', line 90
def upload_templates
Automan::Cloudformation::Uploader.new(options).upload_templates
end
|