lib/r10k/cli/deploy.rb in r10k-1.0.0rc4 vs lib/r10k/cli/deploy.rb in r10k-1.0.0

- old
+ new

@@ -13,10 +13,15 @@ @cmd ||= Cri::Command.define do name 'deploy' usage 'deploy <subcommand>' summary 'Puppet dynamic environment deployment' + description <<-DESCRIPTION +`r10k deploy` implements the Git branch to Puppet environment workflow +(https://puppetlabs.com/blog/git-workflow-and-puppet-environments/). + DESCRIPTION + required :c, :config, 'Specify a configuration file' run do |opts, args, cmd| puts cmd.help(:verbose => opts[:verbose]) exit 0 @@ -29,10 +34,24 @@ @cmd ||= Cri::Command.define do name 'environment' usage 'environment <options> <environment> <...>' summary 'deploy environments and their dependent modules' + description <<-DESCRIPTION +`r10k deploy environment` creates and updates Puppet environments based on Git +branches. + +Environments can provide a Puppetfile at the root of the directory to deploy +independent Puppet modules. To recursively deploy an environment, pass the +`--puppetfile` flag to the command. + +**NOTE**: If an environment has a Puppetfile when it is instantiated a +recursive update will be forced. It is assumed that environments are dependent +on modules specified in the Puppetfile and an update will be automatically +scheduled. On subsequent deployments, Puppetfile deployment will default to off. + DESCRIPTION + flag :p, :puppetfile, 'Deploy modules from a puppetfile' run do |opts, args, cmd| deploy = R10K::Deployment.load_config(opts[:config]) @@ -58,9 +77,15 @@ def self.command @cmd ||= Cri::Command.define do name 'module' usage 'module [module] <module ...>' summary 'deploy modules in all environments' + + description <<-DESCRIPTION +`r10k deploy module` Deploys and updates modules inside of Puppet environments. +It will load the Puppetfile configurations out of all environments, and will +try to deploy the given module names in all environments. + DESCRIPTION run do |opts, args, cmd| deploy = R10K::Deployment.load_config(opts[:config]) task = R10K::Task::Deployment::DeployModules.new(deploy)