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.2.8"
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
Application.new(config).deploy
end
|
.destroy(opts) ⇒ Object
57
58
59
60
61
|
# File 'lib/cf_deployer.rb', line 57
def self.destroy opts
config = self.parseconfig opts, false
Application.new(config).destroy
end
|
.json(opts) ⇒ Object
63
64
65
66
|
# File 'lib/cf_deployer.rb', line 63
def self.json opts
config = self.parseconfig opts, false
Application.new(config).json
end
|
.kill_inactive(opts) ⇒ Object
81
82
83
84
|
# File 'lib/cf_deployer.rb', line 81
def self.kill_inactive opts
config = self.parseconfig opts, false
Application.new(config).kill_inactive
end
|
.parseconfig(options, validate_inputs = true) ⇒ Object
88
89
90
91
92
93
94
95
|
# File 'lib/cf_deployer.rb', line 88
def self.parseconfig options, validate_inputs = true
AWS.config(:region => options[:region]) if options[:region]
split_settings = options.dup
split_settings.merge!({:cli_overrides => {:settings => split_settings.delete(:settings), :inputs => split_settings.delete(:inputs)} })
config = ConfigLoader.new.load split_settings
ConfigValidation.new.validate config, validate_inputs
config
end
|
.status(opts) ⇒ Object
68
69
70
71
72
73
74
|
# File 'lib/cf_deployer.rb', line 68
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
76
77
78
79
|
# File 'lib/cf_deployer.rb', line 76
def self.switch opts
config = self.parseconfig opts, false
Application.new(config).switch
end
|