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.

9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. .. code-block:: yaml
  18. salt:
  19. master:
  20. ...
  21. api:
  22. enabled: true
  23. port: 8000
  24. Salt master with preset minions
  25. .. code-block:: yaml
  26. salt:
  27. master:
  28. enabled: true
  29. ...
  30. minions:
  31. - name: 'node1.system.location.domain.com'
  32. Salt master with alternative installation source and version (optional) - pip
  33. .. code-block:: yaml
  34. salt:
  35. master:
  36. enabled: true
  37. ...
  38. source:
  39. engine: pip
  40. version: 2016.3.0rc2
  41. Salt master with specified formula to install through apt-get
  42. .. code-block:: yaml
  43. salt:
  44. master:
  45. enabled: true
  46. ...
  47. environment:
  48. prd:
  49. keysone:
  50. source: pkg
  51. name: salt-formula-keystone
  52. Clone master branch of keystone formula as local feature branch
  53. .. code-block:: yaml
  54. salt:
  55. master:
  56. enabled: true
  57. ...
  58. environment:
  59. dev:
  60. formula:
  61. keystone:
  62. source: git
  63. address: git@github.com:openstack/salt-formula-keystone.git
  64. revision: master
  65. branch: feature
  66. Salt master with specified formula refs (for example for Gerrit review)
  67. .. code-block:: yaml
  68. salt:
  69. master:
  70. enabled: true
  71. ...
  72. environment:
  73. dev:
  74. formula:
  75. keystone:
  76. source: git
  77. address: https://git.openstack.org/openstack/salt-formula-keystone
  78. revision: refs/changes/56/123456/1
  79. Salt master syndicate master of masters
  80. .. code-block:: yaml
  81. salt:
  82. master:
  83. enabled: true
  84. ...
  85. syndic:
  86. mode: master
  87. Salt master syndicate (client) master
  88. .. code-block:: yaml
  89. salt:
  90. master:
  91. enabled: true
  92. ...
  93. syndicate:
  94. mode: client
  95. host: master-master
  96. Salt master with custom handlers
  97. .. code-block:: yaml
  98. salt:
  99. master:
  100. enabled: true
  101. handler:
  102. handler01:
  103. engine: udp
  104. bind:
  105. host: 127.0.0.1
  106. port: 9999
  107. minion:
  108. handler:
  109. handler01:
  110. engine: udp
  111. bind:
  112. host: 127.0.0.1
  113. port: 9999
  114. handler02:
  115. engine: zmq
  116. bind:
  117. host: 127.0.0.1
  118. port: 9999
  119. Salt minion
  120. -----------
  121. Simplest Salt minion setup with central configuration node
  122. .. code-block:: yaml
  123. .. literalinclude:: tests/pillar/minion_master.sls
  124. :language: yaml
  125. Multi-master Salt minion setup
  126. .. literalinclude:: tests/pillar/minion_multi_master.sls
  127. :language: yaml
  128. Salt minion with salt mine options
  129. .. literalinclude:: tests/pillar/minion_mine.sls
  130. :language: yaml
  131. Salt minion with graphing dependencies
  132. .. literalinclude:: tests/pillar/minion_graph.sls
  133. :language: yaml
  134. Salt minion with PKI CA
  135. .. literalinclude:: tests/pillar/minion_pki_ca.sls
  136. :language: yaml
  137. Salt minion with PKI certificate
  138. .. literalinclude:: tests/pillar/minion_pki_cert.sls
  139. :language: yaml
  140. Salt control (cloud/kvm/docker)
  141. -------------------------------
  142. Salt cloud with local OpenStack provider
  143. .. literalinclude:: tests/pillar/control_cloud_openstack.sls
  144. :language: yaml
  145. Salt cloud with Digital Ocean provider
  146. .. literalinclude:: tests/pillar/control_cloud_digitalocean.sls
  147. :language: yaml
  148. Salt virt KVM cluster
  149. .. literalinclude:: tests/pillar/control_virt.sls
  150. :language: yaml
  151. Usage
  152. =====
  153. Working with salt-cloud
  154. .. code-block:: bash
  155. salt-cloud -m /path/to/map --assume-yes
  156. Debug LIBCLOUD for salt-cloud connection
  157. .. code-block:: bash
  158. export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
  159. Read more
  160. =========
  161. * http://salt.readthedocs.org/en/latest/
  162. * https://github.com/DanielBryan/salt-state-graph
  163. * http://karlgrz.com/testing-salt-states-rapidly-with-docker/
  164. * https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
  165. * http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
  166. * https://github.com/saltstack-formulas/salt-formula
  167. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  168. salt-cloud
  169. ----------
  170. * http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
  171. * http://cloudinit.readthedocs.org/en/latest/topics/examples.html
  172. * http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
  173. * http://docs.saltstack.com/topics/cloud/digitalocean.html
  174. * http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
  175. * http://salt-cloud.readthedocs.org/en/latest/topics/map.html
  176. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  177. salt-virt
  178. ---------
  179. Sample pillar
  180. .. code-block:: yaml
  181. salt:
  182. control:
  183. enabled: True
  184. virt_enabled: True
  185. size:
  186. medium:
  187. cpu: 2
  188. ram: 1024
  189. cluster:
  190. localnode:
  191. domain: domain.com
  192. engine: virt
  193. config:
  194. engine: salt
  195. host: 127.0.0.1
  196. node:
  197. ubuntu01:
  198. provider: node001.domain.com
  199. image: ubuntu-14-04-x64-1456128611.qcow2
  200. size: medium
  201. disk_profile: database
  202. net_profile: testing