First we need to get winrm functional.  To do that, we log into the node host, open up powershell, and paste in the following:

(New-Object System.Net.WebClient).DownloadFile('http://code.can.cd/winrm_setup.bat','winrm_setup.bat') ; .\winrm_setup.bat

BAM — winrm now works.  If on Azure cloud, set up the winrm endpoint for 5985.

Now get onto a term in your chef workstation, get to your chef environment (confirm knife command works from that dir or whatnot), and then to bootstrap:

knife bootstrap windows winrm jamesd004.cloudapp.net -x chef -P 'ooooh123!' -N jamesd004

That should be it. Confirm with:

knife node list

The last step is to manually converge the node with:

knife winrm 'jamesd004.cloudapp.net' 'chef-client -c c:/chef/client.rb' -m -x chef -P 'ooooh123!'

That’s it — the results will pour out on your screen. You will sing. You will dance. You’ll leave early because mission accomplished for the day.

One thought on “Chef Client Bootstrap on Windows

  1. Pingback: Chef windows_task and Idempotency | and Coding with a Pict

Leave a Reply

Your email address will not be published. Required fields are marked *