diff --git a/install.rb b/install.rb index 7627a8d11..72acb24f5 100755 --- a/install.rb +++ b/install.rb @@ -1,496 +1,443 @@ #! /usr/bin/env ruby #-- # Copyright 2004 Austin Ziegler # Install utility. Based on the original installation script for rdoc by the # Pragmatic Programmers. # # This program is free software. It may be redistributed and/or modified under # the terms of the GPL version 2 (or later) or the Ruby licence. # # Usage # ----- # In most cases, if you have a typical project layout, you will need to do # absolutely nothing to make this work for you. This layout is: # # bin/ # executable files -- "commands" # lib/ # the source of the library # tests/ # unit tests # # The default behaviour: # 1) Run all unit test files (ending in .rb) found in all directories under # tests/. # 2) Build Rdoc documentation from all files in bin/ (excluding .bat and .cmd), # all .rb files in lib/, ./README, ./ChangeLog, and ./Install. # 3) Build ri documentation from all files in bin/ (excluding .bat and .cmd), # and all .rb files in lib/. This is disabled by default on Microsoft Windows. # 4) Install commands from bin/ into the Ruby bin directory. On Windows, if a # if a corresponding batch file (.bat or .cmd) exists in the bin directory, # it will be copied over as well. Otherwise, a batch file (always .bat) will # be created to run the specified command. # 5) Install all library files ending in .rb from lib/ into Ruby's # site_lib/version directory. # #++ require 'rbconfig' require 'find' require 'fileutils' begin require 'ftools' # apparently on some system ftools doesn't get loaded $haveftools = true rescue LoadError puts "ftools not found. Using FileUtils instead.." $haveftools = false end require 'optparse' require 'ostruct' begin require 'rdoc/rdoc' $haverdoc = true rescue LoadError puts "Missing rdoc; skipping documentation" $haverdoc = false end -begin - if $haverdoc - ronn = %x{which ronn} - $haveman = true - else - $haveman = false - end -rescue - puts "Missing ronn; skipping man page creation" - $haveman = false -end - PREREQS = %w{openssl facter xmlrpc/client xmlrpc/server cgi} MIN_FACTER_VERSION = 1.5 InstallOptions = OpenStruct.new def glob(list) g = list.map { |i| Dir.glob(i) } g.flatten! g.compact! g.reject! { |e| e =~ /\.svn/ } g end # Set these values to what you want installed. configs = glob(%w{conf/auth.conf}) sbins = glob(%w{sbin/*}) bins = glob(%w{bin/*}) rdoc = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ } ri = glob(%w{bin/*.rb sbin/* lib/**/*.rb}).reject { |e| e=~ /\.(bat|cmd)$/ } man = glob(%w{man/man[0-9]/*}) libs = glob(%w{lib/**/*.rb lib/**/*.py lib/puppet/util/command_line/*}) tests = glob(%w{test/**/*.rb}) def do_configs(configs, target, strip = 'conf/') Dir.mkdir(target) unless File.directory? target configs.each do |cf| ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, '')) File.install(cf, ocf, 0644, true) end end def do_bins(bins, target, strip = 's?bin/') Dir.mkdir(target) unless File.directory? target bins.each do |bf| obf = bf.gsub(/#{strip}/, '') install_binfile(bf, obf, target) end end def do_libs(libs, strip = 'lib/') libs.each do |lf| olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, '')) op = File.dirname(olf) if $haveftools File.makedirs(op, true) File.chmod(0755, op) File.install(lf, olf, 0644, true) else FileUtils.makedirs(op, {:mode => 0755, :verbose => true}) FileUtils.chmod(0755, op) FileUtils.install(lf, olf, {:mode => 0644, :verbose => true}) end end end def do_man(man, strip = 'man/') man.each do |mf| omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, '')) om = File.dirname(omf) if $haveftools File.makedirs(om, true) File.chmod(0755, om) File.install(mf, omf, 0644, true) else FileUtils.makedirs(om, {:mode => 0755, :verbose => true}) FileUtils.chmod(0755, om) FileUtils.install(mf, omf, {:mode => 0644, :verbose => true}) end gzip = %x{which gzip} gzip.chomp! %x{#{gzip} -f #{omf}} end end # Verify that all of the prereqs are installed def check_prereqs PREREQS.each { |pre| begin require pre if pre == "facter" # to_f isn't quite exact for strings like "1.5.1" but is good # enough for this purpose. facter_version = Facter.version.to_f if facter_version < MIN_FACTER_VERSION puts "Facter version: #{facter_version}; minimum required: #{MIN_FACTER_VERSION}; cannot install" exit -1 end end rescue LoadError puts "Could not load #{pre}; cannot install" exit -1 end } end ## # Prepare the file installation. # def prepare_installation $operatingsystem = Facter["operatingsystem"].value InstallOptions.configs = true # Only try to do docs if we're sure they have rdoc if $haverdoc InstallOptions.rdoc = true InstallOptions.ri = $operatingsystem != "windows" else InstallOptions.rdoc = false InstallOptions.ri = false end - if $haveman - InstallOptions.man = true - if $operatingsystem == "windows" - InstallOptions.man = false - end - else - InstallOptions.man = false - end - InstallOptions.tests = true ARGV.options do |opts| opts.banner = "Usage: #{File.basename($0)} [options]" opts.separator "" opts.on('--[no-]rdoc', 'Prevents the creation of RDoc output.', 'Default on.') do |onrdoc| InstallOptions.rdoc = onrdoc end opts.on('--[no-]ri', 'Prevents the creation of RI output.', 'Default off on mswin32.') do |onri| InstallOptions.ri = onri end - opts.on('--[no-]man', 'Prevents the creation of man pages.', 'Default on.') do |onman| - InstallOptions.man = onman - end opts.on('--[no-]tests', 'Prevents the execution of unit tests.', 'Default on.') do |ontest| InstallOptions.tests = ontest end opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |ontest| InstallOptions.configs = ontest end opts.on('--destdir[=OPTIONAL]', 'Installation prefix for all targets', 'Default essentially /') do |destdir| InstallOptions.destdir = destdir end opts.on('--configdir[=OPTIONAL]', 'Installation directory for config files', 'Default /etc/puppet') do |configdir| InstallOptions.configdir = configdir end opts.on('--bindir[=OPTIONAL]', 'Installation directory for binaries', 'overrides Config::CONFIG["bindir"]') do |bindir| InstallOptions.bindir = bindir end opts.on('--sbindir[=OPTIONAL]', 'Installation directory for system binaries', 'overrides Config::CONFIG["sbindir"]') do |sbindir| InstallOptions.sbindir = sbindir end opts.on('--sitelibdir[=OPTIONAL]', 'Installation directory for libraries', 'overrides Config::CONFIG["sitelibdir"]') do |sitelibdir| InstallOptions.sitelibdir = sitelibdir end opts.on('--mandir[=OPTIONAL]', 'Installation directory for man pages', 'overrides Config::CONFIG["mandir"]') do |mandir| InstallOptions.mandir = mandir end opts.on('--quick', 'Performs a quick installation. Only the', 'installation is done.') do |quick| InstallOptions.rdoc = false InstallOptions.ri = false InstallOptions.tests = false InstallOptions.configs = true end opts.on('--full', 'Performs a full installation. All', 'optional installation steps are run.') do |full| InstallOptions.rdoc = true - InstallOptions.man = true InstallOptions.ri = true InstallOptions.tests = true InstallOptions.configs = true end opts.separator("") opts.on_tail('--help', "Shows this help text.") do $stderr.puts opts exit end opts.parse! end tmpdirs = [ENV['TMP'], ENV['TEMP'], "/tmp", "/var/tmp", "."] version = [Config::CONFIG["MAJOR"], Config::CONFIG["MINOR"]].join(".") libdir = File.join(Config::CONFIG["libdir"], "ruby", version) # Mac OS X 10.5 and higher declare bindir and sbindir as # /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin # /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/sbin # which is not generally where people expect executables to be installed # These settings are appropriate defaults for all OS X versions. if RUBY_PLATFORM =~ /^universal-darwin[\d\.]+$/ Config::CONFIG['bindir'] = "/usr/bin" Config::CONFIG['sbindir'] = "/usr/sbin" end if not InstallOptions.configdir.nil? configdir = InstallOptions.configdir else configdir = "/etc/puppet" end if not InstallOptions.bindir.nil? bindir = InstallOptions.bindir else bindir = Config::CONFIG['bindir'] end if not InstallOptions.sbindir.nil? sbindir = InstallOptions.sbindir else sbindir = Config::CONFIG['sbindir'] end if not InstallOptions.sitelibdir.nil? sitelibdir = InstallOptions.sitelibdir else sitelibdir = Config::CONFIG["sitelibdir"] if sitelibdir.nil? sitelibdir = $LOAD_PATH.find { |x| x =~ /site_ruby/ } if sitelibdir.nil? sitelibdir = File.join(libdir, "site_ruby") elsif sitelibdir !~ Regexp.quote(version) sitelibdir = File.join(sitelibdir, version) end end end if not InstallOptions.mandir.nil? mandir = InstallOptions.mandir else mandir = Config::CONFIG['mandir'] end # To be deprecated once people move over to using --destdir option if (destdir = ENV['DESTDIR']) configdir = "#{destdir}#{configdir}" bindir = "#{destdir}#{bindir}" sbindir = "#{destdir}#{sbindir}" mandir = "#{destdir}#{mandir}" sitelibdir = "#{destdir}#{sitelibdir}" FileUtils.makedirs(configdir) if InstallOptions.configs FileUtils.makedirs(bindir) FileUtils.makedirs(sbindir) FileUtils.makedirs(mandir) FileUtils.makedirs(sitelibdir) # This is the new way forward elsif (destdir = InstallOptions.destdir) configdir = "#{destdir}#{configdir}" bindir = "#{destdir}#{bindir}" sbindir = "#{destdir}#{sbindir}" mandir = "#{destdir}#{mandir}" sitelibdir = "#{destdir}#{sitelibdir}" FileUtils.makedirs(configdir) if InstallOptions.configs FileUtils.makedirs(bindir) FileUtils.makedirs(sbindir) FileUtils.makedirs(mandir) FileUtils.makedirs(sitelibdir) end tmpdirs << bindir InstallOptions.tmp_dirs = tmpdirs.compact InstallOptions.site_dir = sitelibdir InstallOptions.config_dir = configdir InstallOptions.bin_dir = bindir InstallOptions.sbin_dir = sbindir InstallOptions.lib_dir = libdir InstallOptions.man_dir = mandir end ## # Build the rdoc documentation. Also, try to build the RI documentation. # def build_rdoc(files) return unless $haverdoc begin r = RDoc::RDoc.new r.document(["--main", "README", "--title", "Puppet -- Site Configuration Management", "--line-numbers"] + files) rescue RDoc::RDocError => e $stderr.puts e.message rescue Exception => e $stderr.puts "Couldn't build RDoc documentation\n#{e.message}" end end def build_ri(files) return unless $haverdoc begin ri = RDoc::RDoc.new #ri.document(["--ri-site", "--merge"] + files) ri.document(["--ri-site"] + files) rescue RDoc::RDocError => e $stderr.puts e.message rescue Exception => e $stderr.puts "Couldn't build Ri documentation\n#{e.message}" $stderr.puts "Continuing with install..." end end -def build_man(bins, sbins) - return unless $haveman - begin - # Locate ronn - ronn = %x{which ronn} - ronn.chomp! - # Create puppet.conf.5 man page - %x{bin/puppetdoc --reference configuration > ./man/man5/puppetconf.5.ronn} - %x{#{ronn} -r ./man/man5/puppetconf.5.ronn} - File.move("./man/man5/puppetconf.5", "./man/man5/puppet.conf.5") - File.unlink("./man/man5/puppetconf.5.ronn") - - # Create binary man pages - binary = bins + sbins - binary.each do |bin| - b = bin.gsub( /(bin|sbin)\//, "") - %x{#{bin} --help > ./man/man8/#{b}.8.ronn} - %x{#{ronn} -r ./man/man8/#{b}.8.ronn} - File.unlink("./man/man8/#{b}.8.ronn") - end - -rescue SystemCallError - $stderr.puts "Couldn't build man pages: " + $ERROR_INFO - $stderr.puts "Continuing with install..." - end -end - def run_tests(test_list) require 'test/unit/ui/console/testrunner' $LOAD_PATH.unshift "lib" test_list.each do |test| next if File.directory?(test) require test end tests = [] ObjectSpace.each_object { |o| tests << o if o.kind_of?(Class) } tests.delete_if { |o| !o.ancestors.include?(Test::Unit::TestCase) } tests.delete_if { |o| o == Test::Unit::TestCase } tests.each { |test| Test::Unit::UI::Console::TestRunner.run(test) } $LOAD_PATH.shift rescue LoadError puts "Missing testrunner library; skipping tests" end ## # Install file(s) from ./bin to Config::CONFIG['bindir']. Patch it on the way # to insert a #! line; on a Unix install, the command is named as expected # (e.g., bin/rdoc becomes rdoc); the shebang line handles running it. Under # windows, we add an '.rb' extension and let file associations do their stuff. def install_binfile(from, op_file, target) tmp_dir = nil InstallOptions.tmp_dirs.each do |t| if File.directory?(t) and File.writable?(t) tmp_dir = t break end end fail "Cannot find a temporary directory" unless tmp_dir tmp_file = File.join(tmp_dir, '_tmp') ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) File.open(from) do |ip| File.open(tmp_file, "w") do |op| ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) op.puts "#!#{ruby}" contents = ip.readlines contents.shift if contents[0] =~ /^#!/ op.write contents.join end end if $operatingsystem == "windows" installed_wrapper = false if File.exists?("#{from}.bat") FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true) installed_wrapper = true end if File.exists?("#{from}.cmd") FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :verbose => true) installed_wrapper = true end if not installed_wrapper tmp_file2 = File.join(tmp_dir, '_tmp_wrapper') cwn = File.join(Config::CONFIG['bindir'], op_file) cwv = CMD_WRAPPER.gsub('', ruby.gsub(%r{/}) { "\\" }).gsub!('', cwn.gsub(%r{/}) { "\\" } ) File.open(tmp_file2, "wb") { |cw| cw.puts cwv } FileUtils.install(tmp_file2, File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true) File.unlink(tmp_file2) installed_wrapper = true end end FileUtils.install(tmp_file, File.join(target, op_file), :mode => 0755, :verbose => true) File.unlink(tmp_file) end CMD_WRAPPER = <<-EOS @echo off if "%OS%"=="Windows_NT" goto WinNT -x "" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto done :WinNT -x "" %* goto done :done EOS check_prereqs prepare_installation #run_tests(tests) if InstallOptions.tests #build_rdoc(rdoc) if InstallOptions.rdoc #build_ri(ri) if InstallOptions.ri -#build_man(bins, sbins) if InstallOptions.man do_configs(configs, InstallOptions.config_dir) if InstallOptions.configs do_bins(sbins, InstallOptions.sbin_dir) do_bins(bins, InstallOptions.bin_dir) do_libs(libs) do_man(man) unless $operatingsystem == "windows" diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index fa1ec58a5..fa06aae36 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -1,477 +1,482 @@ require 'puppet/application' class Puppet::Application::Agent < Puppet::Application should_parse_config run_mode :agent attr_accessor :args, :agent, :daemon, :host def preinit # Do an initial trap, so that cancels don't get a stack trace. trap(:INT) do $stderr.puts "Cancelling startup" exit(0) end { :waitforcert => nil, :detailed_exitcodes => false, :verbose => false, :debug => false, :centrallogs => false, :setdest => false, :enable => false, :disable => false, :client => true, :fqdn => nil, :serve => [], :digest => :MD5, :fingerprint => false, }.each do |opt,val| options[opt] = val end @args = {} require 'puppet/daemon' @daemon = Puppet::Daemon.new @daemon.argv = ARGV.dup end option("--centrallogging") option("--disable") option("--enable") option("--debug","-d") option("--fqdn FQDN","-f") option("--test","-t") option("--verbose","-v") option("--fingerprint") option("--digest DIGEST") option("--serve HANDLER", "-s") do |arg| if Puppet::Network::Handler.handler(arg) options[:serve] << arg.to_sym else raise "Could not find handler for #{arg}" end end option("--no-client") do |arg| options[:client] = false end option("--detailed-exitcodes") do |arg| options[:detailed_exitcodes] = true end option("--logdest DEST", "-l DEST") do |arg| begin Puppet::Util::Log.newdestination(arg) options[:setdest] = true rescue => detail puts detail.backtrace if Puppet[:debug] $stderr.puts detail.to_s end end option("--waitforcert WAITFORCERT", "-w") do |arg| options[:waitforcert] = arg.to_i end option("--port PORT","-p") do |arg| @args[:Port] = arg end def help <<-HELP -SYNOPSIS +puppet-agent(8) -- The puppet agent daemon ======== -Retrieve the client configuration from the puppet master and apply it to + +SYNOPSIS +-------- +Retrieves the client configuration from the puppet master and applies it to the local host. -Currently must be run out periodically, using cron or something similar. +This service may be run as a daemon, run periodically using cron (or something +similar), or run interactively for testing purposes. USAGE -===== - puppet agent [-D|--daemonize|--no-daemonize] [-d|--debug] - [--detailed-exitcodes] [--disable] [--enable] - [-h|--help] [--certname ] [-l|--logdest syslog||console] - [-o|--onetime] [--serve ] [-t|--test] [--noop] - [--digest ] [--fingerprint] [-V|--version] - [-v|--verbose] [-w|--waitforcert ] +----- +puppet agent [-D|--daemonize|--no-daemonize] [-d|--debug] + [--detailed-exitcodes] [--disable] [--enable] [-h|--help] + [--certname ] [-l|--logdest syslog||console] + [-o|--onetime] [--serve ] [-t|--test] [--noop] + [--digest ] [--fingerprint] [-V|--version] + [-v|--verbose] [-w|--waitforcert ] DESCRIPTION -=========== +----------- This is the main puppet client. Its job is to retrieve the local machine's configuration from a remote server and apply it. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default). The client will connect and request a signed certificate, and will continue connecting until it receives one. Once the client has a signed certificate, it will retrieve its configuration and apply it. USAGE NOTES -=========== +----------- 'puppet agent' does its best to find a compromise between interactive use and daemon use. Run with no arguments and no configuration, it will -go into the backgroun, attempt to get a signed certificate, and retrieve +go into the background, attempt to get a signed certificate, and retrieve and apply its configuration every 30 minutes. Some flags are meant specifically for interactive use -- in particular, 'test', 'tags' or 'fingerprint' are useful. 'test' enables verbose logging, causes the daemon to stay in the foreground, exits if the server's configuration is invalid (this happens if, for instance, you've left a syntax error on the server), and exits after running the configuration once (rather than hanging around as a long-running process). 'tags' allows you to specify what portions of a configuration you want to apply. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the 'tags' flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied. This is very useful when you are testing new configurations -- for instance, if you are just starting to manage 'ntpd', you would put all of the new elements into an 'ntpd' class, and call puppet with '--tags ntpd', which would only apply that small portion of the configuration during your testing, rather than applying the whole thing. 'fingerprint' is a one-time flag. In this mode 'puppet agent' will run once and display on the console (and in the log) the current certificate (or certificate request) fingerprint. Providing the '--digest' option allows to use a different digest algorithm to generate the fingerprint. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent (to prevent against man-in-the-middle attacks when signing certificates). OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'server' is a valid configuration parameter, so you can specify '--server ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet agent with '--genconfig'. -daemonize: Send the process into the background. This is the - default. - -no-daemonize: Do not send the process into the background. - -debug: Enable full debugging. - -digest: Change the certificate fingerprinting digest - algorithm. The default is MD5. Valid values depends - on the version of OpenSSL installed, but should - always at least contain MD5, MD2, SHA1 and SHA256. - -detailed-exitcodes: Provide transaction information via exit codes. If - this is enabled, an exit code of '2' means there - were changes, and an exit code of '4' means that - there were failures during the transaction. This - option only makes sense in conjunction with - --onetime. - -disable: Disable working on the local system. This puts a - lock file in place, causing 'puppet agent' not to - work on the system until the lock file is removed. - This is useful if you are testing a configuration - and do not want the central configuration to - override the local state until everything is tested - and committed. - -'puppet agent' uses the same lock file while it is running, so no more -than one 'puppet agent' process is working at a time. - -'puppet agent' exits after executing this. - -enable: Enable working on the local system. This removes any - lock file, causing 'puppet agent' to start managing - the local system again (although it will continue to - use its normal scheduling, so it might not start for - another half hour). - -'puppet agent' exits after executing this. - -certname: Set the certname (unique ID) of the client. The - master reads this unique identifying string, which - is usually set to the node's fully-qualified domain - name, to determine which configurations the node - will receive. Use this option to debug setup - problems or implement unusual node identification - schemes. - -help: Print this help message - -logdest: Where to send messages. Choose between syslog, the - console, and a log file. Defaults to sending - messages to syslog, or the console if debugging or - verbosity is enabled. - -no-client: Do not create a config client. This will cause the - daemon to run without ever checking for its - configuration automatically, and only makes sense - -onetime: Run the configuration once. Runs a single (normally - daemonized) Puppet run. Useful for interactively - running puppet agent when used in conjunction with - the --no-daemonize option. - -fingerprint: Display the current certificate or certificate - signing request fingerprint and then exit. Use the - '--digest' option to change the digest algorithm - used. - -serve: Start another type of server. By default, 'puppet - agent' will start a service handler that allows - authenticated and authorized remote nodes to trigger - the configuration to be pulled down and applied. You - can specify any handler here that does not require - configuration, e.g., filebucket, ca, or resource. - The handlers are in 'lib/puppet/network/handler', - and the names must match exactly, both in the call - to 'serve' and in 'namespaceauth.conf'. - -test: Enable the most common options used for testing. - These are 'onetime', 'verbose', 'ignorecache', - 'no-daemonize', 'no-usecacheonfailure', - 'detailed-exit-codes', 'no-splay', and 'show_diff'. - -noop: Use 'noop' mode where the daemon runs in a no-op or - dry-run mode. This is useful for seeing what changes - Puppet will make without actually executing the - changes. - -verbose: Turn on verbose reporting. - -version: Print the puppet version number and exit. - -waitforcert: This option only matters for daemons that do not yet - have certificates and it is enabled by default, with - a value of 120 (seconds). This causes 'puppet agent' - to connect to the server every 2 minutes and ask it - to sign a certificate request. This is useful for - the initial setup of a puppet client. You can turn - off waiting for certificates by specifying a time of - 0. +* --daemonize: + Send the process into the background. This is the default. + +* --no-daemonize: + Do not send the process into the background. + +* --debug: + Enable full debugging. + +* --digest: + Change the certificate fingerprinting digest algorithm. The default is + MD5. Valid values depends on the version of OpenSSL installed, but + should always at least contain MD5, MD2, SHA1 and SHA256. + +* --detailed-exitcodes: + Provide transaction information via exit codes. If this is enabled, an + exit code of '2' means there were changes, and an exit code of '4' + means that there were failures during the transaction. This option + only makes sense in conjunction with --onetime. + +* --disable: + Disable working on the local system. This puts a lock file in place, + causing 'puppet agent' not to work on the system until the lock file + is removed. This is useful if you are testing a configuration and do + not want the central configuration to override the local state until + everything is tested and committed. + + 'puppet agent' uses the same lock file while it is running, so no more + than one 'puppet agent' process is working at a time. + + 'puppet agent' exits after executing this. + +* --enable: + Enable working on the local system. This removes any lock file, + causing 'puppet agent' to start managing the local system again + (although it will continue to use its normal scheduling, so it might + not start for another half hour). + + 'puppet agent' exits after executing this. + +* --certname: + Set the certname (unique ID) of the client. The master reads this + unique identifying string, which is usually set to the node's + fully-qualified domain name, to determine which configurations the + node will receive. Use this option to debug setup problems or + implement unusual node identification schemes. + +* --help: + Print this help message + +* --logdest: + Where to send messages. Choose between syslog, the console, and a log + file. Defaults to sending messages to syslog, or the console if + debugging or verbosity is enabled. + +* --no-client: + Do not create a config client. This will cause the daemon to run + without ever checking for its configuration automatically, and only + makes sense + +* --onetime: + Run the configuration once. Runs a single (normally daemonized) Puppet + run. Useful for interactively running puppet agent when used in + conjunction with the --no-daemonize option. + +* --fingerprint: + Display the current certificate or certificate signing request + fingerprint and then exit. Use the '--digest' option to change the + digest algorithm used. + +* --serve: + Start another type of server. By default, 'puppet agent' will start a + service handler that allows authenticated and authorized remote nodes + to trigger the configuration to be pulled down and applied. You can + specify any handler here that does not require configuration, e.g., + filebucket, ca, or resource. The handlers are in + 'lib/puppet/network/handler', and the names must match exactly, both + in the call to 'serve' and in 'namespaceauth.conf'. + +* --test: + Enable the most common options used for testing. These are 'onetime', + 'verbose', 'ignorecache', 'no-daemonize', 'no-usecacheonfailure', + 'detailed-exit-codes', 'no-splay', and 'show_diff'. + +* --noop: + Use 'noop' mode where the daemon runs in a no-op or dry-run mode. This + is useful for seeing what changes Puppet will make without actually + executing the changes. + +* --verbose: + Turn on verbose reporting. + +* --version: + Print the puppet version number and exit. + +* --waitforcert: + This option only matters for daemons that do not yet have certificates + and it is enabled by default, with a value of 120 (seconds). This + causes 'puppet agent' to connect to the server every 2 minutes and ask + it to sign a certificate request. This is useful for the initial setup + of a puppet client. You can turn off waiting for certificates by + specifying a time of 0. EXAMPLE -======= - puppet agent --server puppet.domain.com +------- + $ puppet agent --server puppet.domain.com AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005, 2006 Puppet Labs, LLC Licensed under the GNU Public License HELP end def run_command return fingerprint if options[:fingerprint] return onetime if Puppet[:onetime] main end def fingerprint unless cert = host.certificate || host.certificate_request $stderr.puts "Fingerprint asked but no certificate nor certificate request have yet been issued" exit(1) return end unless fingerprint = cert.fingerprint(options[:digest]) raise ArgumentError, "Could not get fingerprint for digest '#{options[:digest]}'" end Puppet.notice fingerprint end def onetime unless options[:client] $stderr.puts "onetime is specified but there is no client" exit(43) return end @daemon.set_signal_traps begin report = @agent.run rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err detail.to_s end if not report exit(1) elsif not Puppet[:noop] and options[:detailed_exitcodes] then exit(report.exit_status) else exit(0) end end def main Puppet.notice "Starting Puppet client version #{Puppet.version}" @daemon.start end # Enable all of the most common test options. def setup_test Puppet.settings.handlearg("--ignorecache") Puppet.settings.handlearg("--no-usecacheonfailure") Puppet.settings.handlearg("--no-splay") Puppet.settings.handlearg("--show_diff") Puppet.settings.handlearg("--no-daemonize") options[:verbose] = true Puppet[:onetime] = true options[:detailed_exitcodes] = true end # Handle the logging settings. def setup_logs if options[:debug] or options[:verbose] Puppet::Util::Log.newdestination(:console) if options[:debug] Puppet::Util::Log.level = :debug else Puppet::Util::Log.level = :info end end Puppet::Util::Log.newdestination(:syslog) unless options[:setdest] end def enable_disable_client(agent) if options[:enable] agent.enable elsif options[:disable] agent.disable end exit(0) end def setup_listen unless FileTest.exists?(Puppet[:authconfig]) Puppet.err "Will not start without authorization file #{Puppet[:authconfig]}" exit(14) end handlers = nil if options[:serve].empty? handlers = [:Runner] else handlers = options[:serve] end require 'puppet/network/server' # No REST handlers yet. server = Puppet::Network::Server.new(:xmlrpc_handlers => handlers, :port => Puppet[:puppetport]) @daemon.server = server end def setup_host @host = Puppet::SSL::Host.new waitforcert = options[:waitforcert] || (Puppet[:onetime] ? 0 : 120) cert = @host.wait_for_cert(waitforcert) unless options[:fingerprint] end def setup setup_test if options[:test] setup_logs exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? # If noop is set, then also enable diffs Puppet[:show_diff] = true if Puppet[:noop] args[:Server] = Puppet[:server] if options[:fqdn] args[:FQDN] = options[:fqdn] Puppet[:certname] = options[:fqdn] end if options[:centrallogs] logdest = args[:Server] logdest += ":" + args[:Port] if args.include?(:Port) Puppet::Util::Log.newdestination(logdest) end Puppet.settings.use :main, :agent, :ssl # Always ignoreimport for agent. It really shouldn't even try to import, # but this is just a temporary band-aid. Puppet[:ignoreimport] = true # We need to specify a ca location for all of the SSL-related i # indirected classes to work; in fingerprint mode we just need # access to the local files and we don't need a ca. Puppet::SSL::Host.ca_location = options[:fingerprint] ? :none : :remote Puppet::Transaction::Report.indirection.terminus_class = :rest # we want the last report to be persisted locally Puppet::Transaction::Report.indirection.cache_class = :yaml # Override the default; puppetd needs this, usually. # You can still override this on the command-line with, e.g., :compiler. Puppet[:catalog_terminus] = :rest # Override the default. Puppet[:facts_terminus] = :facter Puppet::Resource::Catalog.indirection.cache_class = :yaml # We need tomake the client either way, we just don't start it # if --no-client is set. require 'puppet/agent' require 'puppet/configurer' @agent = Puppet::Agent.new(Puppet::Configurer) enable_disable_client(@agent) if options[:enable] or options[:disable] @daemon.agent = agent if options[:client] # It'd be nice to daemonize later, but we have to daemonize before the # waitforcert happens. @daemon.daemonize if Puppet[:daemonize] setup_host @objects = [] # This has to go after the certs are dealt with. if Puppet[:listen] unless Puppet[:onetime] setup_listen else Puppet.notice "Ignoring --listen on onetime run" end end end end diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 1a5ab2c0c..a1edf6243 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -1,236 +1,257 @@ require 'puppet/application' class Puppet::Application::Apply < Puppet::Application should_parse_config option("--debug","-d") option("--execute EXECUTE","-e") do |arg| options[:code] = arg end option("--loadclasses","-L") option("--verbose","-v") option("--use-nodes") option("--detailed-exitcodes") option("--apply catalog", "-a catalog") do |arg| options[:catalog] = arg end option("--logdest LOGDEST", "-l") do |arg| begin Puppet::Util::Log.newdestination(arg) options[:logset] = true rescue => detail $stderr.puts detail.to_s end end def help <<-HELP -SYNOPSIS +puppet-apply(8) -- Apply Puppet manifests locally ======== -Run a stand-alone 'puppet' manifest. + +SYNOPSIS +-------- +Applies a standalone Puppet manifest to the local system. USAGE -===== - puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] [-e|--execute] - [--detailed-exitcodes] [-l|--logdest ] +----- +puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] + [-e|--execute] [--detailed-exitcodes] [-l|--logdest ] + [--apply ] DESCRIPTION -=========== -This is the standalone puppet execution tool; use it to execute -individual manifests that you write. If you need to execute site-wide -manifests, use 'puppet agent' and 'puppet master'. +----------- +This is the standalone puppet execution tool; use it to apply +individual manifests. + +When provided with a modulepath, via command line or config file, puppet +apply can effectively mimic the catalog that would be served by puppet +master with access to the same modules, although there are some subtle +differences. When combined with scheduling and an automated system for +pushing manifests, this can be used to implement a serverless Puppet +site. + +Most users should use 'puppet agent' and 'puppet master' for site-wide +manifests. OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration -file is also a valid long argument. For example, 'ssldir' is a valid -configuration parameter, so you can specify '--ssldir ' as an -argument. +file is also a valid long argument. For example, 'modulepath' is a +valid configuration parameter, so you can specify '--tags ,' +as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with '--genconfig'. -debug: Enable full debugging. +* --debug: + Enable full debugging. + +* --detailed-exitcodes: + Provide transaction information via exit codes. If this is enabled, an + exit code of '2' means there were changes, and an exit code of '4' + means that there were failures during the transaction. -detailed-exitcodes: Provide transaction information via exit codes. If - this is enabled, an exit code of '2' means there - were changes, and an exit code of '4' means that - there were failures during the transaction. +* --help: + Print this help message -help: Print this help message +* --loadclasses: + Load any stored classes. 'puppet agent' caches configured classes + (usually at /etc/puppet/classes.txt), and setting this option causes + all of those classes to be set in your puppet manifest. -loadclasses: Load any stored classes. 'puppet agent' caches - configured classes (usually at - /etc/puppet/classes.txt), and setting this option - causes all of those classes to be set in your puppet - manifest. +* --logdest: + Where to send messages. Choose between syslog, the console, and a log + file. Defaults to sending messages to the console. -logdest: Where to send messages. Choose between syslog, the - console, and a log file. Defaults to sending - messages to the console. +* --execute: + Execute a specific piece of Puppet code -execute: Execute a specific piece of Puppet code +* --verbose: + Print extra information. -verbose: Print extra information. +* --apply: + Apply a JSON catalog (such as one generated with 'puppet master --compile'). You can + either specify a JSON file or pipe in JSON from standard input. EXAMPLE -======= - puppet -l /tmp/manifest.log manifest.pp +------- + $ puppet apply -l /tmp/manifest.log manifest.pp + $ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server" AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def run_command if options[:catalog] apply elsif Puppet[:parseonly] parseonly else main end end def apply if options[:catalog] == "-" text = $stdin.read else text = File.read(options[:catalog]) end begin catalog = Puppet::Resource::Catalog.convert_from(Puppet::Resource::Catalog.default_format,text) catalog = Puppet::Resource::Catalog.pson_create(catalog) unless catalog.is_a?(Puppet::Resource::Catalog) rescue => detail raise Puppet::Error, "Could not deserialize catalog from pson: #{detail}" end catalog = catalog.to_ral require 'puppet/configurer' configurer = Puppet::Configurer.new configurer.run :catalog => catalog end def parseonly # Set our code or file to use. if options[:code] or command_line.args.length == 0 Puppet[:code] = options[:code] || STDIN.read else Puppet[:manifest] = command_line.args.shift end begin Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types rescue => detail Puppet.err detail exit 1 end exit 0 end def main # Set our code or file to use. if options[:code] or command_line.args.length == 0 Puppet[:code] = options[:code] || STDIN.read else manifest = command_line.args.shift raise "Could not find file #{manifest}" unless File.exist?(manifest) Puppet.warning("Only one file can be applied per run. Skipping #{command_line.args.join(', ')}") if command_line.args.size > 0 Puppet[:manifest] = manifest end # Collect our facts. unless facts = Puppet::Node::Facts.indirection.find(Puppet[:certname]) raise "Could not find facts for #{Puppet[:certname]}" end # Find our Node unless node = Puppet::Node.indirection.find(Puppet[:certname]) raise "Could not find node #{Puppet[:certname]}" end # Merge in the facts. node.merge(facts.values) # Allow users to load the classes that puppet agent creates. if options[:loadclasses] file = Puppet[:classfile] if FileTest.exists?(file) unless FileTest.readable?(file) $stderr.puts "#{file} is not readable" exit(63) end node.classes = File.read(file).split(/[\s\n]+/) end end begin # Compile our catalog starttime = Time.now catalog = Puppet::Resource::Catalog.indirection.find(node.name, :use_node => node) # Translate it to a RAL catalog catalog = catalog.to_ral catalog.finalize catalog.retrieval_duration = Time.now - starttime require 'puppet/configurer' configurer = Puppet::Configurer.new report = configurer.run(:skip_plugin_download => true, :catalog => catalog) exit( Puppet[:noop] ? 0 : options[:detailed_exitcodes] ? report.exit_status : 0 ) rescue => detail puts detail.backtrace if Puppet[:trace] $stderr.puts detail.message exit(1) end end def setup exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? # If noop is set, then also enable diffs Puppet[:show_diff] = true if Puppet[:noop] Puppet::Util::Log.newdestination(:console) unless options[:logset] client = nil server = nil trap(:INT) do $stderr.puts "Exiting" exit(1) end # we want the last report to be persisted locally Puppet::Transaction::Report.indirection.cache_class = :yaml if options[:debug] Puppet::Util::Log.level = :debug elsif options[:verbose] Puppet::Util::Log.level = :info end end end diff --git a/lib/puppet/application/cert.rb b/lib/puppet/application/cert.rb index 0db968e9e..0808a42da 100644 --- a/lib/puppet/application/cert.rb +++ b/lib/puppet/application/cert.rb @@ -1,196 +1,207 @@ require 'puppet/application' class Puppet::Application::Cert < Puppet::Application should_parse_config run_mode :master attr_accessor :cert_mode, :all, :ca, :digest, :signed def find_mode(opt) require 'puppet/ssl/certificate_authority' modes = Puppet::SSL::CertificateAuthority::Interface::INTERFACE_METHODS tmp = opt.sub("--", '').to_sym @cert_mode = modes.include?(tmp) ? tmp : nil end option("--clean", "-c") do @cert_mode = :destroy end option("--all", "-a") do @all = true end option("--digest DIGEST") do |arg| @digest = arg end option("--signed", "-s") do @signed = true end option("--debug", "-d") do |arg| Puppet::Util::Log.level = :debug end require 'puppet/ssl/certificate_authority/interface' Puppet::SSL::CertificateAuthority::Interface::INTERFACE_METHODS.reject {|m| m == :destroy }.each do |method| option("--#{method}", "-#{method.to_s[0,1]}") do find_mode("--#{method}") end end option("--verbose", "-v") do Puppet::Util::Log.level = :info end def help <<-HELP -SYNOPSIS +puppet-cert(8) -- Manage certificates and requests ======== -Stand-alone certificate authority. Capable of generating certificates -but mostly meant for signing certificate requests from puppet clients. + +SYNOPSIS +-------- +Standalone certificate authority. Capable of generating certificates, +but mostly used for signing certificate requests from puppet clients. USAGE -===== - puppet cert [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] - [-g|--generate] [-l|--list] [-s|--sign] [-r|--revoke] - [-p|--print] [-c|--clean] [--verify] [--digest DIGEST] - [--fingerprint] [host] +----- +puppet cert [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] + [-g|--generate] [-l|--list] [-s|--sign] [-r|--revoke] [-p|--print] + [-c|--clean] [--verify] [--digest ] [--fingerprint] [host] DESCRIPTION -=========== -Because the puppetmasterd daemon defaults to not signing client +----------- +Because the puppet master service defaults to not signing client certificate requests, this script is available for signing outstanding requests. It can be used to list outstanding requests and then either sign them individually or sign all of them. OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'ssldir' is a valid configuration parameter, so you can specify '--ssldir ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet cert with '--genconfig'. -all: Operate on all items. Currently only makes sense with - '--sign', '--clean', or '--list'. +* --all: + Operate on all items. Currently only makes sense with '--sign', + '--clean', or '--list'. -digest: Set the digest for fingerprinting (defaults to md5). Valid - values depends on your openssl and openssl ruby extension - version, but should contain at least md5, sha1, md2, - sha256. +* --digest: + Set the digest for fingerprinting (defaults to md5). Valid values + depends on your openssl and openssl ruby extension version, but should + contain at least md5, sha1, md2, sha256. -clean: Remove all files related to a host from puppet cert's - storage. This is useful when rebuilding hosts, since new - certificate signing requests will only be honored if puppet - cert does not have a copy of a signed certificate for that - host. The certificate of the host is also revoked. If - '--all' is specified then all host certificates, both - signed and unsigned, will be removed. +* --clean: + Remove all files related to a host from puppet cert's storage. This is + useful when rebuilding hosts, since new certificate signing requests + will only be honored if puppet cert does not have a copy of a signed + certificate for that host. The certificate of the host is also + revoked. If '--all' is specified then all host certificates, both + signed and unsigned, will be removed. -debug: Enable full debugging. +* --debug: + Enable full debugging. -generate: Generate a certificate for a named client. A - certificate/keypair will be generated for each client named - on the command line. +* --generate: + Generate a certificate for a named client. A certificate/keypair will + be generated for each client named on the command line. -help: Print this help message +* --help: + Print this help message -list: List outstanding certificate requests. If '--all' is - specified, signed certificates are also listed, prefixed by - '+', and revoked or invalid certificates are prefixed by - '-' (the verification outcome is printed in parenthesis). +* --list: + List outstanding certificate requests. If '--all' is specified, signed + certificates are also listed, prefixed by '+', and revoked or invalid + certificates are prefixed by '-' (the verification outcome is printed + in parenthesis). -print: Print the full-text version of a host's certificate. +* --print: + Print the full-text version of a host's certificate. -fingerprint: Print the DIGEST (defaults to md5) fingerprint of a host's - certificate. +* --fingerprint: + Print the DIGEST (defaults to md5) fingerprint of a host's + certificate. -revoke: Revoke the certificate of a client. The certificate can be - specified either by its serial number, given as a decimal - number or a hexadecimal number prefixed by '0x', or by its - hostname. The certificate is revoked by adding it to the - Certificate Revocation List given by the 'cacrl' config - parameter. Note that the puppetmasterd needs to be - restarted after revoking certificates. +* --revoke: + Revoke the certificate of a client. The certificate can be specified + either by its serial number, given as a decimal number or a + hexadecimal number prefixed by '0x', or by its hostname. The + certificate is revoked by adding it to the Certificate Revocation List + given by the 'cacrl' config parameter. Note that the puppetmasterd + needs to be restarted after revoking certificates. -sign: Sign an outstanding certificate request. Unless '--all' is - specified, hosts must be listed after all flags. +* --sign: + Sign an outstanding certificate request. Unless '--all' is specified, + hosts must be listed after all flags. -verbose: Enable verbosity. +* --verbose: + Enable verbosity. -version: Print the puppet version number and exit. +* --version: + Print the puppet version number and exit. -verify: Verify the named certificate against the local CA - certificate. +* --verify: + Verify the named certificate against the local CA certificate. EXAMPLE -======= - $ puppet cert -l - culain.madstop.com - $ puppet cert -s culain.madstop.com +------- + $ puppet cert -l + culain.madstop.com + $ puppet cert -s culain.madstop.com AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def main if @all hosts = :all elsif @signed hosts = :signed else hosts = command_line.args.collect { |h| h.downcase } end begin @ca.apply(:revoke, :to => hosts) if @cert_mode == :destroy @ca.apply(@cert_mode, :to => hosts, :digest => @digest) rescue => detail puts detail.backtrace if Puppet[:trace] puts detail.to_s exit(24) end end def setup exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? Puppet::Util::Log.newdestination :console if [:generate, :destroy].include? @cert_mode Puppet::SSL::Host.ca_location = :local else Puppet::SSL::Host.ca_location = :only end begin @ca = Puppet::SSL::CertificateAuthority.new rescue => detail puts detail.backtrace if Puppet[:trace] puts detail.to_s exit(23) end end end diff --git a/lib/puppet/application/describe.rb b/lib/puppet/application/describe.rb index 0c7bea96d..79643159e 100644 --- a/lib/puppet/application/describe.rb +++ b/lib/puppet/application/describe.rb @@ -1,256 +1,257 @@ require 'puppet/application' class Formatter def initialize(width) @width = width end def wrap(txt, opts) return "" unless txt && !txt.empty? work = (opts[:scrub] ? scrub(txt) : txt) indent = (opts[:indent] ? opts[:indent] : 0) textLen = @width - indent patt = Regexp.new("^(.{0,#{textLen}})[ \n]") prefix = " " * indent res = [] while work.length > textLen if work =~ patt res << $1 work.slice!(0, $MATCH.length) else res << work.slice!(0, textLen) end end res << work if work.length.nonzero? prefix + res.join("\n#{prefix}") end def header(txt, sep = "-") "\n#{txt}\n" + sep * txt.size end private def scrub(text) # For text with no carriage returns, there's nothing to do. return text if text !~ /\n/ indent = nil # If we can match an indentation, then just remove that same level of # indent from every line. if text =~ /^(\s+)/ indent = $1 return text.gsub(/^#{indent}/,'') else return text end end end class TypeDoc def initialize @format = Formatter.new(76) @types = {} Puppet::Type.loadall Puppet::Type.eachtype { |type| next if type.name == :component @types[type.name] = type } end def list_types puts "These are the types known to puppet:\n" @types.keys.sort { |a, b| a.to_s <=> b.to_s }.each do |name| type = @types[name] s = type.doc.gsub(/\s+/, " ") n = s.index(".") if n.nil? s = ".. no documentation .." elsif n > 45 s = s[0, 45] + " ..." else s = s[0, n] end printf "%-15s - %s\n", name, s end end def format_type(name, opts) name = name.to_sym unless @types.has_key?(name) puts "Unknown type #{name}" return end type = @types[name] puts @format.header(name.to_s, "=") puts @format.wrap(type.doc, :indent => 0, :scrub => true) + "\n\n" puts @format.header("Parameters") if opts[:parameters] format_attrs(type, [:property, :param]) else list_attrs(type, [:property, :param]) end if opts[:meta] puts @format.header("Meta Parameters") if opts[:parameters] format_attrs(type, [:meta]) else list_attrs(type, [:meta]) end end if type.providers.size > 0 puts @format.header("Providers") if opts[:providers] format_providers(type) else list_providers(type) end end end # List details about attributes def format_attrs(type, attrs) docs = {} type.allattrs.each do |name| kind = type.attrtype(name) docs[name] = type.attrclass(name).doc if attrs.include?(kind) && name != :provider end docs.sort { |a,b| a[0].to_s <=> b[0].to_s }.each { |name, doc| print "\n- **#{name}**" if type.key_attributes.include?(name) and name != :name puts " (*namevar*)" else puts "" end puts @format.wrap(doc, :indent => 4, :scrub => true) } end # List the names of attributes def list_attrs(type, attrs) params = [] type.allattrs.each do |name| kind = type.attrtype(name) params << name.to_s if attrs.include?(kind) && name != :provider end puts @format.wrap(params.sort.join(", "), :indent => 4) end def format_providers(type) type.providers.sort { |a,b| a.to_s <=> b.to_s }.each { |prov| puts "\n- **#{prov}**" puts @format.wrap(type.provider(prov).doc, :indent => 4, :scrub => true) } end def list_providers(type) list = type.providers.sort { |a,b| a.to_s <=> b.to_s }.join(", ") puts @format.wrap(list, :indent => 4) end end class Puppet::Application::Describe < Puppet::Application banner "puppet describe [options] [type]" should_not_parse_config option("--short", "-s", "Only list parameters without detail") do |arg| options[:parameters] = false end option("--providers","-p") option("--list", "-l") option("--meta","-m") def help <<-HELP -SYNOPSIS +puppet-describe(8) -- Display help about resource types ======== -Print help about puppet types on the console. Run with '-h' to get -detailed help. - -USAGE -===== - puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta] +SYNOPSIS +-------- +Prints help about Puppet resource types, providers, and metaparameters. -DESCRIPTION -=========== -Prints details of Puppet types, providers and metaparameters on the -console. +USAGE +----- +puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta] OPTIONS -======= -help: Print this help text +------- +* --help: + Print this help text -providers: Describe providers in detail for each type +* --providers: + Describe providers in detail for each type -list: List all types +* --list: + List all types -meta: List all metaparameters +* --meta: + List all metaparameters -short: List only parameters without detail +* --short: + List only parameters without detail EXAMPLE -======= - puppet describe --list - puppet describe file --providers - puppet describe user -s -m +------- + $ puppet describe --list + $ puppet describe file --providers + $ puppet describe user -s -m AUTHOR -====== +------ David Lutterkort COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def preinit options[:parameters] = true end def main doc = TypeDoc.new if options[:list] doc.list_types else options[:types].each { |name| doc.format_type(name, options) } end end def setup options[:types] = command_line.args.dup handle_help(nil) unless options[:list] || options[:types].size > 0 $stderr.puts "Warning: ignoring types when listing all types" if options[:list] && options[:types].size > 0 end end diff --git a/lib/puppet/application/doc.rb b/lib/puppet/application/doc.rb index c7f270c8d..3bfe41653 100644 --- a/lib/puppet/application/doc.rb +++ b/lib/puppet/application/doc.rb @@ -1,262 +1,271 @@ require 'puppet/application' class Puppet::Application::Doc < Puppet::Application should_not_parse_config run_mode :master attr_accessor :unknown_args, :manifest def preinit {:references => [], :mode => :text, :format => :to_markdown }.each do |name,value| options[name] = value end @unknown_args = [] @manifest = false end option("--all","-a") option("--outputdir OUTPUTDIR","-o") option("--verbose","-v") option("--debug","-d") option("--charset CHARSET") option("--format FORMAT", "-f") do |arg| method = "to_#{arg}" require 'puppet/util/reference' if Puppet::Util::Reference.method_defined?(method) options[:format] = method else raise "Invalid output format #{arg}" end end option("--mode MODE", "-m") do |arg| require 'puppet/util/reference' if Puppet::Util::Reference.modes.include?(arg) or arg.intern==:rdoc options[:mode] = arg.intern else raise "Invalid output mode #{arg}" end end option("--list", "-l") do |arg| require 'puppet/util/reference' puts Puppet::Util::Reference.references.collect { |r| Puppet::Util::Reference.reference(r).doc }.join("\n") exit(0) end option("--reference REFERENCE", "-r") do |arg| options[:references] << arg.intern end def help <<-HELP -SYNOPSIS +puppet-doc(8) -- Generate Puppet documentation and references ======== -Generate a reference for all Puppet types. Largely meant for internal + +SYNOPSIS +-------- +Generates a reference for all Puppet types. Largely meant for internal Puppet Labs use. USAGE -===== - puppet doc [-a|--all] [-h|--help] [-o|--outputdir ] [-m|--mode ] - [-r|--reference <[type]|configuration|..>] [--charset CHARSET] [manifest-file] +----- +puppet doc [-a|--all] [-h|--help] [-o|--outputdir ] + [-m|--mode text|pdf|rdoc] [-r|--reference ] + [--charset ] [] DESCRIPTION -=========== +----------- If mode is not 'rdoc', then this command generates a Markdown document describing all installed Puppet types or all allowable arguments to puppet executables. It is largely meant for internal use and is used to generate the reference document available on the Puppet Labs web site. In 'rdoc' mode, this command generates an html RDoc hierarchy describing the manifests that are in 'manifestdir' and 'modulepath' configuration directives. The generated documentation directory is doc by default but can be changed with the 'outputdir' option. -If the command is started with 'manifest-file' command-line arguments, -puppet doc generate a single manifest documentation that is output on -stdout. +If the command is run with the name of a manifest file as an argument, +puppet doc will output a single manifest's documentation on stdout. OPTIONS -======= -all: Output the docs for all of the reference types. In 'rdoc' - modes, this also outputs documentation for all resources +------- +* --all: + Output the docs for all of the reference types. In 'rdoc' + modes, this also outputs documentation for all resources -help: Print this help message +* --help: + Print this help message -outputdir: Specifies the directory where to output the rdoc - documentation in 'rdoc' mode. +* --outputdir: + Specifies the directory where to output the rdoc + documentation in 'rdoc' mode. -mode: Determine the output mode. Valid modes are 'text', 'pdf' and - 'rdoc'. The 'pdf' mode creates PDF formatted files in the - /tmp directory. The default mode is 'text'. In 'rdoc' mode - you must provide 'manifests-path' +* --mode: + Determine the output mode. Valid modes are 'text', 'pdf' and + 'rdoc'. The 'pdf' mode creates PDF formatted files in the + /tmp directory. The default mode is 'text'. In 'rdoc' mode + you must provide 'manifests-path' -reference: Build a particular reference. Get a list of references by - running 'puppet doc --list'. +* --reference: + Build a particular reference. Get a list of references by + running 'puppet doc --list'. -charset: Used only in 'rdoc' mode. It sets the charset used in the - html files produced. +* --charset: + Used only in 'rdoc' mode. It sets the charset used in the + html files produced. EXAMPLE -======= - $ puppet doc -r type > /tmp/type_reference.markdown +------- + $ puppet doc -r type > /tmp/type_reference.markdown or - $ puppet doc --outputdir /tmp/rdoc --mode rdoc /path/to/manifests + $ puppet doc --outputdir /tmp/rdoc --mode rdoc /path/to/manifests or - $ puppet doc /etc/puppet/manifests/site.pp + $ puppet doc /etc/puppet/manifests/site.pp or - $ puppet doc -m pdf -r configuration + $ puppet doc -m pdf -r configuration AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005-2007 Puppet Labs, LLC Licensed under the GNU Public License HELP end def handle_unknown( opt, arg ) @unknown_args << {:opt => opt, :arg => arg } true end def run_command return[:rdoc].include?(options[:mode]) ? send(options[:mode]) : other end def rdoc exit_code = 0 files = [] unless @manifest env = Puppet::Node::Environment.new files += env.modulepath files << File.dirname(env[:manifest]) end files += command_line.args Puppet.info "scanning: #{files.inspect}" Puppet.settings.setdefaults( "puppetdoc", "document_all" => [false, "Document all resources"] ) Puppet.settings[:document_all] = options[:all] || false begin require 'puppet/util/rdoc' if @manifest Puppet::Util::RDoc.manifestdoc(files) else options[:outputdir] = "doc" unless options[:outputdir] Puppet::Util::RDoc.rdoc(options[:outputdir], files, options[:charset]) end rescue => detail puts detail.backtrace if Puppet[:trace] $stderr.puts "Could not generate documentation: #{detail}" exit_code = 1 end exit exit_code end def other text = "" with_contents = options[:references].length <= 1 exit_code = 0 require 'puppet/util/reference' options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name| raise "Could not find reference #{name}" unless section = Puppet::Util::Reference.reference(name) begin # Add the per-section text, but with no ToC text += section.send(options[:format], with_contents) rescue => detail puts detail.backtrace $stderr.puts "Could not generate reference #{name}: #{detail}" exit_code = 1 next end end text += Puppet::Util::Reference.footer unless with_contents # We've only got one reference if options[:mode] == :pdf Puppet::Util::Reference.pdf(text) else puts text end exit exit_code end def setup # sole manifest documentation if command_line.args.size > 0 options[:mode] = :rdoc @manifest = true end if options[:mode] == :rdoc setup_rdoc else setup_reference end end def setup_reference if options[:all] # Don't add dynamic references to the "all" list. require 'puppet/util/reference' options[:references] = Puppet::Util::Reference.references.reject do |ref| Puppet::Util::Reference.reference(ref).dynamic? end end options[:references] << :type if options[:references].empty? end def setup_rdoc(dummy_argument=:work_arround_for_ruby_GC_bug) # consume the unknown options # and feed them as settings if @unknown_args.size > 0 @unknown_args.each do |option| # force absolute path for modulepath when passed on commandline if option[:opt]=="--modulepath" or option[:opt] == "--manifestdir" option[:arg] = option[:arg].split(':').collect { |p| File.expand_path(p) }.join(':') end Puppet.settings.handlearg(option[:opt], option[:arg]) end end # Now parse the config Puppet.parse_config # Handle the logging settings. if options[:debug] or options[:verbose] if options[:debug] Puppet::Util::Log.level = :debug else Puppet::Util::Log.level = :info end Puppet::Util::Log.newdestination(:console) end end end diff --git a/lib/puppet/application/filebucket.rb b/lib/puppet/application/filebucket.rb index 77ebbb843..460115586 100644 --- a/lib/puppet/application/filebucket.rb +++ b/lib/puppet/application/filebucket.rb @@ -1,185 +1,190 @@ require 'puppet/application' class Puppet::Application::Filebucket < Puppet::Application should_not_parse_config option("--bucket BUCKET","-b") option("--debug","-d") option("--local","-l") option("--remote","-r") option("--verbose","-v") attr :args def help <<-HELP -SYNOPSIS +puppet-filebucket(8) -- Store and retrieve files in a filebucket ======== + +SYNOPSIS +-------- A stand-alone Puppet filebucket client. USAGE -===== - puppet filebucket [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] - [-l|--local] [-r|--remote] - [-s|--server ] [-b|--bucket ] ... - +----- +puppet filebucket [-h|--help] [-V|--version] [-d|--debug] + [-v|--verbose] [-l|--local] [-r|--remote] [-s|--server ] + [-b|--bucket ] ... -DESCRIPTION -=========== -This is a stand-alone filebucket client for sending files to a local or -central filebucket. +Puppet filebucket can operate in three modes, with only one mode per call: +backup: + Send one or more files to the specified file bucket. Each sent file is + printed with its resulting md5 sum. -USAGE -===== -This client can operate in three modes, with only one mode per call: +get: + Return the text associated with an md5 sum. The text is printed to + stdout, and only one file can be retrieved at a time. -backup: Send one or more files to the specified file bucket. Each sent - file is printed with its resulting md5 sum. +restore: + Given a file path and an md5 sum, store the content associated with + the sum into the specified file path. You can specify an entirely new + path to this argument; you are not restricted to restoring the content + to its original location. -get: Return the text associated with an md5 sum. The text is printed - to stdout, and only one file can be retrieved at a time. -restore: Given a file path and an md5 sum, store the content associated - with the sum into the specified file path. You can specify an - entirely new path to this argument; you are not restricted to +DESCRIPTION +----------- +This is a stand-alone filebucket client for sending files to a local or +central filebucket. Note that 'filebucket' defaults to using a network-based filebucket available on the server named 'puppet'. To use this, you'll have to be running as a user with valid Puppet certificates. Alternatively, you can use your local file bucket by specifying '--local'. -EXAMPLE -======= - $ puppet filebucket backup /etc/passwd - /etc/passwd: 429b225650b912a2ee067b0a4cf1e949 - $ puppet filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949 - $ - - OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'ssldir' is a valid configuration parameter, so you can specify '--ssldir ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with '--genconfig'. -debug: Enable full debugging. +* --debug: + Enable full debugging. -help: Print this help message +* --help: + Print this help message -local: Use the local filebucket. This will use the default - configuration information. +* --local: + Use the local filebucket. This will use the default configuration + information. -remote: Use a remote filebucket. This will use the default - configuration information. +* --remote: + Use a remote filebucket. This will use the default configuration + information. -server: The server to send the file to, instead of locally. +* --server: + The server to send the file to, instead of locally. -verbose: Print extra information. +* --verbose: + Print extra information. -version: Print version information. +* --version: + Print version information. EXAMPLE -======= - puppet filebucket -b /tmp/filebucket /my/file +------- + $ puppet filebucket backup /etc/passwd + /etc/passwd: 429b225650b912a2ee067b0a4cf1e949 + $ puppet filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949 AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def run_command @args = command_line.args command = args.shift return send(command) if %w{get backup restore}.include? command help end def get md5 = args.shift out = @client.getfile(md5) print out end def backup args.each do |file| unless FileTest.exists?(file) $stderr.puts "#{file}: no such file" next end unless FileTest.readable?(file) $stderr.puts "#{file}: cannot read file" next end md5 = @client.backup(file) puts "#{file}: #{md5}" end end def restore file = args.shift md5 = args.shift @client.restore(file, md5) end def setup Puppet::Log.newdestination(:console) @client = nil @server = nil trap(:INT) do $stderr.puts "Cancelling" exit(1) end if options[:debug] Puppet::Log.level = :debug elsif options[:verbose] Puppet::Log.level = :info end # Now parse the config Puppet.parse_config exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? require 'puppet/file_bucket/dipper' begin if options[:local] or options[:bucket] path = options[:bucket] || Puppet[:bucketdir] @client = Puppet::FileBucket::Dipper.new(:Path => path) else @client = Puppet::FileBucket::Dipper.new(:Server => Puppet[:server]) end rescue => detail $stderr.puts detail puts detail.backtrace if Puppet[:trace] exit(1) end end end diff --git a/lib/puppet/application/inspect.rb b/lib/puppet/application/inspect.rb index 599898a07..578588144 100644 --- a/lib/puppet/application/inspect.rb +++ b/lib/puppet/application/inspect.rb @@ -1,176 +1,179 @@ require 'puppet' require 'puppet/application' require 'puppet/file_bucket/dipper' class Puppet::Application::Inspect < Puppet::Application should_parse_config run_mode :agent option("--debug","-d") option("--verbose","-v") option("--logdest LOGDEST", "-l") do |arg| begin Puppet::Util::Log.newdestination(arg) options[:logset] = true rescue => detail $stderr.puts detail.to_s end end def help <<-HELP -SYNOPSIS +puppet-inspect(8) -- Send an inspection report ======== -Prepare and submit an inspection report to the puppet master. +SYNOPSIS +-------- + +Prepares and submits an inspection report to the puppet master. USAGE -===== - - puppet inspect +----- +puppet inspect DESCRIPTION -=========== +----------- This command uses the cached catalog from the previous run of 'puppet agent' to determine which attributes of which resources have been marked as auditable with the 'audit' metaparameter. It then examines the current state of the system, writes the state of the specified resource attributes to a report, and submits the report to the puppet master. -Puppet inspect does not run as a daemon, and must be run manually or from cron. +Puppet inspect does not run as a daemon, and must be run manually or +from cron. OPTIONS -======= +------- Any configuration setting which is valid in the configuration file is also a valid long argument, e.g. '--server=master.domain.com'. See the configuration file documentation at http://docs.puppetlabs.com/references/latest/configuration.html for the full list of acceptable settings. AUTHOR -====== +------ Puppet Labs COPYRIGHT -========= +--------- Copyright (c) 2011 Puppet Labs, LLC Licensed under the GNU General Public License version 2 HELP end def setup exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? raise "Inspect requires reporting to be enabled. Set report=true in puppet.conf to enable reporting." unless Puppet[:report] @report = Puppet::Transaction::Report.new("inspect") Puppet::Util::Log.newdestination(@report) Puppet::Util::Log.newdestination(:console) unless options[:logset] trap(:INT) do $stderr.puts "Exiting" exit(1) end if options[:debug] Puppet::Util::Log.level = :debug elsif options[:verbose] Puppet::Util::Log.level = :info end Puppet::Transaction::Report.indirection.terminus_class = :rest Puppet::Resource::Catalog.indirection.terminus_class = :yaml end def run_command retrieval_starttime = Time.now unless catalog = Puppet::Resource::Catalog.indirection.find(Puppet[:certname]) raise "Could not find catalog for #{Puppet[:certname]}" end @report.configuration_version = catalog.version inspect_starttime = Time.now @report.add_times("config_retrieval", inspect_starttime - retrieval_starttime) if Puppet[:archive_files] dipper = Puppet::FileBucket::Dipper.new(:Server => Puppet[:archive_file_server]) end catalog.to_ral.resources.each do |ral_resource| audited_attributes = ral_resource[:audit] next unless audited_attributes status = Puppet::Resource::Status.new(ral_resource) begin audited_resource = ral_resource.to_resource rescue StandardError => detail puts detail.backtrace if Puppet[:trace] ral_resource.err "Could not inspect #{ral_resource}; skipping: #{detail}" audited_attributes.each do |name| event = ral_resource.event( :property => name, :status => "failure", :audited => true, :message => "failed to inspect #{name}" ) status.add_event(event) end else audited_attributes.each do |name| next if audited_resource[name].nil? # Skip :absent properties of :absent resources. Really, it would be nicer if the RAL returned nil for those, but it doesn't. ~JW if name == :ensure or audited_resource[:ensure] != :absent or audited_resource[name] != :absent event = ral_resource.event( :previous_value => audited_resource[name], :property => name, :status => "audit", :audited => true, :message => "inspected value is #{audited_resource[name].inspect}" ) status.add_event(event) end end end if Puppet[:archive_files] and ral_resource.type == :file and audited_attributes.include?(:content) path = ral_resource[:path] if File.readable?(path) begin dipper.backup(path) rescue StandardError => detail Puppet.warning detail end end end @report.add_resource_status(status) end finishtime = Time.now @report.add_times("inspect", finishtime - inspect_starttime) @report.finalize_report begin Puppet::Transaction::Report.indirection.save(@report) rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not send report: #{detail}" end end end diff --git a/lib/puppet/application/kick.rb b/lib/puppet/application/kick.rb index 4cf06036f..9612a72aa 100644 --- a/lib/puppet/application/kick.rb +++ b/lib/puppet/application/kick.rb @@ -1,343 +1,353 @@ require 'puppet/application' class Puppet::Application::Kick < Puppet::Application should_not_parse_config attr_accessor :hosts, :tags, :classes option("--all","-a") option("--foreground","-f") option("--debug","-d") option("--ping","-P") option("--test") option("--host HOST") do |arg| @hosts << arg end option("--tag TAG", "-t") do |arg| @tags << arg end option("--class CLASS", "-c") do |arg| @classes << arg end option("--no-fqdn", "-n") do |arg| options[:fqdn] = false end option("--parallel PARALLEL", "-p") do |arg| begin options[:parallel] = Integer(arg) rescue $stderr.puts "Could not convert #{arg.inspect} to an integer" exit(23) end end def help <<-HELP -SYNOPSIS +puppet-kick(8) -- Remotely control puppet agent ======== + +SYNOPSIS +-------- Trigger a puppet agent run on a set of hosts. USAGE -===== - puppet kick [-a|--all] [-c|--class ] [-d|--debug] [-f|--foreground] - [-h|--help] [--host ] [--no-fqdn] [--ignoreschedules] - [-t|--tag ] [--test] [-p|--ping] [ [...]] +----- +puppet kick [-a|--all] [-c|--class ] [-d|--debug] [-f|--foreground] + [-h|--help] [--host ] [--no-fqdn] [--ignoreschedules] + [-t|--tag ] [--test] [-p|--ping] [ [...]] DESCRIPTION -=========== +----------- This script can be used to connect to a set of machines running 'puppet agent' and trigger them to run their configurations. The most common usage would be to specify a class of hosts and a set of tags, and 'puppet kick' would look up in LDAP all of the hosts matching that class, then connect to each host and trigger a run of all of the objects with the specified tags. If you are not storing your host configurations in LDAP, you can specify hosts manually. You will most likely have to run 'puppet kick' as root to get access to the SSL certificates. 'puppet kick' reads 'puppet master''s configuration file, so that it can copy things like LDAP settings. USAGE NOTES -=========== +----------- 'puppet kick' is useless unless 'puppet agent' is listening. See its documentation for more information, but the gist is that you must enable 'listen' on the 'puppet agent' daemon, either using '--listen' on the -command line or adding 'listen: true' in its config file. In addition, +command line or adding 'listen = true' in its config file. In addition, you need to set the daemons up to specifically allow connections by creating the 'namespaceauth' file, normally at '/etc/puppet/namespaceauth.conf'. This file specifies who has access to each namespace; if you create the file you must add every namespace you want any Puppet daemon to allow -- it is currently global to all Puppet daemons. -An example file looks like this:: +An example file looks like this: [fileserver] allow *.madstop.com [puppetmaster] allow *.madstop.com [puppetrunner] allow culain.madstop.com This is what you would install on your Puppet master; non-master hosts could leave off the 'fileserver' and 'puppetmaster' namespaces. OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'ssldir' is a valid configuration parameter, so you can specify '--ssldir ' as an argument. See the configuration file documentation at -http://reductivelabs.com/projects/puppet/reference/configref.html for +http://docs.puppetlabs.com/references/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet master with '--genconfig'. -all: Connect to all available hosts. Requires LDAP support - at this point. - -class: Specify a class of machines to which to connect. This - only works if you have LDAP configured, at the moment. +* --all: + Connect to all available hosts. Requires LDAP support at this point. -debug: Enable full debugging. +* --class: + Specify a class of machines to which to connect. This only works if + you have LDAP configured, at the moment. -foreground: Run each configuration in the foreground; that is, when - connecting to a host, do not return until the host has - finished its run. The default is false. +* --debug: + Enable full debugging. -help: Print this help message +* --foreground: + Run each configuration in the foreground; that is, when connecting to + a host, do not return until the host has finished its run. The default + is false. -host: A specific host to which to connect. This flag can be - specified more than once. +* --help: + Print this help message -ignoreschedules: Whether the client should ignore schedules when running - its configuration. This can be used to force the client - to perform work it would not normally perform so soon. - The default is false. +* --host: + A specific host to which to connect. This flag can be specified more + than once. -parallel: How parallel to make the connections. Parallelization - is provided by forking for each client to which to - connect. The default is 1, meaning serial execution. +* --ignoreschedules: + Whether the client should ignore schedules when running its + configuration. This can be used to force the client to perform work it + would not normally perform so soon. The default is false. -tag: Specify a tag for selecting the objects to apply. Does - not work with the --test option. +* --parallel: + How parallel to make the connections. Parallelization is provided by + forking for each client to which to connect. The default is 1, meaning + serial execution. -test: Print the hosts you would connect to but do not - actually connect. This option requires LDAP support at - this point. +* --tag: + Specify a tag for selecting the objects to apply. Does not work with + the --test option. -ping:: +* --test: + Print the hosts you would connect to but do not actually connect. This + option requires LDAP support at this point. - Do a ICMP echo against the target host. Skip hosts that don't respond to ping. +* --ping: + Do a ICMP echo against the target host. Skip hosts that don't respond + to ping. EXAMPLE -======= - sudo puppet kick -p 10 -t remotefile -t webserver host1 host2 +------- + $ sudo puppet kick -p 10 -t remotefile -t webserver host1 host2 AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def run_command @hosts += command_line.args options[:test] ? test : main end def test puts "Skipping execution in test mode" exit(0) end def main require 'puppet/network/client' Puppet.warning "Failed to load ruby LDAP library. LDAP functionality will not be available" unless Puppet.features.ldap? require 'puppet/util/ldap/connection' todo = @hosts.dup failures = [] # Now do the actual work go = true while go # If we don't have enough children in process and we still have hosts left to # do, then do the next host. if @children.length < options[:parallel] and ! todo.empty? host = todo.shift pid = fork do run_for_host(host) end @children[pid] = host else # Else, see if we can reap a process. begin pid = Process.wait if host = @children[pid] # Remove our host from the list of children, so the parallelization # continues working. @children.delete(pid) failures << host if $CHILD_STATUS.exitstatus != 0 print "#{host} finished with exit code #{$CHILD_STATUS.exitstatus}\n" else $stderr.puts "Could not find host for PID #{pid} with status #{$CHILD_STATUS.exitstatus}" end rescue Errno::ECHILD # There are no children left, so just exit unless there are still # children left to do. next unless todo.empty? if failures.empty? puts "Finished" exit(0) else puts "Failed: #{failures.join(", ")}" exit(3) end end end end end def run_for_host(host) if options[:ping] out = %x{ping -c 1 #{host}} unless $CHILD_STATUS == 0 $stderr.print "Could not contact #{host}\n" next end end require 'puppet/run' Puppet::Run.indirection.terminus_class = :rest port = Puppet[:puppetport] url = ["https://#{host}:#{port}", "production", "run", host].join('/') print "Triggering #{host}\n" begin run_options = { :tags => @tags, :background => ! options[:foreground], :ignoreschedules => options[:ignoreschedules] } run = Puppet::Run.indirection.save(Puppet::Run.new( run_options ), url) puts "Getting status" result = run.status puts "status is #{result}" rescue => detail puts detail.backtrace if Puppet[:trace] $stderr.puts "Host #{host} failed: #{detail}\n" exit(2) end case result when "success"; exit(0) when "running" $stderr.puts "Host #{host} is already running" exit(3) else $stderr.puts "Host #{host} returned unknown answer '#{result}'" exit(12) end end def initialize(*args) super @hosts = [] @classes = [] @tags = [] end def preinit [:INT, :TERM].each do |signal| trap(signal) do $stderr.puts "Cancelling" exit(1) end end options[:parallel] = 1 options[:verbose] = true options[:fqdn] = true options[:ignoreschedules] = false options[:foreground] = false end def setup if options[:debug] Puppet::Util::Log.level = :debug else Puppet::Util::Log.level = :info end # Now parse the config Puppet.parse_config if Puppet[:node_terminus] == "ldap" and (options[:all] or @classes) if options[:all] @hosts = Puppet::Node.indirection.search("whatever", :fqdn => options[:fqdn]).collect { |node| node.name } puts "all: #{@hosts.join(", ")}" else @hosts = [] @classes.each do |klass| list = Puppet::Node.indirection.search("whatever", :fqdn => options[:fqdn], :class => klass).collect { |node| node.name } puts "#{klass}: #{list.join(", ")}" @hosts += list end end elsif ! @classes.empty? $stderr.puts "You must be using LDAP to specify host classes" exit(24) end @children = {} # If we get a signal, then kill all of our children and get out. [:INT, :TERM].each do |signal| trap(signal) do Puppet.notice "Caught #{signal}; shutting down" @children.each do |pid, host| Process.kill("INT", pid) end waitall exit(1) end end end end diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb index b2b77f870..f689b9e01 100644 --- a/lib/puppet/application/master.rb +++ b/lib/puppet/application/master.rb @@ -1,230 +1,239 @@ require 'puppet/application' class Puppet::Application::Master < Puppet::Application should_parse_config run_mode :master option("--debug", "-d") option("--verbose", "-v") # internal option, only to be used by ext/rack/config.ru option("--rack") option("--compile host", "-c host") do |arg| options[:node] = arg end option("--logdest DEST", "-l DEST") do |arg| begin Puppet::Util::Log.newdestination(arg) options[:setdest] = true rescue => detail puts detail.backtrace if Puppet[:debug] $stderr.puts detail.to_s end end def help <<-HELP -SYNOPSIS +puppet-master(8) -- The puppet master daemon ======== + +SYNOPSIS +-------- The central puppet server. Functions as a certificate authority by default. USAGE -===== - puppet master [-D|--daemonize|--no-daemonize] [-d|--debug] [-h|--help] - [-l|--logdest |console|syslog] [-v|--verbose] [-V|--version] - [--compile ] [--apply ] +----- +puppet master [-D|--daemonize|--no-daemonize] [-d|--debug] [-h|--help] + [-l|--logdest |console|syslog] [-v|--verbose] [-V|--version] + [--compile ] + DESCRIPTION -=========== -This is the puppet central daemon. +----------- +This command starts an instance of puppet master, running as a daemon +and using Ruby's built-in Webrick webserver. Puppet master can also be +managed by other application servers; when this is the case, this +executable is not used. OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'ssldir' is a valid configuration parameter, so you can specify '--ssldir ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all -configuration options can also be generated by running puppetmasterdd +configuration options can also be generated by running puppet master with '--genconfig'. -daemonize: Send the process into the background. This is the default. - -no-daemonize: Do not send the process into the background. +* --daemonize: + Send the process into the background. This is the default. -debug: Enable full debugging. +* --no-daemonize: + Do not send the process into the background. -help: Print this help message. +* --debug: + Enable full debugging. -logdest: Where to send messages. Choose between syslog, the - console, and a log file. Defaults to sending messages to - syslog, or the console if debugging or verbosity is - enabled. +* --help: + Print this help message. -verbose: Enable verbosity. +* --logdest: + Where to send messages. Choose between syslog, the console, and a log + file. Defaults to sending messages to syslog, or the console if + debugging or verbosity is enabled. -version: Print the puppet version number and exit. +* --verbose: + Enable verbosity. -compile: Capability to compile a catalogue and output it in JSON - from the Puppet master. Uses facts contained in the - $vardir/yaml/ directory to compile the catalog. +* --version: + Print the puppet version number and exit. -apply: Capability to apply JSON catalog (such as one generated - with --compile). You can either specify a JSON file or - pipe in JSON from standard input. +* --compile: + Compile a catalogue and output it in JSON from the puppet master. Uses + facts contained in the $vardir/yaml/ directory to compile the catalog. EXAMPLE -======= +------- puppet master AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License HELP end def preinit trap(:INT) do $stderr.puts "Cancelling startup" exit(0) end # Create this first-off, so we have ARGV require 'puppet/daemon' @daemon = Puppet::Daemon.new @daemon.argv = ARGV.dup end def run_command if options[:node] compile elsif Puppet[:parseonly] parseonly else main end end def compile Puppet::Util::Log.newdestination :console raise ArgumentError, "Cannot render compiled catalogs without pson support" unless Puppet.features.pson? begin unless catalog = Puppet::Resource::Catalog.indirection.find(options[:node]) raise "Could not compile catalog for #{options[:node]}" end jj catalog.to_resource rescue => detail $stderr.puts detail exit(30) end exit(0) end def parseonly begin Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types rescue => detail Puppet.err detail exit 1 end exit(0) end def main require 'etc' require 'puppet/file_serving/content' require 'puppet/file_serving/metadata' xmlrpc_handlers = [:Status, :FileServer, :Master, :Report, :Filebucket] xmlrpc_handlers << :CA if Puppet[:ca] # Make sure we've got a localhost ssl cert Puppet::SSL::Host.localhost # And now configure our server to *only* hit the CA for data, because that's # all it will have write access to. Puppet::SSL::Host.ca_location = :only if Puppet::SSL::CertificateAuthority.ca? if Puppet.features.root? begin Puppet::Util.chuser rescue => detail puts detail.backtrace if Puppet[:trace] $stderr.puts "Could not change user to #{Puppet[:user]}: #{detail}" exit(39) end end unless options[:rack] require 'puppet/network/server' @daemon.server = Puppet::Network::Server.new(:xmlrpc_handlers => xmlrpc_handlers) @daemon.daemonize if Puppet[:daemonize] else require 'puppet/network/http/rack' @app = Puppet::Network::HTTP::Rack.new(:xmlrpc_handlers => xmlrpc_handlers, :protocols => [:rest, :xmlrpc]) end Puppet.notice "Starting Puppet master version #{Puppet.version}" unless options[:rack] @daemon.start else return @app end end def setup # Handle the logging settings. if options[:debug] or options[:verbose] if options[:debug] Puppet::Util::Log.level = :debug else Puppet::Util::Log.level = :info end unless Puppet[:daemonize] or options[:rack] Puppet::Util::Log.newdestination(:console) options[:setdest] = true end end Puppet::Util::Log.newdestination(:syslog) unless options[:setdest] exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? Puppet.settings.use :main, :master, :ssl # Cache our nodes in yaml. Currently not configurable. Puppet::Node.indirection.cache_class = :yaml # Configure all of the SSL stuff. if Puppet::SSL::CertificateAuthority.ca? Puppet::SSL::Host.ca_location = :local Puppet.settings.use :ca Puppet::SSL::CertificateAuthority.instance else Puppet::SSL::Host.ca_location = :none end end end diff --git a/lib/puppet/application/queue.rb b/lib/puppet/application/queue.rb index d32ec9a6f..00ace37fa 100644 --- a/lib/puppet/application/queue.rb +++ b/lib/puppet/application/queue.rb @@ -1,151 +1,165 @@ require 'puppet/application' require 'puppet/util' class Puppet::Application::Queue < Puppet::Application should_parse_config attr_accessor :daemon def preinit require 'puppet/daemon' @daemon = Puppet::Daemon.new @daemon.argv = ARGV.dup Puppet::Util::Log.newdestination(:console) # Do an initial trap, so that cancels don't get a stack trace. # This exits with exit code 1 trap(:INT) do $stderr.puts "Caught SIGINT; shutting down" exit(1) end # This is a normal shutdown, so code 0 trap(:TERM) do $stderr.puts "Caught SIGTERM; shutting down" exit(0) end { :verbose => false, :debug => false }.each do |opt,val| options[opt] = val end end option("--debug","-d") option("--verbose","-v") def help <<-HELP -SYNOPSIS +puppet-queue(8) -- Queuing daemon for asynchronous storeconfigs ======== -Retrieve serialized records from a queue and process them in order. + +SYNOPSIS +-------- +Retrieves serialized storeconfigs records from a queue and processes +them in order. USAGE -===== - puppet queue [-d|--debug] [-v|--verbose] +----- +puppet queue [-d|--debug] [-v|--verbose] DESCRIPTION -=========== -This is a simple application that just processes entities in a queue as -they are recieved. +----------- +This application runs as a daemon and processes storeconfigs data, +retrieving the data from a stomp server message queue and writing it to +a database. + +For more information, including instructions for properly setting up +your puppet master and message queue, see the documentation on setting +up asynchronous storeconfigs at: +http://projects.puppetlabs.com/projects/1/wiki/Using_Stored_Configuration OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'server' is a valid configuration parameter, so you can specify '--server ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all -configuration options can also be generated by running puppetd with +configuration options can also be generated by running puppet queue with '--genconfig'. -debug: Enable full debugging. +* --debug: + Enable full debugging. -help: Print this help message +* --help: + Print this help message -verbose: Turn on verbose reporting. +* --verbose: + Turn on verbose reporting. -version: Print the puppet version number and exit. +* --version: + Print the puppet version number and exit. EXAMPLE -======= - puppet queue +------- + $ puppet queue AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public License HELP end def main require 'puppet/indirector/catalog/queue' # provides Puppet::Indirector::Queue.subscribe Puppet.notice "Starting puppetqd #{Puppet.version}" Puppet::Resource::Catalog::Queue.subscribe do |catalog| # Once you have a Puppet::Resource::Catalog instance, passing it to save should suffice # to put it through to the database via its active_record indirector (which is determined # by the terminus_class = :active_record setting above) Puppet::Util.benchmark(:notice, "Processing queued catalog for #{catalog.name}") do begin Puppet::Resource::Catalog.indirection.save(catalog) rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not save queued catalog for #{catalog.name}: #{detail}" end end end Thread.list.each { |thread| thread.join } end # Handle the logging settings. def setup_logs if options[:debug] or options[:verbose] Puppet::Util::Log.newdestination(:console) if options[:debug] Puppet::Util::Log.level = :debug else Puppet::Util::Log.level = :info end end end def setup unless Puppet.features.stomp? raise ArgumentError, "Could not load the 'stomp' library, which must be present for queueing to work. You must install the required library." end setup_logs exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? require 'puppet/resource/catalog' Puppet::Resource::Catalog.indirection.terminus_class = :active_record daemon.daemonize if Puppet[:daemonize] # We want to make sure that we don't have a cache # class set up, because if storeconfigs is enabled, # we'll get a loop of continually caching the catalog # for storage again. Puppet::Resource::Catalog.indirection.cache_class = nil end end diff --git a/lib/puppet/application/resource.rb b/lib/puppet/application/resource.rb index a0e33408d..3995c285b 100644 --- a/lib/puppet/application/resource.rb +++ b/lib/puppet/application/resource.rb @@ -1,222 +1,221 @@ require 'puppet/application' class Puppet::Application::Resource < Puppet::Application should_not_parse_config attr_accessor :host, :extra_params def preinit @extra_params = [] @host = nil Facter.loadfacts end option("--debug","-d") option("--verbose","-v") option("--edit","-e") option("--host HOST","-H") do |arg| @host = arg end option("--types", "-t") do |arg| types = [] Puppet::Type.loadall Puppet::Type.eachtype do |t| next if t.name == :component types << t.name.to_s end puts types.sort exit end option("--param PARAM", "-p") do |arg| @extra_params << arg.to_sym end def help <<-HELP -SYNOPSIS +puppet-resource(8) -- The resource abstraction layer shell ======== -Use the Puppet RAL to directly interact with the system. + +SYNOPSIS +-------- +Uses the Puppet RAL to directly interact with the system. USAGE -===== - puppet resource [-h|--help] [-d|--debug] [-v|--verbose] [-e|--edit] - [-H|--host ] [-p|--param ] [-t|--types] - type +----- +puppet resource [-h|--help] [-d|--debug] [-v|--verbose] [-e|--edit] + [-H|--host ] [-p|--param ] [-t|--types] + [] [= ...] DESCRIPTION -=========== +----------- This command provides simple facilities for converting current system -state into Puppet code, along with some ability to use Puppet to affect -the current state. +state into Puppet code, along with some ability to modify the current +state using Puppet's RAL. -By default, you must at least provide a type to list, which case puppet -resource will tell you everything it knows about all instances of that -type. You can optionally specify an instance name, and puppet resource -will only describe that single instance. +By default, you must at least provide a type to list, in which case +puppet resource will tell you everything it knows about all resources of +that type. You can optionally specify an instance name, and puppet +resource will only describe that single instance. -You can also add '--edit' as an argument, and puppet resource will write -its output to a file, open that file in an editor, and then apply the -file as a Puppet transaction. You can easily use this to use Puppet to -make simple changes to a system. +If given a type, a name, and a series of = pairs, +puppet resource will modify the state of the specified resource. +Alternately, if given a type, a name, and the '--edit' flag, puppet +resource will write its output to a file, open that file in an editor, +and then apply the saved file as a Puppet transaction. OPTIONS -======= +------- Note that any configuration parameter that's valid in the configuration file is also a valid long argument. For example, 'ssldir' is a valid configuration parameter, so you can specify '--ssldir ' as an argument. See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with '--genconfig'. -debug: Enable full debugging. - -edit: +* --debug: + Enable full debugging. +* --edit: Write the results of the query to a file, open the file in an editor, and read the file back in as an executable Puppet manifest. -host: - +* --host: When specified, connect to the resource server on the named host and retrieve the list of resouces of the type specified. -help: - +* --help: Print this help message. -param: - +* --param: Add more parameters to be outputted from queries. -types: - +* --types: List all available types. -verbose: - +* --verbose: Print extra information. EXAMPLE -======= -This example uses `puppet resource` to return Puppet configuration for +------- +This example uses `puppet resource` to return a Puppet configuration for the user `luke`: - $ puppet resource user luke - user { 'luke': - home => '/home/luke', - uid => '100', - ensure => 'present', - comment => 'Luke Kanies,,,', - gid => '1000', - shell => '/bin/bash', - groups => ['sysadmin','audio','video','puppet'] - } + $ puppet resource user luke + user { 'luke': + home => '/home/luke', + uid => '100', + ensure => 'present', + comment => 'Luke Kanies,,,', + gid => '1000', + shell => '/bin/bash', + groups => ['sysadmin','audio','video','puppet'] + } AUTHOR -====== +------ Luke Kanies COPYRIGHT -========= +--------- Copyright (c) 2005-2007 Puppet Labs, LLC Licensed under the GNU Public License HELP end def main args = command_line.args type = args.shift or raise "You must specify the type to display" typeobj = Puppet::Type.type(type) or raise "Could not find type #{type}" name = args.shift params = {} args.each do |setting| if setting =~ /^(\w+)=(.+)$/ params[$1] = $2 else raise "Invalid parameter setting #{setting}" end end raise "You cannot edit a remote host" if options[:edit] and @host properties = typeobj.properties.collect { |s| s.name } format = proc {|trans| trans.dup.collect do |param, value| if value.nil? or value.to_s.empty? trans.delete(param) elsif value.to_s == "absent" and param.to_s != "ensure" trans.delete(param) end trans.delete(param) unless properties.include?(param) or @extra_params.include?(param) end trans.to_manifest } if @host Puppet::Resource.indirection.terminus_class = :rest port = Puppet[:puppetport] key = ["https://#{host}:#{port}", "production", "resources", type, name].join('/') else key = [type, name].join('/') end text = if name if params.empty? [ Puppet::Resource.indirection.find( key ) ] else [ Puppet::Resource.indirection.save(Puppet::Resource.new( type, name, :parameters => params ), key) ] end else Puppet::Resource.indirection.search( key, {} ) end.map(&format).join("\n") if options[:edit] file = "/tmp/x2puppet-#{Process.pid}.pp" begin File.open(file, "w") do |f| f.puts text end ENV["EDITOR"] ||= "vi" system(ENV["EDITOR"], file) system("puppet -v #{file}") ensure #if FileTest.exists? file # File.unlink(file) #end end else puts text end end def setup Puppet::Util::Log.newdestination(:console) # Now parse the config Puppet.parse_config if options[:debug] Puppet::Util::Log.level = :debug elsif options[:verbose] Puppet::Util::Log.level = :info end end end diff --git a/man/man5/puppet.conf.5 b/man/man5/puppet.conf.5 index 210f36786..f6c9926c3 100644 --- a/man/man5/puppet.conf.5 +++ b/man/man5/puppet.conf.5 @@ -1,2103 +1,1592 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETCONF" "5" "August 2010" "" "" -\fBThis page is autogenerated; any changes will get overwritten\fR \fI(last generated on Sat Aug 28 14:00:20 \-0700 2010)\fR -. -.P -{:toc} +.TH "PUPPETCONF" "5" "February 2011" "Puppet Labs, LLC" "Puppet manual" +\fBThis page is autogenerated; any changes will get overwritten\fR \fI(last generated on Thu Feb 17 09:56:34 \-0800 2011)\fR . .SH "Specifying Configuration Parameters" -On The Command\-Line +++++++++++++++++++ Every Puppet executable (with the exception of \fBpuppetdoc\fR) accepts all of the parameters below, but not all of the arguments make sense for every executable\. +. +.SS "On The Command\-Line" +Every Puppet executable (with the exception of \fBpuppetdoc\fR) accepts all of the parameters below, but not all of the arguments make sense for every executable\. . .P I have tried to be as thorough as possible in the descriptions of the arguments, so it should be obvious whether an argument is appropriate or not\. . .P These parameters can be supplied to the executables either as command\-line options or in the configuration file\. For instance, the command\-line invocation below would set the configuration directory to \fB/private/puppet\fR: . .IP "" 4 . .nf $ puppet agent \-\-confdir=/private/puppet . .fi . .IP "" 0 . .P Note that boolean options are turned on and off with a slightly different syntax on the command line: . .IP "" 4 . .nf $ puppet agent \-\-storeconfigs $ puppet agent \-\-no\-storeconfigs . .fi . .IP "" 0 . .P The invocations above will enable and disable, respectively, the storage of the client configuration\. . -.P -Configuration Files +++++++++++++++++++ -. -.P +.SS "Configuration Files" As mentioned above, the configuration parameters can also be stored in a configuration file, located in the configuration directory\. As root, the default configuration directory is \fB/etc/puppet\fR, and as a regular user, the default configuration directory is \fB~user/\.puppet\fR\. As of 0\.23\.0, all executables look for \fBpuppet\.conf\fR in their configuration directory (although they previously looked for separate files)\. For example, \fBpuppet\.conf\fR is located at \fB/etc/puppet/puppet\.conf\fR as \fBroot\fR and \fB~user/\.puppet/puppet\.conf\fR as a regular user by default\. . .P All executables will set any parameters set within the \fB[main]\fR section, and each executable will also use one of the \fB[master]\fR, \fB[agent]\fR\. . .P -File Format \'\'\'\'\'\'\'\'\'\'\' -. -.P The file follows INI\-style formatting\. Here is an example of a very simple \fBpuppet\.conf\fR file: . .IP "" 4 . .nf [main] confdir = /private/puppet storeconfigs = true . .fi . .IP "" 0 . .P Note that boolean parameters must be explicitly specified as \fBtrue\fR or \fBfalse\fR as seen above\. . .P -If you need to change file parameters (e\.g\., reset the mode or owner), do so within curly braces on the same line: +If you need to change file or directory parameters (e\.g\., reset the mode or owner), do so within curly braces on the same line: . .IP "" 4 . .nf [main] - myfile = /tmp/whatever {owner = root, mode = 644} + vardir = /new/vardir {owner = root, mode = 644} . .fi . .IP "" 0 . .P If you\'re starting out with a fresh configuration, you may wish to let the executable generate a template configuration file for you by invoking the executable in question with the \fB\-\-genconfig\fR command\. The executable will print a template configuration to standard output, which can be redirected to a file like so: . .IP "" 4 . .nf $ puppet agent \-\-genconfig > /etc/puppet/puppet\.conf . .fi . .IP "" 0 . .P Note that this invocation will replace the contents of any pre\-existing \fBpuppet\.conf\fR file, so make a backup of your present config if it contains valuable information\. . .P Like the \fB\-\-genconfig\fR argument, the executables also accept a \fB\-\-genmanifest\fR argument, which will generate a manifest that can be used to manage all of Puppet\'s directories and files and prints it to standard output\. This can likewise be redirected to a file: . .IP "" 4 . .nf $ puppet agent \-\-genmanifest > /etc/puppet/manifests/site\.pp . .fi . .IP "" 0 . .P Puppet can also create user and group accounts for itself (one \fBpuppet\fR group and one \fBpuppet\fR user) if it is invoked as \fBroot\fR with the \fB\-\-mkusers\fR argument: . .IP "" 4 . .nf $ puppet agent \-\-mkusers . .fi . .IP "" 0 . .SH "Signals" The \fBpuppet agent\fR and \fBpuppet master\fR executables catch some signals for special handling\. Both daemons catch (\fBSIGHUP\fR), which forces the server to restart tself\. Predictably, interrupt and terminate (\fBSIGINT\fR and \fBSIGTERM\fR) will shut down the server, whether it be an instance of \fBpuppet agent\fR or \fBpuppet master\fR\. . .P Sending the \fBSIGUSR1\fR signal to an instance of \fBpuppet agent\fR will cause it to immediately begin a new configuration transaction with the server\. This signal has no effect on \fBpuppet master\fR\. . .SH "Configuration Parameter Reference" Below is a list of all documented parameters\. Not all of them are valid with all Puppet executables, but the executables will ignore any inappropriate values\. . -.P -async_storeconfigs ++++++++++++++++++ +.SS "archive_file_server" +During an inspect run, the file bucket server to archive files to if archive_files is set\. . -.P -Whether to use a queueing system to provide asynchronous database integration\. Requires that \fBpuppetqd\fR be running and that \'PSON\' support for ruby be installed\. +.IP "\(bu" 4 +\fIDefault\fR: $server +. +.IP "" 0 +. +.SS "archive_files" +During an inspect run, whether to archive files whose contents are audited to a file bucket\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -authconfig ++++++++++ +.SS "async_storeconfigs" +Whether to use a queueing system to provide asynchronous database integration\. Requires that \fBpuppetqd\fR be running and that \'PSON\' support for ruby be installed\. . -.P +.IP "\(bu" 4 +\fIDefault\fR: false +. +.IP "" 0 +. +.SS "authconfig" The configuration file that defines the rights to the different namespaces and methods\. This can be used as a coarse\-grained authorization system for both \fBpuppet agent\fR and \fBpuppet master\fR\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/namespaceauth\.conf . .IP "" 0 . -.P -autoflush +++++++++ -. -.P +.SS "autoflush" Whether log files should always flush to disk\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -autosign ++++++++ -. -.P +.SS "autosign" Whether to enable autosign\. Valid values are true (which autosigns any key request, and is a very bad idea), false (which never autosigns any key request), and the path to a file, which uses that configuration file to determine which keys to sign\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/autosign\.conf . .IP "" 0 . -.P -bindaddress +++++++++++ -. -.P +.SS "bindaddress" The address a listening server should bind to\. Mongrel servers default to 127\.0\.0\.1 and WEBrick defaults to 0\.0\.0\.0\. . -.P -bucketdir +++++++++ -. -.P +.SS "bucketdir" Where FileBucket files are stored\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/bucket . .IP "" 0 . -.P -ca ++ -. -.P +.SS "ca" Wether the master should function as a certificate authority\. . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . -.P -ca_days +++++++ -. -.P +.SS "ca_days" How long a certificate should be valid\. This parameter is deprecated, use ca_ttl instead . -.P -ca_md +++++ -. -.P +.SS "ca_md" The type of hash used in certificates\. . .IP "\(bu" 4 \fIDefault\fR: md5 . .IP "" 0 . -.P -ca_name +++++++ -. -.P +.SS "ca_name" The name to use the Certificate Authority certificate\. . .IP "\(bu" 4 -\fIDefault\fR: $certname +\fIDefault\fR: Puppet CA: $certname . .IP "" 0 . -.P -ca_port +++++++ -. -.P +.SS "ca_port" The port to use for the certificate authority\. . .IP "\(bu" 4 \fIDefault\fR: $masterport . .IP "" 0 . -.P -ca_server +++++++++ -. -.P +.SS "ca_server" The server to use for certificate authority requests\. It\'s a separate server because it cannot and does not need to horizontally scale\. . .IP "\(bu" 4 \fIDefault\fR: $server . .IP "" 0 . -.P -ca_ttl ++++++ -. -.P +.SS "ca_ttl" The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \'y\' (years of 365 days), \'d\' (days), \'h\' (hours), or \'s\' (seconds)\. The unit defaults to seconds\. If this parameter is set, ca_days is ignored\. Examples are \'3600\' (one hour) and \'1825d\', which is the same as \'5y\' (5 years) . .IP "\(bu" 4 \fIDefault\fR: 5y . .IP "" 0 . -.P -cacert ++++++ -. -.P +.SS "cacert" The CA certificate\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/ca_crt\.pem . .IP "" 0 . -.P -cacrl +++++ -. -.P +.SS "cacrl" The certificate revocation list (CRL) for the CA\. Will be used if present but otherwise ignored\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/ca_crl\.pem . .IP "" 0 . -.P -cadir +++++ -. -.P +.SS "cadir" The root directory for the certificate authority\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/ca . .IP "" 0 . -.P -cakey +++++ -. -.P +.SS "cakey" The CA private key\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/ca_key\.pem . .IP "" 0 . -.P -capass ++++++ -. -.P +.SS "capass" Where the CA stores the password for the private key . .IP "\(bu" 4 \fIDefault\fR: $caprivatedir/ca\.pass . .IP "" 0 . -.P -caprivatedir ++++++++++++ -. -.P +.SS "caprivatedir" Where the CA stores private certificate information\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/private . .IP "" 0 . -.P -capub +++++ -. -.P +.SS "capub" The CA public key\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/ca_pub\.pem . .IP "" 0 . -.P -catalog_format ++++++++++++++ -. -.P +.SS "catalog_format" (Deprecated for \'preferred_serialization_format\') What format to use to dump the catalog\. Only supports \'marshal\' and \'yaml\'\. Only matters on the client, since it asks the server for a specific format\. . -.P -catalog_terminus ++++++++++++++++ -. -.P +.SS "catalog_terminus" Where to get node catalogs\. This is useful to change if, for instance, you\'d like to pre\-compile catalogs and store them in memcached or some other easily\-accessed store\. . .IP "\(bu" 4 \fIDefault\fR: compiler . .IP "" 0 . -.P -cert_inventory ++++++++++++++ -. -.P +.SS "cert_inventory" A Complete listing of all certificates . .IP "\(bu" 4 \fIDefault\fR: $cadir/inventory\.txt . .IP "" 0 . -.P -certdir +++++++ -. -.P +.SS "certdir" The certificate directory\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/certs . .IP "" 0 . -.P -certdnsnames ++++++++++++ -. -.P +.SS "certdnsnames" The DNS names on the Server certificate as a colon\-separated list\. If it\'s anything other than an empty string, it will be used as an alias in the created certificate\. By default, only the server gets an alias set up, and only for \'puppet\'\. . -.P -certificate_revocation ++++++++++++++++++++++ -. -.P +.SS "certificate_revocation" Whether certificate revocation should be supported by downloading a Certificate Revocation List (CRL) to all clients\. If enabled, CA chaining will almost definitely not work\. . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . -.P -certname ++++++++ -. -.P +.SS "certname" The name to use when handling certificates\. Defaults to the fully qualified domain name\. . .IP "\(bu" 4 -\fIDefault\fR: pelin\.members\.linode\.com +\fIDefault\fR: magpie\.puppetlabs\.lan . .IP "" 0 . -.P -classfile +++++++++ -. -.P +.SS "classfile" The file in which puppet agent stores a list of the classes associated with the retrieved configuration\. Can be loaded in the separate \fBpuppet\fR executable using the \fB\-\-loadclasses\fR option\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/classes\.txt . .IP "" 0 . -.P -client_datadir ++++++++++++++ -. -.P +.SS "client_datadir" The directory in which serialized data is stored on the client\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/client_data . .IP "" 0 . -.P -clientbucketdir +++++++++++++++ -. -.P +.SS "clientbucketdir" Where FileBucket files are stored locally\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/clientbucket . .IP "" 0 . -.P -clientyamldir +++++++++++++ -. -.P +.SS "clientyamldir" The directory in which client\-side YAML data is stored\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/client_yaml . .IP "" 0 . -.P -code ++++ -. -.P +.SS "code" Code to parse directly\. This is essentially only used by \fBpuppet\fR, and should only be set if you\'re writing your own Puppet executable . -.P -color +++++ -. -.P +.SS "color" Whether to use colors when logging to the console\. Valid values are \fBansi\fR (equivalent to \fBtrue\fR), \fBhtml\fR (mostly used during testing with TextMate), and \fBfalse\fR, which produces no color\. . .IP "\(bu" 4 \fIDefault\fR: ansi . .IP "" 0 . -.P -confdir +++++++ -. -.P -The main Puppet configuration directory\. The default for this parameter is calculated based on the user\. If the process is running as root or the user that \fBpuppet master\fR is supposed to run as, it defaults to a system directory, but if it\'s running as any other user, it defaults to being in \fB~\fR\. +.SS "confdir" +The main Puppet configuration directory\. The default for this parameter is calculated based on the user\. If the process is running as root or the user that Puppet is supposed to run as, it defaults to a system directory, but if it\'s running as any other user, it defaults to being in the user\'s home directory\. . .IP "\(bu" 4 \fIDefault\fR: /etc/puppet . .IP "" 0 . -.P -config ++++++ -. -.P +.SS "config" The configuration file for doc\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/puppet\.conf . .IP "" 0 . -.P -config_version ++++++++++++++ -. -.P +.SS "config_version" How to determine the configuration version\. By default, it will be the time that the configuration is parsed, but you can provide a shell script to override how the version is determined\. The output of this script will be added to every log message in the reports, allowing you to correlate changes on your hosts to the source version on the server\. . -.P -configprint +++++++++++ -. -.P +.SS "configprint" Print the value of a specific configuration parameter\. If a parameter is provided for this, then the value is printed and puppet exits\. Comma\-separate multiple values\. For a list of all values, specify \'all\'\. This feature is only available in Puppet versions higher than 0\.18\.4\. . -.P -configtimeout +++++++++++++ -. -.P +.SS "configtimeout" How long the client should wait for the configuration to be retrieved before considering it a failure\. This can help reduce flapping if too many clients contact the server at one time\. . .IP "\(bu" 4 \fIDefault\fR: 120 . .IP "" 0 . -.P -couchdb_url +++++++++++ -. -.P +.SS "couchdb_url" The url where the puppet couchdb database will be created . .IP "\(bu" 4 \fIDefault\fR: http://127\.0\.0\.1:5984/puppet . .IP "" 0 . -.P -csrdir ++++++ -. -.P +.SS "csrdir" Where the CA stores certificate requests . .IP "\(bu" 4 \fIDefault\fR: $cadir/requests . .IP "" 0 . -.P -daemonize +++++++++ -. -.P +.SS "daemonize" Send the process into the background\. This is the default\. . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . -.P -dbadapter +++++++++ -. -.P +.SS "dbadapter" The type of database to use\. . .IP "\(bu" 4 \fIDefault\fR: sqlite3 . .IP "" 0 . -.P -dbconnections +++++++++++++ -. -.P -The number of database connections\. Only used when networked databases are used\. Will be ignored if the value is an empty string or is less than 1\. -. -.IP "\(bu" 4 -\fIDefault\fR: 0 -. -.IP "" 0 -. -.P -dblocation ++++++++++ +.SS "dbconnections" +The number of database connections for networked databases\. Will be ignored unless the value is a positive integer\. . -.P +.SS "dblocation" The database cache for client configurations\. Used for querying within the language\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/clientconfigs\.sqlite3 . .IP "" 0 . -.P -dbmigrate +++++++++ -. -.P +.SS "dbmigrate" Whether to automatically migrate the database\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -dbname ++++++ -. -.P +.SS "dbname" The name of the database to use\. . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -dbpassword ++++++++++ -. -.P +.SS "dbpassword" The database password for caching\. Only used when networked databases are used\. . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -dbport ++++++ -. -.P +.SS "dbport" The database password for caching\. Only used when networked databases are used\. . -.P -dbserver ++++++++ -. -.P +.SS "dbserver" The database server for caching\. Only used when networked databases are used\. . .IP "\(bu" 4 \fIDefault\fR: localhost . .IP "" 0 . -.P -dbsocket ++++++++ -. -.P +.SS "dbsocket" The database socket location\. Only used when networked databases are used\. Will be ignored if the value is an empty string\. . -.P -dbuser ++++++ -. -.P +.SS "dbuser" The database user for caching\. Only used when networked databases are used\. . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -diff ++++ -. -.P +.SS "diff" Which diff command to use when printing differences between files\. . .IP "\(bu" 4 \fIDefault\fR: diff . .IP "" 0 . -.P -diff_args +++++++++ -. -.P +.SS "diff_args" Which arguments to pass to the diff command when printing differences between files\. . .IP "\(bu" 4 \fIDefault\fR: \-u . .IP "" 0 . -.P -downcasefacts +++++++++++++ -. -.P +.SS "downcasefacts" Whether facts should be made all lowercase when sent to the server\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -dynamicfacts ++++++++++++ -. -.P +.SS "dynamicfacts" Facts that are dynamic; these facts will be ignored when deciding whether changed facts should result in a recompile\. Multiple facts should be comma\-separated\. . .IP "\(bu" 4 \fIDefault\fR: memorysize,memoryfree,swapsize,swapfree . .IP "" 0 . -.P -environment +++++++++++ -. -.P +.SS "environment" The environment Puppet is running in\. For clients (e\.g\., \fBpuppet agent\fR) this determines the environment itself, which is used to find modules and much more\. For servers (i\.e\., \fBpuppet master\fR) this provides the default environment for nodes we know nothing about\. . .IP "\(bu" 4 \fIDefault\fR: production . .IP "" 0 . -.P -evaltrace +++++++++ -. -.P +.SS "evaltrace" Whether each resource should log when it is being evaluated\. This allows you to interactively see exactly what is being done\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -external_nodes ++++++++++++++ -. -.P +.SS "external_nodes" An external command that can produce node information\. The output must be a YAML dump of a hash, and that hash must have one or both of \fBclasses\fR and \fBparameters\fR, where \fBclasses\fR is an array and \fBparameters\fR is a hash\. For unknown nodes, the commands should exit with a non\-zero exit code\. This command makes it straightforward to store your node mapping information in other data sources like databases\. . .IP "\(bu" 4 \fIDefault\fR: none . .IP "" 0 . -.P -factdest ++++++++ -. -.P +.SS "factdest" Where Puppet should store facts that it pulls down from the central server\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/facts/ . .IP "" 0 . -.P -factpath ++++++++ -. -.P +.SS "factpath" Where Puppet should look for facts\. Multiple directories should be colon\-separated, like normal PATH variables\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/lib/facter:$vardir/facts . .IP "" 0 . -.P -facts_terminus ++++++++++++++ -. -.P +.SS "facts_terminus" The node facts terminus\. . .IP "\(bu" 4 \fIDefault\fR: facter . .IP "" 0 . -.P -factsignore +++++++++++ -. -.P +.SS "factsignore" What files to ignore when pulling down facts\. . .IP "\(bu" 4 \fIDefault\fR: \.svn CVS . .IP "" 0 . -.P -factsource ++++++++++ -. -.P +.SS "factsource" From where to retrieve facts\. The standard Puppet \fBfile\fR type is used for retrieval, so anything that is a valid file source can be used here\. . .IP "\(bu" 4 \fIDefault\fR: puppet://$server/facts/ . .IP "" 0 . -.P -factsync ++++++++ -. -.P +.SS "factsync" Whether facts should be synced with the central server\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -fileserverconfig ++++++++++++++++ -. -.P +.SS "fileserverconfig" Where the fileserver configuration is stored\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/fileserver\.conf . .IP "" 0 . -.P -filetimeout +++++++++++ -. -.P +.SS "filetimeout" The minimum time to wait (in seconds) between checking for updates in configuration files\. This timeout determines how quickly Puppet checks whether a file (such as manifests or templates) has changed on disk\. . .IP "\(bu" 4 \fIDefault\fR: 15 . .IP "" 0 . -.P -freeze_main +++++++++++ -. -.P +.SS "freeze_main" Freezes the \'main\' class, disallowing any code to be added to it\. This essentially means that you can\'t have any code outside of a node, class, or definition other than in the site manifest\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -genconfig +++++++++ -. -.P +.SS "genconfig" Whether to just print a configuration to stdout and exit\. Only makes sense when used interactively\. Takes into account arguments specified on the CLI\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -genmanifest +++++++++++ -. -.P +.SS "genmanifest" Whether to just print a manifest to stdout and exit\. Only makes sense when used interactively\. Takes into account arguments specified on the CLI\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -graph +++++ -. -.P +.SS "graph" Whether to create dot graph files for the different configuration graphs\. These dot files can be interpreted by tools like OmniGraffle or dot (which is part of ImageMagick)\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -graphdir ++++++++ -. -.P +.SS "graphdir" Where to store dot\-outputted graphs\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/graphs . .IP "" 0 . -.P -group +++++ -. -.P +.SS "group" The group puppet master should run as\. . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -hostcert ++++++++ -. -.P +.SS "hostcert" Where individual hosts store and look for their certificates\. . .IP "\(bu" 4 \fIDefault\fR: $certdir/$certname\.pem . .IP "" 0 . -.P -hostcrl +++++++ -. -.P +.SS "hostcrl" Where the host\'s certificate revocation list can be found\. This is distinct from the certificate authority\'s CRL\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/crl\.pem . .IP "" 0 . -.P -hostcsr +++++++ -. -.P +.SS "hostcsr" Where individual hosts store and look for their certificate requests\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/csr_$certname\.pem . .IP "" 0 . -.P -hostprivkey +++++++++++ -. -.P +.SS "hostprivkey" Where individual hosts store and look for their private key\. . .IP "\(bu" 4 \fIDefault\fR: $privatekeydir/$certname\.pem . .IP "" 0 . -.P -hostpubkey ++++++++++ -. -.P +.SS "hostpubkey" Where individual hosts store and look for their public key\. . .IP "\(bu" 4 \fIDefault\fR: $publickeydir/$certname\.pem . .IP "" 0 . -.P -http_compression ++++++++++++++++ -. -.P +.SS "http_compression" Allow http compression in REST communication with the master\. This setting might improve performance for agent \-> master communications over slow WANs\. Your puppetmaster needs to support compression (usually by activating some settings in a reverse\-proxy in front of the puppetmaster, which rules out webrick)\. It is harmless to activate this settings if your master doesn\'t support compression, but if it supports it, this setting might reduce performance on high\-speed LANs\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -http_proxy_host +++++++++++++++ -. -.P +.SS "http_proxy_host" The HTTP proxy host to use for outgoing connections\. Note: You may need to use a FQDN for the server hostname when using a proxy\. . .IP "\(bu" 4 \fIDefault\fR: none . .IP "" 0 . -.P -http_proxy_port +++++++++++++++ -. -.P +.SS "http_proxy_port" The HTTP proxy port to use for outgoing connections . .IP "\(bu" 4 \fIDefault\fR: 3128 . .IP "" 0 . -.P -httplog +++++++ -. -.P +.SS "httplog" Where the puppet agent web server logs\. . .IP "\(bu" 4 \fIDefault\fR: $logdir/http\.log . .IP "" 0 . -.P -ignorecache +++++++++++ -. -.P +.SS "ignorecache" Ignore cache and always recompile the configuration\. This is useful for testing new configurations, where the local cache may in fact be stale even if the timestamps are up to date \- if the facts change or if the server changes\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -ignoreimport ++++++++++++ -. -.P +.SS "ignoreimport" A parameter that can be used in commit hooks, since it enables you to parse\-check a single file rather than requiring that all files exist\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -ignoreschedules +++++++++++++++ -. -.P +.SS "ignoreschedules" Boolean; whether puppet agent should ignore schedules\. This is useful for initial puppet agent runs\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -keylength +++++++++ +.SS "inventory_port" +The port to communicate with the inventory_server\. . -.P +.IP "\(bu" 4 +\fIDefault\fR: $masterport +. +.IP "" 0 +. +.SS "inventory_server" +The server to send facts to\. +. +.IP "\(bu" 4 +\fIDefault\fR: $server +. +.IP "" 0 +. +.SS "inventory_terminus" +Should usually be the same as the facts terminus +. +.IP "\(bu" 4 +\fIDefault\fR: $facts_terminus +. +.IP "" 0 +. +.SS "keylength" The bit length of keys\. . .IP "\(bu" 4 \fIDefault\fR: 1024 . .IP "" 0 . -.P -ldapattrs +++++++++ +.SS "lastrunfile" +Where puppet agent stores the last run report summary in yaml format\. . -.P +.IP "\(bu" 4 +\fIDefault\fR: $statedir/last_run_summary\.yaml +. +.IP "" 0 +. +.SS "lastrunreport" +Where puppet agent stores the last run report in yaml format\. +. +.IP "\(bu" 4 +\fIDefault\fR: $statedir/last_run_report\.yaml +. +.IP "" 0 +. +.SS "ldapattrs" The LDAP attributes to include when querying LDAP for nodes\. All returned attributes are set as variables in the top\-level scope\. Multiple values should be comma\-separated\. The value \'all\' returns all attributes\. . .IP "\(bu" 4 \fIDefault\fR: all . .IP "" 0 . -.P -ldapbase ++++++++ -. -.P +.SS "ldapbase" The search base for LDAP searches\. It\'s impossible to provide a meaningful default here, although the LDAP libraries might have one already set\. Generally, it should be the \'ou=Hosts\' branch under your main directory\. . -.P -ldapclassattrs ++++++++++++++ -. -.P +.SS "ldapclassattrs" The LDAP attributes to use to define Puppet classes\. Values should be comma\-separated\. . .IP "\(bu" 4 \fIDefault\fR: puppetclass . .IP "" 0 . -.P -ldapnodes +++++++++ -. -.P +.SS "ldapnodes" Whether to search for node configurations in LDAP\. See http://projects\.puppetlabs\.com/projects/puppet/wiki/LDAP_Nodes for more information\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -ldapparentattr ++++++++++++++ -. -.P +.SS "ldapparentattr" The attribute to use to define the parent node\. . .IP "\(bu" 4 \fIDefault\fR: parentnode . .IP "" 0 . -.P -ldappassword ++++++++++++ -. -.P +.SS "ldappassword" The password to use to connect to LDAP\. . -.P -ldapport ++++++++ -. -.P +.SS "ldapport" The LDAP port\. Only used if \fBldapnodes\fR is enabled\. . .IP "\(bu" 4 \fIDefault\fR: 389 . .IP "" 0 . -.P -ldapserver ++++++++++ -. -.P +.SS "ldapserver" The LDAP server\. Only used if \fBldapnodes\fR is enabled\. . .IP "\(bu" 4 \fIDefault\fR: ldap . .IP "" 0 . -.P -ldapssl +++++++ -. -.P +.SS "ldapssl" Whether SSL should be used when searching for nodes\. Defaults to false because SSL usually requires certificates to be set up on the client side\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -ldapstackedattrs ++++++++++++++++ -. -.P +.SS "ldapstackedattrs" The LDAP attributes that should be stacked to arrays by adding the values in all hierarchy elements of the tree\. Values should be comma\-separated\. . .IP "\(bu" 4 \fIDefault\fR: puppetvar . .IP "" 0 . -.P -ldapstring ++++++++++ -. -.P +.SS "ldapstring" The search string used to find an LDAP node\. . .IP "\(bu" 4 \fIDefault\fR: (&(objectclass=puppetClient)(cn=%s)) . .IP "" 0 . -.P -ldaptls +++++++ -. -.P +.SS "ldaptls" Whether TLS should be used when searching for nodes\. Defaults to false because TLS usually requires certificates to be set up on the client side\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -ldapuser ++++++++ -. -.P +.SS "ldapuser" The user to use to connect to LDAP\. Must be specified as a full DN\. . -.P -lexical +++++++ -. -.P +.SS "lexical" Whether to use lexical scoping (vs\. dynamic)\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -libdir ++++++ -. -.P +.SS "libdir" An extra search path for Puppet\. This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases\. In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\'s search path . .IP "\(bu" 4 \fIDefault\fR: $vardir/lib . .IP "" 0 . -.P -listen ++++++ -. -.P +.SS "listen" Whether puppet agent should listen for connections\. If this is true, then by default only the \fBrunner\fR server is started, which allows remote authorized and authenticated nodes to connect and trigger \fBpuppet agent\fR runs\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -localcacert +++++++++++ -. -.P +.SS "localcacert" Where each client stores the CA certificate\. . .IP "\(bu" 4 \fIDefault\fR: $certdir/ca\.pem . .IP "" 0 . -.P -localconfig +++++++++++ -. -.P +.SS "localconfig" Where puppet agent caches the local configuration\. An extension indicating the cache format is added automatically\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/localconfig . .IP "" 0 . -.P -logdir ++++++ -. -.P +.SS "logdir" The Puppet log directory\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/log . .IP "" 0 . -.P -manage_internal_file_permissions ++++++++++++++++++++++++++++++++ -. -.P +.SS "manage_internal_file_permissions" Whether Puppet should manage the owner, group, and mode of files it uses internally . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . -.P -manifest ++++++++ -. -.P +.SS "manifest" The entry\-point manifest for puppet master\. . .IP "\(bu" 4 \fIDefault\fR: $manifestdir/site\.pp . .IP "" 0 . -.P -manifestdir +++++++++++ -. -.P +.SS "manifestdir" Where puppet master looks for its manifests\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/manifests . .IP "" 0 . -.P -masterhttplog +++++++++++++ -. -.P +.SS "masterhttplog" Where the puppet master web server logs\. . .IP "\(bu" 4 \fIDefault\fR: $logdir/masterhttp\.log . .IP "" 0 . -.P -masterlog +++++++++ -. -.P +.SS "masterlog" Where puppet master logs\. This is generally not used, since syslog is the default log destination\. . .IP "\(bu" 4 \fIDefault\fR: $logdir/puppetmaster\.log . .IP "" 0 . -.P -masterport ++++++++++ -. -.P +.SS "masterport" Which port puppet master listens on\. . .IP "\(bu" 4 \fIDefault\fR: 8140 . .IP "" 0 . -.P -maximum_uid +++++++++++ -. -.P +.SS "maximum_uid" The maximum allowed UID\. Some platforms use negative UIDs but then ship with tools that do not know how to handle signed ints, so the UIDs show up as huge numbers that can then not be fed back into the system\. This is a hackish way to fail in a slightly more useful way when that happens\. . .IP "\(bu" 4 \fIDefault\fR: 4294967290 . .IP "" 0 . -.P -mkusers +++++++ -. -.P +.SS "mkusers" Whether to create the necessary user and group that puppet agent will run as\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -modulepath ++++++++++ -. -.P +.SS "modulepath" The search path for modules as a colon\-separated list of directories\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/modules:/usr/share/puppet/modules . .IP "" 0 . -.P -name ++++ -. -.P +.SS "name" The name of the application, if we are running as one\. The default is essentially $0 without the path or \fB\.rb\fR\. . .IP "\(bu" 4 \fIDefault\fR: doc . .IP "" 0 . -.P -node_name +++++++++ -. -.P +.SS "node_name" How the puppetmaster determines the client\'s identity and sets the \'hostname\', \'fqdn\' and \'domain\' facts for use in the manifest, in particular for determining which \'node\' statement applies to the client\. Possible values are \'cert\' (use the subject\'s CN in the client\'s certificate) and \'facter\' (use the hostname that the client reported in its facts) . .IP "\(bu" 4 \fIDefault\fR: cert . .IP "" 0 . -.P -node_terminus +++++++++++++ -. -.P +.SS "node_terminus" Where to find information about nodes\. . .IP "\(bu" 4 \fIDefault\fR: plain . .IP "" 0 . -.P -noop ++++ -. -.P +.SS "noop" Whether puppet agent should be run in noop mode\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -onetime +++++++ -. -.P +.SS "onetime" Run the configuration once, rather than as a long\-running daemon\. This is useful for interactively running puppetd\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -parseonly +++++++++ -. -.P +.SS "parseonly" Just check the syntax of the manifests\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -passfile ++++++++ -. -.P +.SS "passfile" Where puppet agent stores the password for its private key\. Generally unused\. . .IP "\(bu" 4 \fIDefault\fR: $privatedir/password . .IP "" 0 . -.P -path ++++ -. -.P +.SS "path" The shell search path\. Defaults to whatever is inherited from the parent process\. . .IP "\(bu" 4 \fIDefault\fR: none . .IP "" 0 . -.P -pidfile +++++++ -. -.P +.SS "pidfile" The pid file . .IP "\(bu" 4 \fIDefault\fR: $rundir/$name\.pid . .IP "" 0 . -.P -plugindest ++++++++++ -. -.P +.SS "plugindest" Where Puppet should store plugins that it pulls down from the central server\. . .IP "\(bu" 4 \fIDefault\fR: $libdir . .IP "" 0 . -.P -pluginsignore +++++++++++++ -. -.P +.SS "pluginsignore" What files to ignore when pulling down plugins\. . .IP "\(bu" 4 \fIDefault\fR: \.svn CVS \.git . .IP "" 0 . -.P -pluginsource ++++++++++++ -. -.P +.SS "pluginsource" From where to retrieve plugins\. The standard Puppet \fBfile\fR type is used for retrieval, so anything that is a valid file source can be used here\. . .IP "\(bu" 4 \fIDefault\fR: puppet://$server/plugins . .IP "" 0 . -.P -pluginsync ++++++++++ -. -.P +.SS "pluginsync" Whether plugins should be synced with the central server\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -postrun_command +++++++++++++++ -. -.P +.SS "postrun_command" A command to run after every agent run\. If this command returns a non\-zero return code, the entire Puppet run will be considered to have failed, even though it might have performed work during the normal run\. . -.P -preferred_serialization_format ++++++++++++++++++++++++++++++ -. -.P +.SS "preferred_serialization_format" The preferred means of serializing ruby instances for passing over the wire\. This won\'t guarantee that all instances will be serialized using this method, since not all classes can be guaranteed to support this format, but it will be used for all classes that support it\. . .IP "\(bu" 4 \fIDefault\fR: pson . .IP "" 0 . -.P -prerun_command ++++++++++++++ -. -.P +.SS "prerun_command" A command to run before every agent run\. If this command returns a non\-zero return code, the entire Puppet run will fail\. . -.P -privatedir ++++++++++ -. -.P +.SS "privatedir" Where the client stores private certificate information\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/private . .IP "" 0 . -.P -privatekeydir +++++++++++++ -. -.P +.SS "privatekeydir" The private key directory\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/private_keys . .IP "" 0 . -.P -publickeydir ++++++++++++ -. -.P +.SS "publickeydir" The public key directory\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/public_keys . .IP "" 0 . -.P -puppetdlockfile +++++++++++++++ -. -.P +.SS "puppetdlockfile" A lock file to temporarily stop puppet agent from doing anything\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/puppetdlock . .IP "" 0 . -.P -puppetdlog ++++++++++ -. -.P +.SS "puppetdlog" The log file for puppet agent\. This is generally not used\. . .IP "\(bu" 4 \fIDefault\fR: $logdir/puppetd\.log . .IP "" 0 . -.P -puppetport ++++++++++ -. -.P +.SS "puppetport" Which port puppet agent listens on\. . .IP "\(bu" 4 \fIDefault\fR: 8139 . .IP "" 0 . -.P -queue_source ++++++++++++ -. -.P +.SS "queue_source" Which type of queue to use for asynchronous processing\. If your stomp server requires authentication, you can include it in the URI as long as your stomp client library is at least 1\.1\.1 . .IP "\(bu" 4 \fIDefault\fR: stomp://localhost:61613/ . .IP "" 0 . -.P -queue_type ++++++++++ -. -.P +.SS "queue_type" Which type of queue to use for asynchronous processing\. . .IP "\(bu" 4 \fIDefault\fR: stomp . .IP "" 0 . -.P -rails_loglevel ++++++++++++++ -. -.P +.SS "rails_loglevel" The log level for Rails connections\. The value must be a valid log level within Rails\. Production environments normally use \fBinfo\fR and other environments normally use \fBdebug\fR\. . .IP "\(bu" 4 \fIDefault\fR: info . .IP "" 0 . -.P -railslog ++++++++ -. -.P +.SS "railslog" Where Rails\-specific logs are sent . .IP "\(bu" 4 \fIDefault\fR: $logdir/rails\.log . .IP "" 0 . -.P -report ++++++ -. -.P +.SS "report" Whether to send reports after every transaction\. . .IP "\(bu" 4 -\fIDefault\fR: false +\fIDefault\fR: true . .IP "" 0 . -.P -report_port +++++++++++ -. -.P +.SS "report_port" The port to communicate with the report_server\. . .IP "\(bu" 4 \fIDefault\fR: $masterport . .IP "" 0 . -.P -report_server +++++++++++++ -. -.P -The server to which to send transaction reports\. +.SS "report_server" +The server to send transaction reports to\. . .IP "\(bu" 4 \fIDefault\fR: $server . .IP "" 0 . -.P -reportdir +++++++++ -. -.P +.SS "reportdir" The directory in which to store reports received from the client\. Each client gets a separate subdirectory\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/reports . .IP "" 0 . -.P -reportfrom ++++++++++ -. -.P +.SS "reportfrom" The \'from\' email address for the reports\. . .IP "\(bu" 4 -\fIDefault\fR: report@pelin\.members\.linode\.com +\fIDefault\fR: report@magpie\.puppetlabs\.lan . .IP "" 0 . -.P -reports +++++++ -. -.P +.SS "reports" The list of reports to generate\. All reports are looked for in \fBpuppet/reports/name\.rb\fR, and multiple report names should be comma\-separated (whitespace is okay)\. . .IP "\(bu" 4 \fIDefault\fR: store . .IP "" 0 . -.P -reportserver ++++++++++++ -. -.P +.SS "reportserver" (Deprecated for \'report_server\') The server to which to send transaction reports\. . .IP "\(bu" 4 \fIDefault\fR: $server . .IP "" 0 . -.P -reporturl +++++++++ -. -.P +.SS "reporturl" The URL used by the http reports processor to send reports . .IP "\(bu" 4 \fIDefault\fR: http://localhost:3000/reports . .IP "" 0 . -.P -req_bits ++++++++ -. -.P +.SS "req_bits" The bit length of the certificates\. . .IP "\(bu" 4 \fIDefault\fR: 2048 . .IP "" 0 . -.P -requestdir ++++++++++ -. -.P +.SS "requestdir" Where host certificate requests are stored\. . .IP "\(bu" 4 \fIDefault\fR: $ssldir/certificate_requests . .IP "" 0 . -.P -rest_authconfig +++++++++++++++ -. -.P +.SS "rest_authconfig" The configuration file that defines the rights to the different rest indirections\. This can be used as a fine\-grained authorization system for \fBpuppet master\fR\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/auth\.conf . .IP "" 0 . -.P -rrddir ++++++ -. -.P +.SS "rrddir" The directory where RRD database files are stored\. Directories for each reporting host will be created under this directory\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/rrd . .IP "" 0 . -.P -rrdinterval +++++++++++ -. -.P +.SS "rrdinterval" How often RRD should expect data\. This should match how often the hosts report back to the server\. . .IP "\(bu" 4 \fIDefault\fR: $runinterval . .IP "" 0 . -.P -run_mode ++++++++ -. -.P +.SS "run_mode" The effective \'run mode\' of the application: master, agent, or user\. . .IP "\(bu" 4 \fIDefault\fR: master . .IP "" 0 . -.P -rundir ++++++ -. -.P +.SS "rundir" Where Puppet PID files are kept\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/run . .IP "" 0 . -.P -runinterval +++++++++++ -. -.P +.SS "runinterval" How often puppet agent applies the client configuration; in seconds\. . .IP "\(bu" 4 \fIDefault\fR: 1800 . .IP "" 0 . -.P -sendmail ++++++++ -. -.P +.SS "sendmail" Where to find the sendmail binary with which to send email\. . .IP "\(bu" 4 \fIDefault\fR: /usr/sbin/sendmail . .IP "" 0 . -.P -serial ++++++ -. -.P +.SS "serial" Where the serial number for certificates is stored\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/serial . .IP "" 0 . -.P -server ++++++ -. -.P +.SS "server" The server to which server puppet agent should connect . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -server_datadir ++++++++++++++ -. -.P +.SS "server_datadir" The directory in which serialized data is stored, usually in a subdirectory\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/server_data . .IP "" 0 . -.P -servertype ++++++++++ -. -.P +.SS "servertype" The type of server to use\. Currently supported options are webrick and mongrel\. If you use mongrel, you will need a proxy in front of the process or processes, since Mongrel cannot speak SSL\. . .IP "\(bu" 4 \fIDefault\fR: webrick . .IP "" 0 . -.P -show_diff +++++++++ -. -.P +.SS "show_diff" Whether to print a contextual diff when files are being replaced\. The diff is printed on stdout, so this option is meaningless unless you are running Puppet interactively\. This feature currently requires the \fBdiff/lcs\fR Ruby library\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -signeddir +++++++++ -. -.P +.SS "signeddir" Where the CA stores signed certificates\. . .IP "\(bu" 4 \fIDefault\fR: $cadir/signed . .IP "" 0 . -.P -smtpserver ++++++++++ -. -.P +.SS "smtpserver" The server through which to send email reports\. . .IP "\(bu" 4 \fIDefault\fR: none . .IP "" 0 . -.P -splay +++++ -. -.P +.SS "splay" Whether to sleep for a pseudo\-random (but consistent) amount of time before a run\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -splaylimit ++++++++++ -. -.P +.SS "splaylimit" The maximum time to delay before runs\. Defaults to being the same as the run interval\. . .IP "\(bu" 4 \fIDefault\fR: $runinterval . .IP "" 0 . -.P -ssl_client_header +++++++++++++++++ -. -.P +.SS "ssl_client_header" The header containing an authenticated client\'s SSL DN\. Only used with Mongrel\. This header must be set by the proxy to the authenticated client\'s SSL DN (e\.g\., \fB/CN=puppet\.puppetlabs\.com\fR)\. See http://projects\.puppetlabs\.com/projects/puppet/wiki/Using_Mongrel for more information\. . .IP "\(bu" 4 \fIDefault\fR: HTTP_X_CLIENT_DN . .IP "" 0 . -.P -ssl_client_verify_header ++++++++++++++++++++++++ -. -.P +.SS "ssl_client_verify_header" The header containing the status message of the client verification\. Only used with Mongrel\. This header must be set by the proxy to \'SUCCESS\' if the client successfully authenticated, and anything else otherwise\. See http://projects\.puppetlabs\.com/projects/puppet/wiki/Using_Mongrel for more information\. . .IP "\(bu" 4 \fIDefault\fR: HTTP_X_CLIENT_VERIFY . .IP "" 0 . -.P -ssldir ++++++ -. -.P +.SS "ssldir" Where SSL certificates are kept\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/ssl . .IP "" 0 . -.P -statedir ++++++++ -. -.P +.SS "statedir" The directory where Puppet state is stored\. Generally, this directory can be removed without causing harm (although it might result in spurious service restarts)\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/state . .IP "" 0 . -.P -statefile +++++++++ -. -.P +.SS "statefile" Where puppet agent and puppet master store state associated with the running configuration\. In the case of puppet master, this file reflects the state discovered through interacting with clients\. . .IP "\(bu" 4 \fIDefault\fR: $statedir/state\.yaml . .IP "" 0 . -.P -storeconfigs ++++++++++++ -. -.P +.SS "storeconfigs" Whether to store each client\'s configuration\. This requires ActiveRecord from Ruby on Rails\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -strict_hostname_checking ++++++++++++++++++++++++ -. -.P +.SS "strict_hostname_checking" Whether to only search for the complete hostname as it is in the certificate when searching for node information in the catalogs\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -summarize +++++++++ -. -.P +.SS "summarize" Whether to print a transaction summary\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -syslogfacility ++++++++++++++ -. -.P +.SS "syslogfacility" What syslog facility to use when logging to syslog\. Syslog has a fixed list of valid facilities, and you must choose one of those; you cannot just make one up\. . .IP "\(bu" 4 \fIDefault\fR: daemon . .IP "" 0 . -.P -tagmap ++++++ -. -.P +.SS "tagmap" The mapping between reporting tags and email addresses\. . .IP "\(bu" 4 \fIDefault\fR: $confdir/tagmail\.conf . .IP "" 0 . -.P -tags ++++ -. -.P +.SS "tags" Tags to use to find resources\. If this is set, then only resources tagged with the specified tags will be applied\. Values must be comma\-separated\. . -.P -templatedir +++++++++++ -. -.P +.SS "templatedir" Where Puppet looks for template files\. Can be a list of colon\-seperated directories\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/templates . .IP "" 0 . -.P -thin_storeconfigs +++++++++++++++++ -. -.P +.SS "thin_storeconfigs" Boolean; wether storeconfigs store in the database only the facts and exported resources\. If true, then storeconfigs performance will be higher and still allow exported/collected resources, but other usage external to Puppet might not work . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -trace +++++ -. -.P +.SS "trace" Whether to print stack traces on some errors . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -use_cached_catalog ++++++++++++++++++ -. -.P +.SS "use_cached_catalog" Whether to only use the cached catalog rather than compiling a new catalog on every run\. Puppet can be run with this enabled by default and then selectively disabled when a recompile is desired\. . .IP "\(bu" 4 \fIDefault\fR: false . .IP "" 0 . -.P -usecacheonfailure +++++++++++++++++ -. -.P +.SS "usecacheonfailure" Whether to use the cached configuration when the remote configuration will not compile\. This option is useful for testing new configurations, where you want to fix the broken configuration rather than reverting to a known\-good one\. . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . -.P -user ++++ -. -.P +.SS "user" The user puppet master should run as\. . .IP "\(bu" 4 \fIDefault\fR: puppet . .IP "" 0 . -.P -vardir ++++++ -. -.P +.SS "vardir" Where Puppet stores dynamic and growing data\. The default for this parameter is calculated specially, like \fBconfdir\fR_\. . .IP "\(bu" 4 \fIDefault\fR: /var/lib/puppet . .IP "" 0 . -.P -yamldir +++++++ -. -.P +.SS "yamldir" The directory in which YAML data is stored, usually in a subdirectory\. . .IP "\(bu" 4 \fIDefault\fR: $vardir/yaml . .IP "" 0 . -.P -zlib ++++ -. -.P +.SS "zlib" Boolean; whether to use the zlib library . .IP "\(bu" 4 \fIDefault\fR: true . .IP "" 0 . .P -\fIThis page autogenerated on Sat Aug 28 14:00:20 \-0700 2010\fR +\fIThis page autogenerated on Thu Feb 17 09:56:34 \-0800 2011\fR diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8 index 59afc2ed3..7ff0da9af 100644 --- a/man/man8/filebucket.8 +++ b/man/man8/filebucket.8 @@ -1,105 +1,81 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "FILEBUCKET" "8" "August 2010" "" "" -A stand\-alone Puppet filebucket client\.puppet filebucket [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] +.TH "PUPPET\-FILEBUCKET" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket . -.nf - - [\-l|\-\-local] [\-r|\-\-remote] - [\-s|\-\-server ] [\-b|\-\-bucket ] \.\.\. +.SH "SYNOPSIS" +A stand\-alone Puppet filebucket client\. . -.fi -. -.IP "" 0 -This is a stand\-alone filebucket client for sending files to a local or central filebucket\.This client can operate in three modes, with only one mode per call: +.SH "USAGE" +puppet filebucket \fImode\fR [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-l|\-\-local] [\-r|\-\-remote] [\-s|\-\-server \fIserver\fR] [\-b|\-\-bucket \fIdirectory\fR] \fIfile\fR \fIfile\fR \.\.\. . .P -backup: Send one or more files to the specified file bucket\. Each sent -. -.IP "" 4 -. -.nf - - file is printed with its resulting md5 sum\. -. -.fi -. -.IP "" 0 +Puppet filebucket can operate in three modes, with only one mode per call: . .P -get: Return the text associated with an md5 sum\. The text is printed -. -.IP "" 4 -. -.nf - - to stdout, and only one file can be retrieved at a time\. -. -.fi -. -.IP "" 0 +backup: Send one or more files to the specified file bucket\. Each sent file is printed with its resulting md5 sum\. . .P -restore: Given a file path and an md5 sum, store the content associated -. -.IP "" 4 +get: Return the text associated with an md5 sum\. The text is printed to stdout, and only one file can be retrieved at a time\. . -.nf - - with the sum into the specified file path\. You can specify an - entirely new path to this argument; you are not restricted to - restoring the content to its original location\. -. -.fi +.P +restore: Given a file path and an md5 sum, store the content associated with the sum into the specified file path\. You can specify an entirely new path to this argument; you are not restricted to restoring the content to its original location\. . -.IP "" 0 +.SH "DESCRIPTION" +This is a stand\-alone filebucket client for sending files to a local or central filebucket\. . .P -Note that +filebucket+ defaults to using a network\-based filebucket available on the server named +puppet+\. To use this, you\'ll have to be running as a user with valid Puppet certificates\. Alternatively, you can use your local file bucket by specifying +\-\-local+\.$ puppet filebucket backup /etc/passwd /etc/passwd: 429b225650b912a2ee067b0a4cf1e949 $ puppet filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949 $Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +Note that \'filebucket\' defaults to using a network\-based filebucket available on the server named \'puppet\'\. To use this, you\'ll have to be running as a user with valid Puppet certificates\. Alternatively, you can use your local file bucket by specifying \'\-\-local\'\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. . .P See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. . -.P -debug: Enable full debugging\. +.TP +\-\-debug +Enable full debugging\. . -.P -help: Print this help message +.TP +\-\-help +Print this help message . -.P -local: Use the local filebucket\. This will use the default +.TP +\-\-local +Use the local filebucket\. This will use the default configuration information\. . -.IP "" 4 +.TP +\-\-remote +Use a remote filebucket\. This will use the default configuration information\. . -.nf - - configuration information\. +.TP +\-\-server +The server to send the file to, instead of locally\. . -.fi +.TP +\-\-verbose +Print extra information\. . -.IP "" 0 +.TP +\-\-version +Print version information\. . -.P -remote: Use a remote filebucket\. This will use the default -. -.IP "" 4 +.SH "EXAMPLE" . .nf - configuration information\. +$ puppet filebucket backup /etc/passwd +/etc/passwd: 429b225650b912a2ee067b0a4cf1e949 +$ puppet filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949 . .fi . -.IP "" 0 +.SH "AUTHOR" +Luke Kanies . -.P -server: The server to send the file to, instead of locally\. -. -.P -verbose: Print extra information\. -. -.P -version: Print version information\.puppet filebucket \-b /tmp/filebucket /my/fileLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/pi.8 b/man/man8/pi.8 index b70a128e7..c54a7bec7 100644 --- a/man/man8/pi.8 +++ b/man/man8/pi.8 @@ -1,17 +1,51 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PI" "8" "August 2010" "" "" -Print help about puppet types on the console\. Run with \'\-h\' to get detailed help\.puppet describe [\-h|\-\-help] [\-s|\-\-short] [\-p|\-\-providers] [\-l|\-\-list] [\-m|\-\-meta]Prints details of Puppet types, providers and metaparameters on the console\.help: Print this help text +.TH "PUPPET\-DESCRIBE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.P -providers: Describe providers in detail for each type +.SH "NAME" +\fBpuppet\-describe\fR \- Display help about resource types . -.P -list: List all types +.SH "SYNOPSIS" +Prints help about Puppet resource types, providers, and metaparameters\. . -.P -meta: List all metaparameters +.SH "USAGE" +puppet describe [\-h|\-\-help] [\-s|\-\-short] [\-p|\-\-providers] [\-l|\-\-list] [\-m|\-\-meta] . -.P -short: List only parameters without detailpuppet describe \-\-list puppet describe file \-\-providers puppet describe user \-s \-mDavid LutterkortCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License +.SH "OPTIONS" +. +.TP +\-\-help +Print this help text +. +.TP +\-\-providers +Describe providers in detail for each type +. +.TP +\-\-list +List all types +. +.TP +\-\-meta +List all metaparameters +. +.TP +\-\-short +List only parameters without detail +. +.SH "EXAMPLE" +. +.nf + +$ puppet describe \-\-list +$ puppet describe file \-\-providers +$ puppet describe user \-s \-m +. +.fi +. +.SH "AUTHOR" +David Lutterkort +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-agent.8 b/man/man8/puppet-agent.8 new file mode 100644 index 000000000..3fadd9df7 --- /dev/null +++ b/man/man8/puppet-agent.8 @@ -0,0 +1,139 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-AGENT" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-agent\fR \- The puppet agent daemon +. +.SH "SYNOPSIS" +Retrieves the client configuration from the puppet master and applies it to the local host\. +. +.P +This service may be run as a daemon, run periodically using cron (or something similar), or run interactively for testing purposes\. +. +.SH "USAGE" +puppet agent [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-\-detailed\-exitcodes] [\-\-disable] [\-\-enable] [\-h|\-\-help] [\-\-certname \fIhost name\fR] [\-l|\-\-logdest syslog|\fIfile\fR|console] [\-o|\-\-onetime] [\-\-serve \fIhandler\fR] [\-t|\-\-test] [\-\-noop] [\-\-digest \fIdigest\fR] [\-\-fingerprint] [\-V|\-\-version] [\-v|\-\-verbose] [\-w|\-\-waitforcert \fIseconds\fR] +. +.SH "DESCRIPTION" +This is the main puppet client\. Its job is to retrieve the local machine\'s configuration from a remote server and apply it\. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default)\. The client will connect and request a signed certificate, and will continue connecting until it receives one\. +. +.P +Once the client has a signed certificate, it will retrieve its configuration and apply it\. +. +.SH "USAGE NOTES" +\'puppet agent\' does its best to find a compromise between interactive use and daemon use\. Run with no arguments and no configuration, it will go into the background, attempt to get a signed certificate, and retrieve and apply its configuration every 30 minutes\. +. +.P +Some flags are meant specifically for interactive use \-\- in particular, \'test\', \'tags\' or \'fingerprint\' are useful\. \'test\' enables verbose logging, causes the daemon to stay in the foreground, exits if the server\'s configuration is invalid (this happens if, for instance, you\'ve left a syntax error on the server), and exits after running the configuration once (rather than hanging around as a long\-running process)\. +. +.P +\'tags\' allows you to specify what portions of a configuration you want to apply\. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the \'tags\' flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied\. This is very useful when you are testing new configurations \-\- for instance, if you are just starting to manage \'ntpd\', you would put all of the new elements into an \'ntpd\' class, and call puppet with \'\-\-tags ntpd\', which would only apply that small portion of the configuration during your testing, rather than applying the whole thing\. +. +.P +\'fingerprint\' is a one\-time flag\. In this mode \'puppet agent\' will run once and display on the console (and in the log) the current certificate (or certificate request) fingerprint\. Providing the \'\-\-digest\' option allows to use a different digest algorithm to generate the fingerprint\. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent (to prevent against man\-in\-the\-middle attacks when signing certificates)\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet agent with \'\-\-genconfig\'\. +. +.TP +\-\-daemonize +Send the process into the background\. This is the default\. +. +.TP +\-\-no\-daemonize +Do not send the process into the background\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-digest +Change the certificate fingerprinting digest algorithm\. The default is MD5\. Valid values depends on the version of OpenSSL installed, but should always at least contain MD5, MD2, SHA1 and SHA256\. +. +.TP +\-\-detailed\-exitcodes +Provide transaction information via exit codes\. If this is enabled, an exit code of \'2\' means there were changes, and an exit code of \'4\' means that there were failures during the transaction\. This option only makes sense in conjunction with \-\-onetime\. +. +.TP +\-\-disable +Disable working on the local system\. This puts a lock file in place, causing \'puppet agent\' not to work on the system until the lock file is removed\. This is useful if you are testing a configuration and do not want the central configuration to override the local state until everything is tested and committed\. +. +.IP +\'puppet agent\' uses the same lock file while it is running, so no more than one \'puppet agent\' process is working at a time\. +. +.IP +\'puppet agent\' exits after executing this\. +. +.TP +\-\-enable +Enable working on the local system\. This removes any lock file, causing \'puppet agent\' to start managing the local system again (although it will continue to use its normal scheduling, so it might not start for another half hour)\. +. +.IP +\'puppet agent\' exits after executing this\. +. +.TP +\-\-certname +Set the certname (unique ID) of the client\. The master reads this unique identifying string, which is usually set to the node\'s fully\-qualified domain name, to determine which configurations the node will receive\. Use this option to debug setup problems or implement unusual node identification schemes\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-logdest +Where to send messages\. Choose between syslog, the console, and a log file\. Defaults to sending messages to syslog, or the console if debugging or verbosity is enabled\. +. +.TP +\-\-no\-client +Do not create a config client\. This will cause the daemon to run without ever checking for its configuration automatically, and only makes sense +. +.TP +\-\-onetime +Run the configuration once\. Runs a single (normally daemonized) Puppet run\. Useful for interactively running puppet agent when used in conjunction with the \-\-no\-daemonize option\. +. +.TP +\-\-fingerprint +Display the current certificate or certificate signing request fingerprint and then exit\. Use the \'\-\-digest\' option to change the digest algorithm used\. +. +.TP +\-\-serve +Start another type of server\. By default, \'puppet agent\' will start a service handler that allows authenticated and authorized remote nodes to trigger the configuration to be pulled down and applied\. You can specify any handler here that does not require configuration, e\.g\., filebucket, ca, or resource\. The handlers are in \'lib/puppet/network/handler\', and the names must match exactly, both in the call to \'serve\' and in \'namespaceauth\.conf\'\. +. +.TP +\-\-test +Enable the most common options used for testing\. These are \'onetime\', \'verbose\', \'ignorecache\', \'no\-daemonize\', \'no\-usecacheonfailure\', \'detailed\-exit\-codes\', \'no\-splay\', and \'show_diff\'\. +. +.TP +\-\-noop +Use \'noop\' mode where the daemon runs in a no\-op or dry\-run mode\. This is useful for seeing what changes Puppet will make without actually executing the changes\. +. +.TP +\-\-verbose +Turn on verbose reporting\. +. +.TP +\-\-version +Print the puppet version number and exit\. +. +.TP +\-\-waitforcert +This option only matters for daemons that do not yet have certificates and it is enabled by default, with a value of 120 (seconds)\. This causes \'puppet agent\' to connect to the server every 2 minutes and ask it to sign a certificate request\. This is useful for the initial setup of a puppet client\. You can turn off waiting for certificates by specifying a time of 0\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet agent \-\-server puppet\.domain\.com +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005, 2006 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-apply.8 b/man/man8/puppet-apply.8 new file mode 100644 index 000000000..d8d864b56 --- /dev/null +++ b/man/man8/puppet-apply.8 @@ -0,0 +1,75 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-APPLY" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-apply\fR \- Apply Puppet manifests locally +. +.SH "SYNOPSIS" +Applies a standalone Puppet manifest to the local system\. +. +.SH "USAGE" +puppet apply [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-execute] [\-\-detailed\-exitcodes] [\-l|\-\-logdest \fIfile\fR] [\-\-apply \fIcatalog\fR] \fIfile\fR +. +.SH "DESCRIPTION" +This is the standalone puppet execution tool; use it to apply individual manifests\. +. +.P +When provided with a modulepath, via command line or config file, puppet apply can effectively mimic the catalog that would be served by puppet master with access to the same modules, although there are some subtle differences\. When combined with scheduling and an automated system for pushing manifests, this can be used to implement a serverless Puppet site\. +. +.P +Most users should use \'puppet agent\' and \'puppet master\' for site\-wide manifests\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'modulepath\' is a valid configuration parameter, so you can specify \'\-\-tags \fIclass\fR,\fItag\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-detailed\-exitcodes +Provide transaction information via exit codes\. If this is enabled, an exit code of \'2\' means there were changes, and an exit code of \'4\' means that there were failures during the transaction\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-loadclasses +Load any stored classes\. \'puppet agent\' caches configured classes (usually at /etc/puppet/classes\.txt), and setting this option causes all of those classes to be set in your puppet manifest\. +. +.TP +\-\-logdest +Where to send messages\. Choose between syslog, the console, and a log file\. Defaults to sending messages to the console\. +. +.TP +\-\-execute +Execute a specific piece of Puppet code +. +.TP +\-\-verbose +Print extra information\. +. +.TP +\-\-apply +Apply a JSON catalog (such as one generated with \'puppet master \-\-compile\')\. You can either specify a JSON file or pipe in JSON from standard input\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet apply \-l /tmp/manifest\.log manifest\.pp +$ puppet apply \-\-modulepath=/root/dev/modules \-e "include ntpd::server" +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-cert.8 b/man/man8/puppet-cert.8 new file mode 100644 index 000000000..bea7596d4 --- /dev/null +++ b/man/man8/puppet-cert.8 @@ -0,0 +1,94 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-CERT" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-cert\fR \- Manage certificates and requests +. +.SH "SYNOPSIS" +Standalone certificate authority\. Capable of generating certificates, but mostly used for signing certificate requests from puppet clients\. +. +.SH "USAGE" +puppet cert [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-g|\-\-generate] [\-l|\-\-list] [\-s|\-\-sign] [\-r|\-\-revoke] [\-p|\-\-print] [\-c|\-\-clean] [\-\-verify] [\-\-digest \fIdigest\fR] [\-\-fingerprint] [host] +. +.SH "DESCRIPTION" +Because the puppet master service defaults to not signing client certificate requests, this script is available for signing outstanding requests\. It can be used to list outstanding requests and then either sign them individually or sign all of them\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet cert with \'\-\-genconfig\'\. +. +.TP +\-\-all +Operate on all items\. Currently only makes sense with \'\-\-sign\', \'\-\-clean\', or \'\-\-list\'\. +. +.TP +\-\-digest +Set the digest for fingerprinting (defaults to md5)\. Valid values depends on your openssl and openssl ruby extension version, but should contain at least md5, sha1, md2, sha256\. +. +.TP +\-\-clean +Remove all files related to a host from puppet cert\'s storage\. This is useful when rebuilding hosts, since new certificate signing requests will only be honored if puppet cert does not have a copy of a signed certificate for that host\. The certificate of the host is also revoked\. If \'\-\-all\' is specified then all host certificates, both signed and unsigned, will be removed\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-generate +Generate a certificate for a named client\. A certificate/keypair will be generated for each client named on the command line\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-list +List outstanding certificate requests\. If \'\-\-all\' is specified, signed certificates are also listed, prefixed by \'+\', and revoked or invalid certificates are prefixed by \'\-\' (the verification outcome is printed in parenthesis)\. +. +.TP +\-\-print +Print the full\-text version of a host\'s certificate\. +. +.TP +\-\-fingerprint +Print the DIGEST (defaults to md5) fingerprint of a host\'s certificate\. +. +.TP +\-\-revoke +Revoke the certificate of a client\. The certificate can be specified either by its serial number, given as a decimal number or a hexadecimal number prefixed by \'0x\', or by its hostname\. The certificate is revoked by adding it to the Certificate Revocation List given by the \'cacrl\' config parameter\. Note that the puppetmasterd needs to be restarted after revoking certificates\. +. +.TP +\-\-sign +Sign an outstanding certificate request\. Unless \'\-\-all\' is specified, hosts must be listed after all flags\. +. +.TP +\-\-verbose +Enable verbosity\. +. +.TP +\-\-version +Print the puppet version number and exit\. +. +.TP +\-\-verify +Verify the named certificate against the local CA certificate\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet cert \-l +culain\.madstop\.com +$ puppet cert \-s culain\.madstop\.com +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-describe.8 b/man/man8/puppet-describe.8 new file mode 100644 index 000000000..c54a7bec7 --- /dev/null +++ b/man/man8/puppet-describe.8 @@ -0,0 +1,51 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-DESCRIBE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-describe\fR \- Display help about resource types +. +.SH "SYNOPSIS" +Prints help about Puppet resource types, providers, and metaparameters\. +. +.SH "USAGE" +puppet describe [\-h|\-\-help] [\-s|\-\-short] [\-p|\-\-providers] [\-l|\-\-list] [\-m|\-\-meta] +. +.SH "OPTIONS" +. +.TP +\-\-help +Print this help text +. +.TP +\-\-providers +Describe providers in detail for each type +. +.TP +\-\-list +List all types +. +.TP +\-\-meta +List all metaparameters +. +.TP +\-\-short +List only parameters without detail +. +.SH "EXAMPLE" +. +.nf + +$ puppet describe \-\-list +$ puppet describe file \-\-providers +$ puppet describe user \-s \-m +. +.fi +. +.SH "AUTHOR" +David Lutterkort +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-doc.8 b/man/man8/puppet-doc.8 new file mode 100644 index 000000000..e0cabd5d1 --- /dev/null +++ b/man/man8/puppet-doc.8 @@ -0,0 +1,101 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-DOC" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-doc\fR \- Generate Puppet documentation and references +. +.SH "SYNOPSIS" +Generates a reference for all Puppet types\. Largely meant for internal Puppet Labs use\. +. +.SH "USAGE" +puppet doc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir \fIrdoc\-outputdir\fR] [\-m|\-\-mode text|pdf|rdoc] [\-r|\-\-reference \fIreference\-name\fR] [\-\-charset \fIcharset\fR] [\fImanifest\-file\fR] +. +.SH "DESCRIPTION" +If mode is not \'rdoc\', then this command generates a Markdown document describing all installed Puppet types or all allowable arguments to puppet executables\. It is largely meant for internal use and is used to generate the reference document available on the Puppet Labs web site\. +. +.P +In \'rdoc\' mode, this command generates an html RDoc hierarchy describing the manifests that are in \'manifestdir\' and \'modulepath\' configuration directives\. The generated documentation directory is doc by default but can be changed with the \'outputdir\' option\. +. +.P +If the command is run with the name of a manifest file as an argument, puppet doc will output a single manifest\'s documentation on stdout\. +. +.SH "OPTIONS" +. +.TP +\-\-all +Output the docs for all of the reference types\. In \'rdoc\' modes, this also outputs documentation for all resources +. +.TP +\-\-help +Print this help message +. +.TP +\-\-outputdir +Specifies the directory where to output the rdoc documentation in \'rdoc\' mode\. +. +.TP +\-\-mode +Determine the output mode\. Valid modes are \'text\', \'pdf\' and \'rdoc\'\. The \'pdf\' mode creates PDF formatted files in the /tmp directory\. The default mode is \'text\'\. In \'rdoc\' mode you must provide \'manifests\-path\' +. +.TP +\-\-reference +Build a particular reference\. Get a list of references by running \'puppet doc \-\-list\'\. +. +.TP +\-\-charset +Used only in \'rdoc\' mode\. It sets the charset used in the html files produced\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet doc \-r type > /tmp/type_reference\.markdown +. +.fi +. +.P +or +. +.IP "" 4 +. +.nf + +$ puppet doc \-\-outputdir /tmp/rdoc \-\-mode rdoc /path/to/manifests +. +.fi +. +.IP "" 0 +. +.P +or +. +.IP "" 4 +. +.nf + +$ puppet doc /etc/puppet/manifests/site\.pp +. +.fi +. +.IP "" 0 +. +.P +or +. +.IP "" 4 +. +.nf + +$ puppet doc \-m pdf \-r configuration +. +.fi +. +.IP "" 0 +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-filebucket.8 b/man/man8/puppet-filebucket.8 new file mode 100644 index 000000000..7ff0da9af --- /dev/null +++ b/man/man8/puppet-filebucket.8 @@ -0,0 +1,81 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-FILEBUCKET" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket +. +.SH "SYNOPSIS" +A stand\-alone Puppet filebucket client\. +. +.SH "USAGE" +puppet filebucket \fImode\fR [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-l|\-\-local] [\-r|\-\-remote] [\-s|\-\-server \fIserver\fR] [\-b|\-\-bucket \fIdirectory\fR] \fIfile\fR \fIfile\fR \.\.\. +. +.P +Puppet filebucket can operate in three modes, with only one mode per call: +. +.P +backup: Send one or more files to the specified file bucket\. Each sent file is printed with its resulting md5 sum\. +. +.P +get: Return the text associated with an md5 sum\. The text is printed to stdout, and only one file can be retrieved at a time\. +. +.P +restore: Given a file path and an md5 sum, store the content associated with the sum into the specified file path\. You can specify an entirely new path to this argument; you are not restricted to restoring the content to its original location\. +. +.SH "DESCRIPTION" +This is a stand\-alone filebucket client for sending files to a local or central filebucket\. +. +.P +Note that \'filebucket\' defaults to using a network\-based filebucket available on the server named \'puppet\'\. To use this, you\'ll have to be running as a user with valid Puppet certificates\. Alternatively, you can use your local file bucket by specifying \'\-\-local\'\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-local +Use the local filebucket\. This will use the default configuration information\. +. +.TP +\-\-remote +Use a remote filebucket\. This will use the default configuration information\. +. +.TP +\-\-server +The server to send the file to, instead of locally\. +. +.TP +\-\-verbose +Print extra information\. +. +.TP +\-\-version +Print version information\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet filebucket backup /etc/passwd +/etc/passwd: 429b225650b912a2ee067b0a4cf1e949 +$ puppet filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949 +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-inspect.8 b/man/man8/puppet-inspect.8 new file mode 100644 index 000000000..ae19deede --- /dev/null +++ b/man/man8/puppet-inspect.8 @@ -0,0 +1,28 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-INSPECT" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-inspect\fR \- Send an inspection report +. +.SH "SYNOPSIS" +Prepares and submits an inspection report to the puppet master\. +. +.SH "USAGE" +puppet inspect +. +.SH "DESCRIPTION" +This command uses the cached catalog from the previous run of \'puppet agent\' to determine which attributes of which resources have been marked as auditable with the \'audit\' metaparameter\. It then examines the current state of the system, writes the state of the specified resource attributes to a report, and submits the report to the puppet master\. +. +.P +Puppet inspect does not run as a daemon, and must be run manually or from cron\. +. +.SH "OPTIONS" +Any configuration setting which is valid in the configuration file is also a valid long argument, e\.g\. \'\-\-server=master\.domain\.com\'\. See the configuration file documentation at http://docs\.puppetlabs\.com/references/latest/configuration\.html for the full list of acceptable settings\. +. +.SH "AUTHOR" +Puppet Labs +. +.SH "COPYRIGHT" +Copyright (c) 2011 Puppet Labs, LLC Licensed under the GNU General Public License version 2 diff --git a/man/man8/puppet-kick.8 b/man/man8/puppet-kick.8 new file mode 100644 index 000000000..b6a868918 --- /dev/null +++ b/man/man8/puppet-kick.8 @@ -0,0 +1,115 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-KICK" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-kick\fR \- Remotely control puppet agent +. +.SH "SYNOPSIS" +Trigger a puppet agent run on a set of hosts\. +. +.SH "USAGE" +puppet kick [\-a|\-\-all] [\-c|\-\-class \fIclass\fR] [\-d|\-\-debug] [\-f|\-\-foreground] [\-h|\-\-help] [\-\-host \fIhost\fR] [\-\-no\-fqdn] [\-\-ignoreschedules] [\-t|\-\-tag \fItag\fR] [\-\-test] [\-p|\-\-ping] \fIhost\fR [\fIhost\fR [\.\.\.]] +. +.SH "DESCRIPTION" +This script can be used to connect to a set of machines running \'puppet agent\' and trigger them to run their configurations\. The most common usage would be to specify a class of hosts and a set of tags, and \'puppet kick\' would look up in LDAP all of the hosts matching that class, then connect to each host and trigger a run of all of the objects with the specified tags\. +. +.P +If you are not storing your host configurations in LDAP, you can specify hosts manually\. +. +.P +You will most likely have to run \'puppet kick\' as root to get access to the SSL certificates\. +. +.P +\'puppet kick\' reads \'puppet master\'\'s configuration file, so that it can copy things like LDAP settings\. +. +.SH "USAGE NOTES" +\'puppet kick\' is useless unless \'puppet agent\' is listening\. See its documentation for more information, but the gist is that you must enable \'listen\' on the \'puppet agent\' daemon, either using \'\-\-listen\' on the command line or adding \'listen = true\' in its config file\. In addition, you need to set the daemons up to specifically allow connections by creating the \'namespaceauth\' file, normally at \'/etc/puppet/namespaceauth\.conf\'\. This file specifies who has access to each namespace; if you create the file you must add every namespace you want any Puppet daemon to allow \-\- it is currently global to all Puppet daemons\. +. +.P +An example file looks like this: +. +.IP "" 4 +. +.nf + +[fileserver] + allow *\.madstop\.com + +[puppetmaster] + allow *\.madstop\.com + +[puppetrunner] + allow culain\.madstop\.com +. +.fi +. +.IP "" 0 +. +.P +This is what you would install on your Puppet master; non\-master hosts could leave off the \'fileserver\' and \'puppetmaster\' namespaces\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/latest/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet master with \'\-\-genconfig\'\. +. +.TP +\-\-all +Connect to all available hosts\. Requires LDAP support at this point\. +. +.TP +\-\-class +Specify a class of machines to which to connect\. This only works if you have LDAP configured, at the moment\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-foreground +Run each configuration in the foreground; that is, when connecting to a host, do not return until the host has finished its run\. The default is false\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-host +A specific host to which to connect\. This flag can be specified more than once\. +. +.TP +\-\-ignoreschedules +Whether the client should ignore schedules when running its configuration\. This can be used to force the client to perform work it would not normally perform so soon\. The default is false\. +. +.TP +\-\-parallel +How parallel to make the connections\. Parallelization is provided by forking for each client to which to connect\. The default is 1, meaning serial execution\. +. +.TP +\-\-tag +Specify a tag for selecting the objects to apply\. Does not work with the \-\-test option\. +. +.TP +\-\-test +Print the hosts you would connect to but do not actually connect\. This option requires LDAP support at this point\. +. +.TP +\-\-ping +Do a ICMP echo against the target host\. Skip hosts that don\'t respond to ping\. +. +.SH "EXAMPLE" +. +.nf + +$ sudo puppet kick \-p 10 \-t remotefile \-t webserver host1 host2 +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-master.8 b/man/man8/puppet-master.8 new file mode 100644 index 000000000..9ed2a6ad6 --- /dev/null +++ b/man/man8/puppet-master.8 @@ -0,0 +1,63 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-MASTER" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-master\fR \- The puppet master daemon +. +.SH "SYNOPSIS" +The central puppet server\. Functions as a certificate authority by default\. +. +.SH "USAGE" +puppet master [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-h|\-\-help] [\-l|\-\-logdest \fIfile\fR|console|syslog] [\-v|\-\-verbose] [\-V|\-\-version] [\-\-compile \fInode\-name\fR] +. +.SH "DESCRIPTION" +This command starts an instance of puppet master, running as a daemon and using Ruby\'s built\-in Webrick webserver\. Puppet master can also be managed by other application servers; when this is the case, this executable is not used\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet master with \'\-\-genconfig\'\. +. +.TP +\-\-daemonize +Send the process into the background\. This is the default\. +. +.TP +\-\-no\-daemonize +Do not send the process into the background\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-help +Print this help message\. +. +.TP +\-\-logdest +Where to send messages\. Choose between syslog, the console, and a log file\. Defaults to sending messages to syslog, or the console if debugging or verbosity is enabled\. +. +.TP +\-\-verbose +Enable verbosity\. +. +.TP +\-\-version +Print the puppet version number and exit\. +. +.TP +\-\-compile +Compile a catalogue and output it in JSON from the puppet master\. Uses facts contained in the $vardir/yaml/ directory to compile the catalog\. +. +.SH "EXAMPLE" +puppet master +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-queue.8 b/man/man8/puppet-queue.8 new file mode 100644 index 000000000..7dbd683bf --- /dev/null +++ b/man/man8/puppet-queue.8 @@ -0,0 +1,55 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-QUEUE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-queue\fR \- Queuing daemon for asynchronous storeconfigs +. +.SH "SYNOPSIS" +Retrieves serialized storeconfigs records from a queue and processes them in order\. +. +.SH "USAGE" +puppet queue [\-d|\-\-debug] [\-v|\-\-verbose] +. +.SH "DESCRIPTION" +This application runs as a daemon and processes storeconfigs data, retrieving the data from a stomp server message queue and writing it to a database\. +. +.P +For more information, including instructions for properly setting up your puppet master and message queue, see the documentation on setting up asynchronous storeconfigs at: http://projects\.puppetlabs\.com/projects/1/wiki/Using_Stored_Configuration +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet queue with \'\-\-genconfig\'\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-verbose +Turn on verbose reporting\. +. +.TP +\-\-version +Print the puppet version number and exit\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet queue +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet-resource.8 b/man/man8/puppet-resource.8 new file mode 100644 index 000000000..738537e84 --- /dev/null +++ b/man/man8/puppet-resource.8 @@ -0,0 +1,84 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PUPPET\-RESOURCE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" +. +.SH "NAME" +\fBpuppet\-resource\fR \- The resource abstraction layer shell +. +.SH "SYNOPSIS" +Uses the Puppet RAL to directly interact with the system\. +. +.SH "USAGE" +puppet resource [\-h|\-\-help] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-edit] [\-H|\-\-host \fIhost\fR] [\-p|\-\-param \fIparameter\fR] [\-t|\-\-types] \fItype\fR [\fIname\fR] [\fIattribute\fR=\fIvalue\fR \.\.\.] +. +.SH "DESCRIPTION" +This command provides simple facilities for converting current system state into Puppet code, along with some ability to modify the current state using Puppet\'s RAL\. +. +.P +By default, you must at least provide a type to list, in which case puppet resource will tell you everything it knows about all resources of that type\. You can optionally specify an instance name, and puppet resource will only describe that single instance\. +. +.P +If given a type, a name, and a series of \fIattribute\fR=\fIvalue\fR pairs, puppet resource will modify the state of the specified resource\. Alternately, if given a type, a name, and the \'\-\-edit\' flag, puppet resource will write its output to a file, open that file in an editor, and then apply the saved file as a Puppet transaction\. +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +. +.P +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-edit +Write the results of the query to a file, open the file in an editor, and read the file back in as an executable Puppet manifest\. +. +.TP +\-\-host +When specified, connect to the resource server on the named host and retrieve the list of resouces of the type specified\. +. +.TP +\-\-help +Print this help message\. +. +.TP +\-\-param +Add more parameters to be outputted from queries\. +. +.TP +\-\-types +List all available types\. +. +.TP +\-\-verbose +Print extra information\. +. +.SH "EXAMPLE" +This example uses \fBpuppet resource\fR to return a Puppet configuration for the user \fBluke\fR: +. +.IP "" 4 +. +.nf + +$ puppet resource user luke +user { \'luke\': + home => \'/home/luke\', + uid => \'100\', + ensure => \'present\', + comment => \'Luke Kanies,,,\', + gid => \'1000\', + shell => \'/bin/bash\', + groups => [\'sysadmin\',\'audio\',\'video\',\'puppet\'] +} +. +.fi +. +.IP "" 0 +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppet.8 b/man/man8/puppet.8 index 513d45338..f58a54d41 100644 --- a/man/man8/puppet.8 +++ b/man/man8/puppet.8 @@ -1,10 +1,10 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPET" "8" "August 2010" "" "" +.TH "PUPPET" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . .SH "NAME" \fBpuppet\fR . .P -Usage: puppet command \fIspace separated arguments\fR Available commands are: agent, apply, cert, describe, doc, filebucket, kick, master, queue, resource +Usage: puppet command \fIspace separated arguments\fR Available commands are: agent, apply, cert, describe, doc, filebucket, inspect, kick, master, queue, resource diff --git a/man/man8/puppetca.8 b/man/man8/puppetca.8 index 62fa7a5bf..bea7596d4 100644 --- a/man/man8/puppetca.8 +++ b/man/man8/puppetca.8 @@ -1,169 +1,94 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETCA" "8" "August 2010" "" "" -Stand\-alone certificate authority\. Capable of generating certificates but mostly meant for signing certificate requests from puppet clients\.puppet cert [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] +.TH "PUPPET\-CERT" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-cert\fR \- Manage certificates and requests . -.nf - - [\-g|\-\-generate] [\-l|\-\-list] [\-s|\-\-sign] [\-r|\-\-revoke] - [\-p|\-\-print] [\-c|\-\-clean] [\-\-verify] [\-\-digest DIGEST] - [\-\-fingerprint] [host] -. -.fi -. -.IP "" 0 -Because the puppetmasterd daemon defaults to not signing client certificate requests, this script is available for signing outstanding requests\. It can be used to list outstanding requests and then either sign them individually or sign all of them\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. -. -.P -See the configuration file documentation at http://reductivelabs\.com/projects/puppet/reference/configref\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet cert with \'\-\-genconfig\'\. -. -.P -all: Operate on all items\. Currently only makes sense with +.SH "SYNOPSIS" +Standalone certificate authority\. Capable of generating certificates, but mostly used for signing certificate requests from puppet clients\. . -.IP "" 4 +.SH "USAGE" +puppet cert [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-g|\-\-generate] [\-l|\-\-list] [\-s|\-\-sign] [\-r|\-\-revoke] [\-p|\-\-print] [\-c|\-\-clean] [\-\-verify] [\-\-digest \fIdigest\fR] [\-\-fingerprint] [host] . -.nf - - \'\-\-sign\', \'\-\-clean\', or \'\-\-list\'\. +.SH "DESCRIPTION" +Because the puppet master service defaults to not signing client certificate requests, this script is available for signing outstanding requests\. It can be used to list outstanding requests and then either sign them individually or sign all of them\. . -.fi -. -.IP "" 0 +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. . .P -digest: Set the digest for fingerprinting (defaults to md5)\. Valid -. -.IP "" 4 -. -.nf - - values depends on your openssl and openssl ruby extension - version, but should contain at least md5, sha1, md2, - sha256\. -. -.fi +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet cert with \'\-\-genconfig\'\. . -.IP "" 0 +.TP +\-\-all +Operate on all items\. Currently only makes sense with \'\-\-sign\', \'\-\-clean\', or \'\-\-list\'\. . -.P -clean: Remove all files related to a host from puppet cert\'s +.TP +\-\-digest +Set the digest for fingerprinting (defaults to md5)\. Valid values depends on your openssl and openssl ruby extension version, but should contain at least md5, sha1, md2, sha256\. . -.IP "" 4 +.TP +\-\-clean +Remove all files related to a host from puppet cert\'s storage\. This is useful when rebuilding hosts, since new certificate signing requests will only be honored if puppet cert does not have a copy of a signed certificate for that host\. The certificate of the host is also revoked\. If \'\-\-all\' is specified then all host certificates, both signed and unsigned, will be removed\. . -.nf - - storage\. This is useful when rebuilding hosts, since new - certificate signing requests will only be honored if puppet - cert does not have a copy of a signed certificate for that - host\. The certificate of the host remains valid\. If \'\-\-all\' - is specified then all host certificates, both signed and - unsigned, will be removed\. +.TP +\-\-debug +Enable full debugging\. . -.fi +.TP +\-\-generate +Generate a certificate for a named client\. A certificate/keypair will be generated for each client named on the command line\. . -.IP "" 0 +.TP +\-\-help +Print this help message . -.P -debug: Enable full debugging\. +.TP +\-\-list +List outstanding certificate requests\. If \'\-\-all\' is specified, signed certificates are also listed, prefixed by \'+\', and revoked or invalid certificates are prefixed by \'\-\' (the verification outcome is printed in parenthesis)\. . -.P -generate: Generate a certificate for a named client\. A +.TP +\-\-print +Print the full\-text version of a host\'s certificate\. . -.IP "" 4 +.TP +\-\-fingerprint +Print the DIGEST (defaults to md5) fingerprint of a host\'s certificate\. . -.nf - - certificate/keypair will be generated for each client named - on the command line\. +.TP +\-\-revoke +Revoke the certificate of a client\. The certificate can be specified either by its serial number, given as a decimal number or a hexadecimal number prefixed by \'0x\', or by its hostname\. The certificate is revoked by adding it to the Certificate Revocation List given by the \'cacrl\' config parameter\. Note that the puppetmasterd needs to be restarted after revoking certificates\. . -.fi +.TP +\-\-sign +Sign an outstanding certificate request\. Unless \'\-\-all\' is specified, hosts must be listed after all flags\. . -.IP "" 0 +.TP +\-\-verbose +Enable verbosity\. . -.P -help: Print this help message +.TP +\-\-version +Print the puppet version number and exit\. . -.P -list: List outstanding certificate requests\. If \'\-\-all\' is +.TP +\-\-verify +Verify the named certificate against the local CA certificate\. . -.IP "" 4 +.SH "EXAMPLE" . .nf - specified, signed certificates are also listed, prefixed by - \'+\', and revoked or invalid certificates are prefixed by - \'\-\' (the verification outcome is printed in parenthesis)\. +$ puppet cert \-l +culain\.madstop\.com +$ puppet cert \-s culain\.madstop\.com . .fi . -.IP "" 0 -. -.P -print: Print the full\-text version of a host\'s certificate\. -. -.P -fingerprint: Print the DIGEST (defaults to md5) fingerprint of a host\'s -. -.IP "" 4 -. -.nf - - certificate\. -. -.fi -. -.IP "" 0 -. -.P -revoke: Revoke the certificate of a client\. The certificate can be -. -.IP "" 4 -. -.nf - - specified either by its serial number, given as a decimal - number or a hexadecimal number prefixed by \'0x\', or by its - hostname\. The certificate is revoked by adding it to the - Certificate Revocation List given by the \'cacrl\' config - parameter\. Note that the puppetmasterd needs to be - restarted after revoking certificates\. -. -.fi -. -.IP "" 0 -. -.P -sign: Sign an outstanding certificate request\. Unless \'\-\-all\' is -. -.IP "" 4 -. -.nf - - specified, hosts must be listed after all flags\. -. -.fi -. -.IP "" 0 -. -.P -verbose: Enable verbosity\. -. -.P -version: Print the puppet version number and exit\. -. -.P -verify: Verify the named certificate against the local CA -. -.IP "" 4 -. -.nf - - certificate\. -. -.fi +.SH "AUTHOR" +Luke Kanies . -.IP "" 0 -$ puppet cert \-l culain\.madstop\.com $ puppet cert \-s culain\.madstop\.comLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetd.8 b/man/man8/puppetd.8 index 861137553..3fadd9df7 100644 --- a/man/man8/puppetd.8 +++ b/man/man8/puppetd.8 @@ -1,283 +1,139 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETD" "8" "August 2010" "" "" -puppet agent [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] +.TH "PUPPET\-AGENT" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-agent\fR \- The puppet agent daemon . -.nf - - [\-\-detailed\-exitcodes] [\-\-disable] [\-\-enable] - [\-h|\-\-help] [\-\-fqdn ] [\-l|\-\-logdest syslog||console] - [\-o|\-\-onetime] [\-\-serve ] [\-t|\-\-test] [\-\-noop] - [\-\-digest ] [\-\-fingerprint] [\-V|\-\-version] - [\-v|\-\-verbose] [\-w|\-\-waitforcert ] -. -.fi -. -.IP "" 0 -This is the main puppet client\. Its job is to retrieve the local machine\'s configuration from a remote server and apply it\. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default)\. The client will connect and request a signed certificate, and will continue connecting until it receives one\. -. -.P -Once the client has a signed certificate, it will retrieve its configuration and apply it\.+puppet agent+ does its best to find a compromise between interactive use and daemon use\. Run with no arguments and no configuration, it will go into the backgroun, attempt to get a signed certificate, and retrieve and apply its configuration every 30 minutes\. -. -.P -Some flags are meant specifically for interactive use \-\- in particular, +test+, +tags+ or +fingerprint+ are useful\. +test+ enables verbose logging, causes the daemon to stay in the foreground, exits if the server\'s configuration is invalid (this happens if, for instance, you\'ve left a syntax error on the server), and exits after running the configuration once (rather than hanging around as a long\-running process)\. -. -.P -+tags+ allows you to specify what portions of a configuration you want to apply\. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the +tags+ flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied\. This is very useful when you are testing new configurations \-\- for instance, if you are just starting to manage +ntpd+, you would put all of the new elements into an +ntpd+ class, and call puppet with +\-\-tags ntpd+, which would only apply that small portion of the configuration during your testing, rather than applying the whole thing\. -. -.P -+fingerprint+ is a one\-time flag\. In this mode +puppet agent+ will run once and display on the console (and in the log) the current certificate (or certificate request) fingerprint\. Providing the +\-\-digest+ option allows to use a different digest algorithm to generate the fingerprint\. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent (to prevent against man\-in\-the\-middle attacks when signing certificates)\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. -. -.P -See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet agent with \'\-\-genconfig\'\. -. -.P -daemonize: Send the process into the background\. This is the -. -.IP "" 4 -. -.nf - - default\. -. -.fi -. -.IP "" 0 -. -.P -no\-daemonize: Do not send the process into the background\. -. -.P -debug: Enable full debugging\. +.SH "SYNOPSIS" +Retrieves the client configuration from the puppet master and applies it to the local host\. . .P -digest: Change the certificate fingerprinting digest -. -.IP "" 4 -. -.nf - - algorithm\. The default is MD5\. Valid values depends - on the version of OpenSSL installed, but should - always at least contain MD5, MD2, SHA1 and SHA256\. -. -.fi -. -.IP "" 0 +This service may be run as a daemon, run periodically using cron (or something similar), or run interactively for testing purposes\. . -.P -detailed\-exitcodes: Provide transaction information via exit codes\. If -. -.IP "" 4 -. -.nf - - this is enabled, an exit code of \'2\' means there - were changes, and an exit code of \'4\' means that - there were failures during the transaction\. This - option only makes sense in conjunction with - \-\-onetime\. -. -.fi +.SH "USAGE" +puppet agent [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-\-detailed\-exitcodes] [\-\-disable] [\-\-enable] [\-h|\-\-help] [\-\-certname \fIhost name\fR] [\-l|\-\-logdest syslog|\fIfile\fR|console] [\-o|\-\-onetime] [\-\-serve \fIhandler\fR] [\-t|\-\-test] [\-\-noop] [\-\-digest \fIdigest\fR] [\-\-fingerprint] [\-V|\-\-version] [\-v|\-\-verbose] [\-w|\-\-waitforcert \fIseconds\fR] . -.IP "" 0 +.SH "DESCRIPTION" +This is the main puppet client\. Its job is to retrieve the local machine\'s configuration from a remote server and apply it\. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default)\. The client will connect and request a signed certificate, and will continue connecting until it receives one\. . .P -disable: Disable working on the local system\. This puts a -. -.IP "" 4 -. -.nf - - lock file in place, causing +puppet agent+ not to - work on the system until the lock file is removed\. - This is useful if you are testing a configuration - and do not want the central configuration to - override the local state until everything is tested - and committed\. -. -.fi +Once the client has a signed certificate, it will retrieve its configuration and apply it\. . -.IP "" 0 +.SH "USAGE NOTES" +\'puppet agent\' does its best to find a compromise between interactive use and daemon use\. Run with no arguments and no configuration, it will go into the background, attempt to get a signed certificate, and retrieve and apply its configuration every 30 minutes\. . .P -+puppet agent+ uses the same lock file while it is running, so no more than one +puppet agent+ process is working at a time\. +Some flags are meant specifically for interactive use \-\- in particular, \'test\', \'tags\' or \'fingerprint\' are useful\. \'test\' enables verbose logging, causes the daemon to stay in the foreground, exits if the server\'s configuration is invalid (this happens if, for instance, you\'ve left a syntax error on the server), and exits after running the configuration once (rather than hanging around as a long\-running process)\. . .P -+puppet agent+ exits after executing this\. +\'tags\' allows you to specify what portions of a configuration you want to apply\. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the \'tags\' flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied\. This is very useful when you are testing new configurations \-\- for instance, if you are just starting to manage \'ntpd\', you would put all of the new elements into an \'ntpd\' class, and call puppet with \'\-\-tags ntpd\', which would only apply that small portion of the configuration during your testing, rather than applying the whole thing\. . .P -enable: Enable working on the local system\. This removes any +\'fingerprint\' is a one\-time flag\. In this mode \'puppet agent\' will run once and display on the console (and in the log) the current certificate (or certificate request) fingerprint\. Providing the \'\-\-digest\' option allows to use a different digest algorithm to generate the fingerprint\. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent (to prevent against man\-in\-the\-middle attacks when signing certificates)\. . -.IP "" 4 -. -.nf - - lock file, causing +puppet agent+ to start managing - the local system again (although it will continue to - use its normal scheduling, so it might not start for - another half hour)\. -. -.fi -. -.IP "" 0 +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. . .P -+puppet agent+ exits after executing this\. -. -.P -fqdn: Set the fully\-qualified domain name of the client\. +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet agent with \'\-\-genconfig\'\. . -.IP "" 4 +.TP +\-\-daemonize +Send the process into the background\. This is the default\. . -.nf - - This is only used for certificate purposes, but can - be used to override the discovered hostname\. If you - need to use this flag, it is generally an indication - of a setup problem\. +.TP +\-\-no\-daemonize +Do not send the process into the background\. . -.fi +.TP +\-\-debug +Enable full debugging\. . -.IP "" 0 +.TP +\-\-digest +Change the certificate fingerprinting digest algorithm\. The default is MD5\. Valid values depends on the version of OpenSSL installed, but should always at least contain MD5, MD2, SHA1 and SHA256\. . -.P -help: Print this help message +.TP +\-\-detailed\-exitcodes +Provide transaction information via exit codes\. If this is enabled, an exit code of \'2\' means there were changes, and an exit code of \'4\' means that there were failures during the transaction\. This option only makes sense in conjunction with \-\-onetime\. . -.P -logdest: Where to send messages\. Choose between syslog, the +.TP +\-\-disable +Disable working on the local system\. This puts a lock file in place, causing \'puppet agent\' not to work on the system until the lock file is removed\. This is useful if you are testing a configuration and do not want the central configuration to override the local state until everything is tested and committed\. . -.IP "" 4 +.IP +\'puppet agent\' uses the same lock file while it is running, so no more than one \'puppet agent\' process is working at a time\. . -.nf - - console, and a log file\. Defaults to sending - messages to syslog, or the console if debugging or - verbosity is enabled\. +.IP +\'puppet agent\' exits after executing this\. . -.fi +.TP +\-\-enable +Enable working on the local system\. This removes any lock file, causing \'puppet agent\' to start managing the local system again (although it will continue to use its normal scheduling, so it might not start for another half hour)\. . -.IP "" 0 +.IP +\'puppet agent\' exits after executing this\. . -.P -no\-client: Do not create a config client\. This will cause the +.TP +\-\-certname +Set the certname (unique ID) of the client\. The master reads this unique identifying string, which is usually set to the node\'s fully\-qualified domain name, to determine which configurations the node will receive\. Use this option to debug setup problems or implement unusual node identification schemes\. . -.IP "" 4 +.TP +\-\-help +Print this help message . -.nf - - daemon to run without ever checking for its - configuration automatically, and only makes sense - when used in conjunction with \-\-listen\. +.TP +\-\-logdest +Where to send messages\. Choose between syslog, the console, and a log file\. Defaults to sending messages to syslog, or the console if debugging or verbosity is enabled\. . -.fi +.TP +\-\-no\-client +Do not create a config client\. This will cause the daemon to run without ever checking for its configuration automatically, and only makes sense . -.IP "" 0 +.TP +\-\-onetime +Run the configuration once\. Runs a single (normally daemonized) Puppet run\. Useful for interactively running puppet agent when used in conjunction with the \-\-no\-daemonize option\. . -.P -onetime: Run the configuration once\. Runs a single (normally +.TP +\-\-fingerprint +Display the current certificate or certificate signing request fingerprint and then exit\. Use the \'\-\-digest\' option to change the digest algorithm used\. . -.IP "" 4 +.TP +\-\-serve +Start another type of server\. By default, \'puppet agent\' will start a service handler that allows authenticated and authorized remote nodes to trigger the configuration to be pulled down and applied\. You can specify any handler here that does not require configuration, e\.g\., filebucket, ca, or resource\. The handlers are in \'lib/puppet/network/handler\', and the names must match exactly, both in the call to \'serve\' and in \'namespaceauth\.conf\'\. . -.nf - - daemonized) Puppet run\. Useful for interactively - running puppet agent when used in conjunction with - the \-\-no\-daemonize option\. -. -.fi -. -.IP "" 0 -. -.P -fingerprint: Display the current certificate or certificate +.TP +\-\-test +Enable the most common options used for testing\. These are \'onetime\', \'verbose\', \'ignorecache\', \'no\-daemonize\', \'no\-usecacheonfailure\', \'detailed\-exit\-codes\', \'no\-splay\', and \'show_diff\'\. . -.IP "" 4 +.TP +\-\-noop +Use \'noop\' mode where the daemon runs in a no\-op or dry\-run mode\. This is useful for seeing what changes Puppet will make without actually executing the changes\. . -.nf - - signing request fingerprint and then exit\. Use the - +\-\-digest+ option to change the digest algorithm - used\. +.TP +\-\-verbose +Turn on verbose reporting\. . -.fi +.TP +\-\-version +Print the puppet version number and exit\. . -.IP "" 0 +.TP +\-\-waitforcert +This option only matters for daemons that do not yet have certificates and it is enabled by default, with a value of 120 (seconds)\. This causes \'puppet agent\' to connect to the server every 2 minutes and ask it to sign a certificate request\. This is useful for the initial setup of a puppet client\. You can turn off waiting for certificates by specifying a time of 0\. . -.P -serve: Start another type of server\. By default, +puppet -. -.IP "" 4 +.SH "EXAMPLE" . .nf - agent+ will start a service handler that allows - authenticated and authorized remote nodes to trigger - the configuration to be pulled down and applied\. You - can specify any handler here that does not require - configuration, e\.g\., filebucket, ca, or resource\. - The handlers are in +lib/puppet/network/handler+, - and the names must match exactly, both in the call - to +serve+ and in +namespaceauth\.conf+\. +$ puppet agent \-\-server puppet\.domain\.com . .fi . -.IP "" 0 -. -.P -test: Enable the most common options used for testing\. -. -.IP "" 4 -. -.nf - - These are +onetime+, +verbose+, +ignorecache, - +no\-daemonize+, and +no\-usecacheonfailure+\. -. -.fi -. -.IP "" 0 -. -.P -noop: Use +noop+ mode where the daemon runs in a no\-op or -. -.IP "" 4 -. -.nf - - dry\-run mode\. This is useful for seeing what changes - Puppet will make without actually executing the - changes\. -. -.fi -. -.IP "" 0 -. -.P -verbose: Turn on verbose reporting\. -. -.P -version: Print the puppet version number and exit\. -. -.P -waitforcert: This option only matters for daemons that do not yet -. -.IP "" 4 -. -.nf - - have certificates and it is enabled by default, with - a value of 120 (seconds)\. This causes +puppet agent+ - to connect to the server every 2 minutes and ask it - to sign a certificate request\. This is useful for - the initial setup of a puppet client\. You can turn - off waiting for certificates by specifying a time of - 0\. -. -.fi +.SH "AUTHOR" +Luke Kanies . -.IP "" 0 -puppet agent \-\-server puppet\.domain\.comLuke KaniesCopyright (c) 2005, 2006 Puppet Labs, LLC Licensed under the GNU Public License +.SH "COPYRIGHT" +Copyright (c) 2005, 2006 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetdoc.8 b/man/man8/puppetdoc.8 index 47df0e764..e0cabd5d1 100644 --- a/man/man8/puppetdoc.8 +++ b/man/man8/puppetdoc.8 @@ -1,108 +1,101 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETDOC" "8" "August 2010" "" "" -Generate a reference for all Puppet types\. Largely meant for internal Puppet Labs use\.puppet doc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir \fIrdoc outputdir\fR] [\-m|\-\-mode \fItext|pdf|rdoc\fR] +.TH "PUPPET\-DOC" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-doc\fR \- Generate Puppet documentation and references . -.nf - - [\-r|\-\-reference <[type]|configuration|\.\.>] [\-\-charset CHARSET] [manifest\-file] +.SH "SYNOPSIS" +Generates a reference for all Puppet types\. Largely meant for internal Puppet Labs use\. . -.fi +.SH "USAGE" +puppet doc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir \fIrdoc\-outputdir\fR] [\-m|\-\-mode text|pdf|rdoc] [\-r|\-\-reference \fIreference\-name\fR] [\-\-charset \fIcharset\fR] [\fImanifest\-file\fR] . -.IP "" 0 +.SH "DESCRIPTION" If mode is not \'rdoc\', then this command generates a Markdown document describing all installed Puppet types or all allowable arguments to puppet executables\. It is largely meant for internal use and is used to generate the reference document available on the Puppet Labs web site\. . .P In \'rdoc\' mode, this command generates an html RDoc hierarchy describing the manifests that are in \'manifestdir\' and \'modulepath\' configuration directives\. The generated documentation directory is doc by default but can be changed with the \'outputdir\' option\. . .P -If the command is started with \'manifest\-file\' command\-line arguments, puppet doc generate a single manifest documentation that is output on stdout\.all: Output the docs for all of the reference types\. In \'rdoc\' +If the command is run with the name of a manifest file as an argument, puppet doc will output a single manifest\'s documentation on stdout\. . -.IP "" 4 +.SH "OPTIONS" . -.nf - - modes, this also outputs documentation for all resources +.TP +\-\-all +Output the docs for all of the reference types\. In \'rdoc\' modes, this also outputs documentation for all resources . -.fi +.TP +\-\-help +Print this help message . -.IP "" 0 +.TP +\-\-outputdir +Specifies the directory where to output the rdoc documentation in \'rdoc\' mode\. . -.P -help: Print this help message +.TP +\-\-mode +Determine the output mode\. Valid modes are \'text\', \'pdf\' and \'rdoc\'\. The \'pdf\' mode creates PDF formatted files in the /tmp directory\. The default mode is \'text\'\. In \'rdoc\' mode you must provide \'manifests\-path\' . -.P -outputdir: Specifies the directory where to output the rdoc +.TP +\-\-reference +Build a particular reference\. Get a list of references by running \'puppet doc \-\-list\'\. . -.IP "" 4 +.TP +\-\-charset +Used only in \'rdoc\' mode\. It sets the charset used in the html files produced\. +. +.SH "EXAMPLE" . .nf - documentation in \'rdoc\' mode\. +$ puppet doc \-r type > /tmp/type_reference\.markdown . .fi . -.IP "" 0 -. .P -mode: Determine the output mode\. Valid modes are \'text\', \'trac\', +or . .IP "" 4 . .nf - \'pdf\' and \'rdoc\'\. The \'pdf\' mode creates PDF formatted files - in the /tmp directory\. The default mode is \'text\'\. In \'rdoc\' - mode you must provide \'manifests\-path\' +$ puppet doc \-\-outputdir /tmp/rdoc \-\-mode rdoc /path/to/manifests . .fi . .IP "" 0 . .P -reference: Build a particular reference\. Get a list of references by +or . .IP "" 4 . .nf - running +puppet doc \-\-list+\. +$ puppet doc /etc/puppet/manifests/site\.pp . .fi . .IP "" 0 . .P -charset: Used only in \'rdoc\' mode\. It sets the charset used in the +or . .IP "" 4 . .nf - html files produced\. +$ puppet doc \-m pdf \-r configuration . .fi . .IP "" 0 -$ puppet doc \-r type > /tmp/type_reference\.rst -. -.P -or -. -.P -$ puppet doc \-\-outputdir /tmp/rdoc \-\-mode rdoc /path/to/manifests . -.P -or -. -.P -$ puppet doc /etc/puppet/manifests/site\.pp +.SH "AUTHOR" +Luke Kanies . -.P -or -. -.P -$ puppet doc \-m pdf \-r configurationLuke KaniesCopyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License +.SH "COPYRIGHT" +Copyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetmasterd.8 b/man/man8/puppetmasterd.8 index dde93a3d6..9ed2a6ad6 100644 --- a/man/man8/puppetmasterd.8 +++ b/man/man8/puppetmasterd.8 @@ -1,52 +1,63 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETMASTERD" "8" "August 2010" "" "" -The central puppet server\. Functions as a certificate authority by default\.puppet master [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-h|\-\-help] +.TH "PUPPET\-MASTER" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-master\fR \- The puppet master daemon . -.nf - - [\-l|\-\-logdest |console|syslog] [\-v|\-\-verbose] [\-V|\-\-version] +.SH "SYNOPSIS" +The central puppet server\. Functions as a certificate authority by default\. . -.fi +.SH "USAGE" +puppet master [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-h|\-\-help] [\-l|\-\-logdest \fIfile\fR|console|syslog] [\-v|\-\-verbose] [\-V|\-\-version] [\-\-compile \fInode\-name\fR] . -.IP "" 0 -This is the puppet central daemon\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +.SH "DESCRIPTION" +This command starts an instance of puppet master, running as a daemon and using Ruby\'s built\-in Webrick webserver\. Puppet master can also be managed by other application servers; when this is the case, this executable is not used\. . -.P -See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppetmasterdd with \'\-\-genconfig\'\. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. . .P -daemonize: Send the process into the background\. This is the default\. +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet master with \'\-\-genconfig\'\. . -.P -no\-daemonize: Do not send the process into the background\. +.TP +\-\-daemonize +Send the process into the background\. This is the default\. . -.P -debug: Enable full debugging\. +.TP +\-\-no\-daemonize +Do not send the process into the background\. . -.P -help: Print this help message\. +.TP +\-\-debug +Enable full debugging\. . -.P -logdest: Where to send messages\. Choose between syslog, the +.TP +\-\-help +Print this help message\. . -.IP "" 4 +.TP +\-\-logdest +Where to send messages\. Choose between syslog, the console, and a log file\. Defaults to sending messages to syslog, or the console if debugging or verbosity is enabled\. . -.nf - - console, and a log file\. Defaults to sending messages to - syslog, or the console if debugging or verbosity is - enabled\. +.TP +\-\-verbose +Enable verbosity\. . -.fi +.TP +\-\-version +Print the puppet version number and exit\. . -.IP "" 0 +.TP +\-\-compile +Compile a catalogue and output it in JSON from the puppet master\. Uses facts contained in the $vardir/yaml/ directory to compile the catalog\. . -.P -verbose: Enable verbosity\. +.SH "EXAMPLE" +puppet master . -.P -version: Print the puppet version number and exit\.puppet masterLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetqd.8 b/man/man8/puppetqd.8 index f630c74a5..7dbd683bf 100644 --- a/man/man8/puppetqd.8 +++ b/man/man8/puppetqd.8 @@ -1,20 +1,55 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETQD" "8" "August 2010" "" "" -puppet queue [\-d|\-\-debug] [\-v|\-\-verbose]This is a simple application that just processes entities in a queue as they are recieved\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. +.TH "PUPPET\-QUEUE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.P -See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppetd with \'\-\-genconfig\'\. +.SH "NAME" +\fBpuppet\-queue\fR \- Queuing daemon for asynchronous storeconfigs . -.P -debug: Enable full debugging\. +.SH "SYNOPSIS" +Retrieves serialized storeconfigs records from a queue and processes them in order\. . -.P -help: Print this help message +.SH "USAGE" +puppet queue [\-d|\-\-debug] [\-v|\-\-verbose] +. +.SH "DESCRIPTION" +This application runs as a daemon and processes storeconfigs data, retrieving the data from a stomp server message queue and writing it to a database\. . .P -verbose: Turn on verbose reporting\. +For more information, including instructions for properly setting up your puppet master and message queue, see the documentation on setting up asynchronous storeconfigs at: http://projects\.puppetlabs\.com/projects/1/wiki/Using_Stored_Configuration +. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'server\' is a valid configuration parameter, so you can specify \'\-\-server \fIservername\fR\' as an argument\. . .P -version: Print the puppet version number and exit\.puppet queueLuke KaniesCopyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public License +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet queue with \'\-\-genconfig\'\. +. +.TP +\-\-debug +Enable full debugging\. +. +.TP +\-\-help +Print this help message +. +.TP +\-\-verbose +Turn on verbose reporting\. +. +.TP +\-\-version +Print the puppet version number and exit\. +. +.SH "EXAMPLE" +. +.nf + +$ puppet queue +. +.fi +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetrun.8 b/man/man8/puppetrun.8 index 09fa31b15..b6a868918 100644 --- a/man/man8/puppetrun.8 +++ b/man/man8/puppetrun.8 @@ -1,173 +1,115 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PUPPETRUN" "8" "August 2010" "" "" -Trigger a puppet agent run on a set of hosts\.puppet kick [\-a|\-\-all] [\-c|\-\-class \fIclass\fR] [\-d|\-\-debug] [\-f|\-\-foreground] +.TH "PUPPET\-KICK" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-kick\fR \- Remotely control puppet agent . -.nf - - [\-h|\-\-help] [\-\-host ] [\-\-no\-fqdn] [\-\-ignoreschedules] - [\-t|\-\-tag ] [\-\-test] [\-p|\-\-ping] [ [\.\.\.]] +.SH "SYNOPSIS" +Trigger a puppet agent run on a set of hosts\. . -.fi +.SH "USAGE" +puppet kick [\-a|\-\-all] [\-c|\-\-class \fIclass\fR] [\-d|\-\-debug] [\-f|\-\-foreground] [\-h|\-\-help] [\-\-host \fIhost\fR] [\-\-no\-fqdn] [\-\-ignoreschedules] [\-t|\-\-tag \fItag\fR] [\-\-test] [\-p|\-\-ping] \fIhost\fR [\fIhost\fR [\.\.\.]] . -.IP "" 0 -This script can be used to connect to a set of machines running +puppet agent+ and trigger them to run their configurations\. The most common usage would be to specify a class of hosts and a set of tags, and +puppet kick+ would look up in LDAP all of the hosts matching that class, then connect to each host and trigger a run of all of the objects with the specified tags\. +.SH "DESCRIPTION" +This script can be used to connect to a set of machines running \'puppet agent\' and trigger them to run their configurations\. The most common usage would be to specify a class of hosts and a set of tags, and \'puppet kick\' would look up in LDAP all of the hosts matching that class, then connect to each host and trigger a run of all of the objects with the specified tags\. . .P If you are not storing your host configurations in LDAP, you can specify hosts manually\. . .P -You will most likely have to run +puppet kick+ as root to get access to the SSL certificates\. +You will most likely have to run \'puppet kick\' as root to get access to the SSL certificates\. . .P -+puppet kick+ reads +puppet master+\'s configuration file, so that it can copy things like LDAP settings\.+puppet kick+ is useless unless +puppet agent+ is listening\. See its documentation for more information, but the gist is that you must enable +listen+ on the +puppet agent+ daemon, either using +\-\-listen+ on the command line or adding \'listen: true\' in its config file\. In addition, you need to set the daemons up to specifically allow connections by creating the +namespaceauth+ file, normally at \'/etc/puppet/namespaceauth\.conf\'\. This file specifies who has access to each namespace; if you create the file you must add every namespace you want any Puppet daemon to allow \-\- it is currently global to all Puppet daemons\. +\'puppet kick\' reads \'puppet master\'\'s configuration file, so that it can copy things like LDAP settings\. +. +.SH "USAGE NOTES" +\'puppet kick\' is useless unless \'puppet agent\' is listening\. See its documentation for more information, but the gist is that you must enable \'listen\' on the \'puppet agent\' daemon, either using \'\-\-listen\' on the command line or adding \'listen = true\' in its config file\. In addition, you need to set the daemons up to specifically allow connections by creating the \'namespaceauth\' file, normally at \'/etc/puppet/namespaceauth\.conf\'\. This file specifies who has access to each namespace; if you create the file you must add every namespace you want any Puppet daemon to allow \-\- it is currently global to all Puppet daemons\. . .P -An example file looks like this:: +An example file looks like this: . .IP "" 4 . .nf [fileserver] allow *\.madstop\.com [puppetmaster] allow *\.madstop\.com [puppetrunner] allow culain\.madstop\.com . .fi . .IP "" 0 . .P -This is what you would install on your Puppet master; non\-master hosts could leave off the \'fileserver\' and \'puppetmaster\' namespaces\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. -. -.P -See the configuration file documentation at http://reductivelabs\.com/projects/puppet/reference/configref\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet master with \'\-\-genconfig\'\. -. -.P -all: Connect to all available hosts\. Requires LDAP support -. -.IP "" 4 -. -.nf - - at this point\. -. -.fi -. -.IP "" 0 -. -.P -class: Specify a class of machines to which to connect\. This -. -.IP "" 4 -. -.nf - - only works if you have LDAP configured, at the moment\. -. -.fi -. -.IP "" 0 -. -.P -debug: Enable full debugging\. -. -.P -foreground: Run each configuration in the foreground; that is, when -. -.IP "" 4 -. -.nf - - connecting to a host, do not return until the host has - finished its run\. The default is false\. -. -.fi -. -.IP "" 0 -. -.P -help: Print this help message +This is what you would install on your Puppet master; non\-master hosts could leave off the \'fileserver\' and \'puppetmaster\' namespaces\. . -.P -host: A specific host to which to connect\. This flag can be -. -.IP "" 4 -. -.nf - - specified more than once\. -. -.fi -. -.IP "" 0 +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. . .P -ignoreschedules: Whether the client should ignore schedules when running +See the configuration file documentation at http://docs\.puppetlabs\.com/references/latest/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet master with \'\-\-genconfig\'\. . -.IP "" 4 +.TP +\-\-all +Connect to all available hosts\. Requires LDAP support at this point\. . -.nf - - its configuration\. This can be used to force the client - to perform work it would not normally perform so soon\. - The default is false\. +.TP +\-\-class +Specify a class of machines to which to connect\. This only works if you have LDAP configured, at the moment\. . -.fi +.TP +\-\-debug +Enable full debugging\. . -.IP "" 0 +.TP +\-\-foreground +Run each configuration in the foreground; that is, when connecting to a host, do not return until the host has finished its run\. The default is false\. . -.P -parallel: How parallel to make the connections\. Parallelization +.TP +\-\-help +Print this help message . -.IP "" 4 +.TP +\-\-host +A specific host to which to connect\. This flag can be specified more than once\. . -.nf - - is provided by forking for each client to which to - connect\. The default is 1, meaning serial execution\. -. -.fi -. -.IP "" 0 -. -.P -tag: Specify a tag for selecting the objects to apply\. Does -. -.IP "" 4 +.TP +\-\-ignoreschedules +Whether the client should ignore schedules when running its configuration\. This can be used to force the client to perform work it would not normally perform so soon\. The default is false\. . -.nf - - not work with the \-\-test option\. +.TP +\-\-parallel +How parallel to make the connections\. Parallelization is provided by forking for each client to which to connect\. The default is 1, meaning serial execution\. . -.fi +.TP +\-\-tag +Specify a tag for selecting the objects to apply\. Does not work with the \-\-test option\. . -.IP "" 0 +.TP +\-\-test +Print the hosts you would connect to but do not actually connect\. This option requires LDAP support at this point\. . -.P -test: Print the hosts you would connect to but do not +.TP +\-\-ping +Do a ICMP echo against the target host\. Skip hosts that don\'t respond to ping\. . -.IP "" 4 +.SH "EXAMPLE" . .nf - actually connect\. This option requires LDAP support at - this point\. +$ sudo puppet kick \-p 10 \-t remotefile \-t webserver host1 host2 . .fi . -.IP "" 0 +.SH "AUTHOR" +Luke Kanies . -.P -ping:: -. -.P -Do a ICMP echo against the target host\. Skip hosts that don\'t respond to ping\.sudo puppet kick \-p 10 \-t remotefile \-t webserver host1 host2Luke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License +.SH "COPYRIGHT" +Copyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8 index bdc81e90a..738537e84 100644 --- a/man/man8/ralsh.8 +++ b/man/man8/ralsh.8 @@ -1,85 +1,84 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "RALSH" "8" "August 2010" "" "" -Use the Puppet RAL to directly interact with the system\.puppet resource [\-h|\-\-help] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-edit] +.TH "PUPPET\-RESOURCE" "8" "February 2011" "Puppet Labs, LLC" "Puppet manual" . -.IP "" 4 +.SH "NAME" +\fBpuppet\-resource\fR \- The resource abstraction layer shell . -.nf - - [\-H|\-\-host ] [\-p|\-\-param ] [\-t|\-\-types] - type +.SH "SYNOPSIS" +Uses the Puppet RAL to directly interact with the system\. . -.fi +.SH "USAGE" +puppet resource [\-h|\-\-help] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-edit] [\-H|\-\-host \fIhost\fR] [\-p|\-\-param \fIparameter\fR] [\-t|\-\-types] \fItype\fR [\fIname\fR] [\fIattribute\fR=\fIvalue\fR \.\.\.] . -.IP "" 0 -This command provides simple facilities for converting current system state into Puppet code, along with some ability to use Puppet to affect the current state\. +.SH "DESCRIPTION" +This command provides simple facilities for converting current system state into Puppet code, along with some ability to modify the current state using Puppet\'s RAL\. . .P -By default, you must at least provide a type to list, which case puppet resource will tell you everything it knows about all instances of that type\. You can optionally specify an instance name, and puppet resource will only describe that single instance\. +By default, you must at least provide a type to list, in which case puppet resource will tell you everything it knows about all resources of that type\. You can optionally specify an instance name, and puppet resource will only describe that single instance\. . .P -You can also add +\-\-edit+ as an argument, and puppet resource will write its output to a file, open that file in an editor, and then apply the file as a Puppet transaction\. You can easily use this to use Puppet to make simple changes to a system\.Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. +If given a type, a name, and a series of \fIattribute\fR=\fIvalue\fR pairs, puppet resource will modify the state of the specified resource\. Alternately, if given a type, a name, and the \'\-\-edit\' flag, puppet resource will write its output to a file, open that file in an editor, and then apply the saved file as a Puppet transaction\. . -.P -See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. +.SH "OPTIONS" +Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\. . .P -debug: Enable full debugging\. +See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \'\-\-genconfig\'\. . -.P -edit: +.TP +\-\-debug +Enable full debugging\. . -.P +.TP +\-\-edit Write the results of the query to a file, open the file in an editor, and read the file back in as an executable Puppet manifest\. . -.P -host: -. -.P +.TP +\-\-host When specified, connect to the resource server on the named host and retrieve the list of resouces of the type specified\. . -.P -help: -. -.P +.TP +\-\-help Print this help message\. . -.P -param: -. -.P +.TP +\-\-param Add more parameters to be outputted from queries\. . -.P -types: -. -.P +.TP +\-\-types List all available types\. . -.P -verbose: +.TP +\-\-verbose +Print extra information\. . -.P -Print extra information\.This example uses \fBpuppet resource\fR to return Puppet configuration for the user \fBluke\fR: +.SH "EXAMPLE" +This example uses \fBpuppet resource\fR to return a Puppet configuration for the user \fBluke\fR: . .IP "" 4 . .nf - $ puppet resource user luke - user { \'luke\': - home => \'/home/luke\', - uid => \'100\', - ensure => \'present\', - comment => \'Luke Kanies,,,\', - gid => \'1000\', - shell => \'/bin/bash\', - groups => [\'sysadmin\',\'audio\',\'video\',\'puppet\'] - } +$ puppet resource user luke +user { \'luke\': + home => \'/home/luke\', + uid => \'100\', + ensure => \'present\', + comment => \'Luke Kanies,,,\', + gid => \'1000\', + shell => \'/bin/bash\', + groups => [\'sysadmin\',\'audio\',\'video\',\'puppet\'] +} . .fi . .IP "" 0 -Luke KaniesCopyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License +. +.SH "AUTHOR" +Luke Kanies +. +.SH "COPYRIGHT" +Copyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/tasks/rake/manpages.rake b/tasks/rake/manpages.rake new file mode 100644 index 000000000..f7275e4c3 --- /dev/null +++ b/tasks/rake/manpages.rake @@ -0,0 +1,37 @@ +# require 'fileutils' + +desc "Build Puppet manpages" +task :gen_manpages do + + sbins = Dir.glob(%w{sbin/*}) + bins = Dir.glob(%w{bin/*}) + applications = Dir.glob(%w{lib/puppet/application/*}) + # Locate ronn + ronn = %x{which ronn}.chomp + unless File.executable?(ronn) then fail("Ronn does not appear to be installed.") end + + # Create puppet.conf.5 man page + %x{RUBYLIB=./lib:$RUBYLIB bin/puppetdoc --reference configuration > ./man/man5/puppetconf.5.ronn} + %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man5/puppetconf.5.ronn} + File.move("./man/man5/puppetconf.5", "./man/man5/puppet.conf.5") + File.unlink("./man/man5/puppetconf.5.ronn") + + # Create LEGACY binary man pages (i.e. delete me for 2.8.0) + binary = bins + sbins + binary.each do |bin| + b = bin.gsub( /^s?bin\//, "") + %x{RUBYLIB=./lib:$RUBYLIB #{bin} --help > ./man/man8/#{b}.8.ronn} + %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man8/#{b}.8.ronn} + File.unlink("./man/man8/#{b}.8.ronn") + end + + # Create modern binary man pages + applications.each do |app| + app.gsub!( /^lib\/puppet\/application\/(.*?)\.rb/, '\1') + %x{RUBYLIB=./lib:$RUBYLIB bin/puppet #{app} --help > ./man/man8/puppet-#{app}.8.ronn} + %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man8/puppet-#{app}.8.ronn} + File.unlink("./man/man8/puppet-#{app}.8.ronn") + end + + +end \ No newline at end of file