Current as of Chef 11.8.2
Opscode bundle RubyInstaller DevKit with Chef as their embedded environment. RubyInstaller DevKit is a basically a packaging of MinGW/MSYS. It's intended for Chef internal use only and does not include everything we need (but it's close).
Knife-Solo dependencies:
- Chef
- A SSH server (communication)
- rsync (to transfer cookbooks etc)
Please note this is highly dependent on what Opscode bundle with Chef. These won't be supported by Opscode and could completely break your chef-client installation. Updates to Chef will likely remove rsync and it will need to be reinstalled. Opscode might stop using DevKit entirely without warning and break this whole technique.
You have been warned!
How to:
-
Install a SSHd. I use http://www.bitvise.com/winsshd because its install/configuration can be fully automated and I don't want cygwin or MingGW proper installed.
-
Optional: In your sshd change the default terminal shell when connected to be
C:\opscode\chef\embedded\bin\sh.exe
(or whatever chef's path is) (you can use another shell that's provided like bash if you like). -
Install MSYS
rsync
and it's dependencylibpopt
. These are available, pre-compiled, from the http://sourceforge.net/projects/mingw/files/MSYS/
Specificallyrsync-3.0.8-1-msys-1.0.17-bin.tar.lzma
andlibpopt-1.15-2-msys-1.0.13-dll-0.tar.lzma
are compatible.
http://sourceforge.net/projects/mingw/files/MSYS/Extension/rsync/rsync-3.0.8-1/rsync-3.0.8-1-msys-1.0.17-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MSYS/Extension/popt/popt-1.15-2/libpopt-1.15-2-msys-1.0.13-dll-0.tar.lzma/download
Download and extract them to toC:\opscode\chef\embedded\bin
-
Add
C:\opscode\chef\embedded\bin
andC:\opscode\chef\bin
to your PATH.
e.g.setx PATH "%PATH%;C:\opscode\chef\embedded\bin;C:\opscode\chef\bin" /m
-
You should be able to
knife solo cook
as you please.
Current issues and workarounds
- The version check i.e.
sudo chef-solo --version 2>/dev/null | awk '$1 == "Chef:" {print $2}'
returns an invalid result. To avoid you can specify the command line argument--no-chef-check
provisioning_path '~/chef-solo/
does not work for me. This is treated as being relative to the home directory so to workaround specify--provisioning-path='chef-solo'