Module: Opsicle::DeployHelper

Included in:
ChefUpdate, Deploy, ExecuteRecipes
Defined in:
lib/opsicle/deploy_helper.rb

Instance Method Summary collapse

Instance Method Details

#launch_stack_monitor(response, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/opsicle/deploy_helper.rb', line 3

def launch_stack_monitor(response, options={})
  # Monitoring preferences
  if options[:browser]
    open_deploy(response[:deployment_id])
  elsif options[:monitor] # Default option
    Output.say_verbose "Starting Stack Monitor..."
    @monitor = Opsicle::Monitor::App.new(@environment, parse_options(response, options))
    @monitor.start
  end
end

#open_deploy(deployment_id) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/opsicle/deploy_helper.rb', line 14

def open_deploy(deployment_id)
  if deployment_id
    command = "open 'https://console.aws.amazon.com/opsworks/home?#/stack/#{client.config.opsworks_config[:stack_id]}/deployments'"
    Output.say_verbose "Executing shell command: #{command}"
    %x(#{command})
  else
    Output.say "Deploy failed. No deployment_id was received from OpsWorks", :error
  end
end