<?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>cd ~</title>
	<atom:link href="http://www.rottenbytes.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rottenbytes.info</link>
	<description>/home/nico</description>
	<lastBuildDate>Mon, 10 Sep 2012 09:42:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Chef &amp; FreeBSD : use pkgng</title>
		<link>http://www.rottenbytes.info/2012/09/05/chef-freebsd-use-pkgng/</link>
		<comments>http://www.rottenbytes.info/2012/09/05/chef-freebsd-use-pkgng/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 08:32:23 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[pkgng]]></category>
		<category><![CDATA[poudriere]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=464</guid>
		<description><![CDATA[Baptiste Daroussin did an incredible job on FreeBSD with the new packages system, named PkgNG. It brings modern workflow, options and shiny features that were needed for a long time. Say goodbye to painfully long upgrades.
However, Chef is not yet able to use this packaging system as it does not have a PkgNG provider, or [...]]]></description>
			<content:encoded><![CDATA[<p>Baptiste Daroussin did an incredible job on FreeBSD with the new packages system, named PkgNG. It brings modern workflow, options and shiny features that were needed for a long time. Say goodbye to painfully long upgrades.</p>
<p>However, Chef is not yet able to use this packaging system as it does not have a PkgNG provider, or not had. This is a hacky way to do so but here is a way to use PkgNG with chef, making it the default provider for your packages.</p>
<div id="gist3633306" class="gist">
      <div class="gist-file">
        <div class="gist-data gist-syntax">



  <div class="file-data">
    <table cellpadding="0" cellspacing="0" class="lines highlight">
      <tr>
        <td class="line-numbers">
          <span class="line-number" id="file-pkgng-rb-L1" rel="file-pkgng-rb-L1">1</span>
          <span class="line-number" id="file-pkgng-rb-L2" rel="file-pkgng-rb-L2">2</span>
          <span class="line-number" id="file-pkgng-rb-L3" rel="file-pkgng-rb-L3">3</span>
          <span class="line-number" id="file-pkgng-rb-L4" rel="file-pkgng-rb-L4">4</span>
          <span class="line-number" id="file-pkgng-rb-L5" rel="file-pkgng-rb-L5">5</span>
          <span class="line-number" id="file-pkgng-rb-L6" rel="file-pkgng-rb-L6">6</span>
          <span class="line-number" id="file-pkgng-rb-L7" rel="file-pkgng-rb-L7">7</span>
          <span class="line-number" id="file-pkgng-rb-L8" rel="file-pkgng-rb-L8">8</span>
          <span class="line-number" id="file-pkgng-rb-L9" rel="file-pkgng-rb-L9">9</span>
          <span class="line-number" id="file-pkgng-rb-L10" rel="file-pkgng-rb-L10">10</span>
          <span class="line-number" id="file-pkgng-rb-L11" rel="file-pkgng-rb-L11">11</span>
          <span class="line-number" id="file-pkgng-rb-L12" rel="file-pkgng-rb-L12">12</span>
          <span class="line-number" id="file-pkgng-rb-L13" rel="file-pkgng-rb-L13">13</span>
          <span class="line-number" id="file-pkgng-rb-L14" rel="file-pkgng-rb-L14">14</span>
          <span class="line-number" id="file-pkgng-rb-L15" rel="file-pkgng-rb-L15">15</span>
          <span class="line-number" id="file-pkgng-rb-L16" rel="file-pkgng-rb-L16">16</span>
          <span class="line-number" id="file-pkgng-rb-L17" rel="file-pkgng-rb-L17">17</span>
          <span class="line-number" id="file-pkgng-rb-L18" rel="file-pkgng-rb-L18">18</span>
          <span class="line-number" id="file-pkgng-rb-L19" rel="file-pkgng-rb-L19">19</span>
          <span class="line-number" id="file-pkgng-rb-L20" rel="file-pkgng-rb-L20">20</span>
          <span class="line-number" id="file-pkgng-rb-L21" rel="file-pkgng-rb-L21">21</span>
          <span class="line-number" id="file-pkgng-rb-L22" rel="file-pkgng-rb-L22">22</span>
          <span class="line-number" id="file-pkgng-rb-L23" rel="file-pkgng-rb-L23">23</span>
          <span class="line-number" id="file-pkgng-rb-L24" rel="file-pkgng-rb-L24">24</span>
          <span class="line-number" id="file-pkgng-rb-L25" rel="file-pkgng-rb-L25">25</span>
          <span class="line-number" id="file-pkgng-rb-L26" rel="file-pkgng-rb-L26">26</span>
          <span class="line-number" id="file-pkgng-rb-L27" rel="file-pkgng-rb-L27">27</span>
          <span class="line-number" id="file-pkgng-rb-L28" rel="file-pkgng-rb-L28">28</span>
          <span class="line-number" id="file-pkgng-rb-L29" rel="file-pkgng-rb-L29">29</span>
          <span class="line-number" id="file-pkgng-rb-L30" rel="file-pkgng-rb-L30">30</span>
          <span class="line-number" id="file-pkgng-rb-L31" rel="file-pkgng-rb-L31">31</span>
          <span class="line-number" id="file-pkgng-rb-L32" rel="file-pkgng-rb-L32">32</span>
          <span class="line-number" id="file-pkgng-rb-L33" rel="file-pkgng-rb-L33">33</span>
          <span class="line-number" id="file-pkgng-rb-L34" rel="file-pkgng-rb-L34">34</span>
          <span class="line-number" id="file-pkgng-rb-L35" rel="file-pkgng-rb-L35">35</span>
          <span class="line-number" id="file-pkgng-rb-L36" rel="file-pkgng-rb-L36">36</span>
          <span class="line-number" id="file-pkgng-rb-L37" rel="file-pkgng-rb-L37">37</span>
          <span class="line-number" id="file-pkgng-rb-L38" rel="file-pkgng-rb-L38">38</span>
          <span class="line-number" id="file-pkgng-rb-L39" rel="file-pkgng-rb-L39">39</span>
          <span class="line-number" id="file-pkgng-rb-L40" rel="file-pkgng-rb-L40">40</span>
          <span class="line-number" id="file-pkgng-rb-L41" rel="file-pkgng-rb-L41">41</span>
          <span class="line-number" id="file-pkgng-rb-L42" rel="file-pkgng-rb-L42">42</span>
          <span class="line-number" id="file-pkgng-rb-L43" rel="file-pkgng-rb-L43">43</span>
          <span class="line-number" id="file-pkgng-rb-L44" rel="file-pkgng-rb-L44">44</span>
          <span class="line-number" id="file-pkgng-rb-L45" rel="file-pkgng-rb-L45">45</span>
          <span class="line-number" id="file-pkgng-rb-L46" rel="file-pkgng-rb-L46">46</span>
          <span class="line-number" id="file-pkgng-rb-L47" rel="file-pkgng-rb-L47">47</span>
          <span class="line-number" id="file-pkgng-rb-L48" rel="file-pkgng-rb-L48">48</span>
          <span class="line-number" id="file-pkgng-rb-L49" rel="file-pkgng-rb-L49">49</span>
          <span class="line-number" id="file-pkgng-rb-L50" rel="file-pkgng-rb-L50">50</span>
          <span class="line-number" id="file-pkgng-rb-L51" rel="file-pkgng-rb-L51">51</span>
          <span class="line-number" id="file-pkgng-rb-L52" rel="file-pkgng-rb-L52">52</span>
        </td>
        <td class="line-data">
          <pre class="line-pre"><div class="line" id="file-pkgng-rb-LC1"><span class="nb">require</span> <span class="s1">&#39;chef/mixin/shell_out&#39;</span></div><div class="line" id="file-pkgng-rb-LC2"><span class="nb">require</span> <span class="s1">&#39;chef/platform&#39;</span></div><div class="line" id="file-pkgng-rb-LC3"><span class="nb">require</span> <span class="s1">&#39;chef&#39;</span></div><div class="line" id="file-pkgng-rb-LC4">&nbsp;</div><div class="line" id="file-pkgng-rb-LC5"><span class="kp">include</span> <span class="ss">Chef</span><span class="p">:</span><span class="ss">:Mixin</span><span class="o">::</span><span class="no">ShellOut</span></div><div class="line" id="file-pkgng-rb-LC6">&nbsp;</div><div class="line" id="file-pkgng-rb-LC7"><span class="k">class</span> <span class="nc">Chef</span></div><div class="line" id="file-pkgng-rb-LC8">  <span class="k">class</span> <span class="nc">Provider</span></div><div class="line" id="file-pkgng-rb-LC9">    <span class="k">class</span> <span class="nc">Package</span></div><div class="line" id="file-pkgng-rb-LC10">      <span class="k">class</span> <span class="nc">Pkgng</span> <span class="o">&lt;</span> <span class="ss">Chef</span><span class="p">:</span><span class="ss">:Provider</span><span class="o">::</span><span class="no">Package</span></div><div class="line" id="file-pkgng-rb-LC11">&nbsp;</div><div class="line" id="file-pkgng-rb-LC12">        <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC13">          <span class="k">super</span></div><div class="line" id="file-pkgng-rb-LC14">          <span class="vi">@current_resource</span> <span class="o">=</span> <span class="ss">Chef</span><span class="p">:</span><span class="ss">:Resource</span><span class="o">::</span><span class="no">Package</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="vi">@new_resource</span><span class="o">.</span><span class="n">name</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC15">          <span class="vi">@current_resource</span><span class="o">.</span><span class="n">package_name</span><span class="p">(</span><span class="vi">@new_resource</span><span class="o">.</span><span class="n">package_name</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC16">          <span class="vi">@current_resource</span></div><div class="line" id="file-pkgng-rb-LC17">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC18">&nbsp;</div><div class="line" id="file-pkgng-rb-LC19">        <span class="k">def</span> <span class="nf">check_package_state</span></div><div class="line" id="file-pkgng-rb-LC20">          <span class="n">pkg_info</span> <span class="o">=</span> <span class="n">shell_out!</span><span class="p">(</span><span class="s2">&quot;pkg info </span><span class="si">#{</span><span class="n">package_name</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="ss">:env</span> <span class="o">=&gt;</span> <span class="kp">nil</span><span class="p">,</span> <span class="ss">:returns</span> <span class="o">=&gt;</span> <span class="o">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">70</span><span class="o">]</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC21">&nbsp;</div><div class="line" id="file-pkgng-rb-LC22">          <span class="n">version</span> <span class="o">=</span> <span class="kp">nil</span></div><div class="line" id="file-pkgng-rb-LC23">          <span class="n">t</span> <span class="o">=</span> <span class="n">pkg_info</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="sr">/(.*)-(\d+\.\d+\.\d+(\.\d+.*\s)?)\s+(.*)/</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC24">          <span class="k">unless</span> <span class="n">t</span><span class="o">.</span><span class="n">nil?</span></div><div class="line" id="file-pkgng-rb-LC25">            <span class="n">version</span> <span class="o">=</span> <span class="n">t</span><span class="o">[</span><span class="mi">2</span><span class="o">].</span><span class="n">strip</span></div><div class="line" id="file-pkgng-rb-LC26">          <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC27">&nbsp;</div><div class="line" id="file-pkgng-rb-LC28">          <span class="k">return</span> <span class="n">version</span></div><div class="line" id="file-pkgng-rb-LC29">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC30">&nbsp;</div><div class="line" id="file-pkgng-rb-LC31">        <span class="k">def</span> <span class="nf">load_current_resource</span></div><div class="line" id="file-pkgng-rb-LC32">           <span class="vi">@current_resource</span><span class="o">.</span><span class="n">package_name</span><span class="p">(</span><span class="vi">@new_resource</span><span class="o">.</span><span class="n">package_name</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC33">           <span class="vi">@current_resource</span><span class="o">.</span><span class="n">version</span><span class="p">(</span><span class="nb">self</span><span class="o">.</span><span class="n">check_package_state</span><span class="p">())</span></div><div class="line" id="file-pkgng-rb-LC34">           <span class="vi">@candidate_version</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span></div><div class="line" id="file-pkgng-rb-LC35">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC36">&nbsp;</div><div class="line" id="file-pkgng-rb-LC37">        <span class="k">def</span> <span class="nf">package_name</span></div><div class="line" id="file-pkgng-rb-LC38">          <span class="vi">@new_resource</span><span class="o">.</span><span class="n">package_name</span></div><div class="line" id="file-pkgng-rb-LC39">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC40">&nbsp;</div><div class="line" id="file-pkgng-rb-LC41">        <span class="k">def</span> <span class="nf">install_package</span><span class="p">(</span><span class="nb">name</span><span class="p">,</span> <span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC42">          <span class="n">shell_out!</span><span class="p">(</span><span class="s2">&quot;pkg install -y </span><span class="si">#{</span><span class="n">package_name</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="ss">:env</span> <span class="o">=&gt;</span> <span class="kp">nil</span><span class="p">)</span><span class="o">.</span><span class="n">status</span></div><div class="line" id="file-pkgng-rb-LC43">          <span class="ss">Chef</span><span class="p">:</span><span class="ss">:Log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;PKGNG : </span><span class="si">#{</span><span class="vi">@new_resource</span><span class="si">}</span><span class="s2"> installed from: </span><span class="si">#{</span><span class="vi">@new_resource</span><span class="o">.</span><span class="n">source</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC44">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC45">&nbsp;</div><div class="line" id="file-pkgng-rb-LC46">        <span class="k">def</span> <span class="nf">remove_package</span><span class="p">(</span><span class="nb">name</span><span class="p">,</span> <span class="n">version</span> <span class="o">=</span> <span class="kp">nil</span><span class="p">)</span></div><div class="line" id="file-pkgng-rb-LC47">            <span class="n">shell_out!</span><span class="p">(</span><span class="s2">&quot;pkg delete -y </span><span class="si">#{</span><span class="n">package_name</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="ss">:env</span> <span class="o">=&gt;</span> <span class="kp">nil</span><span class="p">)</span><span class="o">.</span><span class="n">status</span></div><div class="line" id="file-pkgng-rb-LC48">        <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC49">      <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC50">    <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC51">  <span class="k">end</span></div><div class="line" id="file-pkgng-rb-LC52"><span class="k">end</span></div></pre>
        </td>
      </tr>
    </table>
  </div>

        </div>

        <div class="gist-meta">
          <a href="https://gist.github.com/rottenbytes/3633306/raw/fcbadbfa136037c74fe1ec31983954e743d8b028/pkgng.rb" style="float:right">view raw</a>
          <a href="https://gist.github.com/rottenbytes/3633306#file-pkgng-rb" style="float:right; margin-right:10px; color:#666;">pkgng.rb</a>
          <a href="https://gist.github.com/rottenbytes/3633306">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
        </div>
      </div>
      <div class="gist-file">
        <div class="gist-data gist-syntax">



  <div class="file-data">
    <table cellpadding="0" cellspacing="0" class="lines highlight">
      <tr>
        <td class="line-numbers">
          <span class="line-number" id="file-recipe-rb-L1" rel="file-recipe-rb-L1">1</span>
          <span class="line-number" id="file-recipe-rb-L2" rel="file-recipe-rb-L2">2</span>
          <span class="line-number" id="file-recipe-rb-L3" rel="file-recipe-rb-L3">3</span>
          <span class="line-number" id="file-recipe-rb-L4" rel="file-recipe-rb-L4">4</span>
          <span class="line-number" id="file-recipe-rb-L5" rel="file-recipe-rb-L5">5</span>
        </td>
        <td class="line-data">
          <pre class="line-pre"><div class="line" id="file-recipe-rb-LC1"><span class="ss">Chef</span><span class="p">:</span><span class="ss">:Platform</span><span class="o">.</span><span class="n">set</span><span class="p">({</span></div><div class="line" id="file-recipe-rb-LC2">  <span class="ss">:platform</span> <span class="o">=&gt;</span> <span class="ss">:freebsd</span><span class="p">,</span></div><div class="line" id="file-recipe-rb-LC3">  <span class="ss">:resource</span> <span class="o">=&gt;</span> <span class="ss">:package</span><span class="p">,</span></div><div class="line" id="file-recipe-rb-LC4">  <span class="ss">:provider</span> <span class="o">=&gt;</span> <span class="ss">Chef</span><span class="p">:</span><span class="ss">:Provider</span><span class="o">::</span><span class="ss">Package</span><span class="p">:</span><span class="ss">:Pkgng</span></div><div class="line" id="file-recipe-rb-LC5"><span class="p">})</span></div></pre>
        </td>
      </tr>
    </table>
  </div>

        </div>

        <div class="gist-meta">
          <a href="https://gist.github.com/rottenbytes/3633306/raw/fbf71c5a5b435a5dbcb1c062dfe7c4f46c6bb07b/recipe.rb" style="float:right">view raw</a>
          <a href="https://gist.github.com/rottenbytes/3633306#file-recipe-rb" style="float:right; margin-right:10px; color:#666;">recipe.rb</a>
          <a href="https://gist.github.com/rottenbytes/3633306">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
        </div>
      </div>
</div>

<p>Read more : <a href="http://blog.etoilebsd.net/tag/poudriere">poudriere</a> &amp; <a href="http://wiki.freebsd.org/pkgng">pkgng</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2012/09/05/chef-freebsd-use-pkgng/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuisine : updated &amp; shiny</title>
		<link>http://www.rottenbytes.info/2012/07/19/cuisine-updated-shiny/</link>
		<comments>http://www.rottenbytes.info/2012/07/19/cuisine-updated-shiny/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 08:15:40 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[cuisine]]></category>
		<category><![CDATA[dashboard]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=456</guid>
		<description><![CDATA[It&#8217;s been a while since my last post here, and I have updated my cuisine dashboard yesterday so here is a little follow up on what&#8217;s new in it.
First, the asynchronous handler has been updated, pushing backing data a bit differently and fixing a stupid issue on diffs. Check it out, it is needed for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-448" title="cuisine" src="http://www.rottenbytes.info/wp-content/uploads/2011/10/cuisine-150x150.jpg" alt="cuisine" width="150" height="150" />It&#8217;s been a while since my last post here, and I have updated my cuisine dashboard yesterday so here is a little follow up on what&#8217;s new in it.</p>
<p>First, the asynchronous handler has been updated, pushing backing data a bit differently and fixing a stupid issue on diffs. Check it out, it is needed for this new version of the cuisine dashboard.</p>
<p>I added a consumer that allows to use postgresql as storage backend. This does NOT replace the need for elasticsearch. It&#8217;s by making mistakes that you learn, and this one was pretty insightful : it&#8217;s better (necessary ?) to have a permanent storage you can rely on. When you come to update mappings, change stuff everywhere you don&#8217;t want to loose your data, so reindexing is the solution. There are now 3 scripts to cope with the incoming data :</p>
<ul>
<li>direct indexing to ES, this one does NOT remove data from message queue.</li>
<li>storing to PG, data is removed from message queue</li>
<li>going to both, data is removed from message queue</li>
</ul>
<p>These scripts will probably be federated to a single one later, that will be a proper daemon (with logging, pid files and such)</p>
<p>UPDATE : this rewrite is done. A single script allows data consumption, indexing and storage. As a bonus, a quick and dirty packager based on FPM is provided.</p>
<p>In the additions, cuisine now takes enviroments in account, you can filter when looking the last runs and in search you can restrict to a particular one.</p>
<p>To end this post, a few screenshots :</p>
<p><a href="http://www.rottenbytes.info/wp-content/uploads/2012/07/index.png"><img class="alignnone size-medium wp-image-457" title="index" src="http://www.rottenbytes.info/wp-content/uploads/2012/07/index-300x183.png" alt="index" width="300" height="183" /></a> <a href="http://www.rottenbytes.info/wp-content/uploads/2012/07/search.png"><img class="size-medium wp-image-458 alignnone" title="search" src="http://www.rottenbytes.info/wp-content/uploads/2012/07/search-300x203.png" alt="search" width="300" height="203" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2012/07/19/cuisine-updated-shiny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuisine : a chef dashboard</title>
		<link>http://www.rottenbytes.info/2011/10/21/cuisine-a-chef-dashboard/</link>
		<comments>http://www.rottenbytes.info/2011/10/21/cuisine-a-chef-dashboard/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 10:17:30 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[cuisine]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[elasticsearch]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=447</guid>
		<description><![CDATA[ When I wrote the asynchronous chef handler that I presented in the previous post, I had a little idea in mind. being able to track changes made by chef. The idea grew up a little and I now release a little dashboard I wrote. It&#8217;s still in a very early stage of development but [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-448" title="cuisine" src="http://www.rottenbytes.info/wp-content/uploads/2011/10/cuisine-150x150.jpg" alt="cuisine" width="150" height="150" /> When I wrote the <a href="http://www.rottenbytes.info/2011/07/28/asynchronous-reporting-with-chef/">asynchronous chef handler</a> that I presented in the previous post, I had a little idea in mind. being able to track changes made by chef. The idea grew up a little and I now release a little dashboard I wrote. It&#8217;s still in a very early stage of development but I&#8217;ll try to present the idea behind it.</p>
<p>The changes (including diffs) are pushed in a queue. This queue is consumed by a script and datas are indexed in elasticsearch, an open source search engine. On the top of this I wrote a web interface, based on sinatra and twitter&#8217;s bootstrap) that allow you to see the latest runs, filter out runs with no changes and search on criterias (hostname, updated resources and inside the diffs)</p>
<p>To use this you will need a couple of things :</p>
<ul>
<li>a STOMP broker (I use rabbitmq, but activemq or stompserver will fit too)</li>
<li>an elasticsearch instance (or cluster)</li>
<li>sinatra and its dependencies + the stomp ruby gem</li>
</ul>
<p>The <a href="https://github.com/rottenbytes/Cuisine">code is available</a> on github, feel free to get in touch on freenode IRC, you can find me on the #chef-hacking channel (nickname : nico)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/10/21/cuisine-a-chef-dashboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asynchronous reporting with chef</title>
		<link>http://www.rottenbytes.info/2011/07/28/asynchronous-reporting-with-chef/</link>
		<comments>http://www.rottenbytes.info/2011/07/28/asynchronous-reporting-with-chef/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 08:33:45 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[cuisine]]></category>
		<category><![CDATA[message queue]]></category>
		<category><![CDATA[reporting]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=431</guid>
		<description><![CDATA[ Configuration management tools are awesome. Using them, you are now managing loads of servers, reaching the pub on time and you can focus on really fun stuff. A counterpart is that they almost work in your back : changes are propagated quickly, and even if you store your cookbooks/modules in a VCS, even if [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-432" title="gousset" src="http://www.rottenbytes.info/wp-content/uploads/2011/07/gousset.jpg" alt="gousset" width="150" height="113" /> Configuration management tools are awesome. Using them, you are now managing loads of servers, reaching the pub on time and you can focus on really fun stuff. A counterpart is that they almost work in your back : changes are propagated quickly, and even if you store your cookbooks/modules in a VCS, even if you review them, you still want to know what really happens on your servers. Puppet has a really nice automatic summary part to do that job, and some people are doing <a href="http://www.devco.net/archives/2011/07/03/real_time_puppet_events_and_network_wide_callbacks.php">cool things</a> with it. Chef also has summary of updated resources but they don&#8217;t get back to a master like puppet do. So I wrote a little<a href="http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers"> report handler</a> to push back data to wherever you want to. It is based on the stomp protocol, to be non blocking and easily scale if you have a large number of machine. With this you just need to have a consumer that will process data to your favorite datastore.</p>
<p>I&#8217;ve put that on my <a href="https://github.com/rottenbytes/chef">github chef repo</a>, check the readme for the extensive file list &amp; function.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/07/28/asynchronous-reporting-with-chef/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trigger your chef runs with mcollective</title>
		<link>http://www.rottenbytes.info/2011/07/26/trigger-your-chef-runs-with-mcollective/</link>
		<comments>http://www.rottenbytes.info/2011/07/26/trigger-your-chef-runs-with-mcollective/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 09:27:29 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[mcollective]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=423</guid>
		<description><![CDATA[ Mcollective has been able to fire up puppetd runs for a while now, via a standalone RPC call or through the puppet commander binary (check it out, spread your load). I wanted to be able to fire up my chef clients with mcollective, to use metadata to filter what should be impacted. So I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" title="eth0" src="http://www.rottenbytes.info/wp-content/uploads/2009/02/eth0.jpg" alt="eth0" width="80" height="103" /> Mcollective has been able to fire up puppetd runs for a while now, via a standalone RPC call or through the puppet commander binary (check it out, spread your load). I wanted to be able to fire up my chef clients with mcollective, to use metadata to filter what should be impacted. So I wrote a little piece of ruby, mostly based on the puppet one, to achieve this. You can now do the following :</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"> mco rpc chef runonce </span>or  <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">mco rpc chef status</span><br />
The plugin is available on my <a href="https://github.com/rottenbytes/mcollective">github mcollective repository</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/07/26/trigger-your-chef-runs-with-mcollective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mcollective agent, to manage agents</title>
		<link>http://www.rottenbytes.info/2011/03/15/mcollective-agent-to-manage-agents/</link>
		<comments>http://www.rottenbytes.info/2011/03/15/mcollective-agent-to-manage-agents/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 07:37:06 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[mcollective]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=417</guid>
		<description><![CDATA[It started like a toy, to learn a little more about mcollective agents but I finally turned into something useful (at least for me). I pushed my agent &#8220;smith&#8221; on my github account. It allows you to install or remove agents within mcollective. I usually use my configuration management tool to deploy such pieces of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-418" title="agent_smith" src="http://www.rottenbytes.info/wp-content/uploads/2011/03/agent_smith-150x150.jpg" alt="agent_smith" width="150" height="150" />It started like a toy, to learn a little more about mcollective agents but I finally turned into something useful (at least for me). I pushed my agent &#8220;<a href="https://github.com/rottenbytes/mcollective/blob/master/plugins/agents/smith.rb">smith</a>&#8221; on <a href="https://github.com/rottenbytes">my github account</a>. It allows you to install or remove agents within mcollective. I usually use my configuration management tool to deploy such pieces of software but it can be useful in some case to go without it.</p>
<p>The mandatory internet meme reference : yes xzibit approves.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/03/15/mcollective-agent-to-manage-agents/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generic use of chef providers in mcollective</title>
		<link>http://www.rottenbytes.info/2011/03/11/generic-use-of-chef-providers-in-mcollective/</link>
		<comments>http://www.rottenbytes.info/2011/03/11/generic-use-of-chef-providers-in-mcollective/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 20:16:44 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[BOFH Life]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[mcollective]]></category>
		<category><![CDATA[providers]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=412</guid>
		<description><![CDATA[This post follows my previous one, dealing with the reuse of chef providers of chef in mcollective. In the comments Adam Jacob had an interesting word and when I wrote my second agent, to manage package I saw it would be a piece of cake to write a really generic agent, due to the nature [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" title="eth0" src="http://www.rottenbytes.info/wp-content/uploads/2009/02/eth0.jpg" alt="eth0" width="80" height="103" />This post follows my <a href="http://www.rottenbytes.info/?p=404">previous</a> one, dealing with the reuse of chef providers of chef in mcollective. In the comments Adam Jacob had <a href="http://www.rottenbytes.info/?p=404#comment-1405">an interesting word</a> and when I wrote my second agent, to manage package I saw it would be a piece of cake to write a really generic agent, due to the nature of chef resource (and the way to invoke them)</p>
<p>So, this is a <a href="https://github.com/rottenbytes/mcollective/blob/master/plugins/agents/chef-resource.rb">generic chef resource mcollective agent</a>, with the associated <a href="https://github.com/rottenbytes/mcollective/blob/master/clients/generic_chefresource.rb">example client code</a>. It anyway deserves an little explanation; it is not mean to work with a command line invocation. Why ? Because I push quite &#8220;complex&#8221; data as the <em>resourceactions</em> parameter. The only way I found to make this work from command line is to use eval on the argument, which is no way acceptable. Anyway I hope some people will find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/03/11/generic-use-of-chef-providers-in-mcollective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reusing chef providers in mcollective</title>
		<link>http://www.rottenbytes.info/2011/03/08/reusing-chef-providers-in-mcollective/</link>
		<comments>http://www.rottenbytes.info/2011/03/08/reusing-chef-providers-in-mcollective/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 18:59:34 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[BOFH Life]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[mcollective]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=404</guid>
		<description><![CDATA[It has been quite calm for a couple of months here. I have switched job, it explains why I had less time to post some things.I now work at fotolia, and I switched from puppet to chef (no troll intended, I still think puppet is a great tool, please read this).
However, a tool I still [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" title="eth0" src="http://www.rottenbytes.info/wp-content/uploads/2009/02/eth0.jpg" alt="eth0" width="80" height="103" />It has been quite calm for a couple of months here. I have switched job, it explains why I had less time to post some things.I now work at fotolia, and I switched from puppet to chef (no troll intended, I still think puppet is a great tool, please <a href="http://www.quora.com/What-are-the-key-reasons-to-choose-Puppet-over-Chef-or-vice-versa/answer/Andrew-Clay-Shafer">read this</a>).</p>
<p>However, a tool I still have is the awesome mcollective. Unfortunately, the most used agents (package, service) relay on puppet providers to do their actions. Fortunately, open source is here, so I wrote a (basic) service agent that uses chef providers to start/stop or restart an agent. It still needs some polish for the status part (ho the ugly hardcoded path) but I was quite excited to share <a href="https://github.com/rottenbytes/mcollective/blob/master/plugins/agents/chef-service.rb">this</a>. Freshly pushed on github !</p>
<p>Thanks to Jordan Sissel for <a href="https://github.com/jordansissel/ruby-minstrel">minstrel</a>, an awesome debug tool, the opscode team for the help on the provider and R.I. Pienaar for mcollective (and the support).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2011/03/08/reusing-chef-providers-in-mcollective/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mcollective + Cluster SSH</title>
		<link>http://www.rottenbytes.info/2010/10/14/mcollective-cluster-ssh/</link>
		<comments>http://www.rottenbytes.info/2010/10/14/mcollective-cluster-ssh/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 06:59:36 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=398</guid>
		<description><![CDATA[Just a little script that enables you to launch a cluster ssh based on mcollective discovery capacities. Now you can say &#8220;I want cssh to all my openbsd boxes&#8221; in only one command.
mc-cluster-ssh --wf kernel=OpenBSD
Grab it in my github
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" title="eth0" src="http://www.rottenbytes.info/wp-content/uploads/2009/02/eth0.jpg" alt="eth0" width="80" height="103" />Just a little script that enables you to launch a cluster ssh based on mcollective discovery capacities. Now you can say &#8220;I want cssh to all my openbsd boxes&#8221; in only one command.</p>
<pre style="padding-left: 60px;">mc-cluster-ssh --wf kernel=OpenBSD</pre>
<p><a href="http://github.com/rottenbytes/mcollective/blob/master/clients/mc-cluster-ssh">Grab it</a> in my github</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2010/10/14/mcollective-cluster-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STOMP-ed nagios</title>
		<link>http://www.rottenbytes.info/2010/09/27/stomp-ed-nagios/</link>
		<comments>http://www.rottenbytes.info/2010/09/27/stomp-ed-nagios/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 19:30:19 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Général]]></category>
		<category><![CDATA[mcollective]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[stomp]]></category>

		<guid isPermaLink="false">http://www.rottenbytes.info/?p=393</guid>
		<description><![CDATA[Basing more and more stuff on mcollective means relying more and more on one of its underlying components : the activeMQ middleware, and more precisely the stomp connector. I hit a weird bug a few days ago and realized that I was not functionnaly monitoring this part of the system. The port was bound and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-62" title="eth0" src="http://www.rottenbytes.info/wp-content/uploads/2009/02/eth0.jpg" alt="eth0" width="80" height="103" />Basing more and more stuff on mcollective means relying more and more on one of its underlying components : the activeMQ middleware, and more precisely the stomp connector. I hit a weird bug a few days ago and realized that I was not <em>functionnaly</em> monitoring this part of the system. The port was bound and responded to connections, subscriptions were possible but messages didn&#8217;t pass through.So I wrote this little <a href="http://github.com/rottenbytes/Scripts/blob/master/monitoring/check_stomp.rb">plugin</a> that makes this possible : it creates a random string, sends it to a queue and then reads the queue to check if the result is the same.</p>
<p>This has been possible with the help of <a href="http://twitter.com/ripienaar">@ripienaar</a>. Thanks for the explanation for the difference between topics &amp; queues !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rottenbytes.info/2010/09/27/stomp-ed-nagios/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
