- From: Aaron Abramson <
>
- To:
- Subject: [chef] Re: how to set up cluster that has dependencies?
- Date: Wed, 21 Sep 2011 20:18:54 -0600 (GMT-06:00)
The best thing to do would be to go through one of the getting-started
tutorials:
http://help.opscode.com/kb/otherhelp/build-a-lamp-stack
Watch that, follow along and deploy it yourself (if you have access to EC2),
or just read through it. It will give you a good idea on how nodes can query
and search within templates.
Look through the php-quick-start repo, the haproxy cookbook searches chef for
the apache nodes and updates the templates accordingly.
----- Original Message -----
From: "jeff stroomer"
<
>
To:
Sent: Wednesday, September 21, 2011 7:00:17 PM GMT -06:00 US/Canada Central
Subject: [chef] how to set up cluster that has dependencies?
Chef folks,
I have a question concerning the best way to use Chef to set up a cluster of
nodes that have dependencies on one another. (Apologies in advance if this is
a
naïve question, but I’m new to Chef.)
For concreteness, suppose I want node V to run varnish, node T to run
tomcat,
and node M to run mongo. And let’s say that T needs to know the IP address
of M, and V needs to know the IP address of T. I believe that each node can
register its IP address in a database maintained on the Chef server, and
recipes run by each node can query this database. For things to work
properly,
I ought to set up M first, then T, and finally V.
My question is this: How I should plan to use Chef so that the setup of
various
nodes happens in the right order? Do I write a recipe that sets up M first,
then T, and finally V? If so, then what is that recipe associated to? Or
should I instead have a recipe for V that sets up T, and also have the setup
recipe for T begin by setting up M? Or should I write recipes for T, M, and V
that query the database, and don’t do anything unless they can find the IP
addresses they need?
Jeff
- [chef] Re: how to set up cluster that has dependencies?, Aaron Abramson, 09/21/2011
Archive powered by MHonArc 2.6.16.