<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>John&#039;s Tidbits &#187; puppet</title>
	<atom:link href="http://inodes.org/tag/puppet/feed/" rel="self" type="application/rss+xml" />
	<link>http://inodes.org</link>
	<description>Moo - Development, Trouble-shooting and Random thoughts...</description>
	<lastBuildDate>Thu, 07 Apr 2011 11:38:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Puppet, Facts and Certificates</title>
		<link>http://inodes.org/2008/03/13/puppet-facts-and-certificates/</link>
		<comments>http://inodes.org/2008/03/13/puppet-facts-and-certificates/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 03:14:16 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[vquence]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2008/03/13/puppet-facts-and-certificates/</guid>
		<description><![CDATA[I&#8217;m currently setting up Puppet at Vquence so that, among other things, we can deploy hosts into Amazon EC2 more easily. To ensure a minimum setup time on a new server I wanted the setup to be as simple as echo &#8216;DAEMON_OPTS=&#8221;-w 120 &#8211;fqdn newserver.vquence.com &#8211;server puppetmaster.vquence.com&#8221; > /etc/default/puppet aptitude install puppet This means that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently setting up <a href="http://reductivelabs.com/projects/puppet/">Puppet</a> at Vquence so that, among other things, we can deploy hosts into Amazon EC2 more easily. </p>
<p>To ensure a minimum setup time on a new server I wanted the setup to be as simple as</p>
<ul>
<li> echo &#8216;DAEMON_OPTS=&#8221;-w 120 &#8211;fqdn <strong>newserver.vquence.com</strong> &#8211;server puppetmaster.vquence.com&#8221; > /etc/default/puppet </li>
<li> aptitude install puppet </li>
</ul>
<p>This means that the puppet client will use <strong>newserver.vquence.com</strong> as the common name in the SSL certificate it creates for itself. On the puppet master the SSL cert name is then used to pick a node rather than the hostname reported by facter.</p>
<p>This means that I don&#8217;t need to worry about setting up /etc/hostname, even better /etc/hostname can be managed by puppet.</p>
<p>You can control this functionality on the puppet master by using the node_name option. From the docs</p>
<pre>
    # How the puppetmaster determines the client's identity
    # and sets the 'hostname' fact 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)
    # The default value is 'cert'.
    # node_name = cert
</pre>
<p>The problem was that the &#8216;hostname&#8217; fact wasn&#8217;t being set. It looks like there was a regression in SVN#1673 when some refactoring was performed.</p>
<p>I&#8217;ve filed bug <a href="http://reductivelabs.com/trac/puppet/ticket/1133">#1133</a> and you can clone my git <a href="http://inodes.org/~johnf/git/puppet">repository.</a></p>
<p>I haven&#8217;t included any tests in the patch as I&#8217;m not sure how to. The master.rb test already tests this functionality but doesn&#8217;t test that the facts object has actually been changed. I think a test on <strong>getconfig</strong> is probably required but I&#8217;m not sure how you would access the facts after calling it.</p>
<p><strong>Update:</strong> This patch is now in puppet as of 0.24.3.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2008/03/13/puppet-facts-and-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

