matschaffer / knife-solo

DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas
MIT License
786 stars 213 forks source link

Website docs for Windows mismatch with actual supported SSH server type #500

Open sgtcoolguy opened 7 years ago

sgtcoolguy commented 7 years ago

Looking at https://matschaffer.github.io/knife-solo/#label-Windows+support I'm told to install an SSH server, and then cygwin and rsync. I did so, but I chose to use the Microsoft port of OpenSSH natively, as the docs didn't indicate I needed to install cygwin's openssh.

I managed to get the SSH server up and running and can connect from my Mac OS X box, but knife solo cook fails because it expects a cygwin bash shell with sudo, while the MS OpenSSH port gives you a Powershell based session. It's basically hanging on the chef version check, because it runs the command under sudo and there is no sudo. (No idea why it doesn't flat out fail)

matschaffer commented 7 years ago

Thanks for the report @sgtcoolguy - @tknerr is my source of all chef-related windows knowledge at this point so maybe he can help out.

I'd be fine tweaking the cygwin stuff if MS OpenSSH is getting to be the way to do SSH on windows these days.

tknerr commented 7 years ago

Not so much experience with bootstrapping windows nodes (I try to avoid them as much as I can ;-)), I was working mostly with chef on windows clients (which I also try to avoid ;-P)...

Windows nodes are tricky, not even sure whether the usual windows baseboxes have cygwin installed by default.

Just some thoughts:

Not really any good ideas, sorry :-/

tknerr commented 7 years ago

Well actually, I found something related in one of my repos ;-) https://github.com/tknerr/vagrant-managed-servers#windows-support

This is a vagrant plugin for interacting with actual servers (i.e. not VMs) where you can connect to via SSH (Linux nodes) / WinRM (windows nodes), but don't have control over their lifecycle (i.e. destroy, create do nothing).

It assumes WinRM as the communication mechanism for windows nodes (doesn't support SSH), and uses SMB / WinRM for uploading / folder sync by default, with rsync as a last resort.

The windows support has been mostly contributed by @chrisbaldauf, so he might have some more insights.

HTH