blob: 5eecf1a11df2dba8732df96e9b2e28d669b5a149 [file] [log] [blame]
Filip Pytlounb4b80592015-10-06 16:28:32 +02001
Ales Komarek54740682017-05-15 07:16:23 +02002============
3Salt Formula
4============
Filip Pytlounb4b80592015-10-06 16:28:32 +02005
Ales Komarek54740682017-05-15 07:16:23 +02006Salt is a new approach to infrastructure management. Easy enough to get
7running in minutes, scalable enough to manage tens of thousands of servers,
8and fast enough to communicate with them in seconds.
Filip Pytlounb4b80592015-10-06 16:28:32 +02009
Ales Komarek54740682017-05-15 07:16:23 +020010Salt delivers a dynamic communication bus for infrastructures that can be used
11for orchestration, remote execution, configuration management and much more.
Filip Pytlounb4b80592015-10-06 16:28:32 +020012
Ales Komarek54740682017-05-15 07:16:23 +020013
14Sample Metadata
15===============
16
Filip Pytlounb4b80592015-10-06 16:28:32 +020017
Ales Komarekd768f1c2018-01-30 22:37:18 +010018Salt Master
Filip Pytlounb4b80592015-10-06 16:28:32 +020019-----------
20
Ales Komarek54740682017-05-15 07:16:23 +020021Salt master with base formulas and pillar metadata backend
Filip Pytlounb4b80592015-10-06 16:28:32 +020022
Ales Komarek8ba9c0b2016-02-21 14:59:59 +010023.. literalinclude:: tests/pillar/master_single_pillar.sls
24 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +020025
Ales Komarek54740682017-05-15 07:16:23 +020026Salt master with reclass ENC metadata backend
Filip Pytlounb4b80592015-10-06 16:28:32 +020027
Ales Komarek8ba9c0b2016-02-21 14:59:59 +010028.. literalinclude:: tests/pillar/master_single_reclass.sls
29 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +020030
Ales Komarek459407b2018-01-18 17:16:31 +010031Salt master with Architect ENC metadata backend
32
33.. code-block:: yaml
34
35 salt:
36 master:
37 enabled: true
38 pillar:
39 engine: architect
40 project: project-name
41 host: architect-api
42 port: 8181
43 username: salt
44 password: password
45
Petr Michalec1f541c42017-08-17 13:30:37 +020046Salt master with multiple ext_pillars
47
48.. literalinclude:: tests/pillar/master_single_extpillars.sls
49 :language: yaml
50
Filip Pytlounb4b80592015-10-06 16:28:32 +020051Salt master with API
52
Ales Komarekb2c8ff62016-08-22 00:20:01 +020053.. literalinclude:: tests/pillar/master_api.sls
54 :language: yaml
Ales Komarekcdb280f2016-07-27 15:37:51 +020055
56Salt master with defined user ACLs
57
Ales Komarekb2c8ff62016-08-22 00:20:01 +020058.. literalinclude:: tests/pillar/master_acl.sls
59 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +020060
61Salt master with preset minions
62
63.. code-block:: yaml
64
65 salt:
66 master:
67 enabled: true
Filip Pytlounb4b80592015-10-06 16:28:32 +020068 minions:
69 - name: 'node1.system.location.domain.com'
70
Ales Komarek54740682017-05-15 07:16:23 +020071Salt master with pip based installation (optional)
Adam Tenglercaedd972016-05-04 16:44:00 +020072
73.. code-block:: yaml
74
75 salt:
76 master:
77 enabled: true
78 ...
79 source:
80 engine: pip
81 version: 2016.3.0rc2
82
Ales Komarek54740682017-05-15 07:16:23 +020083Install formula through system package management
Adam Tengler3eb85ad2016-05-06 02:52:40 +020084
85.. code-block:: yaml
86
87 salt:
88 master:
89 enabled: true
90 ...
91 environment:
92 prd:
Petr Michalec7a2f1d22017-05-17 22:08:32 +020093 keystone:
Adam Tengler3eb85ad2016-05-06 02:52:40 +020094 source: pkg
95 name: salt-formula-keystone
Petr Michalec7a2f1d22017-05-17 22:08:32 +020096 nova:
97 source: pkg
98 name: salt-formula-keystone
99 version: 0.1+0~20160818133412.24~1.gbp6e1ebb
100 postresql:
101 source: pkg
102 name: salt-formula-postgresql
103 version: purged
104
105Formula keystone is installed latest version and the formulas without version are installed in one call to aptpkg module.
106If the version attribute is present sls iterates over formulas and take action to install specific version or remove it.
107The version attribute may have these values ``[latest|purged|removed|<VERSION>]``.
Adam Tengler3eb85ad2016-05-06 02:52:40 +0200108
109Clone master branch of keystone formula as local feature branch
110
111.. code-block:: yaml
112
113 salt:
114 master:
115 enabled: true
116 ...
117 environment:
118 dev:
119 formula:
120 keystone:
121 source: git
122 address: git@github.com:openstack/salt-formula-keystone.git
123 revision: master
124 branch: feature
125
126Salt master with specified formula refs (for example for Gerrit review)
127
128.. code-block:: yaml
129
130 salt:
131 master:
132 enabled: true
133 ...
134 environment:
135 dev:
136 formula:
137 keystone:
138 source: git
139 address: https://git.openstack.org/openstack/salt-formula-keystone
140 revision: refs/changes/56/123456/1
141
Oleksii Chupryn7b7102a2018-05-11 10:32:11 +0300142Salt master logging configuration
143
144.. code-block:: yaml
145
146 salt:
147 master:
148 enabled: true
149 log:
150 level: warning
151 file: '/var/log/salt/master'
152 level_logfile: warning
153
154Salt minion logging configuration
155
156.. code-block:: yaml
157
158 salt:
159 minion:
160 enabled: true
161 log:
162 level: info
163 file: '/var/log/salt/minion'
164 level_logfile: warning
165
Ales Komarek54740682017-05-15 07:16:23 +0200166Salt master with logging handlers
Filip Pytlounb4b80592015-10-06 16:28:32 +0200167
168.. code-block:: yaml
169
170 salt:
171 master:
172 enabled: true
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100173 handler:
174 handler01:
175 engine: udp
176 bind:
177 host: 127.0.0.1
178 port: 9999
Filip Pytlounb4b80592015-10-06 16:28:32 +0200179 minion:
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100180 handler:
181 handler01:
182 engine: udp
183 bind:
184 host: 127.0.0.1
185 port: 9999
186 handler02:
187 engine: zmq
188 bind:
189 host: 127.0.0.1
190 port: 9999
191
Ales Komareka9fc6e72017-09-06 15:02:40 +0200192Salt engine definition for saltgraph metadata collector
193
194.. code-block:: yaml
195
196 salt:
197 master:
198 engine:
199 graph_metadata:
200 engine: saltgraph
201 host: 127.0.0.1
202 port: 5432
203 user: salt
204 password: salt
205 database: salt
206
Ales Komarek459407b2018-01-18 17:16:31 +0100207Salt engine definition for Architect service
208
209.. code-block:: yaml
210
211 salt:
212 master:
213 engine:
214 architect:
215 engine: architect
216 project: project-name
217 host: architect-api
218 port: 8181
219 username: salt
220 password: password
221
Ales Komareka9fc6e72017-09-06 15:02:40 +0200222Salt engine definition for sending events from docker events
223
224.. code-block:: yaml
225
226 salt:
227 master:
228 engine:
229 docker_events:
230 docker_url: unix://var/run/docker.sock
231
Ales Komarek54740682017-05-15 07:16:23 +0200232Salt master peer setup for remote certificate signing
Jakub Pavlikd4859842016-05-23 10:48:04 +0200233
234.. code-block:: yaml
235
236 salt:
237 master:
238 peer:
239 ".*":
240 - x509.sign_remote_certificate
Filip Pytlounb4b80592015-10-06 16:28:32 +0200241
Ales Komarekb2ada522017-12-07 11:31:32 +0100242
243Salt master backup configuration
244
245.. code-block:: yaml
246
247 salt:
248 master:
249 backup: true
250 initial_data:
251 engine: backupninja
Jiri Broulik3e281642018-03-02 18:17:21 +0100252 home_dir: remote-backup-home-dir
Ales Komarekb2ada522017-12-07 11:31:32 +0100253 source: backup-node-host
254 host: original-salt-master-id
255
Tomáš Kukrál8922aef2017-05-10 10:27:04 +0200256Configure verbosity of state output (used for `salt` command)
257
258.. code-block:: yaml
259
260 salt:
261 master:
Tomáš Kukrál044667b2017-05-11 10:12:15 +0200262 state_output: changes
Tomáš Kukrál8922aef2017-05-10 10:27:04 +0200263
Ales Komarekd768f1c2018-01-30 22:37:18 +0100264Pass pillar render error to minion log
265
266.. note:: When set to `False` this option is great for debuging.
267 However it is not recomended for any production environment as it may contain
268 templating data as passwords, etc... , that minion should not expose.
269
270.. code-block:: yaml
271
272 salt:
273 master:
274 pillar_safe_render_error: False
275
Ales Komarekf44e64c2018-05-29 10:22:31 +0200276Enable Windows repo support
277
278.. code-block:: yaml
279
280 salt:
281 master:
282 win_repo:
283 source: git
284 address: https://github.com/saltstack/salt-winrepo-ng
285 revision: master
286
Ales Komarekd768f1c2018-01-30 22:37:18 +0100287
288Event/Reactor Systems
289~~~~~~~~~~~~~~~~~~~~~
Petr Michalec1f541c42017-08-17 13:30:37 +0200290
Ales Komareke7844d12017-06-08 12:00:01 +0200291Salt synchronise node pillar and modules after start
Ales Komarek54740682017-05-15 07:16:23 +0200292
293.. code-block:: yaml
294
295 salt:
296 master:
297 reactor:
298 salt/minion/*/start:
Ales Komareke7844d12017-06-08 12:00:01 +0200299 - salt://salt/reactor/node_start.sls
Ales Komarek54740682017-05-15 07:16:23 +0200300
Ales Komareke7844d12017-06-08 12:00:01 +0200301Trigger basic node install
302
303.. code-block:: yaml
304
305 salt:
306 master:
307 reactor:
308 salt/minion/install:
309 - salt://salt/reactor/node_install.sls
310
311Sample event to trigger the node installation
312
313.. code-block:: bash
314
315 salt-call event.send 'salt/minion/install'
316
Ales Komarek213fbe02017-08-21 16:39:05 +0200317Run any defined orchestration pipeline
Ales Komarek5c58de32017-06-06 11:49:32 +0200318
319.. code-block:: yaml
320
321 salt:
322 master:
323 reactor:
324 salt/orchestrate/start:
325 - salt://salt/reactor/orchestrate_start.sls
326
Ales Komareke7844d12017-06-08 12:00:01 +0200327Event to trigger the orchestration pipeline
Ales Komarek5c58de32017-06-06 11:49:32 +0200328
329.. code-block:: bash
330
Ales Komareke7844d12017-06-08 12:00:01 +0200331 salt-call event.send 'salt/orchestrate/start' "{'orchestrate': 'salt/orchestrate/infra_install.sls'}"
Ales Komarek5c58de32017-06-06 11:49:32 +0200332
Ales Komarek3ed7c432017-08-24 16:15:49 +0200333Synchronise modules and pillars on minion start.
334
335.. code-block:: yaml
336
337 salt:
338 master:
339 reactor:
340 'salt/minion/*/start':
341 - salt://salt/reactor/minion_start.sls
342
Ales Komarek213fbe02017-08-21 16:39:05 +0200343Add and/or remove the minion key
Ales Komarek5c58de32017-06-06 11:49:32 +0200344
345.. code-block:: yaml
346
347 salt:
348 master:
349 reactor:
Ales Komarek213fbe02017-08-21 16:39:05 +0200350 salt/key/create:
351 - salt://salt/reactor/key_create.sls
352 salt/key/remove:
353 - salt://salt/reactor/key_remove.sls
Ales Komarek5c58de32017-06-06 11:49:32 +0200354
Ales Komarek213fbe02017-08-21 16:39:05 +0200355Event to trigger the key creation
Ales Komarek5c58de32017-06-06 11:49:32 +0200356
357.. code-block:: bash
358
Adam Tengler62188962017-09-04 13:34:44 +0000359 salt-call event.send 'salt/key/create' \
360 > "{'node_id': 'id-of-minion', 'node_host': '172.16.10.100', 'orch_post_create': 'kubernetes.orchestrate.compute_install', 'post_create_pillar': {'node_name': 'id-of-minion'}}"
Ales Komarek5c58de32017-06-06 11:49:32 +0200361
Ales Komarek213fbe02017-08-21 16:39:05 +0200362.. note::
363
364 You can add pass additional `orch_pre_create`, `orch_post_create`,
365 `orch_pre_remove` or `orch_post_remove` parameters to the event to call
366 extra orchestrate files. This can be useful for example for
367 registering/unregistering nodes from the monitoring alarms or dashboards.
368
369 The key creation event needs to be run from other machine than the one
370 being registered.
371
372Event to trigger the key removal
373
374.. code-block:: bash
375
376 salt-call event.send 'salt/key/remove'
Ales Komarek54740682017-05-15 07:16:23 +0200377
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200378Control VM provisioning
379
380.. code-block:: yaml
381
382 virt:
383 disk:
384 three_disks:
385 - system:
386 size: 4096
387 image: ubuntu.qcow
388 - repository_snapshot:
389 size: 8192
390 image: snapshot.qcow
391 - cinder-volume:
392 size: 2048
Ondrej Smolae6bcb292018-04-13 10:56:39 +0200393 nic:
394 control:
395 - name: nic01
396 bridge: br-pxe
397 model: virtio
398 - name: nic02
399 bridge: br-cp
400 model: virtio
401 - name: nic03
402 bridge: br-store-front
403 model: virtio
404 - name: nic04
405 bridge: br-public
406 model: virtio
407
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200408
409 salt:
410 control:
411 enabled: true
412 virt_enabled: true
413 size:
414 medium_three_disks:
415 cpu: 2
416 ram: 4
417 disk_profile: three_disks
418 cluster:
419 mycluster:
420 domain: neco.virt.domain.com
421 engine: virt
Ondrej Smolac7f6cfc2018-05-21 15:55:08 +0200422 #Option to set rng globaly
423 rng: false
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200424 node:
425 ubuntu1:
426 provider: node01.domain.com
427 image: ubuntu.qcow
428 size: medium
429 img_dest: /var/lib/libvirt/ssdimages
Ondrej Smolac7f6cfc2018-05-21 15:55:08 +0200430 #Rng defined on node will have higher priority then global one
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200431 rng:
432 backend: /dev/urandom
433 model: random
434 rate:
435 period: '1800'
436 bytes: '1500'
Ondrej Smolae6bcb292018-04-13 10:56:39 +0200437 mac:
438 nic01: AC:DE:48:AA:AA:AA
439 nic02: AC:DE:48:AA:AA:BB
440
441
Petr Michalec1f541c42017-08-17 13:30:37 +0200442
Petr Michalecdf75d682018-02-07 13:43:53 +0100443Jinja options
444-------------
445
446Use following options to update default jinja renderer options. Salt recognize Jinja options for templates and for sls files.
447
448For full list of options check jinja documentation: http://jinja.pocoo.org/docs/api/#high-level-api.
449
450.. code-block:: yaml
451
452
453 salt:
454 renderer:
455 # for templates
456 jinja: &jina_env
457 # Default Jinja environment options
458 block_start_string: '{%'
459 block_end_string: '%}'
460 variable_start_string: '{{'
461 variable_end_string: '}}'
462 comment_start_string: '{#'
463 comment_end_string: '#}'
464 keep_trailing_newline: False
465 newline_sequence: '\n'
466
467 # Next two are enabled by default in Salt
468 trim_blocks: True
469 lstrip_blocks: True
470
471 # Next two are not enabled by default in Salt
472 # but worth to consider to enable in future for salt-formulas
473 line_statement_prefix: '%'
474 line_comment_prefix: '##'
475
476 # for .sls state files
477 jinja_sls: *jinja_env
478
479
480
481With the line_statement/comment* _prefix options enabled following code statements are valid:
482
483.. code-block:: yaml
484 %- set myvar = 'one'
485
486 ## You can mix even with '{%'
487 {%- set myvar = 'two' %} ## comment
488 %- set mylist = ['one', 'two', 'three'] ## comment
489
490 ## comment
491 %- for item in mylist: ## comment
492 {{- item }}
493 %- endfor
494
495
496Encrypted pillars
Ales Komarekd768f1c2018-01-30 22:37:18 +0100497~~~~~~~~~~~~~~~~~
Petr Michalec1f541c42017-08-17 13:30:37 +0200498
499Note: NACL + below configuration will be available in Salt > 2017.7.
500
501External resources:
502
503- Tutorial to configure salt + reclass ext_pillar and nacl: http://apealive.net/post/2017-09-salt-nacl-ext-pillar/
504- Saltstack documentation: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.nacl.html
505
506Configure salt NACL module:
507
508.. code-block:: shell
509
510 pip install --upgrade libnacl===1.5.2
511 salt-call --local nacl.keygen /etc/salt/pki/master/nacl
512
513 local:
514 saved sk_file:/etc/salt/pki/master/nacl pk_file: /etc/salt/pki/master/nacl.pub
515
516
517.. code-block:: yaml
518
519 salt:
520 master:
521 pillar:
522 reclass: *reclass
523 nacl:
524 index: 99
525 nacl:
526 box_type: sealedbox
527 sk_file: /etc/salt/pki/master/nacl
528 pk_file: /etc/salt/pki/master/nacl.pub
529 #sk: None
530 #pk: None
531
532NACL encrypt secrets:
533
534 salt-call --local nacl.enc 'my_secret_value' pk_file=/etc/salt/pki/master/nacl.pub
535 hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q
536 # or
537 salt-run nacl.enc 'myotherpass'
538 ADDFD0Rav6p6+63sojl7Htfrncp5rrDVyeE4BSPO7ipq8fZuLDIVAzQLf4PCbDqi+Fau5KD3/J/E+Pw=
539
540
541NACL encrypted values on pillar:
542
543Use Boxed syntax `NACL[CryptedValue=]` to encode value on pillar:
544
545.. code-block:: yaml
546
547 my_pillar:
548 my_nacl:
549 key0: unencrypted_value
550 key1: NACL[hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q]
551
552NACL large files:
553
554.. code-block:: shell
555 salt-call nacl.enc_file /tmp/cert.crt out=/srv/salt/env/dev/cert.nacl
556 # or more advanced
557 cert=$(cat /tmp/cert.crt)
558 salt-call --out=newline_values_only nacl.enc_pub data="$cert" > /srv/salt/env/dev/cert.nacl
559
560
561NACL within template/native pillars:
562
563 pillarexample:
564 user: root
565 password1: {{salt.nacl.dec('DRB7Q6/X5gGSRCTpZyxS6hlbWj0llUA+uaVyvou3vJ4=')|json}}
566 cert_key: {{salt.nacl.dec_file('/srv/salt/env/dev/certs/example.com/cert.nacl')|json}}
567 cert_key2: {{salt.nacl.dec_file('salt:///certs/example.com/cert2.nacl')|json}}
568
Ales Komarekd768f1c2018-01-30 22:37:18 +0100569
570Salt Syndic
Ales Komarek54740682017-05-15 07:16:23 +0200571-----------
572
573The master of masters
574
575.. code-block:: yaml
576
577 salt:
578 master:
579 enabled: true
580 order_masters: True
581
582Lower syndicated master
583
584.. code-block:: yaml
585
586 salt:
587 syndic:
588 enabled: true
589 master:
590 host: master-of-master-host
591 timeout: 5
592
593Syndicated master with multiple master of masters
594
595.. code-block:: yaml
596
597 salt:
598 syndic:
599 enabled: true
600 masters:
601 - host: master-of-master-host1
602 - host: master-of-master-host2
603 timeout: 5
604
605
Ales Komarekd768f1c2018-01-30 22:37:18 +0100606Salt Minion
607-----------
608
609Simplest Salt minion setup with central configuration node
610
611.. code-block:: yaml
612
613.. literalinclude:: tests/pillar/minion_master.sls
614 :language: yaml
615
616Multi-master Salt minion setup
617
618.. literalinclude:: tests/pillar/minion_multi_master.sls
619 :language: yaml
620
621Salt minion with salt mine options
622
623.. literalinclude:: tests/pillar/minion_mine.sls
624 :language: yaml
625
626Salt minion with graphing dependencies
627
628.. literalinclude:: tests/pillar/minion_graph.sls
629 :language: yaml
630
631Salt minion behind HTTP proxy
632
633.. code-block:: yaml
634
635 salt:
636 minion:
637 proxy:
638 host: 127.0.0.1
639 port: 3128
640
641Salt minion to specify non-default HTTP backend. The default tornado backend
642does not respect HTTP proxy settings set as environment variables. This is
643useful for cases where you need to set no_proxy lists.
644
645.. code-block:: yaml
646
647 salt:
648 minion:
649 backend: urllib2
650
651
652Salt minion with PKI certificate authority (CA)
653
654.. literalinclude:: tests/pillar/minion_pki_ca.sls
655 :language: yaml
656
657Salt minion using PKI certificate
658
659.. literalinclude:: tests/pillar/minion_pki_cert.sls
660 :language: yaml
661
662Salt minion trust CA certificates issued by salt CA on a specific host (ie: salt-master node)
663
664.. code-block:: yaml
665
666 salt:
667 minion:
668 trusted_ca_minions:
669 - cfg01
670
671
672Salt Minion Proxy
673~~~~~~~~~~~~~~~~~
Jiri Broulika0f46682017-04-20 22:45:01 +0200674
675Salt proxy pillar
676
677.. code-block:: yaml
678
679 salt:
680 minion:
Jiri Broulik88275242017-05-24 17:21:17 +0200681 proxy_minion:
Jiri Broulika0f46682017-04-20 22:45:01 +0200682 master: localhost
683 device:
684 vsrx01.mydomain.local:
685 enabled: true
686 engine: napalm
687 csr1000v.mydomain.local:
688 enabled: true
689 engine: napalm
690
691.. note:: This is pillar of the the real salt-minion
692
693
694Proxy pillar for IOS device
695
696.. code-block:: yaml
697
698 proxy:
699 proxytype: napalm
700 driver: ios
701 host: csr1000v.mydomain.local
702 username: root
703 passwd: r00tme
704
705.. note:: This is pillar of the node thats not able to run salt-minion itself
706
707
708Proxy pillar for JunOS device
709
710.. code-block:: yaml
711
712 proxy:
713 proxytype: napalm
714 driver: junos
715 host: vsrx01.mydomain.local
716 username: root
717 passwd: r00tme
718 optional_args:
719 config_format: set
720
721.. note:: This is pillar of the node thats not able to run salt-minion itself
722
Ales Komarek8fb1da82016-08-21 23:52:03 +0200723
724Salt SSH
Ales Komarekd768f1c2018-01-30 22:37:18 +0100725~~~~~~~~
Ales Komarek8fb1da82016-08-21 23:52:03 +0200726
727Salt SSH with sudoer using key
728
729.. literalinclude:: tests/pillar/master_ssh_minion_key.sls
730 :language: yaml
731
732Salt SSH with sudoer using password
733
734.. literalinclude:: tests/pillar/master_ssh_minion_password.sls
735 :language: yaml
736
737Salt SSH with root using password
738
739.. literalinclude:: tests/pillar/master_ssh_minion_root.sls
740 :language: yaml
741
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100742Salt control (cloud/kvm/docker)
743-------------------------------
Filip Pytlounb4b80592015-10-06 16:28:32 +0200744
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100745Salt cloud with local OpenStack provider
Filip Pytlounb4b80592015-10-06 16:28:32 +0200746
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100747.. literalinclude:: tests/pillar/control_cloud_openstack.sls
748 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200749
750Salt cloud with Digital Ocean provider
751
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100752.. literalinclude:: tests/pillar/control_cloud_digitalocean.sls
753 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200754
Ales Komarek8fb1da82016-08-21 23:52:03 +0200755Salt virt with KVM cluster
Filip Pytlounb4b80592015-10-06 16:28:32 +0200756
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100757.. literalinclude:: tests/pillar/control_virt.sls
758 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200759
Mateusz Los4c7cd2d2018-01-09 11:46:07 +0100760salt virt with custom destination for image file
761
762.. literalinclude:: tests/pillar/control_virt_custom.sls
763 :language: yaml
764
Filip Pytlounb4b80592015-10-06 16:28:32 +0200765
766Usage
767=====
768
769Working with salt-cloud
770
771.. code-block:: bash
772
773 salt-cloud -m /path/to/map --assume-yes
774
775Debug LIBCLOUD for salt-cloud connection
776
777.. code-block:: bash
778
779 export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
780
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100781
Ales Komarekd768f1c2018-01-30 22:37:18 +0100782References
783==========
Filip Pytlounb4b80592015-10-06 16:28:32 +0200784
785* http://salt.readthedocs.org/en/latest/
786* https://github.com/DanielBryan/salt-state-graph
787* http://karlgrz.com/testing-salt-states-rapidly-with-docker/
788* https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
789* http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
790* https://github.com/saltstack-formulas/salt-formula
791* http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
792
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100793
Filip Pytlounb4b80592015-10-06 16:28:32 +0200794salt-cloud
795----------
796
797* http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
798* http://cloudinit.readthedocs.org/en/latest/topics/examples.html
799* http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
800* http://docs.saltstack.com/topics/cloud/digitalocean.html
801* http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
802* http://salt-cloud.readthedocs.org/en/latest/topics/map.html
803* http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100804
Filip Pytloun954dbd62017-02-02 13:02:03 +0100805
806Documentation and Bugs
807======================
808
809To learn how to install and update salt-formulas, consult the documentation
810available online at:
811
812 http://salt-formulas.readthedocs.io/
813
814In the unfortunate event that bugs are discovered, they should be reported to
815the appropriate issue tracker. Use Github issue tracker for specific salt
816formula:
817
818 https://github.com/salt-formulas/salt-formula-salt/issues
819
820For feature requests, bug reports or blueprints affecting entire ecosystem,
821use Launchpad salt-formulas project:
822
823 https://launchpad.net/salt-formulas
824
825You can also join salt-formulas-users team and subscribe to mailing list:
826
827 https://launchpad.net/~salt-formulas-users
828
829Developers wishing to work on the salt-formulas projects should always base
830their work on master branch and submit pull request against specific formula.
831
832 https://github.com/salt-formulas/salt-formula-salt
833
834Any questions or feedback is always welcome so feel free to join our IRC
835channel:
836
837 #salt-formulas @ irc.freenode.net