[chef] Re: CHEF-3580: Do you keep node artifacts in source control?


Chronological Thread 
  • From: Andrea Campi < >
  • To:
  • Subject: [chef] Re: CHEF-3580: Do you keep node artifacts in source control?
  • Date: Sun, 4 Nov 2012 00:45:30 +0100



On Fri, Nov 2, 2012 at 6:11 PM, Bryan McLellan < " target="_blank"> > wrote:
What goes in them? Anything more than a run list? What attribute
precedence are you using?

We do keep nodes in git.
We use https://github.com/andreacampi/knife-export-plugins to dump nodes; that takes care of keeping things predictable enough that a diff is meaningful.

My only gripe with this are the cookbooks that needlessly set normal attributes… If we could reduce those to the bare minimum, I'd be a happy camper.
 

If the node exists, would you prefer 'knife node from file' to:
1) fail
2) overwrite the node (all attributes)
3) overwrite the node, then expand the run list
4) merge with the existing node

(Current result is #2)

Why?

What if you weren't as smart and awesome as you are today?

I'm not sure I understand #3… fully expanding the run list, i.e. saving to the node the list of recipes that happen to appear on the run list, if we were to expand roles right now?
That doesn't sound terribly useful, it will be out of date as soon as any role is edited.
But I'm probably wrong and you meant something else.


I don't have a strong preference one way or another, but:

#2 is convenient if you are very rigorous in your workflow. If you are not, you may well end up losing attributes.
Also, it doesn't really play well with cookbooks that set normal attribute *unless* you make sure to commit those (like I do).

I feel like #4 is probably more newbie-friendly.




Archive powered by MHonArc 2.6.16.

§