Class: Automan::Cli::Stacker
- Includes:
- Thor::Actions
- Defined in:
- lib/automan/cli/stacker.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
Class Method Summary collapse
Instance Method Summary collapse
- #launch ⇒ Object
- #params ⇒ Object
- #project(app_name) ⇒ Object
- #replace_instances ⇒ Object
- #terminate ⇒ Object
- #upload_templates ⇒ Object
Methods inherited from Base
Instance Attribute Details
#app_name ⇒ Object (readonly)
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().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().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().replace_instances end |
#terminate ⇒ Object
63 64 65 |
# File 'lib/automan/cli/stacker.rb', line 63 def terminate Automan::Cloudformation::Terminator.new().terminate end |
#upload_templates ⇒ Object
90 91 92 |
# File 'lib/automan/cli/stacker.rb', line 90 def upload_templates Automan::Cloudformation::Uploader.new().upload_templates end |