Module: CfDeployer

Defined in:
lib/cf_deployer/driver/verisign_driver.rb,
lib/cf_deployer.rb,
lib/cf_deployer/cli.rb,
lib/cf_deployer/hook.rb,
lib/cf_deployer/stack.rb,
lib/cf_deployer/logger.rb,
lib/cf_deployer/version.rb,
lib/cf_deployer/defaults.rb,
lib/cf_deployer/component.rb,
lib/cf_deployer/application.rb,
lib/cf_deployer/config_loader.rb,
lib/cf_deployer/driver/dry_run.rb,
lib/cf_deployer/driver/instance.rb,
lib/cf_deployer/status_presenter.rb,
lib/cf_deployer/application_error.rb,
lib/cf_deployer/config_validation.rb,
lib/cf_deployer/driver/elb_driver.rb,
lib/cf_deployer/driver/route53_driver.rb,
lib/cf_deployer/deployment_strategy/base.rb,
lib/cf_deployer/driver/auto_scaling_group.rb,
lib/cf_deployer/driver/cloud_formation_driver.rb,
lib/cf_deployer/deployment_strategy/blue_green.rb,
lib/cf_deployer/deployment_strategy/cname_swap.rb,
lib/cf_deployer/deployment_strategy/create_or_update.rb,
lib/cf_deployer/deployment_strategy/auto_scaling_group_swap.rb

Overview

To use this driver instead of Route53 (the default), use the setting ‘dns-driver’

Defined Under Namespace

Modules: Defaults, DeploymentStrategy, Driver Classes: Application, ApplicationError, CLI, Component, ConfigLoader, ConfigValidation, Hook, Log, ResourceNotInReadyState, Stack, StatusPresenter

Constant Summary collapse

VERSION =
"1.6.0"

Class Method Summary collapse

Class Method Details

.config(opts) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/cf_deployer.rb', line 43

def self.config opts
  config = self.parseconfig opts, false
  config[:components].each do |component, c_hash|
    c_hash.delete :defined_parameters
  end
  puts config.select { |k,v| [:components, :environments, :environment, :application, :'config-file'].include? k.to_sym }.to_yaml
end

.deploy(opts) ⇒ Object



51
52
53
54
55
# File 'lib/cf_deployer.rb', line 51

def self.deploy opts
  config = self.parseconfig opts
  # AWS.config(:logger => Logger.new($stdout))
  Application.new(config).deploy
end

.destroy(opts) ⇒ Object



63
64
65
66
67
# File 'lib/cf_deployer.rb', line 63

def self.destroy opts
  config = self.parseconfig opts, false
  # AWS.config(:logger => Logger.new($stdout))
  Application.new(config).destroy
end

.diff(opts) ⇒ Object



74
75
76
77
# File 'lib/cf_deployer.rb', line 74

def self.diff opts
  config = self.parseconfig opts, false
  Application.new(config).diff
end

.json(opts) ⇒ Object



69
70
71
72
# File 'lib/cf_deployer.rb', line 69

def self.json opts
  config = self.parseconfig opts, false
  Application.new(config).json
end

.kill_inactive(opts) ⇒ Object



92
93
94
95
# File 'lib/cf_deployer.rb', line 92

def self.kill_inactive opts
  config = self.parseconfig opts, false
  Application.new(config).kill_inactive
end

.runhook(opts) ⇒ Object



57
58
59
60
61
# File 'lib/cf_deployer.rb', line 57

def self.runhook opts
  config = self.parseconfig opts
  # AWS.config(:logger => Logger.new($stdout))
  Application.new(config).run_hook opts[:component].first, opts[:hook_name]
end

.status(opts) ⇒ Object



79
80
81
82
83
84
85
# File 'lib/cf_deployer.rb', line 79

def self.status opts
  config = self.parseconfig opts, false
  status_info = Application.new(config).status opts[:component].first, opts[:verbosity]
  presenter = CfDeployer::StatusPresenter.new status_info, opts[:verbosity]

  puts opts[:'output-format'] == 'json' ? presenter.to_json : presenter.output
end

.switch(opts) ⇒ Object



87
88
89
90
# File 'lib/cf_deployer.rb', line 87

def self.switch opts
  config = self.parseconfig opts, false
  Application.new(config).switch
end