module CfDeployer
To use this driver instead of Route53 (the default), use the setting 'dns-driver'
Constants
- VERSION
Public Class Methods
config(opts)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/cf_deployer.rb, line 74 def self.diff opts config = self.parseconfig opts, false Application.new(config).diff end
json(opts)
click to toggle source
# File lib/cf_deployer.rb, line 69 def self.json opts config = self.parseconfig opts, false Application.new(config).json end
kill_inactive(opts)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/cf_deployer.rb, line 87 def self.switch opts config = self.parseconfig opts, false Application.new(config).switch end
Private Class Methods
parseconfig(options, validate_inputs = true)
click to toggle source
# File lib/cf_deployer.rb, line 99 def self.parseconfig options, validate_inputs = true AWS.config(:region => options[:region]) if options[:region] options[:cli_overrides] = {:settings => options.delete(:settings), :inputs => options.delete(:inputs)} config = ConfigLoader.new.load options ConfigValidation.new.validate config, validate_inputs config end