0

Regarding Chef Workstation best practices:

I currently am setting up a Chef Workstation on a windows 7 machine. In order to avoid Powershell scripts, I have my workstation setup on a VM running on Virtualbox.

When I attempt to use Chef's Testkitchen, Testkitchen attempts to spin up a sandbox environment using Vagrant + Virtualbox. Virtualbox running on Virtualbox = nested virtualization issue as Virtualbox does not support nested virtualization.

Am I correct in assuming here that in order to keep using Testkitchen and Vagrant + Virtualbox, I will either need to dual boot my current windows 7 machine or acquire an additional machine with a linux distribution as the native OS?

Thanks in advance for any feedback / recommendations on overcoming this hurdle in setting up my Chef Workstation environment.

StephenKing
  • 36,187
  • 11
  • 83
  • 112
J0991
  • 977
  • 2
  • 9
  • 16
  • What's your problem with Test-Kitchen on Windows? – StephenKing May 25 '17 at 17:39
  • I am just trying to avoid having to use Powershell. Am i correct in assuming that a Chef workstation on a windows machine would require quite a bit of powershell knowledge? I am much more familiar with linux (as is most the company I work for). – J0991 May 25 '17 at 18:08
  • No, not at all. You, in fact, _can only_ use powershell when running chef-client on a Windows machine. Just give it a try and install ChefDK on Windows and run `kitchen` (from powershell or good old `cmd`). – StephenKing May 25 '17 at 18:10
  • Sorry maybe I should be more clear. I am configuring linux machines using Chef. When the Chef Development Kit is installed on a windows machine, won't that require using Powershell (even though I'm configuring Linux machines with Chef)? – J0991 May 25 '17 at 18:12
  • No, why do you think so? You write the cookbooks in Ruby and they are executed on the Linux machines. Not sure what you think where powershell should kick in. Just give it a try, don't be afraid ;-) – StephenKing May 25 '17 at 18:39
  • I did try briefly before moving forward with my Linux workstation. Some problems I encountered include navigating directories, creating new files, etc.. Just general tasks I would have to do when using a Chef Workstation that is using the ChefDK for windows. Basic usage does not seem as straight forward (or atleast familiar), as Linux is to me. Am I misunderstanding how the ChefDK works on windows? – J0991 May 25 '17 at 18:45

1 Answers1

1

The expectation is that ChefDK is installed on your actual workstation, not a VM. You don't need Powershell specifically, you can use ChefDK just fine with bash from MSYS or cmd.exe if you prefer.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Thanks for the response coderanger. After installing the ChefDK for windows on my machine, I'm accessing Chef using the provided default shortcut. When the console launches, I can see "PS C:\Windows\system32", and am unable to use any of my familiar commands to do the work I need to (LL to list directory contents, touch to create files, etc.). Is there another way to access the terminal to use the ChefDK that I'm missing out on? – J0991 May 25 '17 at 19:41
  • Yes, just don't use that console shortcut. You can use your own console, just run stuff under C:\opscode\chefdk\bin or whatever the install path is. – coderanger May 25 '17 at 19:47
  • Awesome! Thanks for the followup. I will begin experimenting with ChefDK on a windows machine, however first I need to locate my installation path as you mentioned. I've reviewed https://docs.chef.io/install_dk.html, however didn't see anything particular to the install path. Do you have any tips on finding the install path for my ChefDK? – J0991 May 25 '17 at 20:10
  • Just open up your C drive and I'm sure you'll see it, either C:\Chef or C:\Opscode or something very similar to that. – coderanger May 25 '17 at 20:20