I’m trying to create an auto bootstrap script that will install the chef client msi, dynaically create the client.rb file and add the necessary paths. When I run chef-client at the end of my script I get the following error.
INFO: Client key C:\chef\client.pem is not present - registering
FATAL: OpenSSL::X509::CertificateError: nested asn1 error
The knife bootstrap windows (I assume this is what you are referring to when bootstrapping over winrm) uses the client key on the local workstation or a validator key and uploads it to the node.
For these kinds of auto bootstrapping scenatrios, you need to have a validator key on the node in order for it to obtain a client.pem. The link to the unattended install docs below should walk you through that.
You have to create just the bootstrap DataBag and n DataBag Items for each Node you want to bootstrap.
When you use the Item syntax from the readme file you’ll see it’s pretty easy.