[chef] Re: Re: Re: Starting out with the opscode platform.


Chronological Thread 
  • From: Edward Sargisson < >
  • To:
  • Subject: [chef] Re: Re: Re: Starting out with the opscode platform.
  • Date: Sun, 29 May 2011 19:47:52 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=GPeAUYvajYy+z0+mOwdU/C2n5m/cUi2KRqtomZ8+OsN3OAMOW6AwlecsurblXERWaH +tKcDPXmgr3T+w59C+gKDmh1iR5qz4DL1v9/0qyIEHULdHzIdG9aBJ1j+JmshNxZ18WU ALVCI3hVu/A/eeASZCC+H58czT/4CFQrnIMVM=

No dumb questions - only unasked ones. Genuinely - chef is a different
model so ask questions.

I would ask why you need to set the ip address and host name and where
else could you put it?

If you've only got a couple of actual nodes then, by all means, set
the details in a recipe. But the point of chef is that you can manage
hundreds or thousands of nodes.

So I don't think your roles and recipes should care about the actual
IP address - just that there is one. However, presumably some other
server needs to know what the ip address is (the load balancer needs
to know about the app servers, say). This means you need to write
something to find it. You could have your nodes register with the DNS
server or you could call an API on your load balancer. Lastly, your
load balancer could query chef to find out what IP addresses it needs.
I've not used it but Chef has a search function so you could write
something that looks for all nodes with the app-server role. In the
load balancer chef recipe you iterate that list and write a config
file with it.

On Sun, May 29, 2011 at 7:30 PM, Tim Uckun 
< >
 wrote:
>>
>> If you have some custom setup (most people do) then you would create a
>> new recipe to do that and include it in the relevant role.
>>
>
> How about highly specific parameters like IP address etc.
>
> I am sorry if this is a dumb question but I am coming from puppet and
> I guess I still have that the puppet way of doing things in my head.
>
> Normally I set up my node and set some variables like
>
> $ip_address = 'blah'
> $host_name = 'blah'
>
> Then I might have individual resources for this node alone like
>
> file :some_file { ...}
>
> This along with the inheritance of other common roles defines the
> state of the node.
>
> I am wondering where that configuration takes place in the chef node.
> From what you guys are saying it sounds like I need to create a role
> for the server right?
>



Archive powered by MHonArc 2.6.16.

§