Chef Keys and their locations

Where should i keep these below keys in chef locations?
knife.rb
organization.pem
validation.pem
chef-validator.pem
client.rb
client.pem

workstation
C:\chef\ ?
C:\Users\raju\Desktop\chef-repo.chef\ ?

Node
C:\chef\ ?

Several of these files in question have a default location but many of them can live pretty much anywhere so long as you provide the correct flags. I’ll provide the defaults along with some guidance.

For a workstation:
knife.rb - c:\Users\$username\.chef is the deafult, if you have a .chef folder in your current working directory, chef looks in there first, then falls back to the user location.

For a node:
client.rb - C:\chef\client.rb
client.pem - C:\chef\client.rb

The pem files (keys) can live anywhere so long as the config, whether knife.rb or client.rb, points to them correctly. If values aren’t provided it said config, it expects these to be in the default locations. Unless you have good reasons to change them, probably best to just use the default. The docs have a page on Keys that talks about this in detail. There are is also a corresponding page just for client.rb and https://docs.chef.io/config_rb_knife.html.

In terms of normal operation the default locations should work just fine and the nature of many of the operations means you shouldn’t really have to think about the locations assuming the config file is setup correctly. If you have a a more specific question regarding issues with locations or a problem you are encountering, feel free to ask here or join us in the Chef Community Slack.

-cheeseplus

Hey, thank you.