Module: Capistrano::ASG::Rolling::DSL

Defined in:
lib/capistrano/asg/rolling/dsl.rb

Overview

Adds the autoscale DSL to the Capistrano configuration:

autoscale ‘my-asg’, user: ‘deployer’, roles: %w(app assets)

Instance Method Summary collapse

Instance Method Details

#autoscale(name, properties = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/capistrano/asg/rolling/dsl.rb', line 11

def autoscale(name, properties = {})
  group = Capistrano::ASG::Rolling::AutoscaleGroup.new(name, properties)
  raise Capistrano::ASG::Rolling::NoAutoScalingGroup, "Auto Scaling Group #{name} could not be found." unless group.exists?

  Capistrano::ASG::Rolling::Configuration.autoscale_groups << group
end