Can same chef-client node communicate with multiple chef-server

Hi

I have a one virtual machine that already manage by some organisation
chef-server . but i also want same node chef-client also communicate with
my own chef-server .

so is it possible that same node can communicate with multiple chef-server
? and if yes
please send me the steps.

Regards
Prateek

Hi

I have a one virtual machine that already manage by some organisation chef-server . but i also want same node chef-client also communicate with my own chef-server .

so is it possible that same node can communicate with multiple chef-server ? and if yes
please send me the steps.

Regards
Prateek

Yes it is possible, there’s multiples ways to do it but it sounds highly counterproductive and dangerous.
The aim of chef is to describe your system state, if you make a node asking 2 separate referential you can’t be sure of it’s state after a bunch of run.

First idea: create 2 ‘client.rb’, named by the target server to know who’s who. In those config files, target a separate client.pem (you can name it with client_key parameter).

You may use the same key on both servers but I highly discourage it as it would mean updating both server if you rotate the client key and this open the door to hard to diagnose problems, pointing to the wrong server should error out.

To avoid repeating yourself, you may use a single configuration file and use environment variables in it to point to a different server and use a specific key. Example with knife.rb here can be adapted.

Useful doc links:
https://docs.chef.io/config_rb_client.html
https://docs.chef.io/config_rb_knife.html

1 Like