How to Setup Remote node to talk to chef server from the remote node?

Community,

I normally run bootstrap from the chef workstation and I know there is a lot of configuration that is done in the background that I am not normally required to do. In this case I am tasked with installing chef-client directly on the remote node and need to know how to perform this task needed to get the remote node configured and registered properly to the chef server.

I found this information here, but it does not explain how to configure the client to talk to the chef server. Can someone provide the link that explain how to get the remote node properly configured to and registered to the chef server from the remote node?

https://docs.chef.io/install_windows.html

Thank you,

Are you using?

Example:

knife bootstrap windows winrm "IPADDRESS" -N "HOSTNAME" --winrm-user “USER” --winrm-password “PASSWORD” --run-list 'role[system]' --environment production --bootstrap-version 14.12.9

If you add: include_recipe 'chef-client::default' to your runlist it will take care of scheduled task for chef client.

In this case I can not boot strap the remote system. So I am trying to do this process in reverse meaning manually install chef-client on the remote node and configuring the node to be able to accept communication from the chef server. If I need to copy over certain files and directories from an existing remote node I'd need to know all those steps.

At the moment I am having issues trying to figure out how to generate a new C:\chef\client.pem file as it appears to be different for each machine.

For a manual install:

  • Install Chef Infra Client
  • Create/copy client.rb with unique node name and matching your org validation
  • Copy validation.pem file from your Chef Server
  • Create JSON file with initial run list
  • Run Chef Client with run list from JSON file

This is essentially what the bootstrap operation does, except it downloads and installs the Chef Client for you. Make sure to delete the validation.pem file after you're done; that would let a malicious actor register nodes with your Chef server!

I am trying this now. I also found this site: https://stackoverflow.com/questions/24788920/chef-clients-and-validators