Class: SimpleDeploy::StackCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_deploy/stack/stack_creator.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ StackCreator

Returns a new instance of StackCreator.



6
7
8
9
10
11
12
# File 'lib/simple_deploy/stack/stack_creator.rb', line 6

def initialize(args)
  @config = SimpleDeploy.config
  @logger = SimpleDeploy.logger
  @entry = args[:entry]
  @name = args[:name]
  @template = read_template_from_file args[:template_file]
end

Instance Method Details

#createObject



14
15
16
17
18
19
# File 'lib/simple_deploy/stack/stack_creator.rb', line 14

def create
  @logger.info "Creating Cloud Formation stack #{@name}."
  cloud_formation.create :name => @name,
                         :parameters => read_parameters_from_entry,
                         :template => @template
end