bin/mu-deploy in cloud-mu-2.1.0beta vs bin/mu-deploy in cloud-mu-3.0.0beta
- old
+ new
@@ -40,10 +40,12 @@
opt :update, "Update the stored configuration of an existing deployment, instead of creating a new deploy.", :require => false, :type => :string
opt :cloudformation, "Emit Amazon Web Services targets into a CloudFormation template instead of building real services.", :require => false, :default => false, :type => :boolean
opt :cloudformation_output, "When emitting a CloudFormation template, put the final product in this location instead of in /tmp. Takes a local file path or an s3:// URI. S3 uploads will be given AUTHENTICATED-READ permissions.", :require => false, :type => :string
opt :verbose, "Display debugging output.", :require => false, :default => false, :type => :boolean
opt :quiet, "Display minimal output.", :require => false, :default => false, :type => :boolean
+ opt :color, "Display log output in human-friendly colors.", :require => false, :default => true, :type => :boolean
+ opt :credentials, "Set the default credential set to use for resources which do not specify a default", :require => false, :type => :string
end
verbosity = MU::Logger::NORMAL
verbosity = MU::Logger::LOUD if $opts[:verbose]
verbosity = MU::Logger::QUIET if $opts[:quiet]
@@ -56,11 +58,11 @@
MU.log "--liveupdate only valid when combined with --update", MU::ERR
exit 1
end
MU.setVar("curRegion", $opts[:region]) if $opts[:region]
-MU.setLogging(verbosity, $opts[:web])
+MU.setLogging(verbosity, $opts[:web], STDOUT, $opts[:color])
# Parse any paramater options into something useable.
params = Hash.new
$opts[:parameter].each { |param|
name, value = param.split(/\s*=\s*/, 2)
@@ -85,15 +87,15 @@
end
MU.log "Loading #{config}", html: $opts[:web], details: $opts
-conf_engine = MU::Config.new(config, $opts[:skipinitialupdates], params: params, updating: $opts[:update])
+conf_engine = MU::Config.new(config, $opts[:skipinitialupdates], params: params, updating: $opts[:update], default_credentials: $opts[:credentials])
stack_conf = conf_engine.config
if $opts[:dryrun] or $opts[:verbose]
- puts stack_conf.to_yaml
+ puts MU::Config.stripConfig(stack_conf).to_yaml
conf_engine.visualizeDependencies
end
if $opts[:dryrun]
MU.log("#{$config} loaded successfully.", html: $opts[:web])
@@ -110,10 +112,11 @@
}
begin
cost_dummy_deploy = MU::Deploy.new(
$opts[:environment],
verbosity: MU::Logger::SILENT,
+ color: $opts[:color],
force_cloudformation: true,
cloudformation_path: "/dev/null",
nocleanup: false,
no_artifacts: true,
stack_conf: stack_conf
@@ -133,10 +136,11 @@
# stack_conf = old_conf.merge(stack_conf)
deploy.updateBasketofKittens(stack_conf)
deployer = MU::Deploy.new(
deploy.environment,
verbosity: verbosity,
+ color: $opts[:color],
webify_logs: $opts[:web],
nocleanup: true, # don't accidentally blow up an existing deploy
stack_conf: stack_conf,
deploy_id: $opts[:update],
deploy_obj: deploy
@@ -154,9 +158,10 @@
end
deployer = MU::Deploy.new(
$opts[:environment],
verbosity: verbosity,
+ color: $opts[:color],
webify_logs: $opts[:web],
nocleanup: $opts[:nocleanup],
cloudformation_path: cfm_path,
force_cloudformation: $opts[:cloudformation],
stack_conf: stack_conf