index.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .. _installation:
  2. ============
  3. Installation
  4. ============
  5. This section contains instructions to install Salt. If you are setting up your
  6. environment for the first time, you should install a Salt master on
  7. a dedicated management server or VM, and then install a Salt minion on each
  8. system that you want to manage using Salt. For now you don't need to worry
  9. about your :ref:`architecture <architecture-overview>`, you can easily add
  10. components and modify your configuration later without needing to reinstall
  11. anything.
  12. The general installation process is as follows:
  13. 1. Install a Salt master using the instructions for your platform or by running
  14. the Salt bootstrap script. If you use the bootstrap script, be sure to
  15. include the ``-M`` option to install the Salt master.
  16. 2. Make sure that your Salt minions can :ref:`find the Salt master
  17. <master-dns>`.
  18. 3. Install the Salt minion on each system that you want to manage.
  19. 4. Accept the Salt :ref:`minion keys <using-salt-key>` after the Salt minion
  20. connects.
  21. After this, you should be able to run a simple command and receive salt version returns from
  22. all connected Salt minions.
  23. .. code-block:: bash
  24. salt '*' test.version
  25. Quick Install
  26. -------------
  27. On most distributions, you can set up a **Salt Minion** with the
  28. :ref:`Salt bootstrap <salt-bootstrap>`.
  29. Platform-specific Installation Instructions
  30. -------------------------------------------
  31. These guides go into detail how to install Salt on a given platform.
  32. .. toctree::
  33. :maxdepth: 1
  34. arch
  35. debian
  36. eos
  37. fedora
  38. freebsd
  39. gentoo
  40. nxos
  41. openbsd
  42. osx
  43. rhel
  44. solaris
  45. ubuntu
  46. windows
  47. suse
  48. Initial Configuration
  49. ---------------------
  50. .. toctree::
  51. :maxdepth: 1
  52. ../../ref/configuration/index
  53. Additional Installation Guides
  54. ------------------------------
  55. .. toctree::
  56. :maxdepth: 1
  57. ../tutorials/salt_bootstrap
  58. ../tutorials/firewall
  59. ../tutorials/preseed_key
  60. ../tutorials/walkthrough_macosx
  61. ../tutorials/rooted
  62. ../tutorials/standalone_minion
  63. ../tutorials/quickstart
  64. Dependencies
  65. ------------
  66. Salt should run on any Unix-like platform so long as the dependencies are met.
  67. * `Python`_ - Python2 >= 2.7, Python3 >= 3.4
  68. * `msgpack-python`_ - High-performance message interchange format
  69. * `YAML`_ - Python YAML bindings
  70. * `Jinja2`_ - parsing Salt States (configurable in the master settings)
  71. * `MarkupSafe`_ - Implements a XML/HTML/XHTML Markup safe string for Python
  72. * `apache-libcloud`_ - Python lib for interacting with many of the popular
  73. cloud service providers using a unified API
  74. * `Requests`_ - HTTP library
  75. * `Tornado`_ - Web framework and asynchronous networking library
  76. * `futures`_ - Python2 only dependency. Backport of the concurrent.futures package from Python 3.2
  77. * ZeroMQ:
  78. * `ZeroMQ`_ >= 3.2.0
  79. * `pyzmq`_ >= 2.2.0 - ZeroMQ Python bindings
  80. * `PyCrypto`_ - The Python cryptography toolkit
  81. .. warning::
  82. For historical reasons, Salt requires PyCrypto as a "lowest common
  83. denominator". However, `PyCrypto is unmaintained`_ and best practice is to
  84. manually upgrade to use a more maintained library such as `PyCryptodome`_. See
  85. `Issue #52674`_ and `Issue #54115`_ for more info
  86. .. _PyCrypto is unmaintained: https://github.com/dlitz/pycrypto/issues/301#issue-551975699
  87. .. _PyCryptodome: https://pypi.org/project/pycryptodome/
  88. .. _Issue #52674: https://github.com/saltstack/salt/issues/52674
  89. .. _Issue #54115: https://github.com/saltstack/salt/issues/54115
  90. Salt defaults to the `ZeroMQ`_ transport. The ``--salt-transport`` installation
  91. option is available, but currently only supports the ``zeromq`` option. This
  92. may be expanded in the future.
  93. .. code-block:: bash
  94. python setup.py --salt-transport=zeromq install
  95. This way, only the required dependencies are pulled by the setup script if need
  96. be.
  97. If installing using pip, the ``--salt-transport`` install option can be
  98. provided like:
  99. .. code-block:: bash
  100. pip install --install-option="--salt-transport=zeromq" salt
  101. .. note::
  102. Salt does not bundle dependencies that are typically distributed as part of
  103. the base OS. If you have unmet dependencies and are using a custom or
  104. minimal installation, you might need to install some additional packages
  105. from your OS vendor.
  106. Optional Dependencies
  107. ---------------------
  108. * `mako`_ - an optional parser for Salt States (configurable in the master
  109. settings)
  110. * gcc - dynamic `Cython`_ module compiling
  111. .. _`Python`: https://www.python.org/downloads/
  112. .. _`ZeroMQ`: https://zeromq.org/
  113. .. _`pyzmq`: https://github.com/zeromq/pyzmq
  114. .. _`msgpack-python`: https://pypi.org/project/msgpack-python/
  115. .. _`M2Crypto`: https://gitlab.com/m2crypto/m2crypto
  116. .. _`PyCrypto`: https://www.dlitz.net/software/pycrypto/
  117. .. _`YAML`: https://pyyaml.org/
  118. .. _`Jinja2`: https://jinja.palletsprojects.com/en/2.11.x/
  119. .. _`MarkupSafe`: https://pypi.org/project/MarkupSafe/
  120. .. _`mako`: https://www.makotemplates.org/
  121. .. _`Cython`: https://cython.org/
  122. .. _`apache-libcloud`: http://libcloud.apache.org
  123. .. _`Requests`: http://docs.python-requests.org/en/latest
  124. .. _`Tornado`: http://www.tornadoweb.org/en/stable/
  125. .. _`futures`: https://github.com/agronholm/pythonfutures
  126. Upgrading Salt
  127. --------------
  128. When upgrading Salt, the master(s) should always be upgraded first. Backward
  129. compatibility for minions running newer versions of salt than their masters is
  130. not guaranteed.
  131. Whenever possible, backward compatibility between new masters and old minions
  132. will be preserved. Generally, the only exception to this policy is in case of
  133. a security vulnerability.
  134. .. seealso::
  135. :ref:`Installing Salt for development <installing-for-development>` and
  136. contributing to the project.
  137. Building Packages using Salt Pack
  138. ---------------------------------
  139. Salt-pack is an open-source package builder for most commonly used Linux
  140. platforms, for example: Redhat/CentOS and Debian/Ubuntu families, utilizing
  141. SaltStack states and execution modules to build Salt and a specified set of
  142. dependencies, from which a platform specific repository can be built.
  143. https://github.com/saltstack/salt-pack