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
2013-01-24 14:24:16 +00:00
There are no plans for the foreseeable future to develop a Salt
2012-03-20 03:09:35 +00:00
Master on Windows. For now you must run your Salt Master on a
supported operating system to control your Salt Minions on Windows.
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.
2013-01-07 21:27:16 +00:00
Windows Installer
=================
A Salt Minion Windows installer can be found here:
2013-01-07 22:19:34 +00:00
.. admonition :: Download here
2013-08-12 00:02:51 +00:00
* 0.16.3
* http://saltstack.com/downloads/Salt-Minion-0.16.3-win32-Setup.exe
* http://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
* http://saltstack.com/downloads/Salt-Minion-0.16.2-win32-Setup.exe
* http://saltstack.com/downloads/Salt-Minion-0.16.2-AMD64-Setup.exe
2013-07-02 17:44:26 +00:00
* 0.16.0
* http://saltstack.com/downloads/Salt-Minion-0.16.0-win32-Setup.exe
* http://saltstack.com/downloads/Salt-Minion-0.16.0-AMD64-Setup.exe
2013-06-03 18:05:10 +00:00
* 0.15.3
* http://saltstack.com/downloads/Salt-Minion-0.15.3-win32-Setup.exe
* http://saltstack.com/downloads/Salt-Minion-0.15.3-AMD64-Setup.exe
2013-04-16 00:58:15 +00:00
* 0.14.1
* http://saltstack.com/downloads/Salt-Minion-0.14.1-win32-Setup.exe
* http://saltstack.com/downloads/Salt-Minion-0.14.1-AMD64-Setup.exe
2013-03-25 04:37:57 +00:00
* 0.14.0
* http://saltstack.com/downloads/Salt-Minion-0.14.0-win32-Setup.exe
* http://saltstack.com/downloads/Salt-Minion-0.14.0-AMD64-Setup.exe
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
Make sure that the minion config file has the line `ipc_mode: tcp`
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-06-03 18:05:10 +00:00
Salt-Minion-0.15.3-Setup-amd64.exe /S /master=yoursaltmaster /minion-name=yourminionname
2013-01-07 21:27:16 +00:00
2013-01-07 22:19:34 +00:00
Installer Source
================
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:
2013-02-05 22:00:10 +00:00
https://github.com/saltstack/salt/blob/develop/pkg/windows/installer/Salt-Minion-Setup.nsi.
To create the installer run `` python setup.py bdist_esky `` , extract the
frozen archive from `` dist/ `` into `` pkg/windows/buildenv/ `` and run NSIS.
2013-01-07 22:19:34 +00:00
The NSIS installer can be found here: http://nsis.sourceforge.net/Main_Page
2012-03-20 06:59:24 +00:00
Installation from source
2012-04-26 05:11:09 +00:00
========================
2012-03-20 03:09:35 +00:00
2013-01-07 21:27:16 +00:00
To install Salt from source one must install each dependency separately and
configure Salt to run on your Windows host.
2012-03-20 03:09:35 +00:00
2013-01-07 21:27:16 +00:00
Rather than send you on a wild goose chase across the Internet, we've collected
2013-07-03 02:23:44 +00:00
some of the more difficult to find installers in our GitHub repo for you.
2012-03-20 03:09:35 +00:00
2012-03-20 06:59:24 +00:00
Install on Windows XP 32bit
===========================
1. Install `msysgit`_
2013-07-03 02:23:44 +00:00
1. Clone the Salt git repository from GitHub
2012-03-20 06:59:24 +00:00
.. code-block :: bash
git clone git://github.com/saltstack/salt.git
2013-06-30 05:59:53 +00:00
2. Install Microsoft Visual Studio 2008 Express.
2012-03-20 06:59:24 +00:00
You must use Visual Studio 2008 Express, **not** Visual Studio 2010 Express.
3. Install `Python 2.7.x`_
4. Add c:\\Python27 to your system path
2013-01-24 14:24:16 +00:00
5. Install the Microsoft Visual C++ 2008 SP1 Redistributable, `vcredist_x86`_ .
2012-03-20 06:59:24 +00:00
6. Install `Win32OpenSSL-1_0_0e.exe`_
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
#. Choose first option to install in Windows system directory
7. Install `pyzmq-2.1.11.win32-py2.7.msi`_
2012-04-19 17:20:03 +00:00
8. Install `pycrypto-2.3.win32-py2.7.msi`_
2012-03-20 06:59:24 +00:00
2013-06-07 22:20:54 +00:00
9. Install `M2Crypto`_
2013-06-07 22:23:46 +00:00
10. Install `pywin32`_
2012-03-20 06:59:24 +00:00
2013-06-07 22:23:46 +00:00
11. Install `PyYAML-3.10.win32-py2.7.msi`_
2012-03-20 06:59:24 +00:00
2013-06-07 22:23:46 +00:00
12. Install `Cython-0.15.1.win32-py2.79.exe`_
13. Download and run `distribute_setup.py`_
2012-03-20 06:59:24 +00:00
.. code-block :: bash
python distribute_setup.py
2013-06-07 22:23:46 +00:00
14. Download and run `pip`_
2012-03-20 06:59:24 +00:00
.. code-block :: bash
python get-pip.py
2013-06-07 22:23:46 +00:00
15. Add c:\\python27\\scripts to your path
2012-03-20 06:59:24 +00:00
2013-06-07 22:23:46 +00:00
16. Close terminal window and open a new terminal window (*cmd* )
2012-03-20 06:59:24 +00:00
2013-06-07 22:23:46 +00:00
17. Install jinja2
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
.. code-block :: bash
pip install jinja2
2013-06-07 22:23:46 +00:00
18. Install wmi
2013-06-07 22:18:15 +00:00
.. code-block :: bash
pip install wmi
2013-06-07 22:23:46 +00:00
19. Install Messagepack
2013-02-05 22:00:10 +00:00
2012-03-20 06:59:24 +00:00
.. code-block :: bash
pip install msgpack-python
2013-06-07 22:23:46 +00:00
20. Install Salt
2012-03-20 06:59:24 +00:00
.. code-block :: bash
cd ./salt
python setup.py install
2013-06-07 22:23:46 +00:00
21. Edit c:\\etc\\salt\\minion
2012-03-20 06:59:24 +00:00
.. code-block :: bash
master: ipaddress or hostname of your salt-master
master_port: 4506
2013-01-10 20:36:51 +00:00
ipc_mode: tcp
2012-03-20 06:59:24 +00:00
root_dir: c:\
pki_dir: /etc/salt/pki
cachedir: /var/cache/salt
renderer: yaml_jinja
open_mode: False
multiprocessing: False
2013-06-07 22:23:46 +00:00
22. Start the salt-minion
2012-03-20 06:59:24 +00:00
.. code-block :: bash
cd c:\python27\scripts
python salt-minion
2013-06-07 22:23:46 +00:00
23. 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-06-07 22:23:46 +00:00
24. 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
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.
2012-10-25 22:03:27 +00:00
.. _http: //csa-net.dk/salt: http://csa-net.dk/salt
2012-03-20 06:59:24 +00:00
.. _msysgit: http://code.google.com/p/msysgit/downloads/list?can=3
2012-10-12 22:37:09 +00:00
.. _Microsoft Visual Studio 2008 Express: http://www.microsoft.com/en-gb/download/details.aspx?id=20682
2012-03-20 06:59:24 +00:00
.. _Python 2.7.x: http://www.python.org
.. _vcredist_x86: http://www.microsoft.com/download/en/details.aspx?id=5582
.. _Win32OpenSSL-1_0_0e.exe: http://www.slproweb.com/products/Win32OpenSSL.html
.. _pyzmq-2.1.11.win32-py2.7.msi: https://github.com/zeromq/pyzmq/downloads
.. _pycrypto-2.3.win32-py2.7.msi: http://www.voidspace.org.uk/python/modules.shtml#pycrypto
.. _PyYAML-3.10.win32-py2.7.msi: http://pyyaml.org/wiki/PyYAML
.. _Cython-0.15.1.win32-py2.79.exe: http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython
.. _distribute_setup.py: http://python-distribute.org/distribute_setup.py
.. _pip: https://raw.github.com/pypa/pip/master/contrib/get-pip.py
2013-06-07 22:23:46 +00:00
.. _M2Crypto: http://chandlerproject.org/pub/Projects/MeTooCrypto/M2Crypto-0.21.1.win32-py2.7.exe
.. _pywin32: http://sourceforge.net/projects/pywin32/files/