[chef] Re: Re: Re: Re: Re: Ideas on kickstarting a node and auto-applying a role


Chronological Thread 
  • From: Paul Choi < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Ideas on kickstarting a node and auto-applying a role
  • Date: Thu, 20 May 2010 22:44:51 -0700
  • Organization: Plaxo, Inc.

Hi Gilles,

Actually, I'm really interested in what others have to say about this idea, so thanks for your input.

Bryan McLellan responded saying you can do "chef-client -j <json file>" to apply a role from a node.
So, in my kickstart script's %post section, I have:
  curl http://<blah>/cgi-bin/chef_role.cgi?<node fqdn> > /tmp/role.json
  chef-client -j /tmp/role.json

And chef_role.cgi is just a little perl script I wrote that takes the hostname and spits out role/cluster assignment.

I did think about maybe setting up knife on each host. Or using Chef::REST with an admin user's client PEM cert on the node, but I thought I'll just do "chef-client -j", since it at least works for me. :)

-Paul


On 5/20/10 10:34 PM, Gilles Devaux wrote:
Ouch, old thread, sorry.

What we have at peerpong is a very simple boot.sh sitting on the
image. You still have to log in, run boot.sh ->  this registers the
node on the chef server. then go on the server UI, apply roles to the
new node.

I guess it would not be difficult to apply roles for the new machine
from boot.sh using knife though. Command line would look like
./boot.sh [database|app||...]

Might spend some time on that tomorrow actually :)

--Gilles

On Sun, May 16, 2010 at 6:41 PM, Cameron 
Pope< >
  wrote:
For what it's worth, I've been using PoolParty
(http://auser.github.com/poolparty/) to define multi-machine deployments on
EC2 and I've found that it works pretty well. There have been a few quirks
but it's under active development.

Cheers!
-Cameorn

Cameron Pope









Archive powered by MHonArc 2.6.16.

§