Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (31 sloc) 1.68 KB
layout title author comments categories tags
Setting Up A Windows Workstation for Chef Development - The Easy Way

The Old Way

I've got a longer post about building a cookbook to set up for Chef development. This felt kludgy and hard to maintain, so I played around a little bit.

The New Way

Now, I've got a couple of snippets that get me pretty well on my way.

First (from PowerShell), some basic ExecutionPolicy configuration. Then install the latest ChefDK and Chocolatey. After that, apply a basic Chef recipe to install Git, ConEmu, Visual Studio Code, 7Zip, WinMerge, and Vagrant.

# Setup my execution policy for both the 64 bit and 32 bit shells
set-executionpolicy remotesigned
start-job -runas32 {set-executionpolicy remotesigned} | receive-job -wait

# Install the latest stable ChefDK
invoke-restmethod '' | iex
install-project chefdk -verbose

# Install Chocolatey
invoke-expression ((new-object net.webclient).DownloadString(''))
choco feature enable -n allowGlobalConfirmation

# Get a basic setup recipe
invoke-restmethod '' | out-file -encoding ascii -filepath c:/basic.rb

# Use Chef Apply to setup 
chef-apply c:/basic.rb

After Visual Studio Code is installed, you'll want to install a couple of handy extensions: