- From: Brad Knowles <
>
- To:
- Cc: Brad Knowles <
>
- Subject: [chef] Re: Re: Setting up hosts between multiple boxes on EC2
- Date: Sun, 20 Nov 2011 08:38:28 -0600
On Nov 20, 2011, at 8:31 AM, Matt Ray wrote:
>
You'll want to take a good look at how Chef utilizes search within
>
recipes. Rather than try to manage dns, you use search in the recipes
>
for your "app1" to find the machines that have the recipe or roles
>
that identify your "db1" machine (and vice versa). Many recipes do
>
this sort of work, load balancers looking for web apps, clients
>
looking for servers and workers looking for masters. IMHO, it's one of
>
the cooler features of working with Chef.
And I've recently gotten this sort of thing working with the "shorewall"
firewall toolkit. I can tell you that it feels like a pretty good
achievement when you finally get something like this working on your own, for
the first time.
As I understand it, one thing to be concerned about with regards to using
data bags is that you don't want to have multiple nodes potentially writing
to the same data bag at the same time -- that could cause a race condition in
writing the data bag contents back to the chef server, which might cause data
to be lost.
So, if you were in a situation where you wanted to use search to populate the
data bags and then be more circumspect about when information is purged from
the data bags, then you would want to have that process done by a back-end
monitoring server, and have read-only access to the data bags on all the rest
of the nodes.
--
Brad Knowles
<
>
SAGE Level IV, Chef Level 0.0.1
Archive powered by MHonArc 2.6.16.