|
I have been brainstorming on how to build groups functionality into Chef and the best ways to do it. My thinking is that there are two types of groups, mixed groups and configuration groups. Mixed groups are a collection of machines, such as a group of machines that provide a LAMP stack for a website. They are a group because they combine to form a operational unit. Configuration groups are groups that have identical configurations (outside of specific attributes like ip address), such as a group of load balanced web servers. They all have the same configuration and are generally reconfigured as a whole. Additionally what I mean by "configuration" is a combination of roles, cookbooks, recipes. Here's where it gets tricky and fun, mixed groups can contain configuration groups since you may be have a load balanced web server setup for the hypothetical LAMP stack. Hypothetically one could write a cookbook that says "if this machine is in the X configuration group and the Y mixed group do Z". I think this type of hierarchy may lead to some interesting things (inheritance?). Nodes would have attributes stating the groups that it belongs to and there would also be docs in couch stating which the group and its contents whether it be nodes or configurations.
As I mentioned this is still brainstorming so I would be grateful for feedback before I start digging into the code.
(JIRA Ticket: http://tickets.opscode.com/browse/CHEF-498)
|
2 Comments
comments.show.hideAug 21, 2009
Joe Williams
Per an IRC conversation with BTM, I think nested roles should do the trick for the "configuration groups". Additionally Adam suggested "templates" for bulk assignment of cookbooks to machines. I think both of these will do pretty much what I am thinking is needed.
Aug 21, 2009
Joe Williams
Closed 489 and opened two separate tickets for "templates" and nested roles.
http://tickets.opscode.com/browse/CHEF-505 http://tickets.opscode.com/browse/CHEF-506