Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 2 | ============ |
| 3 | Salt Formula |
| 4 | ============ |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 5 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 6 | Salt is a new approach to infrastructure management. Easy enough to get |
| 7 | running in minutes, scalable enough to manage tens of thousands of servers, |
| 8 | and fast enough to communicate with them in seconds. |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 9 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 10 | Salt delivers a dynamic communication bus for infrastructures that can be used |
| 11 | for orchestration, remote execution, configuration management and much more. |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 12 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 13 | |
| 14 | Sample Metadata |
| 15 | =============== |
| 16 | |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 17 | |
| 18 | Salt master |
| 19 | ----------- |
| 20 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 21 | Salt master with base formulas and pillar metadata backend |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 22 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 23 | .. literalinclude:: tests/pillar/master_single_pillar.sls |
| 24 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 25 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 26 | Salt master with reclass ENC metadata backend |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 27 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 28 | .. literalinclude:: tests/pillar/master_single_reclass.sls |
| 29 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 30 | |
Petr Michalec | 1f541c4 | 2017-08-17 13:30:37 +0200 | [diff] [blame^] | 31 | Salt master with multiple ext_pillars |
| 32 | |
| 33 | .. literalinclude:: tests/pillar/master_single_extpillars.sls |
| 34 | :language: yaml |
| 35 | |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 36 | Salt master with API |
| 37 | |
Ales Komarek | b2c8ff6 | 2016-08-22 00:20:01 +0200 | [diff] [blame] | 38 | .. literalinclude:: tests/pillar/master_api.sls |
| 39 | :language: yaml |
Ales Komarek | cdb280f | 2016-07-27 15:37:51 +0200 | [diff] [blame] | 40 | |
| 41 | Salt master with defined user ACLs |
| 42 | |
Ales Komarek | b2c8ff6 | 2016-08-22 00:20:01 +0200 | [diff] [blame] | 43 | .. literalinclude:: tests/pillar/master_acl.sls |
| 44 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 45 | |
| 46 | Salt master with preset minions |
| 47 | |
| 48 | .. code-block:: yaml |
| 49 | |
| 50 | salt: |
| 51 | master: |
| 52 | enabled: true |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 53 | minions: |
| 54 | - name: 'node1.system.location.domain.com' |
| 55 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 56 | Salt master with pip based installation (optional) |
Adam Tengler | caedd97 | 2016-05-04 16:44:00 +0200 | [diff] [blame] | 57 | |
| 58 | .. code-block:: yaml |
| 59 | |
| 60 | salt: |
| 61 | master: |
| 62 | enabled: true |
| 63 | ... |
| 64 | source: |
| 65 | engine: pip |
| 66 | version: 2016.3.0rc2 |
| 67 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 68 | Install formula through system package management |
Adam Tengler | 3eb85ad | 2016-05-06 02:52:40 +0200 | [diff] [blame] | 69 | |
| 70 | .. code-block:: yaml |
| 71 | |
| 72 | salt: |
| 73 | master: |
| 74 | enabled: true |
| 75 | ... |
| 76 | environment: |
| 77 | prd: |
Petr Michalec | 7a2f1d2 | 2017-05-17 22:08:32 +0200 | [diff] [blame] | 78 | keystone: |
Adam Tengler | 3eb85ad | 2016-05-06 02:52:40 +0200 | [diff] [blame] | 79 | source: pkg |
| 80 | name: salt-formula-keystone |
Petr Michalec | 7a2f1d2 | 2017-05-17 22:08:32 +0200 | [diff] [blame] | 81 | nova: |
| 82 | source: pkg |
| 83 | name: salt-formula-keystone |
| 84 | version: 0.1+0~20160818133412.24~1.gbp6e1ebb |
| 85 | postresql: |
| 86 | source: pkg |
| 87 | name: salt-formula-postgresql |
| 88 | version: purged |
| 89 | |
| 90 | Formula keystone is installed latest version and the formulas without version are installed in one call to aptpkg module. |
| 91 | If the version attribute is present sls iterates over formulas and take action to install specific version or remove it. |
| 92 | The version attribute may have these values ``[latest|purged|removed|<VERSION>]``. |
Adam Tengler | 3eb85ad | 2016-05-06 02:52:40 +0200 | [diff] [blame] | 93 | |
| 94 | Clone master branch of keystone formula as local feature branch |
| 95 | |
| 96 | .. code-block:: yaml |
| 97 | |
| 98 | salt: |
| 99 | master: |
| 100 | enabled: true |
| 101 | ... |
| 102 | environment: |
| 103 | dev: |
| 104 | formula: |
| 105 | keystone: |
| 106 | source: git |
| 107 | address: git@github.com:openstack/salt-formula-keystone.git |
| 108 | revision: master |
| 109 | branch: feature |
| 110 | |
| 111 | Salt master with specified formula refs (for example for Gerrit review) |
| 112 | |
| 113 | .. code-block:: yaml |
| 114 | |
| 115 | salt: |
| 116 | master: |
| 117 | enabled: true |
| 118 | ... |
| 119 | environment: |
| 120 | dev: |
| 121 | formula: |
| 122 | keystone: |
| 123 | source: git |
| 124 | address: https://git.openstack.org/openstack/salt-formula-keystone |
| 125 | revision: refs/changes/56/123456/1 |
| 126 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 127 | Salt master with logging handlers |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 128 | |
| 129 | .. code-block:: yaml |
| 130 | |
| 131 | salt: |
| 132 | master: |
| 133 | enabled: true |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 134 | handler: |
| 135 | handler01: |
| 136 | engine: udp |
| 137 | bind: |
| 138 | host: 127.0.0.1 |
| 139 | port: 9999 |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 140 | minion: |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 141 | handler: |
| 142 | handler01: |
| 143 | engine: udp |
| 144 | bind: |
| 145 | host: 127.0.0.1 |
| 146 | port: 9999 |
| 147 | handler02: |
| 148 | engine: zmq |
| 149 | bind: |
| 150 | host: 127.0.0.1 |
| 151 | port: 9999 |
| 152 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 153 | Salt master peer setup for remote certificate signing |
Jakub Pavlik | d485984 | 2016-05-23 10:48:04 +0200 | [diff] [blame] | 154 | |
| 155 | .. code-block:: yaml |
| 156 | |
| 157 | salt: |
| 158 | master: |
| 159 | peer: |
| 160 | ".*": |
| 161 | - x509.sign_remote_certificate |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 162 | |
Tomáš Kukrál | 8922aef | 2017-05-10 10:27:04 +0200 | [diff] [blame] | 163 | Configure verbosity of state output (used for `salt` command) |
| 164 | |
| 165 | .. code-block:: yaml |
| 166 | |
| 167 | salt: |
| 168 | master: |
Tomáš Kukrál | 044667b | 2017-05-11 10:12:15 +0200 | [diff] [blame] | 169 | state_output: changes |
Tomáš Kukrál | 8922aef | 2017-05-10 10:27:04 +0200 | [diff] [blame] | 170 | |
Petr Michalec | 1f541c4 | 2017-08-17 13:30:37 +0200 | [diff] [blame^] | 171 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 172 | Salt synchronise node pillar and modules after start |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 173 | |
| 174 | .. code-block:: yaml |
| 175 | |
| 176 | salt: |
| 177 | master: |
| 178 | reactor: |
| 179 | salt/minion/*/start: |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 180 | - salt://salt/reactor/node_start.sls |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 181 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 182 | Trigger basic node install |
| 183 | |
| 184 | .. code-block:: yaml |
| 185 | |
| 186 | salt: |
| 187 | master: |
| 188 | reactor: |
| 189 | salt/minion/install: |
| 190 | - salt://salt/reactor/node_install.sls |
| 191 | |
| 192 | Sample event to trigger the node installation |
| 193 | |
| 194 | .. code-block:: bash |
| 195 | |
| 196 | salt-call event.send 'salt/minion/install' |
| 197 | |
| 198 | Run any orchestration pipeline |
Ales Komarek | 5c58de3 | 2017-06-06 11:49:32 +0200 | [diff] [blame] | 199 | |
| 200 | .. code-block:: yaml |
| 201 | |
| 202 | salt: |
| 203 | master: |
| 204 | reactor: |
| 205 | salt/orchestrate/start: |
| 206 | - salt://salt/reactor/orchestrate_start.sls |
| 207 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 208 | Event to trigger the orchestration pipeline |
Ales Komarek | 5c58de3 | 2017-06-06 11:49:32 +0200 | [diff] [blame] | 209 | |
| 210 | .. code-block:: bash |
| 211 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 212 | salt-call event.send 'salt/orchestrate/start' "{'orchestrate': 'salt/orchestrate/infra_install.sls'}" |
Ales Komarek | 5c58de3 | 2017-06-06 11:49:32 +0200 | [diff] [blame] | 213 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 214 | Classify node after start |
Ales Komarek | 5c58de3 | 2017-06-06 11:49:32 +0200 | [diff] [blame] | 215 | |
| 216 | .. code-block:: yaml |
| 217 | |
| 218 | salt: |
| 219 | master: |
| 220 | reactor: |
| 221 | reclass/minion/classify: |
| 222 | - salt://reclass/reactor/node_register.sls |
| 223 | |
Ales Komarek | e7844d1 | 2017-06-08 12:00:01 +0200 | [diff] [blame] | 224 | Event to trigger the node classification |
Ales Komarek | 5c58de3 | 2017-06-06 11:49:32 +0200 | [diff] [blame] | 225 | |
| 226 | .. code-block:: bash |
| 227 | |
| 228 | salt-call event.send 'reclass/minion/classify' "{'node_master_ip': '$config_host', 'node_ip': '${node_ip}', 'node_domain': '$node_domain', 'node_cluster': '$node_cluster', 'node_hostname': '$node_hostname', 'node_os': '$node_os'}" |
| 229 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 230 | |
Petr Michalec | 1f541c4 | 2017-08-17 13:30:37 +0200 | [diff] [blame^] | 231 | |
| 232 | Encrypted pillars |
| 233 | ----------------- |
| 234 | |
| 235 | Note: NACL + below configuration will be available in Salt > 2017.7. |
| 236 | |
| 237 | External resources: |
| 238 | |
| 239 | - Tutorial to configure salt + reclass ext_pillar and nacl: http://apealive.net/post/2017-09-salt-nacl-ext-pillar/ |
| 240 | - Saltstack documentation: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.nacl.html |
| 241 | |
| 242 | Configure salt NACL module: |
| 243 | |
| 244 | .. code-block:: shell |
| 245 | |
| 246 | pip install --upgrade libnacl===1.5.2 |
| 247 | salt-call --local nacl.keygen /etc/salt/pki/master/nacl |
| 248 | |
| 249 | local: |
| 250 | saved sk_file:/etc/salt/pki/master/nacl pk_file: /etc/salt/pki/master/nacl.pub |
| 251 | |
| 252 | |
| 253 | .. code-block:: yaml |
| 254 | |
| 255 | salt: |
| 256 | master: |
| 257 | pillar: |
| 258 | reclass: *reclass |
| 259 | nacl: |
| 260 | index: 99 |
| 261 | nacl: |
| 262 | box_type: sealedbox |
| 263 | sk_file: /etc/salt/pki/master/nacl |
| 264 | pk_file: /etc/salt/pki/master/nacl.pub |
| 265 | #sk: None |
| 266 | #pk: None |
| 267 | |
| 268 | NACL encrypt secrets: |
| 269 | |
| 270 | salt-call --local nacl.enc 'my_secret_value' pk_file=/etc/salt/pki/master/nacl.pub |
| 271 | hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q |
| 272 | # or |
| 273 | salt-run nacl.enc 'myotherpass' |
| 274 | ADDFD0Rav6p6+63sojl7Htfrncp5rrDVyeE4BSPO7ipq8fZuLDIVAzQLf4PCbDqi+Fau5KD3/J/E+Pw= |
| 275 | |
| 276 | |
| 277 | NACL encrypted values on pillar: |
| 278 | |
| 279 | Use Boxed syntax `NACL[CryptedValue=]` to encode value on pillar: |
| 280 | |
| 281 | .. code-block:: yaml |
| 282 | |
| 283 | my_pillar: |
| 284 | my_nacl: |
| 285 | key0: unencrypted_value |
| 286 | key1: NACL[hXTkJpC1hcKMS7yZVGESutWrkvzusXfETXkacSklIxYjfWDlMJmR37MlmthdIgjXpg4f2AlBKb8tc9Woma7q] |
| 287 | |
| 288 | NACL large files: |
| 289 | |
| 290 | .. code-block:: shell |
| 291 | salt-call nacl.enc_file /tmp/cert.crt out=/srv/salt/env/dev/cert.nacl |
| 292 | # or more advanced |
| 293 | cert=$(cat /tmp/cert.crt) |
| 294 | salt-call --out=newline_values_only nacl.enc_pub data="$cert" > /srv/salt/env/dev/cert.nacl |
| 295 | |
| 296 | |
| 297 | NACL within template/native pillars: |
| 298 | |
| 299 | pillarexample: |
| 300 | user: root |
| 301 | password1: {{salt.nacl.dec('DRB7Q6/X5gGSRCTpZyxS6hlbWj0llUA+uaVyvou3vJ4=')|json}} |
| 302 | cert_key: {{salt.nacl.dec_file('/srv/salt/env/dev/certs/example.com/cert.nacl')|json}} |
| 303 | cert_key2: {{salt.nacl.dec_file('salt:///certs/example.com/cert2.nacl')|json}} |
| 304 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 305 | Salt syndic |
| 306 | ----------- |
| 307 | |
| 308 | The master of masters |
| 309 | |
| 310 | .. code-block:: yaml |
| 311 | |
| 312 | salt: |
| 313 | master: |
| 314 | enabled: true |
| 315 | order_masters: True |
| 316 | |
| 317 | Lower syndicated master |
| 318 | |
| 319 | .. code-block:: yaml |
| 320 | |
| 321 | salt: |
| 322 | syndic: |
| 323 | enabled: true |
| 324 | master: |
| 325 | host: master-of-master-host |
| 326 | timeout: 5 |
| 327 | |
| 328 | Syndicated master with multiple master of masters |
| 329 | |
| 330 | .. code-block:: yaml |
| 331 | |
| 332 | salt: |
| 333 | syndic: |
| 334 | enabled: true |
| 335 | masters: |
| 336 | - host: master-of-master-host1 |
| 337 | - host: master-of-master-host2 |
| 338 | timeout: 5 |
| 339 | |
| 340 | |
| 341 | Salt-minion proxy |
| 342 | ----------------- |
Jiri Broulik | a0f4668 | 2017-04-20 22:45:01 +0200 | [diff] [blame] | 343 | |
| 344 | Salt proxy pillar |
| 345 | |
| 346 | .. code-block:: yaml |
| 347 | |
| 348 | salt: |
| 349 | minion: |
Jiri Broulik | 8827524 | 2017-05-24 17:21:17 +0200 | [diff] [blame] | 350 | proxy_minion: |
Jiri Broulik | a0f4668 | 2017-04-20 22:45:01 +0200 | [diff] [blame] | 351 | master: localhost |
| 352 | device: |
| 353 | vsrx01.mydomain.local: |
| 354 | enabled: true |
| 355 | engine: napalm |
| 356 | csr1000v.mydomain.local: |
| 357 | enabled: true |
| 358 | engine: napalm |
| 359 | |
| 360 | .. note:: This is pillar of the the real salt-minion |
| 361 | |
| 362 | |
| 363 | Proxy pillar for IOS device |
| 364 | |
| 365 | .. code-block:: yaml |
| 366 | |
| 367 | proxy: |
| 368 | proxytype: napalm |
| 369 | driver: ios |
| 370 | host: csr1000v.mydomain.local |
| 371 | username: root |
| 372 | passwd: r00tme |
| 373 | |
| 374 | .. note:: This is pillar of the node thats not able to run salt-minion itself |
| 375 | |
| 376 | |
| 377 | Proxy pillar for JunOS device |
| 378 | |
| 379 | .. code-block:: yaml |
| 380 | |
| 381 | proxy: |
| 382 | proxytype: napalm |
| 383 | driver: junos |
| 384 | host: vsrx01.mydomain.local |
| 385 | username: root |
| 386 | passwd: r00tme |
| 387 | optional_args: |
| 388 | config_format: set |
| 389 | |
| 390 | .. note:: This is pillar of the node thats not able to run salt-minion itself |
| 391 | |
Ales Komarek | 8fb1da8 | 2016-08-21 23:52:03 +0200 | [diff] [blame] | 392 | |
| 393 | Salt SSH |
| 394 | -------- |
| 395 | |
| 396 | Salt SSH with sudoer using key |
| 397 | |
| 398 | .. literalinclude:: tests/pillar/master_ssh_minion_key.sls |
| 399 | :language: yaml |
| 400 | |
| 401 | Salt SSH with sudoer using password |
| 402 | |
| 403 | .. literalinclude:: tests/pillar/master_ssh_minion_password.sls |
| 404 | :language: yaml |
| 405 | |
| 406 | Salt SSH with root using password |
| 407 | |
| 408 | .. literalinclude:: tests/pillar/master_ssh_minion_root.sls |
| 409 | :language: yaml |
| 410 | |
| 411 | |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 412 | Salt minion |
| 413 | ----------- |
| 414 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 415 | Simplest Salt minion setup with central configuration node |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 416 | |
| 417 | .. code-block:: yaml |
| 418 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 419 | .. literalinclude:: tests/pillar/minion_master.sls |
| 420 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 421 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 422 | Multi-master Salt minion setup |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 423 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 424 | .. literalinclude:: tests/pillar/minion_multi_master.sls |
| 425 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 426 | |
| 427 | Salt minion with salt mine options |
| 428 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 429 | .. literalinclude:: tests/pillar/minion_mine.sls |
| 430 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 431 | |
| 432 | Salt minion with graphing dependencies |
| 433 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 434 | .. literalinclude:: tests/pillar/minion_graph.sls |
| 435 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 436 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 437 | Salt minion behind HTTP proxy |
Ondrej Smola | c2d3e6f | 2017-03-26 17:52:40 +0200 | [diff] [blame] | 438 | |
| 439 | .. code-block:: yaml |
| 440 | |
| 441 | salt: |
| 442 | minion: |
| 443 | proxy: |
| 444 | host: 127.0.0.1 |
| 445 | port: 3128 |
| 446 | |
Sam Stoelinga | bb4c04b | 2017-06-26 15:47:19 -0700 | [diff] [blame] | 447 | Salt minion to specify non-default HTTP backend. The default tornado backend |
| 448 | does not respect HTTP proxy settings set as environment variables. This is |
| 449 | useful for cases where you need to set no_proxy lists. |
| 450 | |
| 451 | .. code-block:: yaml |
| 452 | |
| 453 | salt: |
| 454 | minion: |
| 455 | backend: urllib2 |
| 456 | |
| 457 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 458 | Salt minion with PKI certificate authority (CA) |
Ales Komarek | 5d17e4b | 2016-04-08 11:53:53 +0200 | [diff] [blame] | 459 | |
| 460 | .. literalinclude:: tests/pillar/minion_pki_ca.sls |
| 461 | :language: yaml |
| 462 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 463 | Salt minion using PKI certificate |
Ales Komarek | 5d17e4b | 2016-04-08 11:53:53 +0200 | [diff] [blame] | 464 | |
| 465 | .. literalinclude:: tests/pillar/minion_pki_cert.sls |
| 466 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 467 | |
Petr Michalec | 56066ac | 2017-06-01 10:52:56 +0200 | [diff] [blame] | 468 | Salt minion trust CA certificates issued by salt CA on a specific host (ie: salt-master node) |
| 469 | |
| 470 | .. code-block:: yaml |
| 471 | |
| 472 | salt: |
| 473 | minion: |
| 474 | trusted_ca_minions: |
| 475 | - cfg01 |
Ales Komarek | 8fb1da8 | 2016-08-21 23:52:03 +0200 | [diff] [blame] | 476 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 477 | Salt control (cloud/kvm/docker) |
| 478 | ------------------------------- |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 479 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 480 | Salt cloud with local OpenStack provider |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 481 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 482 | .. literalinclude:: tests/pillar/control_cloud_openstack.sls |
| 483 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 484 | |
| 485 | Salt cloud with Digital Ocean provider |
| 486 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 487 | .. literalinclude:: tests/pillar/control_cloud_digitalocean.sls |
| 488 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 489 | |
Ales Komarek | 8fb1da8 | 2016-08-21 23:52:03 +0200 | [diff] [blame] | 490 | Salt virt with KVM cluster |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 491 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 492 | .. literalinclude:: tests/pillar/control_virt.sls |
| 493 | :language: yaml |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 494 | |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 495 | |
| 496 | Usage |
| 497 | ===== |
| 498 | |
| 499 | Working with salt-cloud |
| 500 | |
| 501 | .. code-block:: bash |
| 502 | |
| 503 | salt-cloud -m /path/to/map --assume-yes |
| 504 | |
| 505 | Debug LIBCLOUD for salt-cloud connection |
| 506 | |
| 507 | .. code-block:: bash |
| 508 | |
| 509 | export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all |
| 510 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 511 | |
Ales Komarek | 5474068 | 2017-05-15 07:16:23 +0200 | [diff] [blame] | 512 | More Information |
| 513 | ================ |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 514 | |
| 515 | * http://salt.readthedocs.org/en/latest/ |
| 516 | * https://github.com/DanielBryan/salt-state-graph |
| 517 | * http://karlgrz.com/testing-salt-states-rapidly-with-docker/ |
| 518 | * https://mywushublog.com/2013/03/configuration-management-with-salt-stack/ |
| 519 | * http://russell.ballestrini.net/replace-the-nagios-scheduler-and-nrpe-with-salt-stack/ |
| 520 | * https://github.com/saltstack-formulas/salt-formula |
| 521 | * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html |
| 522 | |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 523 | |
Filip Pytloun | b4b8059 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 524 | salt-cloud |
| 525 | ---------- |
| 526 | |
| 527 | * http://www.blog.sandro-mathys.ch/2013/07/setting-user-password-when-launching.html |
| 528 | * http://cloudinit.readthedocs.org/en/latest/topics/examples.html |
| 529 | * http://salt-cloud.readthedocs.org/en/latest/topics/install/index.html |
| 530 | * http://docs.saltstack.com/topics/cloud/digitalocean.html |
| 531 | * http://salt-cloud.readthedocs.org/en/latest/topics/rackspace.html |
| 532 | * http://salt-cloud.readthedocs.org/en/latest/topics/map.html |
| 533 | * http://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html |
Ales Komarek | 8ba9c0b | 2016-02-21 14:59:59 +0100 | [diff] [blame] | 534 | |
Filip Pytloun | 954dbd6 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 535 | |
| 536 | Documentation and Bugs |
| 537 | ====================== |
| 538 | |
| 539 | To learn how to install and update salt-formulas, consult the documentation |
| 540 | available online at: |
| 541 | |
| 542 | http://salt-formulas.readthedocs.io/ |
| 543 | |
| 544 | In the unfortunate event that bugs are discovered, they should be reported to |
| 545 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 546 | formula: |
| 547 | |
| 548 | https://github.com/salt-formulas/salt-formula-salt/issues |
| 549 | |
| 550 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 551 | use Launchpad salt-formulas project: |
| 552 | |
| 553 | https://launchpad.net/salt-formulas |
| 554 | |
| 555 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 556 | |
| 557 | https://launchpad.net/~salt-formulas-users |
| 558 | |
| 559 | Developers wishing to work on the salt-formulas projects should always base |
| 560 | their work on master branch and submit pull request against specific formula. |
| 561 | |
| 562 | https://github.com/salt-formulas/salt-formula-salt |
| 563 | |
| 564 | Any questions or feedback is always welcome so feel free to join our IRC |
| 565 | channel: |
| 566 | |
| 567 | #salt-formulas @ irc.freenode.net |