Toumash / webcon-oneline-server

Vagrant webcon provisioning template
0 stars 1 forks source link

Figure out how to test chef recipes #5

Open Toumash opened 2 years ago

Toumash commented 2 years ago

Running chef from vagrant is super slow (2-5 minutes to vagrant up --provisoon)

We need a way to quickly run chef from the guest VM.

Running chef-zero.bat with cookbooks copied to C:\chef does not work.

The error message says we need a configuration file, but how to create it/pass it by cli arguments?

image

Toumash commented 2 years ago

I've found a working manual process. You have to copy the files, because for some reason running them from C:\vagrant crashes the chef.

  1. Copy the cookbooks directory somewhere
  2. cd into the directory
  3. run
    chef-client.bat --local-mode -o <recipe-name>

for example

chef-client.bat --local-mode -o webcon-prerequisites