blob: de8b4a6259f98c451fc433e3eeb0ab2a8ed69cad [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
276
277Event/Reactor Systems
278~~~~~~~~~~~~~~~~~~~~~
Petr Michalec1f541c42017-08-17 13:30:37 +0200279
Ales Komareke7844d12017-06-08 12:00:01 +0200280Salt synchronise node pillar and modules after start
Ales Komarek54740682017-05-15 07:16:23 +0200281
282.. code-block:: yaml
283
284 salt:
285 master:
286 reactor:
287 salt/minion/*/start:
Ales Komareke7844d12017-06-08 12:00:01 +0200288 - salt://salt/reactor/node_start.sls
Ales Komarek54740682017-05-15 07:16:23 +0200289
Ales Komareke7844d12017-06-08 12:00:01 +0200290Trigger basic node install
291
292.. code-block:: yaml
293
294 salt:
295 master:
296 reactor:
297 salt/minion/install:
298 - salt://salt/reactor/node_install.sls
299
300Sample event to trigger the node installation
301
302.. code-block:: bash
303
304 salt-call event.send 'salt/minion/install'
305
Ales Komarek213fbe02017-08-21 16:39:05 +0200306Run any defined orchestration pipeline
Ales Komarek5c58de32017-06-06 11:49:32 +0200307
308.. code-block:: yaml
309
310 salt:
311 master:
312 reactor:
313 salt/orchestrate/start:
314 - salt://salt/reactor/orchestrate_start.sls
315
Ales Komareke7844d12017-06-08 12:00:01 +0200316Event to trigger the orchestration pipeline
Ales Komarek5c58de32017-06-06 11:49:32 +0200317
318.. code-block:: bash
319
Ales Komareke7844d12017-06-08 12:00:01 +0200320 salt-call event.send 'salt/orchestrate/start' "{'orchestrate': 'salt/orchestrate/infra_install.sls'}"
Ales Komarek5c58de32017-06-06 11:49:32 +0200321
Ales Komarek3ed7c432017-08-24 16:15:49 +0200322Synchronise modules and pillars on minion start.
323
324.. code-block:: yaml
325
326 salt:
327 master:
328 reactor:
329 'salt/minion/*/start':
330 - salt://salt/reactor/minion_start.sls
331
Ales Komarek213fbe02017-08-21 16:39:05 +0200332Add and/or remove the minion key
Ales Komarek5c58de32017-06-06 11:49:32 +0200333
334.. code-block:: yaml
335
336 salt:
337 master:
338 reactor:
Ales Komarek213fbe02017-08-21 16:39:05 +0200339 salt/key/create:
340 - salt://salt/reactor/key_create.sls
341 salt/key/remove:
342 - salt://salt/reactor/key_remove.sls
Ales Komarek5c58de32017-06-06 11:49:32 +0200343
Ales Komarek213fbe02017-08-21 16:39:05 +0200344Event to trigger the key creation
Ales Komarek5c58de32017-06-06 11:49:32 +0200345
346.. code-block:: bash
347
Adam Tengler62188962017-09-04 13:34:44 +0000348 salt-call event.send 'salt/key/create' \
349 > "{'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 +0200350
Ales Komarek213fbe02017-08-21 16:39:05 +0200351.. note::
352
353 You can add pass additional `orch_pre_create`, `orch_post_create`,
354 `orch_pre_remove` or `orch_post_remove` parameters to the event to call
355 extra orchestrate files. This can be useful for example for
356 registering/unregistering nodes from the monitoring alarms or dashboards.
357
358 The key creation event needs to be run from other machine than the one
359 being registered.
360
361Event to trigger the key removal
362
363.. code-block:: bash
364
365 salt-call event.send 'salt/key/remove'
Ales Komarek54740682017-05-15 07:16:23 +0200366
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200367Control VM provisioning
368
369.. code-block:: yaml
370
371 virt:
372 disk:
373 three_disks:
374 - system:
375 size: 4096
376 image: ubuntu.qcow
377 - repository_snapshot:
378 size: 8192
379 image: snapshot.qcow
380 - cinder-volume:
381 size: 2048
Ondrej Smolae6bcb292018-04-13 10:56:39 +0200382 nic:
383 control:
384 - name: nic01
385 bridge: br-pxe
386 model: virtio
387 - name: nic02
388 bridge: br-cp
389 model: virtio
390 - name: nic03
391 bridge: br-store-front
392 model: virtio
393 - name: nic04
394 bridge: br-public
395 model: virtio
396
Dzmitry Stremkouski7ee23402018-04-10 00:43:48 +0200397
398 salt:
399 control:
400 enabled: true
401 virt_enabled: true
402 size:
403 medium_three_disks:
404 cpu: 2
405 ram: 4
406 disk_profile: three_disks
407 cluster:
408 mycluster:
409 domain: neco.virt.domain.com
410 engine: virt
411 node:
412 ubuntu1:
413 provider: node01.domain.com
414 image: ubuntu.qcow
415 size: medium
416 img_dest: /var/lib/libvirt/ssdimages
417 rng:
418 backend: /dev/urandom
419 model: random
420 rate:
421 period: '1800'
422 bytes: '1500'
Ondrej Smolae6bcb292018-04-13 10:56:39 +0200423 mac:
424 nic01: AC:DE:48:AA:AA:AA
425 nic02: AC:DE:48:AA:AA:BB
426
427
Petr Michalec1f541c42017-08-17 13:30:37 +0200428
Petr Michalecdf75d682018-02-07 13:43:53 +0100429Jinja options
430-------------
431
432Use following options to update default jinja renderer options. Salt recognize Jinja options for templates and for sls files.
433
434For full list of options check jinja documentation: http://jinja.pocoo.org/docs/api/#high-level-api.
435
436.. code-block:: yaml
437
438
439 salt:
440 renderer:
441 # for templates
442 jinja: &jina_env
443 # Default Jinja environment options
444 block_start_string: '{%'
445 block_end_string: '%}'
446 variable_start_string: '{{'
447 variable_end_string: '}}'
448 comment_start_string: '{#'
449 comment_end_string: '#}'
450 keep_trailing_newline: False
451 newline_sequence: '\n'
452
453 # Next two are enabled by default in Salt
454 trim_blocks: True
455 lstrip_blocks: True
456
457 # Next two are not enabled by default in Salt
458 # but worth to consider to enable in future for salt-formulas
459 line_statement_prefix: '%'
460 line_comment_prefix: '##'
461
462 # for .sls state files
463 jinja_sls: *jinja_env
464
465
466
467With the line_statement/comment* _prefix options enabled following code statements are valid:
468
469.. code-block:: yaml
470 %- set myvar = 'one'
471
472 ## You can mix even with '{%'
473 {%- set myvar = 'two' %} ## comment
474 %- set mylist = ['one', 'two', 'three'] ## comment
475
476 ## comment
477 %- for item in mylist: ## comment
478 {{- item }}
479 %- endfor
480
481
482Encrypted pillars
Ales Komarekd768f1c2018-01-30 22:37:18 +0100483~~~~~~~~~~~~~~~~~
Petr Michalec1f541c42017-08-17 13:30:37 +0200484
485Note: NACL + below configuration will be available in Salt > 2017.7.
486
487External resources:
488
489- Tutorial to configure salt + reclass ext_pillar and nacl: http://apealive.net/post/2017-09-salt-nacl-ext-pillar/
490- Saltstack documentation: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.nacl.html
491
492Configure salt NACL module:
493
494.. code-block:: shell
495
496 pip install --upgrade libnacl===1.5.2
497 salt-call --local nacl.keygen /etc/salt/pki/master/nacl
498
499 local:
500 saved sk_file:/etc/salt/pki/master/nacl pk_file: /etc/salt/pki/master/nacl.pub
501
502
503.. code-block:: yaml
504
505 salt:
506 master:
507 pillar:
508 reclass: *reclass
509 nacl:
510 index: 99
511 nacl:
512 box_type: sealedbox
513 sk_file: /etc/salt/pki/master/nacl
514 pk_file: /etc/salt/pki/master/nacl.pub
515 #sk: None
516 #pk: None
517
518NACL encrypt secrets:
519
520 salt-call --local nacl.enc 'my_secret_value' pk_file=/etc/salt/pki/master/nacl.pub
521 hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q
522 # or
523 salt-run nacl.enc 'myotherpass'
524 ADDFD0Rav6p6+63sojl7Htfrncp5rrDVyeE4BSPO7ipq8fZuLDIVAzQLf4PCbDqi+Fau5KD3/J/E+Pw=
525
526
527NACL encrypted values on pillar:
528
529Use Boxed syntax `NACL[CryptedValue=]` to encode value on pillar:
530
531.. code-block:: yaml
532
533 my_pillar:
534 my_nacl:
535 key0: unencrypted_value
536 key1: NACL[hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q]
537
538NACL large files:
539
540.. code-block:: shell
541 salt-call nacl.enc_file /tmp/cert.crt out=/srv/salt/env/dev/cert.nacl
542 # or more advanced
543 cert=$(cat /tmp/cert.crt)
544 salt-call --out=newline_values_only nacl.enc_pub data="$cert" > /srv/salt/env/dev/cert.nacl
545
546
547NACL within template/native pillars:
548
549 pillarexample:
550 user: root
551 password1: {{salt.nacl.dec('DRB7Q6/X5gGSRCTpZyxS6hlbWj0llUA+uaVyvou3vJ4=')|json}}
552 cert_key: {{salt.nacl.dec_file('/srv/salt/env/dev/certs/example.com/cert.nacl')|json}}
553 cert_key2: {{salt.nacl.dec_file('salt:///certs/example.com/cert2.nacl')|json}}
554
Ales Komarekd768f1c2018-01-30 22:37:18 +0100555
556Salt Syndic
Ales Komarek54740682017-05-15 07:16:23 +0200557-----------
558
559The master of masters
560
561.. code-block:: yaml
562
563 salt:
564 master:
565 enabled: true
566 order_masters: True
567
568Lower syndicated master
569
570.. code-block:: yaml
571
572 salt:
573 syndic:
574 enabled: true
575 master:
576 host: master-of-master-host
577 timeout: 5
578
579Syndicated master with multiple master of masters
580
581.. code-block:: yaml
582
583 salt:
584 syndic:
585 enabled: true
586 masters:
587 - host: master-of-master-host1
588 - host: master-of-master-host2
589 timeout: 5
590
591
Ales Komarekd768f1c2018-01-30 22:37:18 +0100592Salt Minion
593-----------
594
595Simplest Salt minion setup with central configuration node
596
597.. code-block:: yaml
598
599.. literalinclude:: tests/pillar/minion_master.sls
600 :language: yaml
601
602Multi-master Salt minion setup
603
604.. literalinclude:: tests/pillar/minion_multi_master.sls
605 :language: yaml
606
607Salt minion with salt mine options
608
609.. literalinclude:: tests/pillar/minion_mine.sls
610 :language: yaml
611
612Salt minion with graphing dependencies
613
614.. literalinclude:: tests/pillar/minion_graph.sls
615 :language: yaml
616
617Salt minion behind HTTP proxy
618
619.. code-block:: yaml
620
621 salt:
622 minion:
623 proxy:
624 host: 127.0.0.1
625 port: 3128
626
627Salt minion to specify non-default HTTP backend. The default tornado backend
628does not respect HTTP proxy settings set as environment variables. This is
629useful for cases where you need to set no_proxy lists.
630
631.. code-block:: yaml
632
633 salt:
634 minion:
635 backend: urllib2
636
637
638Salt minion with PKI certificate authority (CA)
639
640.. literalinclude:: tests/pillar/minion_pki_ca.sls
641 :language: yaml
642
643Salt minion using PKI certificate
644
645.. literalinclude:: tests/pillar/minion_pki_cert.sls
646 :language: yaml
647
648Salt minion trust CA certificates issued by salt CA on a specific host (ie: salt-master node)
649
650.. code-block:: yaml
651
652 salt:
653 minion:
654 trusted_ca_minions:
655 - cfg01
656
657
658Salt Minion Proxy
659~~~~~~~~~~~~~~~~~
Jiri Broulika0f46682017-04-20 22:45:01 +0200660
661Salt proxy pillar
662
663.. code-block:: yaml
664
665 salt:
666 minion:
Jiri Broulik88275242017-05-24 17:21:17 +0200667 proxy_minion:
Jiri Broulika0f46682017-04-20 22:45:01 +0200668 master: localhost
669 device:
670 vsrx01.mydomain.local:
671 enabled: true
672 engine: napalm
673 csr1000v.mydomain.local:
674 enabled: true
675 engine: napalm
676
677.. note:: This is pillar of the the real salt-minion
678
679
680Proxy pillar for IOS device
681
682.. code-block:: yaml
683
684 proxy:
685 proxytype: napalm
686 driver: ios
687 host: csr1000v.mydomain.local
688 username: root
689 passwd: r00tme
690
691.. note:: This is pillar of the node thats not able to run salt-minion itself
692
693
694Proxy pillar for JunOS device
695
696.. code-block:: yaml
697
698 proxy:
699 proxytype: napalm
700 driver: junos
701 host: vsrx01.mydomain.local
702 username: root
703 passwd: r00tme
704 optional_args:
705 config_format: set
706
707.. note:: This is pillar of the node thats not able to run salt-minion itself
708
Ales Komarek8fb1da82016-08-21 23:52:03 +0200709
710Salt SSH
Ales Komarekd768f1c2018-01-30 22:37:18 +0100711~~~~~~~~
Ales Komarek8fb1da82016-08-21 23:52:03 +0200712
713Salt SSH with sudoer using key
714
715.. literalinclude:: tests/pillar/master_ssh_minion_key.sls
716 :language: yaml
717
718Salt SSH with sudoer using password
719
720.. literalinclude:: tests/pillar/master_ssh_minion_password.sls
721 :language: yaml
722
723Salt SSH with root using password
724
725.. literalinclude:: tests/pillar/master_ssh_minion_root.sls
726 :language: yaml
727
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100728Salt control (cloud/kvm/docker)
729-------------------------------
Filip Pytlounb4b80592015-10-06 16:28:32 +0200730
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100731Salt cloud with local OpenStack provider
Filip Pytlounb4b80592015-10-06 16:28:32 +0200732
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100733.. literalinclude:: tests/pillar/control_cloud_openstack.sls
734 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200735
736Salt cloud with Digital Ocean provider
737
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100738.. literalinclude:: tests/pillar/control_cloud_digitalocean.sls
739 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200740
Ales Komarek8fb1da82016-08-21 23:52:03 +0200741Salt virt with KVM cluster
Filip Pytlounb4b80592015-10-06 16:28:32 +0200742
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100743.. literalinclude:: tests/pillar/control_virt.sls
744 :language: yaml
Filip Pytlounb4b80592015-10-06 16:28:32 +0200745
Mateusz Los4c7cd2d2018-01-09 11:46:07 +0100746salt virt with custom destination for image file
747
748.. literalinclude:: tests/pillar/control_virt_custom.sls
749 :language: yaml
750
Filip Pytlounb4b80592015-10-06 16:28:32 +0200751
752Usage
753=====
754
755Working with salt-cloud
756
757.. code-block:: bash
758
759 salt-cloud -m /path/to/map --assume-yes
760
761Debug LIBCLOUD for salt-cloud connection
762
763.. code-block:: bash
764
765 export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all
766
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100767
Ales Komarekd768f1c2018-01-30 22:37:18 +0100768References
769==========
Filip Pytlounb4b80592015-10-06 16:28:32 +0200770
771* http://salt.readthedocs.org/en/latest/
772* https://github.com/DanielBryan/salt-state-graph
773* http://karlgrz.com/testing-salt-states-rapidly-with-docker/
774* https://mywushublog.com/2013/03/configuration-management-with-salt-stack/
775* http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/
776* https://github.com/saltstack-formulas/salt-formula
777* http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
778
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100779
Filip Pytlounb4b80592015-10-06 16:28:32 +0200780salt-cloud
781----------
782
783* http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html
784* http://cloudinit.readthedocs.org/en/latest/topics/examples.html
785* http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html
786* http://docs.saltstack.com/topics/cloud/digitalocean.html
787* http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html
788* http://salt-cloud.readthedocs.org/en/latest/topics/map.html
789* http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
Ales Komarek8ba9c0b2016-02-21 14:59:59 +0100790
Filip Pytloun954dbd62017-02-02 13:02:03 +0100791
792Documentation and Bugs
793======================
794
795To learn how to install and update salt-formulas, consult the documentation
796available online at:
797
798 http://salt-formulas.readthedocs.io/
799
800In the unfortunate event that bugs are discovered, they should be reported to
801the appropriate issue tracker. Use Github issue tracker for specific salt
802formula:
803
804 https://github.com/salt-formulas/salt-formula-salt/issues
805
806For feature requests, bug reports or blueprints affecting entire ecosystem,
807use Launchpad salt-formulas project:
808
809 https://launchpad.net/salt-formulas
810
811You can also join salt-formulas-users team and subscribe to mailing list:
812
813 https://launchpad.net/~salt-formulas-users
814
815Developers wishing to work on the salt-formulas projects should always base
816their work on master branch and submit pull request against specific formula.
817
818 https://github.com/salt-formulas/salt-formula-salt
819
820Any questions or feedback is always welcome so feel free to join our IRC
821channel:
822
823 #salt-formulas @ irc.freenode.net