2012-04-26 05:11:09 +00:00
=======
2012-03-20 03:09:35 +00:00
Windows
2012-04-26 05:11:09 +00:00
=======
2012-03-20 03:09:35 +00:00
2013-01-07 21:27:16 +00:00
Salt has full support for running the Salt Minion on Windows.
2012-03-20 03:09:35 +00:00
2014-01-06 23:07:26 +00:00
There are no plans for the foreseeable future to develop a Salt Master on
Windows. For now you must run your Salt Master on a supported operating system
to control your Salt Minions on Windows.
2012-03-20 03:09:35 +00:00
2014-01-06 23:07:26 +00:00
Many of the standard Salt modules have been ported to work on Windows and many
of the Salt States currently work on Windows, as well.
2012-03-20 03:09:35 +00:00
2013-10-15 08:47:37 +00:00
2013-01-07 21:27:16 +00:00
Windows Installer
=================
2014-04-18 00:41:15 +00:00
Salt Minion Windows installers can be found here. The output of `md5sum <salt
minion exe>` should match the contents of the corresponding md5 file.
2013-01-07 22:19:34 +00:00
.. admonition :: Download here
2014-04-17 06:43:19 +00:00
* 2014.1.3
2014-04-18 00:39:34 +00:00
* `Salt-Minion-2014.1.3-win32-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-win32-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-win32-Setup.exe.md5> `__
2014-04-21 00:37:59 +00:00
* `Salt-Minion-2014.1.3-AMD64-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-AMD64-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-AMD64-Setup.exe.md5> `__
2014-04-17 06:43:19 +00:00
2014-03-31 20:27:54 +00:00
* 2014.1.1
2014-04-21 00:37:59 +00:00
* `Salt-Minion-2014.1.1-win32-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.1-win32-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.1-win32-Setup.exe.md5> `__
* `Salt-Minion-2014.1.1-AMD64-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.1-AMD64-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.1-AMD64-Setup.exe.md5> `__
2014-04-18 00:39:34 +00:00
2014-03-31 20:27:54 +00:00
2014-02-25 22:00:47 +00:00
* 2014.1.0
2014-04-21 00:37:59 +00:00
* `Salt-Minion-2014.1.0-win32-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.0-win32-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.0-win32-Setup.exe.md5> `__
* `Salt-Minion-2014.1.0-AMD64-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.0-AMD64-Setup.exe> `__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.0-AMD64-Setup.exe.md5> `__
2014-02-25 22:00:47 +00:00
2014-02-14 23:51:05 +00:00
* 0.17.5-2 (bugfix release)
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.5-2-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.5-2-AMD64-Setup.exe
2014-02-14 23:51:05 +00:00
2014-02-14 08:45:48 +00:00
* 0.17.5
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.5-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.5-AMD64-Setup.exe
2014-02-14 08:45:48 +00:00
2013-12-26 18:55:33 +00:00
* 0.17.4
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.4-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.4-AMD64-Setup.exe
2013-12-26 18:55:33 +00:00
2013-11-15 00:09:12 +00:00
* 0.17.2
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.2-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.2-AMD64-Setup.exe
2013-11-15 00:09:12 +00:00
2013-10-29 00:33:36 +00:00
* 0.17.1.1 - Windows Installer bugfix release
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.1.1-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.1.1-AMD64-Setup.exe
2013-10-29 00:33:36 +00:00
2013-10-18 07:24:37 +00:00
* 0.17.1
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.1-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.1-AMD64-Setup.exe
2013-10-18 07:24:37 +00:00
2013-10-08 17:31:19 +00:00
* 0.17.0
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.0-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.17.0-AMD64-Setup.exe
2013-10-08 17:31:19 +00:00
2013-08-12 00:02:51 +00:00
* 0.16.3
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.3-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.3-AMD64-Setup.exe
2013-08-12 00:02:05 +00:00
2013-08-02 17:09:10 +00:00
* 0.16.2
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.2-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.2-AMD64-Setup.exe
2013-08-02 17:09:10 +00:00
2013-07-02 17:44:26 +00:00
* 0.16.0
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.0-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.16.0-AMD64-Setup.exe
2013-07-02 17:44:26 +00:00
2013-06-03 18:05:10 +00:00
* 0.15.3
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.15.3-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.15.3-AMD64-Setup.exe
2013-06-03 18:05:10 +00:00
2013-04-16 00:58:15 +00:00
* 0.14.1
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.14.1-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.14.1-AMD64-Setup.exe
2013-04-16 00:58:15 +00:00
2013-03-25 04:37:57 +00:00
* 0.14.0
2014-04-17 23:42:33 +00:00
* https://docs.saltstack.com/downloads/Salt-Minion-0.14.0-win32-Setup.exe
* https://docs.saltstack.com/downloads/Salt-Minion-0.14.0-AMD64-Setup.exe
2013-03-25 04:37:57 +00:00
2014-01-08 03:06:43 +00:00
.. note ::
The executables above will install dependencies that the Salt minion
requires.
2013-01-07 21:27:16 +00:00
2013-01-28 19:49:41 +00:00
The 64bit installer has been tested on Windows 7 64bit and Windows Server
2008R2 64bit. The 32bit installer has been tested on Windows 2003 Server 32bit.
2013-07-03 02:23:44 +00:00
Please file a bug report on our GitHub repo if issues for other platforms are
2013-01-28 19:49:41 +00:00
found.
2013-01-07 21:27:16 +00:00
The installer asks for 2 bits of information; the master hostname and the
minion name. The installer will update the minion config with these options and
then start the minion.
The `salt-minion` service will appear in the Windows Service Manager and can be
started and stopped there or with the command line program `sc` like any other
Windows service.
2013-06-28 09:34:38 +00:00
If the minion won't start, try installing the Microsoft Visual C++ 2008 x64 SP1
redistributable. Allow all Windows updates to run salt-minion smoothly.
2013-01-07 21:41:20 +00:00
2013-01-10 20:36:51 +00:00
2013-01-07 21:27:16 +00:00
Silent Installer option
=======================
The installer can be run silently by providing the `/S` option at the command
line. The options `/master` and `/minion-name` allow for configuring the master
hostname and minion name, respectively. Here's an example of using the silent
installer:
.. code-block :: bash
2013-10-15 08:47:37 +00:00
Salt-Minion-0.17.0-Setup-amd64.exe /S /master=yoursaltmaster /minion-name=yourminionname
2013-01-07 22:19:34 +00:00
2013-10-15 08:47:37 +00:00
Setting up a Windows build environment
======================================
2013-01-07 22:19:34 +00:00
2013-10-15 08:47:37 +00:00
1. Install the Microsoft Visual C++ 2008 SP1 Redistributable, `vcredist_x86`_ or `vcredist_x64`_ .
2013-01-07 22:19:34 +00:00
2013-10-15 08:47:37 +00:00
2. Install `msysgit`_
2012-03-20 03:09:35 +00:00
2013-10-15 08:47:37 +00:00
3. Clone the Salt git repository from GitHub
.. code-block :: bash
2012-03-20 03:09:35 +00:00
2013-10-15 08:47:37 +00:00
git clone git://github.com/saltstack/salt.git
2012-03-20 03:09:35 +00:00
2013-10-15 08:47:37 +00:00
4. Install the latest point release of `Python 2.7`_ for the architecture you wish to target
2012-03-20 03:09:35 +00:00
2013-10-15 08:47:37 +00:00
5. Add C:\\Python27 and C:\\Python27\\Scripts to your system path
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
6. Download and run the Setuptools bootstrap - `ez_setup.py`_
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
python ez_setup.py
7. Install Pip
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
.. code-block :: bash
easy_install pip
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
8. Install the latest point release of `OpenSSL for Windows`_
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
#. During setup, choose first option to install in Windows system directory
2013-02-05 22:00:10 +00:00
2013-10-15 08:47:37 +00:00
9. Install the latest point release of `M2Crypto`_
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
#. In general, be sure to download installers targeted at py2.7 for your chosen architecture
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
10. Install the latest point release of `pycrypto`_
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
11. Install the latest point release of `pywin32`_
2013-06-07 22:20:54 +00:00
2013-10-15 08:47:37 +00:00
12. Install the latest point release of `Cython`_
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
13. Install the latest point release of `jinja2`_
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
14. Install the latest point release of `msgpack`_
2013-06-07 22:23:46 +00:00
2013-10-15 08:47:37 +00:00
15. Install psutil
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
easy_install psutil
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
16. Install pyzmq
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
easy_install pyzmq
17. Install PyYAML
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
.. code-block :: bash
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
easy_install pyyaml
18. Install bbfreeze
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
easy_install bbfreeze
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
19. Install wmi
2013-06-07 22:18:15 +00:00
.. code-block :: bash
pip install wmi
2013-10-15 08:47:37 +00:00
20. Install esky
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
pip install esky
2012-03-20 06:59:24 +00:00
2013-10-15 08:47:37 +00:00
21. Install Salt
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
cd salt
2012-03-20 06:59:24 +00:00
python setup.py install
2013-10-15 08:47:37 +00:00
22. Build a frozen binary distribution of Salt
.. code-block :: bash
python setup.py bdist_esky
A zip file has been created in the `` dist/ `` folder, containing a frozen copy of Python and the
dependency libraries, along with Windows executables for each of the Salt scripts.
Building the installer
======================
The Salt Windows installer is built with the open-source NSIS compiler. The
source for the installer is found in the pkg directory of the Salt repo here:
2014-02-20 23:16:59 +00:00
https://github.com/saltstack/salt/tree/develop/pkg/windows/installer/Salt-Minion-Setup.nsi.
2013-10-15 08:47:37 +00:00
To create the installer, extract the frozen archive from `` dist/ `` into `` pkg/windows/buildenv/ ``
and run NSIS.
The NSIS installer can be found here: http://nsis.sourceforge.net/Main_Page
Testing the Salt minion
=======================
1. Create the directory C:\\salt (if it doesn't exist already)
2. Copy the example `` conf `` and `` var `` directories from `` pkg/windows/buildenv/ `` into C:\\salt
3. Edit C:\\salt\\conf\\minion
2012-03-20 06:59:24 +00:00
.. code-block :: bash
master: ipaddress or hostname of your salt-master
2013-10-15 08:47:37 +00:00
4. Start the salt-minion
2012-03-20 06:59:24 +00:00
.. code-block :: bash
2013-10-15 08:47:37 +00:00
cd C:\Python27\Scripts
2012-03-20 06:59:24 +00:00
python salt-minion
2013-10-15 08:47:37 +00:00
5. On the salt-master accept the new minion's key
2012-03-20 06:59:24 +00:00
.. code-block :: bash
sudo salt-key -A
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
(This accepts all unaccepted keys. If you're concerned about security just accept the key for this specific minion)
2013-10-15 08:47:37 +00:00
6. Test that your minion is responding
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
a. On the salt-master run:
.. code-block :: bash
sudo salt '*' test.ping
2013-02-05 22:00:10 +00:00
2012-12-07 17:31:56 +00:00
You should get the following response: {'your minion hostname': True}
2012-03-20 06:59:24 +00:00
2012-10-25 22:03:27 +00:00
Single command bootstrap script
===============================
2012-12-06 16:53:55 +00:00
On a 64 bit Windows host the following script makes an unattended install of salt, including all dependencies:
2012-10-25 22:03:27 +00:00
2013-07-14 05:36:51 +00:00
.. admonition :: Not up to date.
This script is not up to date. Please use the installer found above
2012-10-25 22:03:27 +00:00
.. code-block :: bash
"PowerShell (New-Object System.Net.WebClient).DownloadFile('http://csa-net.dk/salt/bootstrap64.bat','C:\bootstrap.bat');(New-Object -com Shell.Application).ShellExecute('C:\bootstrap.bat');"
2012-10-25 22:18:22 +00:00
(All in one line.)
2012-10-25 22:03:27 +00:00
2013-01-24 14:24:16 +00:00
You can execute the above command remotely from a Linux host using winexe:
2012-10-25 22:03:27 +00:00
.. code-block :: bash
2012-10-25 22:18:22 +00:00
winexe -U "administrator" //fqdn "PowerShell (New-Object ......);"
2012-10-25 22:03:27 +00:00
For more info check `http://csa-net.dk/salt`_
2013-09-05 11:38:24 +00:00
Packages management under Windows 2003
2013-09-05 16:02:55 +00:00
======================================
2013-09-05 11:38:24 +00:00
2013-10-15 08:47:37 +00:00
On windows Server 2003, you need to install optional component "wmi windows installer provider" to have full list of installed packages. If you don't have this, salt-minion can't report some installed softwares.
2013-09-05 11:38:24 +00:00
2012-10-25 22:03:27 +00:00
.. _http: //csa-net.dk/salt: http://csa-net.dk/salt
2014-02-20 23:16:59 +00:00
.. _vcredist_x86: http://www.microsoft.com/en-us/download/details.aspx?id=5582
.. _vcredist_x64: http://www.microsoft.com/en-us/download/details.aspx?id=2092
2013-10-15 08:47:37 +00:00
.. _msysgit: http://code.google.com/p/msysgit/downloads/list?can=3
2014-02-20 23:16:59 +00:00
.. _Python 2.7: http://www.python.org/downloads
2013-10-15 08:47:37 +00:00
.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
2014-02-20 23:16:59 +00:00
.. _OpenSSL for Windows: http://slproweb.com/products/Win32OpenSSL.html
2013-10-15 08:47:37 +00:00
.. _M2Crypto: http://chandlerproject.org/Projects/MeTooCrypto
.. _pycrypto: http://www.voidspace.org.uk/python/modules.shtml#pycrypto
.. _pywin32: http://sourceforge.net/projects/pywin32/files/pywin32
.. _Cython: http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython
.. _jinja2: http://www.lfd.uci.edu/~gohlke/pythonlibs/#jinja2
.. _msgpack: http://www.lfd.uci.edu/~gohlke/pythonlibs/#msgpack