Once you have uploaded the policy to server, now you are ready to try out your Chef Desktop cookbook on your first test node. Before you begin, you need to:
client.rb file with the basic information needed to connect to the Chef Infra Server instanceFrom your workstation, configure the server and the client.rb file for your node. S90T7HK2 is an example node serial number.
Create a local client.rb file with settings similar to:
validation_client_name 'my_org-validator'
validation_key File.expand_path('c:\chef\my_org-validator.pem')
chef_server_url "https://my.fqdn.com/my_chef_server_instance"
ssl_verify_mode :verify_peer
local_key_generation true
rest_timeout 30
http_retry_count 3
chef_license 'accept'
node_name 'S90T7HK2'
C:\> knife node create S90T7HK2
Created node [S90T7HK2]
Use knife node policy set to apply the policy to a node.
Use the name of the policy specified in the Policyfile.rb that was uploaded to the Chef Infra Server.
knife node policy set S90T7HK2 'Windows_Node_Policy_Group' 'desktop-config'
Go to your test node and install the Chef Infra Client from an elevated PowerShell window, or use sudo if you are installing it from MacOS. For additional information, see the Chef Install Script documentation.
. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef
curl -L https://omnitruck.chef.io/install.sh | sudo bash
After Chef Infra Client finishes installing, copy the client.rb file with the correct data for your node and Chef Infra Server, and place that in c:\chef.
Then copy the validator.pem file you downloaded from your Chef Infra Server at the beginning of the guide and put it in the same folder.
Run the client:
chef-client
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/desktop/nodes/