class CfDeployer::DeploymentStrategy::CreateOrUpdate
Constants
- BLUE_GREEN_STRATEGY
Public Instance Methods
deploy()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 19 def deploy hook_to_run = stack.exists? ? :'after-update' : :'after-create' stack.deploy warm_up_inactive_stack get_parameters_outputs(inactive_stack) run_hook(hook_to_run) end
destroy()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 31 def destroy delete_stack stack end
exists?()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 6 def exists? stack.exists? end
kill_inactive()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 35 def kill_inactive raise ApplicationError.new('There is no inactive version to kill for Create or Update Deployments.') end
output_value(key)
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 27 def output_value(key) exists? ? stack.output(key) : "The value will be referenced from the output #{key} of undeployed component #{component_name}" end
status(get_resource_statuses = false)
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 10 def status get_resource_statuses = false my_status = {} my_status[stack.name] = {} my_status[stack.name][:status] = stack.status my_status[stack.name][:resources] = stack.resource_statuses if stack.exists? && get_resource_statuses my_status end
switch()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 39 def switch raise ApplicationError.new('There is no inactive version to switch to for Create or Update Deployments. Redeploy the version you want') end
Private Instance Methods
active_stack()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 53 def active_stack nil end
inactive_stack()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 49 def inactive_stack stack end
stack()
click to toggle source
# File lib/cf_deployer/deployment_strategy/create_or_update.rb, line 45 def stack Stack.new(stack_prefix, @component_name, @context) end