[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Matt Robinson matt at puppetlabs.com
Tue May 10 07:59:57 UTC 2011


The following commit has been merged in the experimental branch:
commit 4506dfeab3eead32f44f4baa461ebba88fe098ab
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Fri Nov 5 11:37:27 2010 -0700

    (#5150) Make fact REST terminus configurable to connect to inventory service
    
    Puppet masters can now set the inventory_server and inventory_port
    option to point to another puppet master that will function as the
    central inventory service.  When agents connect to the
    puppet master, this will send fact data from the puppet master over REST
    to the inventory service.
    
    The puppet master itself will still store the client fact data in the
    local yaml dir by setting the cache class to yaml.
    
    Getting puppet masters to talk to each other using certs is difficult.
    
    Paired-with: Jesse Wolfe <jesse at puppetlabs.com>

diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index c7bebf8..7ae5538 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -115,7 +115,16 @@ module Puppet
     :node_terminus => ["plain", "Where to find information about nodes."],
     :catalog_terminus => ["compiler", "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."],
-    :facts_terminus => [Puppet.application_name.to_s == "master" ? 'yaml' : 'facter', "The node facts terminus."],
+    :facts_terminus => {
+      :default => Puppet.application_name.to_s == "master" ? 'yaml' : 'facter', 
+      :desc => "The node facts terminus.",
+      :hook => proc do |value|
+        require 'puppet/node/facts'
+        if value.to_s == "rest"
+          Puppet::Node::Facts.cache_class = :yaml
+        end
+      end
+    },
     :inventory_terminus => [ "$facts_terminus", "Should usually be the same as the facts terminus" ],
     :httplog => { :default => "$logdir/http.log",
       :owner => "root",
@@ -579,11 +588,17 @@ module Puppet
       end
     },
     :report_server => ["$server",
-      "The server to which to send transaction reports."
+      "The server to send transaction reports to."
     ],
     :report_port => ["$masterport",
       "The port to communicate with the report_server."
     ],
+    :inventory_server => ["$server",
+      "The server to send facts to."
+    ],
+    :inventory_port => ["$masterport",
+      "The port to communicate with the inventory_server."
+    ],
     :report => [false,
       "Whether to send reports after every transaction."
     ],
diff --git a/lib/puppet/indirector/facts/rest.rb b/lib/puppet/indirector/facts/rest.rb
index 07491fc..e2afa14 100644
--- a/lib/puppet/indirector/facts/rest.rb
+++ b/lib/puppet/indirector/facts/rest.rb
@@ -3,4 +3,6 @@ require 'puppet/indirector/rest'
 
 class Puppet::Node::Facts::Rest < Puppet::Indirector::REST
   desc "Find and save facts about nodes over HTTP via REST."
+  use_server_setting(:inventory_server)
+  use_port_setting(:inventory_port)
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list