<?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>Kartar.Net &#187; repository</title>
	<atom:link href="http://www.kartar.net/tag/repository/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kartar.net</link>
	<description>the truth about a man lies in what he hides</description>
	<lastBuildDate>Fri, 30 Jul 2010 00:25:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Puppet Module Repository isn&#8217;t just for modules</title>
		<link>http://www.kartar.net/2010/06/puppet-module-repository-isnt-just-for-modules/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=puppet-module-repository-isnt-just-for-modules</link>
		<comments>http://www.kartar.net/2010/06/puppet-module-repository-isnt-just-for-modules/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 00:08:15 +0000</pubDate>
		<dc:creator>kartar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[is]]></category>
		<category><![CDATA[on]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.kartar.net/?p=2329</guid>
		<description><![CDATA[You can store more than just your modules at the Forge.   I just added my types and providers to my collection of modules at the new Puppet Module Forge.  I&#8217;d love to all those people maintaining types and providers, functions, and facts add theirs to the Forge also.  It&#8217;s a cool way to share [...]]]></description>
			<content:encoded><![CDATA[<p>You can store more than just your modules at the Forge. <img src='http://www.kartar.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I just added my types and providers to <a title="James' modules at the Forge" href="http://forge.puppetlabs.com/users/jamtur01" target="_blank">my collection of modules</a> at the new <a title="Puppet module forge" href="http://forge.puppetlabs.com" target="_blank">Puppet Module Forge</a>.  I&#8217;d love to all those people maintaining types and providers, functions, and facts add theirs to the Forge also.  It&#8217;s a cool way to share your code (and the site allows you to provide links back to your code <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a> and ticketing system so user&#8217;s can report bugs).  In time I hope most people&#8217;s environments will consist of the core types and providers bundled with <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> and a selection of cool code generated by the <a href="http://www.kartar.net/tag/community/" class="st_tag internal_tag" rel="tag" title="Posts tagged with community">community</a> and sourced from the <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> Forge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kartar.net/2010/06/puppet-module-repository-isnt-just-for-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Puppet Forge in beta!</title>
		<link>http://www.kartar.net/2010/05/puppet-forge-in-beta/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=puppet-forge-in-beta</link>
		<comments>http://www.kartar.net/2010/05/puppet-forge-in-beta/#comments</comments>
		<pubDate>Thu, 27 May 2010 12:14:55 +0000</pubDate>
		<dc:creator>kartar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[is]]></category>
		<category><![CDATA[on]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.kartar.net/?p=2325</guid>
		<description><![CDATA[The Puppet Forge AKA the Puppet Module Repository is live and operational.  It&#8217;s a store of Puppet modules (and types and providers) that allows you to share your awesome code and modules with others. It also comes with the puppet-module tool that allows you to build modules for, manage and install modules from the forge.  [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> Forge AKA the<a href="http://forge.puppetlabs.com/"> Puppet Module Repository</a> is live and operational.  It&#8217;s a store of <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> modules (and types and providers) that allows you to share your awesome code and modules with others.</p>
<p>It also comes with the <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>-module tool that allows you to build modules for, manage and install modules from the forge.  You can install <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>-module via a gem:</p>
<pre>
$ sudo gem install <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>-module
</pre>
<p>Both the site and tool are in public <a href="http://www.kartar.net/tag/beta/" class="st_tag internal_tag" rel="tag" title="Posts tagged with beta">beta</a> right now so hammer away at it and tell us what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kartar.net/2010/05/puppet-forge-in-beta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Puppet types and providers is easy&#8230;</title>
		<link>http://www.kartar.net/2010/02/puppet-types-and-providers-are-easy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=puppet-types-and-providers-are-easy</link>
		<comments>http://www.kartar.net/2010/02/puppet-types-and-providers-are-easy/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 06:24:31 +0000</pubDate>
		<dc:creator>kartar</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.kartar.net/?p=2196</guid>
		<description><![CDATA[Puppet types are used to manage individual configuration items.  Puppet has a package type, a service type, a user type, etc.  Each type has providers. Each provider handles the management of that configuration on a different platform or tool, for example the package type has aptitude, yum, RPM, and DMG providers (amongst 22 others &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> types are used to manage individual configuration items.  <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> has a package type, a service type, a user type, etc.  Each type has providers. Each provider handles the management of that configuration on a different platform or tool, for example the package type has aptitude, yum, RPM, and DMG providers (amongst 22 others &#8211; what is wrong with people that they need to invent new packaging systems&#8230; but I digress).</p>
<p>There are a lot of types, in fact I think <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> covers a pretty good spectrum of configuration items that need to be managed.  I don&#8217;t know of anything in particular that is missing that I can&#8217;t live without.  But there are little gaps that are annoying, I&#8217;d like network and firewall types for example, but creating both these types in a generic enough way to support multiple platforms would be, IMHO, a non-trivial problem.  </p>
<p>Another gap is VCS/DVCS management. A lot of people use source code in repositories to do things with (including install stuff from you bad people &#8211; package things &#8230; it&#8217;s healthier). <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> currently relies on creating and removing these repositories with the exec type (which <strong>exec</strong>utes scripts or binaries), for example:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">exec</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;svn co http://core.svn.wordpress.org/trunk/ /var/www/wp&quot;</span>:
    creates <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;/var/www/wp&quot;</span>,
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>This is a bit ugly and it&#8217;d be a lot easier to write a <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> type to manage repositories. But <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> types and providers are written in Ruby and really, really complex and hard to develop. Right? Right?</p>
<p>No. No, they are not&#8230; and I&#8217;m going to create a simple type and provider to show you. <img src='http://www.kartar.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s a very (very!) simple <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> type, called <strong>repo</strong>, for managing repositories. I&#8217;ve created providers for SVN and Git as examples also.  The first part of the repo type is the type itself &#8211; these are usually stored in lib/<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>/type or distributed via modules (see the <a href="http://reductivelabs.com/trac/puppet/wiki/PluginsInModules">PluginsInModules</a> page in the <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> wiki).  I&#8217;ll create a file called repo.rb.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">touch</span> repo.rb</pre></div></div>

<p>And then populate the file:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">Puppet::Type</span>.<span style="color:#9900CC;">newtype</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:repo</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#0066ff; font-weight:bold;">@doc</span> = <span style="color:#996600;">&quot;Manage repos&quot;</span>
&nbsp;
    ensurable
&nbsp;
    newparam<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:source</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        desc <span style="color:#996600;">&quot;The repo source&quot;</span>
&nbsp;
        validate <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>value<span style="color:#006600; font-weight:bold;">|</span>
            <span style="color:#9966CC; font-weight:bold;">if</span> value =~ <span style="color:#006600; font-weight:bold;">/</span>^git<span style="color:#006600; font-weight:bold;">/</span>
                resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:provider</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#ff3333; font-weight:bold;">:git</span>
            <span style="color:#9966CC; font-weight:bold;">else</span>
                resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:provider</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#ff3333; font-weight:bold;">:svn</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        isnamevar
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    newparam<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:path</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        desc <span style="color:#996600;">&quot;Destination path&quot;</span>
&nbsp;
        validate <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>value<span style="color:#006600; font-weight:bold;">|</span>
            <span style="color:#9966CC; font-weight:bold;">unless</span> value =~ <span style="color:#006600; font-weight:bold;">/</span>^\<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>z0<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+/</span>
                <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#CC00FF; font-weight:bold;">ArgumentError</span> , <span style="color:#996600;">&quot;%s is not a valid file path&quot;</span> <span style="color:#006600; font-weight:bold;">%</span> value
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>So &#8211; pretty simple.  We create a block <code><a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a>::Type.newtype(:repo) do</code> that creates a new type, which we&#8217;ve called repo.</p>
<p>Inside the block we&#8217;ve got a <code>@doc</code> string.  This is the documentation for the type. Add whatever level of detail and examples in here that is required.</p>
<p>We&#8217;ve also got the <code>ensurable</code> statement.  Ensurable provides some &#8220;automagic&#8221; that creates a basic <code>ensure</code> property.  <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> types use the ensure property to determine the state of a configuration item.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">service <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;sshd&quot;</span>:
    <span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> present,
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>The <code>ensurable</code> statement tells <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> to expect three methods: create, destroy and exists? in our provider.  These methods, allow, respectively:</p>
<ul>
<li>A command to create the resource</li>
<li>A command to delete the resource, and</li>
<li>A command to check for the existence of the resource</li>
</ul>
<p>All we then need to do is specify these methods and their contents and <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> creates the supporting infrastructure around them but more on this when we look at our providers.</p>
<p>Next, we&#8217;ve defined a new parameter &#8211; this one called <code>source</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">    newparam<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:source</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        desc <span style="color:#996600;">&quot;The repo source&quot;</span>
&nbsp;
        validate <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>value<span style="color:#006600; font-weight:bold;">|</span>
            <span style="color:#9966CC; font-weight:bold;">if</span> value =~ <span style="color:#006600; font-weight:bold;">/</span>^git<span style="color:#006600; font-weight:bold;">/</span>
                resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:provider</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#ff3333; font-weight:bold;">:git</span>
            <span style="color:#9966CC; font-weight:bold;">else</span>
                resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:provider</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#ff3333; font-weight:bold;">:svn</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        isnamevar
    <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The source parameter will tell the repo type where to go to retrieve/clone/checkout our source <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a>.</p>
<p>In this parameter we&#8217;re also using a hook called <code>validate</code>.  Normally used to check the value for appropriateness here we&#8217;re using it to take a guess at what provider to use.  Our code says, if the source parameter starts with <code>git</code> then use the Git provider, if not default to the Subversion provider.  This is obviously fairly crude as a default and we can override this by defining the <code>provider</code> attribute in our resources:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">provider <span style="color:#006600; font-weight:bold;">=&gt;</span> git,</pre></div></div>

<p>We&#8217;ve also used another piece of <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> automagic, <code>isnamevar</code>, to make this parameter the &#8220;name&#8221; variable for this type.  In <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a>-speak, the value of this parameter is used as the name of the resource.</p>
<p>(Types have two kinds of values &#8211; properties and parameters.  Properties &#8220;do things&#8221;. They tell us HOW the provider works. We&#8217;ve only defined one property, ensure, by using the <code>ensurable</code> statement.  Parameters are more like variables, they contain information relevant to configuring the resource the type manages rather than &#8220;doing things&#8221;.)</p>
<p>Finally, we&#8217;ve defined another parameter, <code>path</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">    newparam<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:path</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        desc <span style="color:#996600;">&quot;Destination path&quot;</span>
&nbsp;
        validate <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>value<span style="color:#006600; font-weight:bold;">|</span>
            <span style="color:#9966CC; font-weight:bold;">unless</span> value =~ <span style="color:#006600; font-weight:bold;">/</span>^\<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>z0<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+/</span>
                <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#CC00FF; font-weight:bold;">ArgumentError</span> , <span style="color:#996600;">&quot;%s is not a valid file path&quot;</span> <span style="color:#006600; font-weight:bold;">%</span> value
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This is a variable value that specifies where the repo type should put the cloned/checked-out <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a>.  In this parameter we&#8217;ve again used the <code>validate</code> hook to create a block that checks the value for appropriateness.  Here we&#8217;re just checking, very crudely, to make sure it looks like the destination path is a valid fully-qualified file path.  We could also use this validation for the source parameter to confirm a valid source URL/location was being provided.</p>
<p>(You can also use another hook called <code>munge</code> to adjust the value of the parameter rather than validating it before passing it to the provider.)</p>
<p>And that is it for the type.  </p>
<p>Next, we need to create a provider for our type.  Let&#8217;s start with a Subversion provider like so:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'fileutils'</span>
&nbsp;
<span style="color:#6666ff; font-weight:bold;">Puppet::Type</span>.<span style="color:#9900CC;">type</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:repo</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">provide</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:svn</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    desc <span style="color:#996600;">&quot;SVN Support&quot;</span>
&nbsp;
    commands <span style="color:#ff3333; font-weight:bold;">:svncmd</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;svn&quot;</span>
    commands <span style="color:#ff3333; font-weight:bold;">:svnadmin</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;svnadmin&quot;</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> create
        svncmd <span style="color:#996600;">&quot;checkout&quot;</span>, resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:name</span><span style="color:#006600; font-weight:bold;">&#93;</span>, resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:path</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> destroy
        <span style="color:#CC00FF; font-weight:bold;">FileUtils</span>.<span style="color:#9900CC;">rm_rf</span> resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:path</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> exists?
        <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">directory</span>? resource<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:path</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Up front we&#8217;ve required the <code>fileutils</code> library, which we&#8217;re going to use a method from.  Next, we&#8217;ve defined the provider as a block:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">Puppet::Type</span>.<span style="color:#9900CC;">type</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:repo</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">provide</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:svn</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span></pre></div></div>

<p>We tell <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> that this is a provider called <code>svn</code> for the type called <code>repo</code>.</p>
<p>Then we use a <code>desc</code> method that allows us to add some documentation to our provider.</p>
<p>Next, we define the commands that this provider will use, here the svn and svnadmin binaries, to manipulate our resource&#8217;s configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">    commands <span style="color:#ff3333; font-weight:bold;">:svncmd</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;svn&quot;</span>
    commands <span style="color:#ff3333; font-weight:bold;">:svnadmin</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;svnadmin&quot;</span></pre></div></div>

<p><a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> uses these commands to determine if the provider is appropriate to use on a client, if <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> can&#8217;t find these commands in the local path then it will disable the provider.</p>
<p>Next, we&#8217;ve defined three methods &#8211; <code>create</code>, <code>destroy</code> and <code>exists?</code>.  Sounds familiar?  Yep, these are the methods that the <code>ensurable</code> statement expects to find in the provider:</p>
<p>The <code>create</code> method ensures our resource is created.  It uses the svn command to create a <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a> with a source of <code>resource[:name]</code> (remember the <code>source</code> parameter in our type is also the name variable of the type &#8211; we could also specify <code>resource[:source]</code> here too) and a destination of <code>resource[:path]</code> (the value of the path attribute).</p>
<p>The <code>delete</code> method ensures the deletion of the resource.  In this case, it deletes the directory and files specified in the <code>resource[:path]</code> parameter.</p>
<p>Lastly, the <code>exists?</code> method checks to see if the resource exists. Its operation is pretty simple and closely linked with the value of the <code>ensure</code> attribute in the resource: </p>
<ul>
<li>If <code>exists?</code> is false and <code>ensure</code> is present, then <code>create</code> method will be called.</li>
<li>If <code>exists?</code> is true and <code>ensure</code> is set to <code>absent</code>, then the <code>destroy</code> method will be called.</li>
</ul>
<p>In this case the <code>exists?</code> method checks if there is already a directory at the location specified in the <code>resource[:path]</code> parameter.  </p>
<p>So, let&#8217;s put all this together and create a resource with our new type.  I&#8217;ve assumed you&#8217;ve already distributed your type and providers to <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a>.  We can then create a resource like:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">repo <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;wp&quot;</span>:
    source <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;http://core.svn.wordpress.org/trunk/&quot;</span>,
    path <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;/var/www/wp&quot;</span>,
    <span style="color:#9966CC; font-weight:bold;">ensure</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> present,
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>Simple eh?  We specify a repo resource, the source we wish to check out or clone from, the destination path and the ensure attribute (present or absent) and that&#8217;s it.</p>
<p>You can see the complete code for this type and its providers at my <a href="http://github.com/jamtur01/puppet/tree/feature/svn">Puppet repository on GitHub</a>.  It&#8217;s obviously very basic but should be easy to extend to provide additional capabilities (and currently has no tests &#8211; my bad). You can find further documentation (in a lot more detail!) on <a href="http://reductivelabs.com/trac/puppet/wiki/DocumentationStart#ExtendingPuppet">creating your own types and providers at the Puppet wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kartar.net/2010/02/puppet-types-and-providers-are-easy/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Puppet&#8217;s BuildBot</title>
		<link>http://www.kartar.net/2008/08/puppets-buildbot/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=puppets-buildbot</link>
		<comments>http://www.kartar.net/2008/08/puppets-buildbot/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 01:23:22 +0000</pubDate>
		<dc:creator>kartar</dc:creator>
				<category><![CDATA[buildbot]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ci]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[is]]></category>
		<category><![CDATA[keys]]></category>
		<category><![CDATA[on]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[reductive]]></category>
		<category><![CDATA[reductivelabs]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[Rspec]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[war]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[So rather than doing the work I actually should be I've been playing with <a href="http://buildbot.net">BuildBot</a>. I had intended to get around to setting up BuildBot sometime in the next couple of months but I got hooked.  

The reason I wanted to have a look at BuildBot was that <a href="http://reductivelabs.com/trac/puppet">Puppet</a> has reached a stage where we simply can't test every platform it runs on.  We are also starting to get patches from a wider variety of sources.  Buildbot will allow us to execute our tests on a wider variety of platforms. Hopefully with the cooperation of the community we can gather a really big collection of build platforms to test on.

Here's the blurb for BuildBot

<i>The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.

The overall goal is to reduce tree breakage and provide a platform to run tests or code-quality checks that are too annoying or pedantic for any human to waste their time with. Developers get immediate (and potentially public) feedback about their changes, encouraging them to be more careful about testing before checkin.</i>

It's a very easy tool to deploy.  The hardest part has been the slightly broken Git source handling and the assumption that any Git repository is local.  I need to have a local Git repository to allow BuildBot to submit the right commits references to the PBChangeSource function.

But I designed a basic process for handling new commits:

1. Commit pushed to GitHub.
2. <a href="http://github.com/jamtur01/github-buildbot-commitbot/tree/master">Commit bot</a> at GitHub picks up commit and sends it to BuildBot Master.
3. BuildBot uses the git_buildbot.py script to calculate the before/after commit and branch references and tell BuildBot about them.
4. BuildBot executes the build and tells each slave to retrieve the commit and runs the tests.  Currently we're running:

a. All the Unit tests
b. All the RSpec tests

5. We then get the results of the tests on the website and in an email to the new Puppet Builds mailing list.

In addition I've also enabled BuildBot's IRC bot and added a new bot, called pinocchio, to the #puppet channel that reports on build status.

At this stage it's all in test mode and when I've ironed out a few issues we should be in a position to do a production installation at ReductiveLabs and start canvassing for build slaves.]]></description>
			<content:encoded><![CDATA[<p>So rather than doing the work I actually should be I&#8217;ve been playing with <a href="http://buildbot.net">BuildBot</a>. I had intended to get around to setting up BuildBot sometime in the next couple of months but I got hooked.</p>
<p>The reason I wanted to have a look at BuildBot was that <a href="http://reductivelabs.com/trac/puppet">Puppet</a> has reached a stage where we simply can&#8217;t test every platform it runs on.  We are also starting to get patches from a wider variety of sources.  Buildbot will allow us to execute our tests on a wider variety of platforms. Hopefully with the cooperation of the <a href="http://www.kartar.net/tag/community/" class="st_tag internal_tag" rel="tag" title="Posts tagged with community">community</a> we can gather a really big collection of build platforms to test on.</p>
<p>Here&#8217;s the blurb for BuildBot</p>
<p><em>The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.</em></p>
<p><em>The overall goal is to reduce tree breakage and provide a platform to run tests or code-quality checks that are too annoying or pedantic for any human to waste their time with. Developers get immediate (and potentially public) feedback about their changes, encouraging them to be more careful about testing before checkin.</em></p>
<p>It&#8217;s a very easy tool to deploy.  The hardest part has been the slightly broken Git source handling and the assumption that any Git <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a> is local.  I need to have a local Git <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a> to allow BuildBot to submit the right commits references to the PBChangeSource function.</p>
<p>But I designed a basic process for handling new commits:</p>
<p>1. Commit pushed to GitHub.<br />
2. <a href="http://github.com/jamtur01/github-buildbot-commitbot/tree/master">Commit bot</a> at GitHub picks up commit and sends it to BuildBot Master.<br />
3. BuildBot uses the git_buildbot.py script to calculate the before/after commit and branch references and tell BuildBot about them.<br />
4. BuildBot executes the build and tells each slave to retrieve the commit and runs the tests.  Currently we&#8217;re running:</p>
<p>a. All the Unit tests<br />
b. All the <a href="http://www.kartar.net/tag/rspec/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Rspec">RSpec</a> tests</p>
<p>5. We then get the results of the tests on the website and in an email to the new <a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a> Builds mailing list.</p>
<p>In addition I&#8217;ve also enabled BuildBot&#8217;s <a href="http://www.kartar.net/tag/irc/" class="st_tag internal_tag" rel="tag" title="Posts tagged with irc">IRC</a> bot and added a new bot, called pinocchio, to the #<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a> channel that reports on build status.</p>
<p>At this stage it&#8217;s all in test mode and when I&#8217;ve ironed out a few issues we should be in a position to do a production installation at ReductiveLabs and start canvassing for build slaves.</p>
<p><strong>UPDATE</strong></p>
<p>After mucking around with Buildbot I just couldn&#8217;t get a whole bunch of issues with Git resolved so we changed to <a href="http://www.kartar.net/tag/hudson/" class="st_tag internal_tag" rel="tag" title="Posts tagged with hudson">Hudson</a> as our CI &#8211; which works much better.  The message overall is &#8211; CI and Git: still a young pair.  I&#8217;ve included our configuration below for edification:</p>
<p><em># -*- python -*-<br />
# ex: set syntax=python:</em></p>
<p><em># This is a sample buildmaster config file. It must be installed as<br />
# &#8216;master.cfg&#8217; in your buildmaster&#8217;s base directory (although the filename<br />
# can be changed with the &#8211;basedir option to &#8216;mktap buildbot master&#8217;).</em></p>
<p><em># It has one job: define a dictionary named BuildmasterConfig. This<br />
# dictionary has a variety of keys to control different aspects of the<br />
# buildmaster. They are documented in docs/config.xhtml .</em></p>
<p><em># This is the dictionary that the buildmaster pays attention to. We also use<br />
# a shorter alias to save typing.<br />
c = BuildmasterConfig = {}</em></p>
<p><em>####### BUILDSLAVES</em></p>
<p><em># the &#8216;slaves&#8217; list defines the set of allowable buildslaves. Each element is<br />
# a tuple of bot-name and bot-password. These correspond to values given to<br />
# the buildslave&#8217;s mktap invocation.<br />
from buildbot.buildslave import BuildSlave</em></p>
<p><em>c['slaves'] = [BuildSlave("debian", "debian"),<br />
BuildSlave("freebsd", "freebsd"),<br />
BuildSlave("redhat", "redhat")<br />
]</em></p>
<p><em># &#8216;slavePortnum&#8217; defines the TCP port to listen on. This must match the value<br />
# configured into the buildslaves (with their &#8211;master option)</em></p>
<p><em>c['slavePortnum'] = 9989</em></p>
<p><em>####### CHANGESOURCES</em></p>
<p><em># the &#8216;change_source&#8217; setting tells the buildmaster how it should find out<br />
# about source code changes. Any class which implements IChangeSource can be<br />
# put here: there are several in buildbot/changes/*.py to choose from.</em></p>
<p><em>from buildbot.changes.pb import PBChangeSource<br />
c['change_source'] = PBChangeSource()</em></p>
<p><em>####### SCHEDULERS</em></p>
<p><em>## configure the Schedulers</em></p>
<p><em>from buildbot import scheduler</em></p>
<p><em>stable = scheduler.Scheduler(name=&#8221;stable&#8221;, builderNames=["debian_stable", "freebsd_stable", "redhat_stable"], treeStableTimer=60, branch=&#8221;0.24.x&#8221;)<br />
dev = scheduler.Scheduler(name=&#8221;dev&#8221;, builderNames=["debian_dev", "freebsd_dev", "redhat_dev"], treeStableTimer=60, branch=&#8221;master&#8221;)</em></p>
<p><em>c['schedulers'] = [stable, dev]</em></p>
<p><em>####### BUILDERS</em></p>
<p><em># the &#8216;builders&#8217; list defines the Builders. Each one is configured with a<br />
# dictionary, using the following keys:<br />
#  name (required): the name used to describe this bilder<br />
#  slavename (required): which slave to use, must appear in c['bots']<br />
#  builddir (required): which subdirectory to run the builder in<br />
#  factory (required): a BuildFactory to define how the build is run<br />
#  periodicBuildTime (optional): if set, force a build every N seconds</em></p>
<p><em># buildbot/process/factory.py provides several BuildFactory classes you can<br />
# start with, which implement build processes for common targets (GNU<br />
# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the<br />
# base class, and is configured with a series of BuildSteps. When the build<br />
# is run, the appropriate buildslave is told to execute each Step in turn.</em></p>
<p><em># the first BuildStep is typically responsible for obtaining a copy of the<br />
# sources. There are source-obtaining Steps in buildbot/steps/source.py for<br />
# CVS, SVN, and others.</em></p>
<p><em>from buildbot.process import factory<br />
from buildbot.steps import source, shell</em></p>
<p><em>pstable = factory.BuildFactory()<br />
pstable.addStep(source.Git(repourl=&#8217;git://github.com/jamtur01/<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>.git&#8217;, branch=&#8217;0.24.x&#8217;))<br />
pstable.addStep(shell.ShellCommand(command=&#8217;rake spec&#8217;, name=&#8217;Spec Tests&#8217;))<br />
pstable.addStep(shell.ShellCommand(command=&#8217;rake unit&#8217;, name=&#8217;Unit Tests&#8217;))</em></p>
<p><em>pdev = factory.BuildFactory()<br />
pdev.addStep(source.Git(repourl=&#8217;git://reductivelabs.com/<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>&#8217;, branch=&#8217;master&#8217;))<br />
pdev.addStep(shell.ShellCommand(command=&#8217;rake spec&#8217;, name=&#8217;Spec Tests&#8217;))<br />
pdev.addStep(shell.ShellCommand(command=&#8217;rake unit&#8217;, name=&#8217;Unit Tests&#8217;))</em></p>
<p><em>debian_stable = {&#8216;name&#8217;: &#8220;debian_stable&#8221;,<br />
&#8216;slavename&#8217;: &#8220;debian&#8221;,<br />
&#8216;builddir&#8217;: &#8220;debian_stable&#8221;,<br />
&#8216;factory&#8217;: pstable,<br />
}</em></p>
<p><em>debian_dev = { &#8216;name&#8217;: &#8220;debian_dev&#8221;,<br />
&#8216;slavename&#8217;: &#8220;debian&#8221;,<br />
&#8216;builddir&#8217;: &#8220;debian_dev&#8221;,<br />
&#8216;factory&#8217;: pdev,<br />
}</em></p>
<p><em>redhat_stable = {&#8216;name&#8217;: &#8220;redhat_stable&#8221;,<br />
&#8216;slavename&#8217;: &#8220;redhat&#8221;,<br />
&#8216;builddir&#8217;: &#8220;redhat_stable&#8221;,<br />
&#8216;factory&#8217;: pstable,<br />
}</em></p>
<p><em>redhat_dev = { &#8216;name&#8217;: &#8220;redhat_dev&#8221;,<br />
&#8216;slavename&#8217;: &#8220;redhat&#8221;,<br />
&#8216;builddir&#8217;: &#8220;redhat_dev&#8221;,<br />
&#8216;factory&#8217;: pdev,<br />
}</em></p>
<p><em>freebsd_stable = {&#8216;name&#8217;: &#8220;freebsd_stable&#8221;,<br />
&#8216;slavename&#8217;: &#8220;freebsd&#8221;,<br />
&#8216;builddir&#8217;: &#8220;freebsd_stable&#8221;,<br />
&#8216;factory&#8217;: pstable,<br />
}</em></p>
<p><em>freebsd_dev = { &#8216;name&#8217;: &#8220;freebsd_dev&#8221;,<br />
&#8216;slavename&#8217;: &#8220;freebsd&#8221;,<br />
&#8216;builddir&#8217;: &#8220;freebsd_dev&#8221;,<br />
&#8216;factory&#8217;: pdev,<br />
}</em></p>
<p><em>c['builders'] = [debian_stable, debian_dev, freebsd_stable, freebsd_dev, redhat_stable, redhat_dev]</em></p>
<p><em>####### STATUS TARGETS</em></p>
<p><em># &#8216;status&#8217; is a list of Status Targets. The results of each build will be<br />
# pushed to these targets. buildbot/status/*.py has a variety to choose from,<br />
# including web pages, email senders, and <a href="http://www.kartar.net/tag/irc/" class="st_tag internal_tag" rel="tag" title="Posts tagged with irc">IRC</a> bots.</em></p>
<p><em>c['status'] = []</em></p>
<p><em>from buildbot.status import html<br />
c['status'].append(html.WebStatus(http_port=8010))</em></p>
<p><em>from buildbot.status import mail<br />
c['status'].append(mail.MailNotifier(fromaddr=&#8221;buildbot@reductivelabs.com&#8221;,<br />
extraRecipients=["<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>-build@googlegroups.com"],<br />
sendToInterestedUsers=False))</em></p>
<p><em>from buildbot.status import words<br />
c['status'].append(words.<a href="http://www.kartar.net/tag/irc/" class="st_tag internal_tag" rel="tag" title="Posts tagged with irc">IRC</a>(host=&#8221;<a href="http://www.kartar.net/tag/irc/" class="st_tag internal_tag" rel="tag" title="Posts tagged with irc">irc</a>.freenode.net&#8221;, nick=&#8221;pinocchio&#8221;,<br />
channels=["#<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>"],<br />
password=&#8221;password&#8221;))</em></p>
<p><em># from buildbot.status import client<br />
# c['status'].append(client.PBListener(9988))</em></p>
<p><em>####### DEBUGGING OPTIONS</em></p>
<p><em># if you set &#8216;debugPassword&#8217;, then you can connect to the buildmaster with<br />
# the diagnostic tool in contrib/debugclient.py . From this tool, you can<br />
# manually force builds and inject changes, which may be useful for testing<br />
# your buildmaster without actually commiting changes to your <a href="http://www.kartar.net/tag/repository/" class="st_tag internal_tag" rel="tag" title="Posts tagged with repository">repository</a> (or<br />
# before you have a functioning &#8216;sources&#8217; set up). The debug tool uses the<br />
# same port number as the slaves do: &#8216;slavePortnum&#8217;.</em></p>
<p><em>#c['debugPassword'] = &#8220;debugpassword&#8221;</em></p>
<p><em># if you set &#8216;manhole&#8217;, you can ssh into the buildmaster and get an<br />
# interactive python shell, which may be useful for debugging buildbot<br />
# internals. It is probably only useful for buildbot developers. You can also<br />
# use an authorized_keys file, or plain telnet.<br />
#from buildbot import manhole<br />
#c['manhole'] = manhole.PasswordManhole(&#8220;tcp:9999:interface=127.0.0.1&#8243;,<br />
#                                       &#8220;admin&#8221;, &#8220;password&#8221;)</em></p>
<p><em>####### PROJECT IDENTITY</em></p>
<p><em># the &#8216;projectName&#8217; string will be used to describe the project that this<br />
# buildbot is working on. For example, it is used as the title of the<br />
# waterfall HTML page. The &#8216;projectURL&#8217; string will be used to provide a link<br />
# from buildbot HTML pages to your project&#8217;s home page.</em></p>
<p><em>c['projectName'] = &#8220;<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">Puppet</a>&#8221;<br />
c['projectURL'] = &#8220;http://reductivelabs.com/trac/<a href="http://www.kartar.net/tag/puppet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with puppet">puppet</a>/&#8221;</em></p>
<p><em># the &#8216;buildbotURL&#8217; string should point to the location where the buildbot&#8217;s<br />
# internal web server (usually the html.Waterfall page) is visible. This<br />
# typically uses the port number set in the Waterfall &#8216;status&#8217; entry, but<br />
# with an externally-visible host name which the buildbot cannot figure out<br />
# without some help.</em></p>
<p><em>#c['buildbotURL'] = &#8220;http://10.0.0.x:8010/&#8221;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kartar.net/2008/08/puppets-buildbot/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
