[chef] Re: managing system files with Chef


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: managing system files with Chef
  • Date: Thu, 5 May 2011 09:18:37 -0700

On Thursday, May 5, 2011 at 9:03 AM, Sascha Bates wrote:

Chef wants to manage config files as templates.  I get that.  I'm wondering how people are handling system configuration files that are large and sometimes unwieldy?  For example, in Red Hat, the /etc/sendmail.cf  is 700 lines and we update just one.  Should I really keep a template or cookbook file for something like that?  We are running primarily RH4 and RH5 and have identified the following choices for system configuration files:

The reason for this is that it's declarative. When you do it this way, you get the same config file when you build a new machine as you have on one that's managed with chef for a long time. Consider the following scenario:

1. You patch line X of file FOO using regular expressions
2. You patch line X of file FOO using regular expressions (again)
3. When you build a new server, the regex in step 2 doesn't match and your file doesn't get patched at all.

It's not hard to imagine many variations of this problem.

The ideal situation is that your applications support config.d/ directories, but this isn't always the case. Anyway, I'd recommend carefully considering this problem before you decide to go off the happy path.


-- 
Dan DeLeo
 



Archive powered by MHonArc 2.6.16.

§