There are some nice things in that cookbook that I may rethink in my hosts cookbook.
However, the issue for specifying all the nodes in a cluster when running the bootstrap on a particular node remains.
The only solution I have come up with is to use a databag that describes each cluster and it’s nodes or to create a custom role for each cluster…
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Brad Montgomery
Sent: Friday, April 06, 2012 11:09 AM
Subject: [chef] Re: multiple clusters and attributes
We’ve got a recipe to do this… you create a role, and then an attribute that just lists all the hostnames. The recipe then looks up their ip addresses and writes the /etc/hosts file.
There’s probably a better way to do this, but this works for us.
You can see our recipe, here:
On Fri, Apr 6, 2012 at 9:05 AM, Van Fossan,Randy firstname.lastname@example.org wrote:
How are you guys handling attributes for multiple systems (like clusters)??
For example, in cluster, I need to be able to add all nodes in the
cluster to the /etc/hosts file on each cluster node. I am not sure
of the best method for setting / adding attributes for these entries
without creating something like a separate role for each cluster.
I already have a hosts cookbook to add additional entries if the
attribute has data. I just do not know how to populate that array
differently for different clusters.
Anyone have any suggestions or ideas?