Class: DockerRailsProxy::Stack::Create

Inherits:
DockerRailsProxy::Stack show all
Defined in:
lib/docker_rails_proxy/commands/stack/create.rb

Constant Summary collapse

YML_EXTENSIONS =
%w(.yml .yaml).freeze

Constants inherited from DockerRailsProxy::Stack

RUNNING_STATUSES

Constants included from Callbacks

Callbacks::INHERITABLE_CALLBACKS, Callbacks::UNINHERITABLE_CALLBACKS

Instance Attribute Summary collapse

Attributes inherited from DockerRailsProxy::Stack

#options

Attributes inherited from Base

#additional_arguments, #additional_arguments_options, #arguments

Instance Method Summary collapse

Methods inherited from Base

build_path, call, command, execute, #initialize

Methods included from Logger

included, #logger

Methods included from Rsync

included, #sync

Methods included from Callbacks

included

Methods included from InheritableAttributes

included

Constructor Details

This class inherits a constructor from DockerRailsProxy::Base

Instance Attribute Details

#dataObject

Returns the value of attribute data.



10
11
12
# File 'lib/docker_rails_proxy/commands/stack/create.rb', line 10

def data
  @data
end

#outputsObject

Returns the value of attribute outputs.



10
11
12
# File 'lib/docker_rails_proxy/commands/stack/create.rb', line 10

def outputs
  @outputs
end

#parametersObject

Returns the value of attribute parameters.



10
11
12
# File 'lib/docker_rails_proxy/commands/stack/create.rb', line 10

def parameters
  @parameters
end

Instance Method Details

#processObject



63
64
65
66
67
68
69
70
71
72
# File 'lib/docker_rails_proxy/commands/stack/create.rb', line 63

def process
  system <<-EOS
    aws cloudformation create-stack \
      --stack-name '#{options[:stack_name]}' \
      --parameters #{parameters.join(' ')} \
      --template-body 'file://#{options[:jsonfile]}' \
      --capabilities 'CAPABILITY_IAM' \
      --profile '#{options[:profile]}'
  EOS
end