I've installed "Chef Workstation" (which appears to have replaced "ChefDK" for local machined, but is largely undocumented, and I suppose new?) by downloading its Windows installer manually and running it.
I've run the
chef generate cookbook first_cookbook
command suggested by an old tutorial that hasn't been otherwise helpful (as it largely refers to something called 'knife', for hosted installations, I think?)The output of that command suggested looking into the "delivery" command (which appears do be, again, undocumented, unless I take a 'course' from the Chef team?) to execute the cookbook. After a little experimentation, it looks like I need
delivery local acceptance
to get the cookbook to run on my laptop; but that throws a bunch of errors relating to Vagrant (which no tutorial, documentation, or message suggested was a prerequisite for Chef!?)ELLIOTTCABLE@Xenia-Windows ~/first_cookbook (master) λ delivery local acceptance Chef Delivery Running Acceptance Stage Running Provision Phase -----> Starting Kitchen (v1.24.0) >>>>>> ------Exception------- >>>>>> Class: Kitchen::ShellOut::ShellCommandFailed >>>>>> Message: Expected process to exit with [0], but received '1' ---- Begin output of vagrant --version ---- STDOUT: STDERR: 'vagrant' is not recognized as an internal or external command, operable program or batch file. ---- End output of vagrant --version ---- Ran vagrant --version returned 1 >>>>>> ---------------------- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also try running `kitchen diagnose --all` for configuration Phase failed with exit code (1)!
If so, this is a problem for me, that I'm not sure how to circumvent - my end-goal being, of course, to set up new machines in two steps (install Chef, run script from the 'net.) Vagrant's a pretty big prereq!
Other tutorials suggest using
chef-client -z
for a similar purpose. That doesn't pan out, either - whether in the directory created by 'chef generate', or the parent directory thereof, it seems unable to find the cookbook I just generated:Missing Cookbooks: ------------------ No such cookbook: first_cookbook Expanded Run List: ------------------ * first_cookbook