1
0

index.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. .. _installation-dependencies:
  65. Dependencies
  66. ------------
  67. Salt should run on any Unix-like platform so long as the dependencies are met.
  68. * `Python`_ - Python2 >= 2.7, Python3 >= 3.4
  69. * `msgpack-python`_ - High-performance message interchange format
  70. * `YAML`_ - Python YAML bindings
  71. * `Jinja2`_ - parsing Salt States (configurable in the master settings)
  72. * `MarkupSafe`_ - Implements a XML/HTML/XHTML Markup safe string for Python
  73. * `apache-libcloud`_ - Python lib for interacting with many of the popular
  74. cloud service providers using a unified API
  75. * `Requests`_ - HTTP library
  76. * `Tornado`_ - Web framework and asynchronous networking library
  77. * `futures`_ - Python2 only dependency. Backport of the concurrent.futures package from Python 3.2
  78. * ZeroMQ:
  79. * `ZeroMQ`_ >= 3.2.0
  80. * `pyzmq`_ >= 2.2.0 - ZeroMQ Python bindings
  81. * `PyCrypto`_ - The Python cryptography toolkit
  82. .. warning::
  83. For historical reasons, Salt requires PyCrypto as a "lowest common
  84. denominator". However, `PyCrypto is unmaintained`_ and best practice is to
  85. manually upgrade to use a more maintained library such as `PyCryptodome`_. See
  86. `Issue #52674`_ and `Issue #54115`_ for more info
  87. .. _PyCrypto is unmaintained: https://github.com/dlitz/pycrypto/issues/301#issue-551975699
  88. .. _PyCryptodome: https://pypi.org/project/pycryptodome/
  89. .. _Issue #52674: https://github.com/saltstack/salt/issues/52674
  90. .. _Issue #54115: https://github.com/saltstack/salt/issues/54115
  91. Salt defaults to the `ZeroMQ`_ transport. The ``--salt-transport`` installation
  92. option is available, but currently only supports the ``zeromq`` option. This
  93. may be expanded in the future.
  94. .. code-block:: bash
  95. python setup.py --salt-transport=zeromq install
  96. This way, only the required dependencies are pulled by the setup script if need
  97. be.
  98. If installing using pip, the ``--salt-transport`` install option can be
  99. provided like:
  100. .. code-block:: bash
  101. pip install --install-option="--salt-transport=zeromq" salt
  102. .. note::
  103. Salt does not bundle dependencies that are typically distributed as part of
  104. the base OS. If you have unmet dependencies and are using a custom or
  105. minimal installation, you might need to install some additional packages
  106. from your OS vendor.
  107. Optional Dependencies
  108. ---------------------
  109. * `mako`_ - an optional parser for Salt States (configurable in the master
  110. settings)
  111. * gcc - dynamic `Cython`_ module compiling
  112. .. _`Python`: https://www.python.org/downloads/
  113. .. _`ZeroMQ`: https://zeromq.org/
  114. .. _`pyzmq`: https://github.com/zeromq/pyzmq
  115. .. _`msgpack-python`: https://pypi.org/project/msgpack-python/
  116. .. _`M2Crypto`: https://gitlab.com/m2crypto/m2crypto
  117. .. _`PyCrypto`: https://www.dlitz.net/software/pycrypto/
  118. .. _`YAML`: https://pyyaml.org/
  119. .. _`Jinja2`: https://jinja.palletsprojects.com/en/2.11.x/
  120. .. _`MarkupSafe`: https://pypi.org/project/MarkupSafe/
  121. .. _`mako`: https://www.makotemplates.org/
  122. .. _`Cython`: https://cython.org/
  123. .. _`apache-libcloud`: http://libcloud.apache.org
  124. .. _`Requests`: http://docs.python-requests.org/en/latest
  125. .. _`Tornado`: http://www.tornadoweb.org/en/stable/
  126. .. _`futures`: https://github.com/agronholm/pythonfutures
  127. Upgrading Salt
  128. --------------
  129. When upgrading Salt, the master(s) should always be upgraded first. Backward
  130. compatibility for minions running newer versions of salt than their masters is
  131. not guaranteed.
  132. Whenever possible, backward compatibility between new masters and old minions
  133. will be preserved. Generally, the only exception to this policy is in case of
  134. a security vulnerability.
  135. .. seealso::
  136. :ref:`Installing Salt for development <installing-for-development>` and
  137. contributing to the project.
  138. Building Packages using Salt Pack
  139. ---------------------------------
  140. Salt-pack is an open-source package builder for most commonly used Linux
  141. platforms, for example: Redhat/CentOS and Debian/Ubuntu families, utilizing
  142. SaltStack states and execution modules to build Salt and a specified set of
  143. dependencies, from which a platform specific repository can be built.
  144. https://github.com/saltstack/salt-pack