New version of salt-formula from Saltstack
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.

README.rst 7.2KB

9 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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. salt:
  157. minion:
  158. enabled: true
  159. master:
  160. host: master.domain.com
  161. mine:
  162. interval: 60
  163. module:
  164. grains.items: []
  165. network.interfaces: []
  166. Salt minion with graphing dependencies
  167. .. code-block:: yaml
  168. salt:
  169. minion:
  170. enabled: true
  171. graph_states: true
  172. master:
  173. host: master.domain.com
  174. Salt control (cloud/virt)
  175. -------------------------
  176. Salt cloud with local OpenStack insecure (ignoring SSL cert errors) provider
  177. .. code-block:: yaml
  178. salt:
  179. control:
  180. enabled: true
  181. provider:
  182. openstack_account:
  183. engine: openstack
  184. insecure: true
  185. region: RegionOne
  186. identity_url: 'https://10.0.0.2:35357'
  187. tenant: devops
  188. user: user
  189. password: 'password'
  190. fixed_networks:
  191. - 123d3332-18be-4d1d-8d4d-5f5a54456554e
  192. floating_networks:
  193. - public
  194. ignore_cidr: 192.168.0.0/16
  195. Salt cloud with Digital Ocean provider
  196. .. code-block:: yaml
  197. salt:
  198. control:
  199. enabled: true
  200. provider:
  201. dony1:
  202. engine: digital_ocean
  203. region: New York 1
  204. client_key: xxxxxxx
  205. api_key: xxxxxxx
  206. Salt cloud with cluster definition
  207. .. code-block:: yaml
  208. salt:
  209. control:
  210. enabled: true
  211. cluster:
  212. devops_ase:
  213. config:
  214. engine: salt
  215. host: 147.32.120.1
  216. node:
  217. proxy1.ase.cepsos.cz:
  218. provider: cepsos_devops
  219. image: Ubuntu12.04 x86_64
  220. size: m1.medium
  221. node1.ase.cepsos.cz:
  222. provider: cepsos_devops
  223. image: Ubuntu12.04 x86_64
  224. size: m1.medium
  225. node2.ase.cepsos.cz:
  226. provider: cepsos_devops
  227. image: Ubuntu12.04 x86_64
  228. size: m1.medium
  229. node3.ase.cepsos.cz:
  230. provider: cepsos_devops
  231. image: Ubuntu12.04 x86_64
  232. size: m1.medium
  233. Usage
  234. =====
  235. Working with salt-cloud
  236. .. code-block:: bash
  237. salt-cloud -m /path/to/map --assume-yes
  238. Debug LIBCLOUD for salt-cloud connection
  239. .. code-block:: bash
  240. export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
  241. Read more
  242. =========
  243. * http://salt.readthedocs.org/en/latest/
  244. * https://github.com/DanielBryan/salt-state-graph
  245. * http://karlgrz.com/testing-salt-states-rapidly-with-docker/
  246. * https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
  247. * http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
  248. * https://github.com/saltstack-formulas/salt-formula
  249. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
  250. salt-cloud
  251. ----------
  252. * http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
  253. * http://cloudinit.readthedocs.org/en/latest/topics/examples.html
  254. * http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
  255. * http://docs.saltstack.com/topics/cloud/digitalocean.html
  256. * http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
  257. * http://salt-cloud.readthedocs.org/en/latest/topics/map.html
  258. * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html