New Saltstack Salt formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README.rst 7.2KB

9 lat temu
9 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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 environment and pillar metadata source
  11. .. code-block:: yaml
  12. salt:
  13. master:
  14. enabled: true
  15. command_timeout: 5
  16. worker_threads: 2
  17. pillar:
  18. engine: salt
  19. source:
  20. engine: git
  21. address: 'git@repo.domain.com:salt/pillar-demo.git'
  22. branch: 'master'
  23. base_environment: prd
  24. environment:
  25. prd:
  26. enabled: true
  27. formula:
  28. linux:
  29. source: git
  30. address: 'git@repo.domain.com:salt/formula-linux.git'
  31. branch: 'master'
  32. salt:
  33. source: git
  34. address: 'git@repo.domain.com:salt/formula-salt.git'
  35. branch: 'master'
  36. openssh:
  37. source: git
  38. address: 'git@repo.domain.com:salt/formula-openssh.git'
  39. branch: 'master'
  40. Simple Salt master with base environment and custom states
  41. .. code-block:: yaml
  42. salt:
  43. master:
  44. ...
  45. environment:
  46. base:
  47. states:
  48. - name: gitlab
  49. source: git
  50. address: 'git@repo.domain.cz:salt/state-gitlab.git'
  51. branch: 'master'
  52. formulas:
  53. ...
  54. Salt master with reclass ENC
  55. .. code-block:: yaml
  56. salt:
  57. master:
  58. enabled: true
  59. ...
  60. pillar:
  61. engine: reclass
  62. data_dir: /srv/salt/reclass
  63. Salt master with windows repository
  64. .. code-block:: yaml
  65. salt:
  66. master:
  67. enabled: true
  68. ...
  69. windows_repo:
  70. type: git
  71. address: 'git@repo.domain.com:salt/win-packages.git'
  72. Salt master with API
  73. .. code-block:: yaml
  74. salt:
  75. master:
  76. ...
  77. api:
  78. enabled: true
  79. port: 8000
  80. Salt master with preset minions
  81. .. code-block:: yaml
  82. salt:
  83. master:
  84. enabled: true
  85. ...
  86. minions:
  87. - name: 'node1.system.location.domain.com'
  88. Salt master syndicate master of masters
  89. .. code-block:: yaml
  90. salt:
  91. master:
  92. enabled: true
  93. ...
  94. syndic:
  95. mode: master
  96. Salt master syndicate (client) master
  97. .. code-block:: yaml
  98. salt:
  99. master:
  100. enabled: true
  101. ...
  102. syndicate:
  103. mode: client
  104. host: master-master
  105. Salt master with custom handlers
  106. .. code-block:: yaml
  107. salt:
  108. master:
  109. enabled: true
  110. command_timeout: 5
  111. worker_threads: 2
  112. environments:
  113. - name: base
  114. states:
  115. - source: git
  116. address: 'git@repo.domain.com:salt/state-ubuntu.git'
  117. branch: 'master'
  118. pillar:
  119. source: git
  120. address: 'git@repo.domain.com:salt/pillar-demo.git'
  121. branch: 'master'
  122. handlers:
  123. name: logstash
  124. type: udp
  125. bind:
  126. host: 127.0.0.1
  127. port: 9999
  128. minion:
  129. handlers:
  130. - engine: udp
  131. bind:
  132. host: 127.0.0.1
  133. port: 9999
  134. - engine: zmq
  135. bind:
  136. host: 127.0.0.1
  137. port: 9999
  138. Salt minion
  139. -----------
  140. Simplest Salt minion
  141. .. code-block:: yaml
  142. salt:
  143. minion:
  144. enabled: true
  145. master:
  146. host: master.domain.com
  147. Multi-master Salt minion
  148. .. code-block:: yaml
  149. salt:
  150. minion:
  151. enabled: true
  152. masters:
  153. - host: master1.domain.com
  154. - host: master2.domain.com
  155. Salt minion with salt mine options
  156. .. code-block:: yaml
  157. salt:
  158. minion:
  159. enabled: true
  160. master:
  161. host: master.domain.com
  162. mine:
  163. interval: 60
  164. module:
  165. grains.items: []
  166. network.interfaces: []
  167. Salt minion with graphing dependencies
  168. .. code-block:: yaml
  169. salt:
  170. minion:
  171. enabled: true
  172. graph_states: true
  173. master:
  174. host: master.domain.com
  175. Salt control (cloud/virt)
  176. -------------------------
  177. Salt cloud with local OpenStack insecure (ignoring SSL cert errors) provider
  178. .. code-block:: yaml
  179. salt:
  180. control:
  181. enabled: true
  182. provider:
  183. openstack_account:
  184. engine: openstack
  185. insecure: true
  186. region: RegionOne
  187. identity_url: 'https://10.0.0.2:35357'
  188. tenant: devops
  189. user: user
  190. password: 'password'
  191. fixed_networks:
  192. - 123d3332-18be-4d1d-8d4d-5f5a54456554e
  193. floating_networks:
  194. - public
  195. ignore_cidr: 192.168.0.0/16
  196. Salt cloud with Digital Ocean provider
  197. .. code-block:: yaml
  198. salt:
  199. control:
  200. enabled: true
  201. provider:
  202. dony1:
  203. engine: digital_ocean
  204. region: New York 1
  205. client_key: xxxxxxx
  206. api_key: xxxxxxx
  207. Salt cloud with cluster definition
  208. .. code-block:: yaml
  209. salt:
  210. control:
  211. enabled: true
  212. cluster:
  213. devops_ase:
  214. config:
  215. engine: salt
  216. host: 147.32.120.1
  217. node:
  218. proxy1.ase.cepsos.cz:
  219. provider: cepsos_devops
  220. image: Ubuntu12.04 x86_64
  221. size: m1.medium
  222. node1.ase.cepsos.cz:
  223. provider: cepsos_devops
  224. image: Ubuntu12.04 x86_64
  225. size: m1.medium
  226. node2.ase.cepsos.cz:
  227. provider: cepsos_devops
  228. image: Ubuntu12.04 x86_64
  229. size: m1.medium
  230. node3.ase.cepsos.cz:
  231. provider: cepsos_devops
  232. image: Ubuntu12.04 x86_64
  233. size: m1.medium
  234. Usage
  235. =====
  236. Working with salt-cloud
  237. .. code-block:: bash
  238. salt-cloud -m /path/to/map --assume-yes
  239. Debug LIBCLOUD for salt-cloud connection
  240. .. code-block:: bash
  241. export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
  242. Read more
  243. =========
  244. * http://salt.readthedocs.org/en/latest/
  245. * https://github.com/DanielBryan/salt-state-graph
  246. * http://karlgrz.com/testing-salt-states-rapidly-with-docker/
  247. * https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
  248. * http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
  249. * https://github.com/saltstack-formulas/salt-formula
  250. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  251. salt-cloud
  252. ----------
  253. * http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
  254. * http://cloudinit.readthedocs.org/en/latest/topics/examples.html
  255. * http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
  256. * http://docs.saltstack.com/topics/cloud/digitalocean.html
  257. * http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
  258. * http://salt-cloud.readthedocs.org/en/latest/topics/map.html
  259. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html