[chef] Re: Re: Re: is there a smart way to tweak configurations file in chef? (or puppet, cfengine, or otherwise?)


Chronological Thread 
  • From: Arjuna Christensen <aj@opscode.com>
  • To: "chef@lists.opscode.com" <chef@lists.opscode.com>
  • Subject: [chef] Re: Re: Re: is there a smart way to tweak configurations file in chef? (or puppet, cfengine, or otherwise?)
  • Date: Fri, 31 Jul 2009 16:13:40 +1200

On 31/07/2009, at 3:57 PM, Jeffrey Hulten <jhulten@gmail.com> wrote:

Is this something Augeas (http://augeas.net/index.html) either with Chef or Puppet would help with? I know the Puppet guys have at least some Augeas support.

That's what I said; see below.

I have a number of concerns with Augeas, mostly around it's lack of cross platform support, unique 'lenses' to describe syntax and the requirement of an external non-native-Ruby (gem) library.

The lightweight file editing mixin should be able to accomplish most of these tasks in most common formats, aside from some of the more advanced functionality of Augeas.


On Thu, Jul 30, 2009 at 8:24 PM, Arjuna Christensen <aj@opscode.com> wrote:
Hiya,

There are a few camps of thought for this - ex-users of cfengine often look for such behavior.

We have a lightweight file editing Mixin in production, and I have been evaluating Augeas on supported platforms for similar tasks.

On 31/07/2009, at 11:42 AM, Thomas Hartman wrote:

I have this scenario where I have a my.cnf ini file, and I want to
make sure it has a certain value in a certain section. (Can't just
append to the end of the file.)

I solved this using the perl file, attached. Obviously this isn't a
perfect solution though. If the value is already set, but set wrong,
it won't work.

The right way to do this would be to parse the ini file and do something smart.

You could possibly try the parseconfig Gem, and do so in-template-parse-and-re-render magic, but down this path surely lies madness.

Most times this can be solved by a 'smart' template for my.cnf which reads in snippets from another directory, or programatically builds up the entire configuration file. This is the other main camp of thought - everything you are managing on your system should be managed (entire files) instead of a line in a file, which has the potential to conflict or be broken by earlier configuration (in that same file)

I am just wondering if this kind of tweak is a solved problem, in
chef, puppet, cfengine, or anywhere else.

Thanks in advance for any advice!

--
Thomas Hartman

Darcs hosting: patch-tag.com
Build a webapp with haskell: happstack.com
<insert_after_line.pl>

-- 
AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com





Archive powered by MHonArc 2.6.16.

§