class Admiral::Tasks::CloudFormation

Constants

DESCRIPTION
EXAMPLES
NAME
USAGE

Public Instance Methods

create() click to toggle source
# File lib/admiral-cloudformation/tasks.rb, line 29
def create
  template = File.read options[:template]
  create_stack stack_name(options[:environment]), template, params(options[:environment])
end
destroy() click to toggle source
Calls superclass method Admiral::Util::CloudFormation#destroy
# File lib/admiral-cloudformation/tasks.rb, line 45
def destroy
  super stack_name options[:environment]
end
init(type) click to toggle source
# File lib/admiral-cloudformation/tasks.rb, line 51
def init(type)
  raise ArgumentError, "#{type} must be one of #{EXAMPLES.join(',')}" unless EXAMPLES.include?(type)

  path = File.expand_path("../../../examples/#{type}", __FILE__)
  FileUtils.cp Dir.glob("#{path}/*"), Dir.getwd
  puts "[admiral] #{type} CloudFormation setup initialized."
end
update() click to toggle source
# File lib/admiral-cloudformation/tasks.rb, line 37
def update
  template = File.read options[:template]
  update_stack stack_name(options[:environment]), template, params(options[:environment])
end