Search code examples
salt-project

Salt-Stack control from Windows


I run Windows and I'd like to use Salt-Stack to configure an Ubuntu VirtualBox development/test environment on this Windows box and later deploy and control production Ubuntu boxes, preferably controlled from said Windows machine.

I'm new to Salt-Stack and it seems running a Master is not supported on Windows (only a Windows Minion).

There is a tool called salt-ssh which recently became production ready. I'd also rather not have Salt-Minion services running, so this sounds great. I'm not sure if this is supported on Windows (and would guess it isn't), but it sounds plausible that if it is using SSH it could work on Windows. I tried to install it using pip2

pip2 install salt-ssh
pip2 install pypiwin32

I set up a roster file and try something like:

salt-ssh wpbox2 test.ping

but get an error:

PicklingError: Can't pickle <function file_list at 0x03173B70>: it's not found as salt.loaded.int.fileserver.roots.file_list

I'm not sure if I am missing anything, or this means it doesn't work on Windows.

I was interested to know if Salt-Stack can be controlled from Windows, or whether my only choice is to use another Linux VM for a Master, or create a script to self install Salt-Stack in a masterless fashion each time and control it via SSH.

Edit:

this command does not work on Windows:

salt-ssh --roster-file='c:/etc/salt/roster' '*' test.ping

result:

No hosts found with target '*' of type glob

but this does work on Ubuntu (different name to make sure it is not default for roster, but the same contents):

salt-ssh --roster-file='/etc/salt/roster2' '*' test.ping

Solution

  • salt-ssh isn't supported on Windows yet, unfortunately. We do hope to get it working on Windows eventually, but there are a few technical hurdles we need to overcome first.

    Since you're using virtual box, this vagrant repo should work for you to spin up a Salt master and 2 minions.

    https://github.com/UtahDave/salt-vagrant-demo