- From: o haya <
>
- To:
, Noah Kantrowitz <
>
- Cc:
- Subject: [chef] Re: "Just" register a Chef node ?
- Date: Thu, 16 Jul 2015 05:31:45 -0700
Hi Noah,
I wanted to try what you were suggesting. This was with CENTOS node
(node6.whatever.com), which was NOT already registered in the Chef server.
On the node, I have /etc/chef/client.rb:
log_location STDOUT
chef_server_url "
https://chefserver.whatever.com/organizations/chefadmins"
validation_client_name "chefadmins-validator"
node_name "node6.whatever.com"
trusted_certs_dir "/etc/chef/trusted_certs"
and validation.pem is in the same dir (/etc/chef).
I ran the command from my Chef workstation:
knife ssh 'name:node6.whatever.com' 'sudo chef-client -o
recipe[mycookbook::xx_server]' -x root -P xxxxxxx
I got this error:
FATAL: No nodes returned from search!
Maybe I misunderstood what you said, or am missing something?
Thanks,
Jim
--------------------------------------------
On Sun, 7/12/15, Noah Kantrowitz
<
>
wrote:
Subject: Re: [chef] "Just" register a Chef node ?
To:
Cc:
Date: Sunday, July 12, 2015, 12:17 PM
On
Jul 12, 2015, at 9:09 AM, o haya
<
>
wrote:
>
Hi,
>
>
Assuming the machine
already:
>
>
- Has
the Chef client software installed
>
-
Has client.pem removed
>
- Has client.rb
with "node_name" being empty
>
>
Does Chef provide a way/tool to
remotely cause that machine to be registered as a Chef node
(initiated from a centralized machine)?
>
>
This would be for both Windows-based
and Linux (CENTOS-/Redhat-) based machines.
>
>
I know that we can
do "knife bootstrap", but in our case, we
don't want to push the Chef client software to the node
machines, but rather want to pre-provision the node machines
with the Chef client software and just be able to cause the
node machines to register as Chef nodes. Something like
having a "knife bootstrap", but where the
bootstrap process would not include pushing the Chef client
software to the node machine(s), would be perfect.
Knife bootstrap is already
idempotent, if chef-client is present on the machine it will
not reinstall it. If you are working with something like an
autoscaling, you can use the validator key bootstraps. Get
the key for your org's validator client and put it in
something like /etc/chef/validator.pem, and set the
validator key path and client name in your client.rb when
you bake your images. The first time chef-client runs it
will use this to register with the server automatically.
--Noah
- [chef] "Just" register a Chef node ?, o haya, 07/12/2015
- [chef] Re: "Just" register a Chef node ?, Noah Kantrowitz, 07/12/2015
- [chef] Re: "Just" register a Chef node ?, o haya, 07/16/2015
- [chef] Re: "Just" register a Chef node ?, Andrew Brown, 07/12/2015
- [chef] Re: "Just" register a Chef node ?, Tracy Phillips, 07/13/2015
- [chef] Re: "Just" register a Chef node ?, Nico Kadel-Garcia, 07/15/2015
- [chef] RE: "Just" register a Chef node ?, Benzinger, Dennis, 07/15/2015
Archive powered by MHonArc 2.6.16.