<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 02/02/12 08:14, Bram Gillemon wrote:
<blockquote
cite="mid:BA76D35C-BCA7-4DFF-A58E-83AC1FC17C5E@openminds.be"
type="cite">
<pre wrap="">Tom,
how do you manage your configurations with chef?
Do you use attributes per cookbook to manage the different roles you can add to your server? How do you pass the ports to your nagios?
I'm trying to figure out how i can manage all my configuration files using chef.
</pre>
</blockquote>
<br>
Originally, well still mostly, I have each role declaring a list of
nagios client ports which the nagios::server recipe collects using
node search on nagios attributes and adds to the template.<br>
<br>
However I am thinking of creating an abstraction layer in a
"network" cookbook that declares a LWRP called "Port" that would be
declared in network services cookbooks and used like so ... say for
mysql;<br>
<br>
<div class="container" title="Hint: double-click to select code">
<div class="line number1 index0 alt2"><code class="ruby plain">Port
</code><code class="ruby color2">"mysql-port"</code> <code
class="ruby keyword">do</code></div>
<div class="line number2 index1 alt1"><code class="ruby spaces">
</code><code class="ruby plain">number 3306<br>
state "OPEN"<br>
protocol "TCP"<br>
</code><code class="ruby constants"></code><code class="ruby
plain"></code><code class="ruby constants"></code><code
class="ruby plain"></code><code class="ruby constants"></code><code
class="ruby plain"></code></div>
<div class="line number3 index2 alt2"><code class="ruby keyword">end<br>
<br>
</code></div>
</div>
The benefit here is that a recipe for any monitoring program could
come and get the ports for an app, such as monit, nmap, zabbix and
it could even by used for configuring firewalls by adding some
"Rule" abstraction.<br>
<br>
However other than proving the concept with MySQL, thats as far as I
got.<br>
<br>
Cheers,<br>
Tom<br>
</body>
</html>