[chef] Environmental state

Chronological Thread 
  • From: Geoff Meakin Acid < >
  • To:
  • Subject: [chef] Environmental state
  • Date: Tue, 6 Sep 2011 12:45:36 +0100

Hi Chef community,

I am very new to chef and have succeeded in setting up a bunch of nodes how I like them in chef0.10 using roles and your most excellent community cookbooks

I wonder if somebody could point me towards the right way of doing the following…

Suppose I have a loadbalancing http service - e.g. nginx/apache, and want to loadbalance to all my nodes with the 'applicationserver' role. The loadbalancer needs to know the names or IPs of those machines so that it can configure itself consistently with how many appserver nodes there are. As I take appservers up and down (e.g. elastically), the loadbalancer should reconfigure itself accordingly.

Can someone help me by suggesting how to manage this "environmental state" in chef? How can the loadbalancing node know how many nodes have the 'appserver' role applied to them, what they are, and use that information to configure its files/templates?

Thanks in advance



Archive powered by MHonArc 2.6.16.