2

I'm very inexperienced with Windows. I'm trying to set up Chef, such that I can avoid duplicating a bunch of "initial setup tasks" everytime I install Windows on a machine, as a developer (enable Windows Subsystem for Linux, install Chocolatey, install VS Code and FireFox ... .)

Unfortunately, I'm entirely unable to find any documentation about this.[1]

  1. 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.

  2. 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?)

  3. 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!

  4. 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
    

tl;dr can someone walk me through the exact steps to: A. install Chef for local usage; B. create a script I can git-version that installs, say, FireFox; and C. immediately run that on the machine I just typed it on?


(Thank you so much ahead-of-time for y'all's help, I'm so very lost! I haven't felt this much like a beginner in, like, 15 years of software development. ;_;)

  1. It looks like Chef has gone extremely "enterprisey" since I last glanced at it, years ago. If I want a "webinar" tutorial-session to learn four hours of their opinions on how DevOps should be conducted, or how to use their hosted service, or how to setup an extremely complicated automation system involving multiple servers and clients configuring eachother, I'm well-served. If I literally just want to install Chef, and configure it to install a single Chocolatey package, ... I'm apparently out of luck, because that process seems to be entirely undocumented, except in out-of-date blog-posts from 2011. :P

0

You must log in to answer this question.

Browse other questions tagged .