- From: dreamcat four <
>
- To:
,
- Subject: [chef] Re: Re: Ideas on kickstarting a node and auto-applying a role
- Date: Fri, 14 May 2010 20:48:04 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=t07uox7vRkRtcoqSd3fSzoleMBPJrE3D3nhOVmqU54xqRBJbWVCTUKkuS7rA/3RkeE 8rklj8VnuZSMTTawhACV//qgk1iWdXE1Vreebj69DbwddfkFCG7q5MPcb0iZAJGaAsUL g05O0FIen1QeO7Hi3XzRaKeaCz6LF/SuqHdaw=
On Fri, May 14, 2010 at 7:37 PM, John Merrells
<
>
wrote:
>
I have a separate piece of code that is driven by a data file that maps
>
virtual hosts onto virtual servers onto physical machines. The code sets up
>
the name servers, creates the machines through my hosting provider API and
>
sets up the roles for the servers in chef. You can
Any opportunity to see this script? It sounds worth looking at.
:)
actually create the nodes before the client actually connects for the
first time. The common key between the virtual and the physical is the
hostname of the machine. I know what the machine name will be e.g
'webserver6' and the boot script names the machine that before the
chef client code is installed.
>
>
> It's the manual application of role(s) to the newly created node that I
>
> would like to see automated. I don't think there's a way in Chef to set a
>
> rule saying, "if a host is in 10.1.12.* subnet, apply role[a], role[b],
>
> role[z], etc". If I can figure out this last step, life would be just
>
> awesome. :)
>
>
>
You might be able to do this by writing some ruby code in a role file.....
>
I'm not sure how the chef client determines which cookbooks to download
>
from the server... it might be static.... others on the list can probably
>
answer this.
>
>
However, I'd have thought that basing roles on ip addresses is going to
>
remove some flexibility that you might need later on.
>
>
John
>
>
--
>
John Merrells
>
http://johnmerrells.com
>
+1.415.244.5808
>
>
>
>
>
>
>
Archive powered by MHonArc 2.6.16.