roles are designed to make the whole system flexible and easy to use.
It really depends on your business requirements and current situation. You
could be in a situation where you’re in a team that is slow to adopt new
cultural and workflow changes.
Telling a team in that situation “Ok you need to learn just a bit of ruby
in order to append the resolv.conf settings. By the way since you’re
modifying code you need to go through a brand new process before rolling
out to production. Oh and remember how you would test in Dev? yea that’s
not going to work anymore because Dev is now Production” Versus. “Here’s a
role that’s applied to all of our servers, these settings shouldn’t ever
really change because that’s how roles were designed, but since we’d like
to add another dns server follow the same format that is in this role”
if you’re in a team like Riot Games who off the bat know ruby or
development processes then hell ya cookbook all the things!
While beating the dead horse …they’re there for certain use cases and
allowing flexibility. Not everybody is a “devops” ninja. someone on the
food fight show said that.
To really beat the horse dead. Only the person/team implementing chef needs
to use the right ingredients at the right time. You can’t take someone
else’s ideas and or concepts and apply it to your environment expecting
With all that said. One needs to take care in using roles. Like cooking
there needs to be a balance of everything in my opinion. Roles really need
to be used as they were designed “A role is a way to define certain
patterns and processes that exist across nodes in a Chef organization as
belonging to a single job function.”
It’s safe to say that if a new guy comes into my environment who is new to
chef and the culture of devops they can see how my environment looks
without having to dig into the chef recipes one by one.
On Tue, Jun 11, 2013 at 5:27 PM, Joshua Miller firstname.lastname@example.org:
We’ve moving towards “cookbooks in place of roles”. Not being able to
version lock roles is a real problem. Note that if you’re currently
relying on the role-level precedence you may need to rethink.
On Tue, Jun 11, 2013 at 12:35 PM, Ranjib Dey email@example.com wrote:
i use a combination of both, if i can achieve my customizations just by
means of attributes and aggregating recipes, i always prefer to use roles.
Its cleaner, by design roles does not allow any logic except attributes and
a run list. If i need anything more than this, i use cookbooks/recipes.
On Tue, Jun 11, 2013 at 12:31 PM, Larry Wright firstname.lastname@example.org:
A few months ago there was some discussion about using cookbooks as
containers in place of roles. This started with a blog post that advocated
always using cookbooks in place of roles, as I recall (though I can’t seem
to find it at the moment). Some discussions at work have got me to thinking
this might be a useful thing in some cases, so I’m wondering how many of
you are actually doing this and what you have found the pros/cons of this
approach to be.
Thanks in advance
Mobile: (845) 475-8744