New Saltstack Salt formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. ====
  2. Salt
  3. ====
  4. Salt is a new approach to infrastructure management. Easy enough to get running in minutes, scalable enough to manage tens of thousands of servers, and fast enough to communicate with them in seconds.
  5. Salt delivers a dynamic communication bus for infrastructures that can be used for orchestration, remote execution, configuration management and much more.
  6. Sample pillars
  7. ==============
  8. Salt master
  9. -----------
  10. Salt master with base production environment and pillar tree as metadata backend
  11. .. literalinclude:: tests/pillar/master_single_pillar.sls
  12. :language: yaml
  13. Salt master with reclass ENC as metadata backend
  14. .. literalinclude:: tests/pillar/master_single_reclass.sls
  15. :language: yaml
  16. Salt master with API
  17. .. literalinclude:: tests/pillar/master_api.sls
  18. :language: yaml
  19. Salt master with defined user ACLs
  20. .. literalinclude:: tests/pillar/master_acl.sls
  21. :language: yaml
  22. Salt master with preset minions
  23. .. code-block:: yaml
  24. salt:
  25. master:
  26. enabled: true
  27. minions:
  28. - name: 'node1.system.location.domain.com'
  29. Salt master with alternative installation source and version (optional) - pip
  30. .. code-block:: yaml
  31. salt:
  32. master:
  33. enabled: true
  34. ...
  35. source:
  36. engine: pip
  37. version: 2016.3.0rc2
  38. Salt master with specified formula to install through apt-get
  39. .. code-block:: yaml
  40. salt:
  41. master:
  42. enabled: true
  43. ...
  44. environment:
  45. prd:
  46. keysone:
  47. source: pkg
  48. name: salt-formula-keystone
  49. Clone master branch of keystone formula as local feature branch
  50. .. code-block:: yaml
  51. salt:
  52. master:
  53. enabled: true
  54. ...
  55. environment:
  56. dev:
  57. formula:
  58. keystone:
  59. source: git
  60. address: git@github.com:openstack/salt-formula-keystone.git
  61. revision: master
  62. branch: feature
  63. Salt master with specified formula refs (for example for Gerrit review)
  64. .. code-block:: yaml
  65. salt:
  66. master:
  67. enabled: true
  68. ...
  69. environment:
  70. dev:
  71. formula:
  72. keystone:
  73. source: git
  74. address: https://git.openstack.org/openstack/salt-formula-keystone
  75. revision: refs/changes/56/123456/1
  76. Salt syndic: Master of masters
  77. .. code-block:: yaml
  78. salt:
  79. master:
  80. enabled: true
  81. order_masters: True
  82. Salt syndic: Lower master
  83. .. code-block:: yaml
  84. salt:
  85. syndic:
  86. enabled: true
  87. master:
  88. host: master-of-master-host
  89. timeout: 5
  90. Salt syndic: Lower master with multi-master of masters
  91. .. code-block:: yaml
  92. salt:
  93. syndic:
  94. enabled: true
  95. masters:
  96. - host: master-of-master-host1
  97. - host: master-of-master-host2
  98. timeout: 5
  99. Salt master with custom handlers
  100. .. code-block:: yaml
  101. salt:
  102. master:
  103. enabled: true
  104. handler:
  105. handler01:
  106. engine: udp
  107. bind:
  108. host: 127.0.0.1
  109. port: 9999
  110. minion:
  111. handler:
  112. handler01:
  113. engine: udp
  114. bind:
  115. host: 127.0.0.1
  116. port: 9999
  117. handler02:
  118. engine: zmq
  119. bind:
  120. host: 127.0.0.1
  121. port: 9999
  122. Salt master peer for remote certificate sign.
  123. .. code-block:: yaml
  124. salt:
  125. master:
  126. peer:
  127. ".*":
  128. - x509.sign_remote_certificate
  129. Salt SSH
  130. --------
  131. Salt SSH with sudoer using key
  132. .. literalinclude:: tests/pillar/master_ssh_minion_key.sls
  133. :language: yaml
  134. Salt SSH with sudoer using password
  135. .. literalinclude:: tests/pillar/master_ssh_minion_password.sls
  136. :language: yaml
  137. Salt SSH with root using password
  138. .. literalinclude:: tests/pillar/master_ssh_minion_root.sls
  139. :language: yaml
  140. Salt minion
  141. -----------
  142. Simplest Salt minion setup with central configuration node
  143. .. code-block:: yaml
  144. .. literalinclude:: tests/pillar/minion_master.sls
  145. :language: yaml
  146. Multi-master Salt minion setup
  147. .. literalinclude:: tests/pillar/minion_multi_master.sls
  148. :language: yaml
  149. Salt minion with salt mine options
  150. .. literalinclude:: tests/pillar/minion_mine.sls
  151. :language: yaml
  152. Salt minion with graphing dependencies
  153. .. literalinclude:: tests/pillar/minion_graph.sls
  154. :language: yaml
  155. Salt minion behind http proxy
  156. .. code-block:: yaml
  157. salt:
  158. minion:
  159. proxy:
  160. host: 127.0.0.1
  161. port: 3128
  162. PKI CA
  163. ~~~~~~
  164. Salt minion with PKI CA
  165. .. literalinclude:: tests/pillar/minion_pki_ca.sls
  166. :language: yaml
  167. Salt minion with PKI certificate
  168. .. literalinclude:: tests/pillar/minion_pki_cert.sls
  169. :language: yaml
  170. Salt control (cloud/kvm/docker)
  171. -------------------------------
  172. Salt cloud with local OpenStack provider
  173. .. literalinclude:: tests/pillar/control_cloud_openstack.sls
  174. :language: yaml
  175. Salt cloud with Digital Ocean provider
  176. .. literalinclude:: tests/pillar/control_cloud_digitalocean.sls
  177. :language: yaml
  178. Salt virt with KVM cluster
  179. .. literalinclude:: tests/pillar/control_virt.sls
  180. :language: yaml
  181. Usage
  182. =====
  183. Working with salt-cloud
  184. .. code-block:: bash
  185. salt-cloud -m /path/to/map --assume-yes
  186. Debug LIBCLOUD for salt-cloud connection
  187. .. code-block:: bash
  188. export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
  189. Read more
  190. =========
  191. * http://salt.readthedocs.org/en/latest/
  192. * https://github.com/DanielBryan/salt-state-graph
  193. * http://karlgrz.com/testing-salt-states-rapidly-with-docker/
  194. * https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
  195. * http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
  196. * https://github.com/saltstack-formulas/salt-formula
  197. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  198. salt-cloud
  199. ----------
  200. * http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
  201. * http://cloudinit.readthedocs.org/en/latest/topics/examples.html
  202. * http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
  203. * http://docs.saltstack.com/topics/cloud/digitalocean.html
  204. * http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
  205. * http://salt-cloud.readthedocs.org/en/latest/topics/map.html
  206. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  207. Documentation and Bugs
  208. ======================
  209. To learn how to install and update salt-formulas, consult the documentation
  210. available online at:
  211. http://salt-formulas.readthedocs.io/
  212. In the unfortunate event that bugs are discovered, they should be reported to
  213. the appropriate issue tracker. Use Github issue tracker for specific salt
  214. formula:
  215. https://github.com/salt-formulas/salt-formula-salt/issues
  216. For feature requests, bug reports or blueprints affecting entire ecosystem,
  217. use Launchpad salt-formulas project:
  218. https://launchpad.net/salt-formulas
  219. You can also join salt-formulas-users team and subscribe to mailing list:
  220. https://launchpad.net/~salt-formulas-users
  221. Developers wishing to work on the salt-formulas projects should always base
  222. their work on master branch and submit pull request against specific formula.
  223. https://github.com/salt-formulas/salt-formula-salt
  224. Any questions or feedback is always welcome so feel free to join our IRC
  225. channel:
  226. #salt-formulas @ irc.freenode.net