blob: 377f1d256868147c76adafbce01b775cdaa32192 [file] [log] [blame]
OlgaGusarenkoa8b77152018-07-30 23:33:35 +03001=====
2Usage
3=====
Ales Komarekef982692016-02-21 14:56:07 +01004
OlgaGusarenkoa8b77152018-07-30 23:33:35 +03005Metal as a Service
Ales Komarekef982692016-02-21 14:56:07 +01006
7Sample pillars
8==============
9
OlgaGusarenkoa8b77152018-07-30 23:33:35 +030010Single maas service:
Ales Komarekef982692016-02-21 14:56:07 +010011
12.. code-block:: yaml
13
14 maas:
15 server:
16 enabled: true
17
OlgaGusarenkoa8b77152018-07-30 23:33:35 +030018Single MAAS region service [single UI/API]:
Ondrej Smola9af2b082016-08-25 17:37:29 +020019
20.. code-block:: yaml
21
Damian Szelugaa8248102017-03-16 08:48:51 +010022 maas:
Damian Szeluga336ff2e2017-03-30 11:19:34 +020023 salt_master_ip: 192.168.0.10
Damian Szelugaa8248102017-03-16 08:48:51 +010024 region:
Jiri Broulik0df14bc2017-08-07 10:01:55 +020025 upstream_proxy:
26 address: 10.0.0.1
27 port: 8080
Ondrej Smola3ffb6312017-09-22 17:13:10 +020028 user: username #OPTIONAL
29 password: password #OPTIONAL
Damian Szelugaa8248102017-03-16 08:48:51 +010030 theme: mirantis
31 bind:
32 host: 192.168.0.10:5240
33 port: 5240
34 admin:
35 username: exampleuser
36 password: examplepassword
37 email: email@example.com
38 database:
39 engine: null
40 host: localhost
41 name: maasdb
42 password: qwqwqw
43 username: maas
44 enabled: true
45 user: mirantis
46 token: "89EgtWkX45ddjMYpuL:SqVjxFG87Dr6kVf4Wp:5WLfbUgmm9XQtJxm3V2LUUy7bpCmqmnk"
47 fabrics:
azvyagintsevf3515c82018-06-26 18:59:05 +030048 fabric1:
49 name: 'tf2'
azvyagintsev06b71e72017-11-08 17:11:07 +020050 description: "Test fabric"
azvyagintsevf3515c82018-06-26 18:59:05 +030051 fabric2:
52 name: 'tf2'
azvyagintsev06b71e72017-11-08 17:11:07 +020053 description: "Test fabric2"
azvyagintsevf3515c82018-06-26 18:59:05 +030054 deploy_network:
55 name: 'deploy_network'
56 description: Fabric for deploy_network
57 vlans:
58 0:
59 name: 'vlan 0'
60 description: Deploy VLAN
Petr Ruzicka80471852018-07-13 14:08:27 +020061 mtu: 1500
azvyagintsevf3515c82018-06-26 18:59:05 +030062 dhcp: true
azvyagintsev6913e5e2018-07-05 11:42:53 +030063 # FIXME: after refactoring domain module, it should be
64 # fixed exactly for FQDN, not only 'hostname'
azvyagintsevf3515c82018-06-26 18:59:05 +030065 primary_rack: "${linux:network:hostname}"
66
Damian Szelugaa8248102017-03-16 08:48:51 +010067 subnets:
68 subnet1:
azvyagintsevf3515c82018-06-26 18:59:05 +030069 fabric: ${maas:region:fabrics:deploy_network:name}
Damian Szelugaa8248102017-03-16 08:48:51 +010070 cidr: 2.2.3.0/24
71 gateway_ip: 2.2.3.2
azvyagintsevf3515c82018-06-26 18:59:05 +030072 vlan: 150
73 ipranges:
74 1:
75 end: "2.2.3.40"
76 start: "2.2.3.20"
77 type: dynamic
78 2:
79 end: "2.2.3.250"
80 start: "2.2.3.45"
azvyagintsev87e68362018-07-23 09:21:38 +020081 type: reserved
Damian Szelugaa8248102017-03-16 08:48:51 +010082 dhcp_snippets:
83 test-snippet:
84 value: option bootfile-name "tftp://192.168.0.10/snippet";
85 description: Test snippet
86 enabled: true
87 subnet: subnet1
azvyagintsev3ff2ef12018-06-01 21:30:45 +030088 boot_sources_delete_all_others: true
Jiri Broulike30a60f2018-04-09 21:15:10 +020089 boot_sources:
azvyagintsev3ff2ef12018-06-01 21:30:45 +030090 resources_mirror:
91 url: http://images.maas.io/ephemeral-v3/
Jiri Broulike30a60f2018-04-09 21:15:10 +020092 keyring_file: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
azvyagintsev3ff2ef12018-06-01 21:30:45 +030093 boot_sources_selections:
94 xenial:
95 url: "http://images.maas.io/ephemeral-v3/" # should be same in boot_sources, or other already defined.
96 os: "ubuntu"
97 release: "xenial"
98 arches: "amd64"
99 subarches: '"*"'
100 labels: '"*"'
Damian Szelugaa8248102017-03-16 08:48:51 +0100101 package_repositories:
102 Saltstack:
103 url: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/
104 distributions:
105 - trusty
106 components:
107 - main
Damian Szelugaa8248102017-03-16 08:48:51 +0100108 arches: amd64
109 key: "-----BEGIN PGP PUBLIC KEY BLOCK-----
110 Version: GnuPG v2
Pavel Cizinsky5a6e2722016-08-31 15:58:13 +0200111
Damian Szelugaa8248102017-03-16 08:48:51 +0100112 mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9
azvyagintsev06b71e72017-11-08 17:11:07 +0200113 ......
Damian Szelugaa8248102017-03-16 08:48:51 +0100114 fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS
115 MA==
116 =dtMN
117 -----END PGP PUBLIC KEY BLOCK-----"
118 enabled: true
119 machines:
azvyagintsev06b71e72017-11-08 17:11:07 +0200120 machine1_new_schema:
121 pxe_interface_mac: "11:22:33:44:55:66" # Node will be identified by those mac
122 interfaces:
123 nic01: # could be any, used for iterate only
124 type: eth # NotImplemented
125 name: eth0 # Override default nic name. Interface to rename will be identified by mac
126 mac: "11:22:33:44:55:66"
127 mode: "static"
128 ip: "2.2.3.19" # ip should be out of reserved subnet range, but still in subnet range
129 subnet: "subnet1"
130 gateway: "2.2.3.2" # override default gateway from subnet
131 nic02:
132 type: eth # Not-implemented
133 mac: "11:22:33:44:55:78"
134 subnet: "subnet2"
135 mode: "dhcp"
Damian Szelugaa8248102017-03-16 08:48:51 +0100136 power_parameters:
137 power_type: ipmi
138 power_address: '192.168.10.10'
139 power_user: bmc_user
azvyagintsev6543ec82018-11-01 23:45:09 +0200140 # power_password: bmc_password # Old format,please use new one
141 power_pass: bmc_password
Ondrej Smola455003c2017-06-01 22:53:39 +0200142 #Optional (for legacy HW)
143 power_driver: LAN
azvyagintsev06b71e72017-11-08 17:11:07 +0200144 distro_series: xenial
145 hwe_kernel: hwe-16.04
146 machine1_old_schema:
147 interface:
148 mac: "11:22:33:44:55:88" # Node will be identified by those mac
149 mode: "static"
150 ip: "2.2.3.15"
151 subnet: "subnet1"
152 gateway: "2.2.3.2"
153 power_parameters:
154 power_type: ipmi
155 power_address: '192.168.10.10'
156 power_user: bmc_user
azvyagintsev6543ec82018-11-01 23:45:09 +0200157 # power_password: bmc_password # Old format,please use new one
158 power_pass: bmc_password
azvyagintsev06b71e72017-11-08 17:11:07 +0200159 #Optional (for legacy HW)
160 power_driver: LAN
Maciej Relewicz37b12a22017-04-25 15:23:16 +0200161 distro_series: xenial
162 hwe_kernel: hwe-16.04
Petr Ruzicka610f2852018-08-22 15:05:52 +0200163 virsh_example:
164 pxe_interface_mac: "52:54:00:00:01:01"
165 interfaces:
166 nic01:
167 type: eth
168 name: eth0
169 mac: "52:54:00:00:01:01"
170 subnet: "${maas:region:subnets:deploy_network:name}"
171 mode: "dhcp"
172 power_parameters:
173 power_type: virsh
174 power_address: "qemu+tcp://my-kvm-node-hostname/system"
175 power_id: "kvm01-pxe01"
Damian Szelugaa8248102017-03-16 08:48:51 +0100176 devices:
177 machine1-ipmi:
178 interface:
179 ip_address: 192.168.10.10
180 subnet: cidr:192.168.10.0/24
181 mac: '66:55:44:33:22:11'
Damian Szeluga336ff2e2017-03-30 11:19:34 +0200182 commissioning_scripts:
azvyagintsevec61dd62017-11-16 19:12:05 +0200183 00-maas-05-simplify-network-interfaces: /etc/maas/files/commisioning_scripts/00-maas-05-simplify-network-interfaces
Damian Szeluga336ff2e2017-03-30 11:19:34 +0200184 maas_config:
azvyagintsev6913e5e2018-07-05 11:42:53 +0300185 # domain: mydomain.local # This function broken
Damian Szeluga336ff2e2017-03-30 11:19:34 +0200186 http_proxy: http://192.168.0.10:3142
187 commissioning_distro_series: xenial
188 default_distro_series: xenial
189 default_osystem: 'ubuntu'
190 default_storage_layout: lvm
191 disk_erase_with_secure_erase: true
192 dnssec_validation: 'no'
193 enable_third_party_drivers: true
194 maas_name: cfg01
195 network_discovery: 'enabled'
196 active_discovery_interval: '600'
197 ntp_external_only: true
198 ntp_servers: 10.10.11.23 10.10.11.24
199 upstream_dns: 192.168.12.13
200 enable_http_proxy: true
201 default_min_hwe_kernel: ''
202 sshprefs:
azvyagintsev06b71e72017-11-08 17:11:07 +0200203 - 'ssh-rsa ASD.........dfsadf blah@blah'
Ondrej Smola9af2b082016-08-25 17:37:29 +0200204
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300205Update VLAN:
Pavel Cizinsky8dd85b52018-06-18 21:40:13 +0200206
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300207.. note:: Vid 0 has default name untagged in the MaaS UI.
Pavel Cizinsky0995e8f2018-05-04 17:10:37 +0200208
209.. code-block:: yaml
210
211 maas:
212 region:
213 fabrics:
214 test-fabric:
215 description: "Test fabric"
216 vlan:
217 0:
218 description: "Your VLAN 0"
219 dhcp: True
220 13:
221 description: "Your VLAN 13"
222 dhcp: False
Ondrej Smola9af2b082016-08-25 17:37:29 +0200223
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300224Create disk schema per machine via ``maas/client.sls`` with
225default lvm schema + default values.
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100226
Maria Zlatkova3e88fd72018-08-08 10:51:29 +0300227.. note:: This should be used mostly for custom root
228 partitioning and RAID configuration. For
229 not-root partitions, use ``salt-formula-linux``.
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100230
231.. code-block:: yaml
232
233 maas:
234 region:
235 machines:
236 server1:
237 disk_layout:
238 type: lvm
239 root_size: 20G
240 root_device: vda
241 volume_group: vg1
242 volume_name: root
243 volume_size: 8
244 bootable_device: vda
245
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300246FLAT layout with custom root size:
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100247
248.. code-block:: yaml
249
250 maas:
251 region:
252 machines:
253 server2:
254 disk_layout:
255 type: flat
256 root_size: 20
257 physical_device: vda
258 bootable_device: vda
259
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300260Size specification with ``%`` char used is not yet supported.
Petr Michalec16cc5c92018-05-17 09:56:35 +0200261
262.. code-block:: yaml
azvyagintsev80f9da72018-06-01 18:01:45 +0300263
Petr Michalec16cc5c92018-05-17 09:56:35 +0200264 maas:
265 region:
266 machines:
267 server3:
268 disk_layout:
269 type: flat
270 bootable_device: sda
271 disk:
272 sda:
273 type: physical
274 partition_schema:
275 part1:
276 size: 100%
277 type: ext4
278 mount: '/'
279
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300280Define more complex layout:
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100281
282.. code-block:: yaml
283
284 maas:
285 region:
286 machines:
287 server3:
288 disk_layout:
azvyagintsevbca1f462018-05-25 19:06:46 +0300289 type: custom
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100290 bootable_device: vda
291 disk:
292 vda:
293 type: physical
294 partition_schema:
295 part1:
296 size: 10G
297 type: ext4
298 mount: '/'
299 part2:
300 size: 2G
301 part3:
302 size: 3G
303 vdc:
304 type: physical
305 partition_schema:
306 part1:
Petr Michalec16cc5c92018-05-17 09:56:35 +0200307 size: 100G
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100308 vdd:
309 type: physical
310 partition_schema:
311 part1:
Petr Michalec16cc5c92018-05-17 09:56:35 +0200312 size: 100G
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100313 raid0:
314 type: raid
315 level: 10
316 devices:
317 - vde
318 - vdf
319 partition_schema:
320 part1:
321 size: 10G
322 part2:
323 size: 2G
324 part3:
325 size: 3G
326 raid1:
327 type: raid
328 level: 1
329 partitions:
330 - vdc-part1
331 - vdd-part1
332 volume_group2:
333 type: lvm
334 devices:
335 - raid1
336 volume:
337 tmp:
338 size: 5G
Ondrej Smola47b56752018-03-06 15:38:27 +0100339 type: ext4
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100340 mount: '/tmp'
341 log:
342 size: 7G
Ondrej Smola47b56752018-03-06 15:38:27 +0100343 type: ext4
Ondrej Smolab57a23b2018-01-24 11:18:24 +0100344 mount: '/var/log'
azvyagintsev7605a662017-11-03 19:05:04 +0200345
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300346Raid setup, 4x HDD:
Petr Michalec16cc5c92018-05-17 09:56:35 +0200347
348.. code-block:: yaml
349
350 maas:
351 region:
352 machines:
353 serverWithRaidExample:
354 disk_layout:
azvyagintsevbca1f462018-05-25 19:06:46 +0300355 type: custom
356 bootable_device: sda
Petr Michalec16cc5c92018-05-17 09:56:35 +0200357 disk:
358 md0:
359 type: raid
360 level: 1
361 devices:
362 - sda
363 - sdb
364 partition_schema:
365 part1:
366 size: 230G
367 type: ext4
368 mount: /
369 md1:
370 type: raid
371 level: 1
372 devices:
373 - sdc
374 - sdd
375 partition_schema:
376 part1:
377 size: 1890G
378 type: ext4
379 mount: /var/lib/libvirt
380
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300381Raid + LVM setup, 2xSSD + 2xHDD:
Petr Michalec16cc5c92018-05-17 09:56:35 +0200382
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300383.. note:: This setup lacks the ability run state twice,
384 as of now when ``disk_partition_present`` is called,
385 it tries blindly to delete the partition and then
386 recreated. That fails as MAAS rejects remove
387 partition used in RAID/LVM.
Petr Michalec16cc5c92018-05-17 09:56:35 +0200388
389.. code-block:: yaml
390
391 maas:
392 region:
393 machines:
394 serverWithRaidExample2:
395 disk_layout:
azvyagintsevbca1f462018-05-25 19:06:46 +0300396 type: custom
Petr Michalec16cc5c92018-05-17 09:56:35 +0200397 #bootable_device: vgssd-root
398 disk:
399 sda: &maas_disk_physical_ssd
400 type: physical
401 partition_schema:
402 part1:
403 size: 239G
404 sdb: *maas_disk_physical_ssd
405 sdc: &maas_disk_physical_hdd
406 type: physical
407 partition_schema:
408 part1:
409 size: 1990G
410 sdd: *maas_disk_physical_hdd
411 md0:
412 type: raid
413 level: 1
414 partitions:
415 - sda-part1
416 - sdb-part1
417 md1:
418 type: raid
419 level: 1
420 partitions:
421 - sdc-part1
422 - sdd-part1
423 vgssd:
424 type: lvm
425 devices:
426 - md0
427 volume:
428 root:
429 size: 230G
430 type: ext4
431 mount: '/'
432 vghdd:
433 type: lvm
434 devices:
435 - md1
436 volume:
437 libvirt:
438 size: 1800G
439 type: ext4
440 mount: '/var/lib/libvirt'
441
azvyagintsevd786e5f2018-11-06 20:57:24 +0200442
443LVM setup using partition
444
445
446.. code-block:: yaml
447
448
449 maas:
450 region:
451 machines:
452 serverWithLvmExample3:
453 disk_layout:
454 type: custom
455 bootable_device: sda
456 disk:
457 sda:
458 type: physical
459 partition_schema:
460 part1:
461 size: 50G
462 part2:
463 mount: /var/lib/libvirt/images/
464 size: 10G
465 type: ext4
466 vg0:
467 partitions:
468 - sda-part1
469 type: lvm
470 volume:
471 root:
472 mount: /
473 size: 40G
474 type: ext4
475
476
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300477Setup image mirror (Maas boot resources):
Jiri Broulike30a60f2018-04-09 21:15:10 +0200478
479.. code-block:: yaml
480
481 maas:
482 mirror:
483 enabled: true
484 image:
azvyagintsev80f9da72018-06-01 18:01:45 +0300485 sections:
486 bootloaders:
487 keyring: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
488 upstream: http://images.maas.io/ephemeral-v3/daily/
489 local_dir: /var/www/html/maas/images/ephemeral-v3/daily
490 count: 1
491 # i386 need for pxe
492 filters: ['arch~(i386|amd64)', 'os~(grub*|pxelinux)']
Jiri Broulike30a60f2018-04-09 21:15:10 +0200493 xenial:
azvyagintsev80f9da72018-06-01 18:01:45 +0300494 keyring: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
495 upstream: http://images.maas.io/ephemeral-v3/daily/
496 local_dir: /var/www/html/maas/images/ephemeral-v3/daily
497 count: 1
498 filters: ['release~(xenial)', 'arch~(amd64)', 'subarch~(generic|hwe-16.04$|ga-16.04)']
Jiri Broulike30a60f2018-04-09 21:15:10 +0200499 count: 1
500
azvyagintseva1afa852018-11-19 20:45:18 +0200501Usage of local deb repos and curtin-based variables.
502
503Dict of variables ``curtin_vars:amd64:xenial: `` format, which will be passed only to:
504``/etc/maas/preseeds/curtin_userdata_amd64_generic_xenial`` accordingly.
505
Richard Felklce118a22017-09-13 11:09:12 +0200506
507.. code-block:: yaml
azvyagintsev7605a662017-11-03 19:05:04 +0200508
Richard Felklce118a22017-09-13 11:09:12 +0200509 maas:
510 cluster:
511 enabled: true
512 region:
513 port: 80
514 host: localhost
515 saltstack_repo_key: |
516 -----BEGIN PGP PUBLIC KEY BLOCK-----
517 Version: GnuPG v2
518
519 mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9
azvyagintsev06b71e72017-11-08 17:11:07 +0200520 .....
Richard Felklce118a22017-09-13 11:09:12 +0200521 fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS
522 MA==
523 =dtMN
524 -----END PGP PUBLIC KEY BLOCK-----
azvyagintseva80fdfb2018-07-16 22:34:45 +0300525 saltstack_repo_xenial: "deb [arch=amd64] http://${_param:local_repo_url}/ubuntu-xenial stable salt"
526 saltstack_repo_trusty: "deb [arch=amd64] http://${_param:local_repo_url}/ubuntu-trusty stable salt"
azvyagintseva1afa852018-11-19 20:45:18 +0200527 curtin_vars:
528 amd64:
529 xenial:
530 # List of packages, to be installed directly in curtin stage.
531 extra_pkgs: [ "linux-headers-generic-hwe-16.04", "linux-image-extra-virtual-hwe-16.04" ]
532 # exact kernel pkgs name, to be passed into curtin stage.
533 kernel_package: 'linux-image-virtual-hwe-16.04'
Richard Felklce118a22017-09-13 11:09:12 +0200534
Ondrej Smola9af2b082016-08-25 17:37:29 +0200535Single MAAS cluster service [multiple racks]
536
537.. code-block:: yaml
538
539 maas:
540 cluster:
541 enabled: true
Jakub Pavlikf43512b2016-08-30 10:25:42 +0200542 role: master/slave
Ondrej Smola9af2b082016-08-25 17:37:29 +0200543
azvyagintsev7605a662017-11-03 19:05:04 +0200544.. code-block:: yaml
545
546 maas:
547 cluster:
548 enabled: true
549 role: master/slave
550
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300551MAAS region service with backup data:
Martin Polreich0764b762017-11-20 14:08:30 +0100552
553.. code-block:: yaml
azvyagintsev80f9da72018-06-01 18:01:45 +0300554
Martin Polreich0764b762017-11-20 14:08:30 +0100555 maas:
556 region:
557 database:
558 initial_data:
559 source: cfg01.local
560 host: 192.168.0.11
561
azvyagintsev6543ec82018-11-01 23:45:09 +0200562MAAS service power_parameters defintion with OpenStack Nova power_type:
563
564.. code-block:: yaml
565
566 maas:
567 region:
568 machines:
569 cmp1:
570 power_type: nova
571 power_parameters: # old style, deprecated
572 power_nova_id: hostuuid
573 power_os_tenantname: tenant
574 power_os_username: user
575 power_os_password: password
576 power_os_authurl: http://url
577
578
579.. code-block:: yaml
580
581 maas:
582 region:
583 machines:
584 cmp1:
585 power_type: nova
586 power_parameters: # new style
587 nova_id: hostuuid
588 os_tenantname: tenant
589 os_username: user
590 os_password: password
591 os_authurl: http://url
592
Petr Michalec8a0d52e2018-05-30 16:22:56 +0200593Test pillars
594==============
595
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300596Mind the PostgreSQL and rsyslog ``.sls``. Database and
597syslog service are required for MAAS to properly install
598and work.
Petr Michalec8a0d52e2018-05-30 16:22:56 +0200599
600* https://github.com/salt-formulas/salt-formula-rsyslog/tree/master/tests/pillar
601
602
azvyagintsev7605a662017-11-03 19:05:04 +0200603Module function's example:
604==========================
605
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300606Wait for status of selected machine's:
azvyagintsev7605a662017-11-03 19:05:04 +0200607
608.. code-block:: bash
609
610 > cat maas/machines/wait_for_machines_ready.sls
611
612 ...
613
614 wait_for_machines_ready:
615 module.run:
616 - name: maas.wait_for_machine_status
617 - kwargs:
618 machines:
619 - kvm01
620 - kvm02
621 timeout: 1200 # in seconds
622 req_status: "Ready"
623 - require:
624 - cmd: maas_login_admin
625 ...
626
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300627If module run w/\o any extra paremeters,
628``wait_for_machines_ready`` will wait for defined in salt
629machines. In this case, it is usefull to skip some machines:
azvyagintsev7605a662017-11-03 19:05:04 +0200630
631.. code-block:: bash
632
633 > cat maas/machines/wait_for_machines_deployed.sls
634
635 ...
636
637 wait_for_machines_ready:
638 module.run:
639 - name: maas.wait_for_machine_status
640 - kwargs:
641 timeout: 1200 # in seconds
Michael Polenchuke438bd32017-11-09 20:42:42 +0400642 req_status: "Deployed"
azvyagintsev7605a662017-11-03 19:05:04 +0200643 ignore_machines:
644 - kvm01 # in case it's broken or whatever
645 - require:
646 - cmd: maas_login_admin
647 ...
648
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300649List of available ``req_status`` defined in global variable:
azvyagintsev06b71e72017-11-08 17:11:07 +0200650
651.. code-block:: python
652
653 STATUS_NAME_DICT = dict([
654 (0, 'New'), (1, 'Commissioning'), (2, 'Failed commissioning'),
655 (3, 'Missing'), (4, 'Ready'), (5, 'Reserved'), (10, 'Allocated'),
656 (9, 'Deploying'), (6, 'Deployed'), (7, 'Retired'), (8, 'Broken'),
657 (11, 'Failed deployment'), (12, 'Releasing'),
658 (13, 'Releasing failed'), (14, 'Disk erasing'),
659 (15, 'Failed disk erasing')])
azvyagintsev7605a662017-11-03 19:05:04 +0200660
Ales Komarekef982692016-02-21 14:56:07 +0100661Read more
662=========
663
Roald Nefsc86d84a2017-10-12 21:19:50 +0200664* https://maas.io/
Filip Pytlounc07d2352017-02-02 13:02:03 +0100665
666Documentation and Bugs
667======================
668
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300669* http://salt-formulas.readthedocs.io/
670 Learn how to install and update salt-formulas
Filip Pytlounc07d2352017-02-02 13:02:03 +0100671
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300672* https://github.com/salt-formulas/salt-formula-maas/issues
673 In the unfortunate event that bugs are discovered, report the issue to the
674 appropriate issue tracker. Use the Github issue tracker for a specific salt
675 formula
Filip Pytlounc07d2352017-02-02 13:02:03 +0100676
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300677* https://launchpad.net/salt-formulas
678 For feature requests, bug reports, or blueprints affecting the entire
679 ecosystem, use the Launchpad salt-formulas project
Filip Pytlounc07d2352017-02-02 13:02:03 +0100680
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300681* https://launchpad.net/~salt-formulas-users
682 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytlounc07d2352017-02-02 13:02:03 +0100683
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300684* https://github.com/salt-formulas/salt-formula-maas
685 Develop the salt-formulas projects in the master branch and then submit pull
686 requests against a specific formula
Filip Pytlounc07d2352017-02-02 13:02:03 +0100687
OlgaGusarenkoa8b77152018-07-30 23:33:35 +0300688* #salt-formulas @ irc.freenode.net
689 Use this IRC channel in case of any questions or feedback which is always
690 welcome
Filip Pytlounc07d2352017-02-02 13:02:03 +0100691