- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: "Cluster" Management
- Date: Thu, 10 Apr 2014 09:38:54 -0700
What you’re describing is a distributed leader election problem. If I was
you, I’d manually manage a tag to pick the node that runs db setup and
migrations. If the leader leaves the cluster (hardware failure, etc.), then
tag a different node in the cluster with knife tag or something. If that ever
becomes a burden on your team, then you need to run zookeeper or similar to
get a really reliable leader election system that automatically handles
systems going down, race conditions, etc.
--
Daniel DeLeo
On Thursday, April 10, 2014 at 8:47 AM, Stewart, Curtis wrote:
>
We’re running a deployment of 3 rails app servers, and we only need one to
>
run the database setup.
>
>
What’s the best solution for allowing Chef to determine which app should
>
run the db:setup?
>
>
Is it safe to run a search for ‘role:app’, then only run db:setup if
>
current node is first node? We can even sort the search response to make
>
sure it’s always the same ordered response.
>
>
I’d love to hear your suggestions!
>
>
Thanks,
>
Curtis
Archive powered by MHonArc 2.6.16.