On Mon, Nov 30, 2009 at 4:58 PM, Steven VanDevender <ste...@uoregon.edu> wrote:
> Paul Lathrop writes:
>  > 2) Why does puppet manage dependencies the way it does?
>  > 3) How can I keep dependencies manageable?
>  >
>  > The answer to #2 is more complicated, and has been hashed over before
>  > on the list, but I'll comment that some people just don't like the
>  > dependency model in puppet. There are other tools out there that use
>  > a different model - personally I prefer Puppet's way.
>
> Ultimately I think Puppet's way makes the most sense -- when you need to
> enforce dependencies they're explicitly documented in the manifests, not
> implicitly dependent to something like declaration order.  It helps you
> to remember them if you move a resource from one place to another.
>
>  > #3 can be answered "the same as you
>  > would in object-oriented development" - develop good abstractions and
>  > minimize your crossing of abstraction boundaries. It sounds like
>  > Doug's manifests don't follow these guidelines, as he says "Within the
>  > bootstrapped modules currently I have a horrible mess of
>  > unmaintainable requires => statements, that are just going to get
>  > harder to maintain as times goes on. I'm afraid to touch it now, for
>  > fear of what will break." Refactoring is in order.
>
> There are cases where you have a lot of dependencies and ordering
> requirements and this tends to provoke a reaction of "dependency
> management is HAAARRRD".  But those are the cases where it's also the
> most important.  If you want to create something maintainable under
> those circumstances, you're going to have to work out the proper
> dependency relationships sooner or later.  Unfortunately I don't know of
> any configuration management tool that figures out dependencies for you;
> the best you can hope for right now is to have one that lets you express
> them clearly.

A conclusion I've come to is that inter-class requires are almost
always better done by requiring the entire class rather than
individual resources outside the current class.

So intra-class dependencies are for specific resource order within the
class, and inter-class dependencies all live at the class level.

This may be obvious, but we slowly had requires creep up that were not
done this way, and it causes no end of hell for debugging.


-- 
nigel

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to