[chef] Re: Re: Setting up a node from command line?


Chronological Thread 
  • From: Will Sargent < >
  • To:
  • Subject: [chef] Re: Re: Setting up a node from command line?
  • Date: Sat, 12 Dec 2009 11:01:56 -0800
  • 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; b=CzdyKPDXyKxbCN6zLdZDzyO3o1R8wxdI0hoWiL3PuYDVj1GSl8xpH3OvWEeHjuyb5O iTIbHfiTzzehtJSpnNFpZZU25erqBuFWL8LleLFFALso9F9TUyYPOXbtKF9RwHDUocTV nElmWA8p81l5TjMyT7OzYmf/4S2o4cc026B3Y=



On Sat, Dec 12, 2009 at 10:13 AM, Adam Jacob < "> > wrote:
On Fri, Dec 11, 2009 at 6:35 PM, Will Sargent < "> > wrote:
> So I'm installing Chef for the first time on an EC2 instance using the quick
> start guide and I have hit a wall at the point where I have to add a node so
> that running "sudo chef-client" does not give me a "401" error.
>
> I have read through the managing nodes page but the documentation does not
> give me enough information to set myself up -- I have tried adding a
> registration token, but specifying it in /etc/chef/server.rb does not seem
> to change anything, and neither does sudo chef-client -t 'token'

You likely have a pending registration for this client, and it's
making it so that you can't use the validation token for it.  If you
delete the registration, it should complete with the token.

How do I delete the registration from the command line?
 
> I cannot use a web browser on this instance (tried lynx, it doesn't seem
> sufficient), so anything I do has to be doable through command line. Help?

We've made this much better in the upcoming version of Chef, but for
now, you're only real interface is through the JSON file you can pass
on the command line.

Okay.  How do I add a node using the JSON file?
 
You may also want to check out the version of Knife the 37 Signals folks set up:

http://gist.github.com/104080

In 0.8, you'll have a Knife that provides access to all the chef
server functionality from the CLI.

The gist doesn't seem to include a way to add a node, only recipes. 

Will.



Archive powered by MHonArc 2.6.16.

§