Friday, December 30, 2011

Set up Salt minion on Windows XP

I've been doing some work getting Salt working on Windows. You can find out more about Salt here: www.saltstack.org  and the source code is here: https://github.com/saltstack/salt


Installing Salt from source on Windows XP 32 bit
The download location is found underneath the name of the file to install
Items in double quotes should be run from the command line

  1. Install Python 2.7.x
  2. add c:\python27 to your path
  3. Install vcredist_x86.exe
  4. Install Win32OpenSSL-1_0_0e.exe
    1. Choose first option to install in Windows system directory
  5. Install pyzmq-2.1.11.win32-py2.7.msi
  6. Install M2Crypto-0.21.1.win32-py2.7.msi
  7. Install pycrypto-2.3.win32-py2.7.msi
  8. Install PyYAML-3.10.win32-py2.7.msi
  9. Install Cython-0.15.1.win32-py2.79.exe
  10. install distribute_setup.py
    1. http://python-distribute.org/distribute_setup.py
    2. “python distribute_setup.py”
  11. Install pip
    1. https://raw.github.com/pypa/pip/master/contrib/get-pip.py
    2. “python get-pip.py"
  12. Add c:\python27\scripts to your path
  13. Open new terminal window (cmd)
  14. Install jinja2
    1. “pip install jinja2”
  15. Change directory to your copy of the latest Salt source from github
  16. Install Salt
    1. “python setup.py install”
  17. Edit c:\etc\salt\minon
    1. master: ipaddress or hostname of your salt-master
    2. master_port: 4506
    3. root_dir: c:\
    4. pki_dir: /etc/salt/pki
    5. cachedir: /var/cache/salt
    6. renderer: yaml_jinja
    7. open_mode: False
    8. multiprocessing: False
  18. Start the salt-minion
    1. Change directory to c:\python27\scripts
    2. "python salt-minion"
  19. On the salt-master accept the new minion's key
    1. "sudo salt-key -A"   (This accepts all unaccepted keys. If you're concerned about security just accept the key for this specific minion)
  20. Test that your minion is responding
    1. on the salt-master run “sudo salt '*' test.ping"
    2. You should get the following response: {'your minion hostname': True}
  21. Jump for joy!!

I've run through this several times and it works. Please let me know if you run into any issues.

Support for Windows in Salt is still very new and not all features work with Windows yet.