I’m trying to bootstrap a node. I can’t use knife to bootstrap for governance concerns. what I did is:
- Install chef client chef-client-14.1.12-1-x64.msi
- configure c:\chef\client.rb
chef_server_url 'https://*************************/org-name'
validation_client_name 'org-name-validator'
validation_key 'c:\chef\org-name-validator.pem'
node_name 'HOSTNAME'
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
- Run chef-client command.
The same process works well on Linux. But on Windows, it came back with below error messages:
PS C:\Chef> chef-client.bat
Starting Chef Client, version 14.1.12e[0m
Creating a new client identity for HOSTNAME using the validator key.e[0m
[2018-06-01T03:16:20+00:00] WARN: Failed to read the private key C:\chef\validation.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - C:\chef\validation.pem>
[2018-06-01T03:16:20+00:00] WARN: Failed to read the private key C:\chef\validation.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - C:\chef\validation.pem>
Apparently, the configuration parameter “validation_key” in client.rb didn’t work. chef-client is looking for the default validator key
I’ve tried to change the name of the validator key file name to validation.pem. the chef-client was then trying to look for chef server at localhost.
Tried it on multiple systems including one fresh built windows server 2016. same error. Must be some configuration I missed. Anyone can help?