Ales Komarek | ef98269 | 2016-02-21 14:56:07 +0100 | [diff] [blame] | 1 | |
| 2 | ================== |
smolaon | 552ba58 | 2016-02-23 20:35:42 +0100 | [diff] [blame] | 3 | Metal as a Service |
Ales Komarek | ef98269 | 2016-02-21 14:56:07 +0100 | [diff] [blame] | 4 | ================== |
| 5 | |
| 6 | Service maas description |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | Single maas service |
| 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | maas: |
| 16 | server: |
| 17 | enabled: true |
| 18 | |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 19 | Single MAAS region service [single UI/API] |
| 20 | |
| 21 | .. code-block:: yaml |
| 22 | |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 23 | maas: |
Damian Szeluga | 336ff2e | 2017-03-30 11:19:34 +0200 | [diff] [blame] | 24 | salt_master_ip: 192.168.0.10 |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 25 | region: |
Jiri Broulik | 0df14bc | 2017-08-07 10:01:55 +0200 | [diff] [blame] | 26 | upstream_proxy: |
| 27 | address: 10.0.0.1 |
| 28 | port: 8080 |
Ondrej Smola | 3ffb631 | 2017-09-22 17:13:10 +0200 | [diff] [blame] | 29 | user: username #OPTIONAL |
| 30 | password: password #OPTIONAL |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 31 | theme: mirantis |
| 32 | bind: |
| 33 | host: 192.168.0.10:5240 |
| 34 | port: 5240 |
| 35 | admin: |
| 36 | username: exampleuser |
| 37 | password: examplepassword |
| 38 | email: email@example.com |
| 39 | database: |
| 40 | engine: null |
| 41 | host: localhost |
| 42 | name: maasdb |
| 43 | password: qwqwqw |
| 44 | username: maas |
| 45 | enabled: true |
| 46 | user: mirantis |
| 47 | token: "89EgtWkX45ddjMYpuL:SqVjxFG87Dr6kVf4Wp:5WLfbUgmm9XQtJxm3V2LUUy7bpCmqmnk" |
| 48 | fabrics: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 49 | test-fabric1: |
| 50 | description: "Test fabric" |
| 51 | test-fabric2: |
| 52 | description: "Test fabric2" |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 53 | subnets: |
| 54 | subnet1: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 55 | fabric: test-fabric1 |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 56 | cidr: 2.2.3.0/24 |
| 57 | gateway_ip: 2.2.3.2 |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 58 | iprange: # reserved range for DHCP\auto mapping |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 59 | start: 2.2.3.20 |
| 60 | end: 2.2.3.250 |
| 61 | dhcp_snippets: |
| 62 | test-snippet: |
| 63 | value: option bootfile-name "tftp://192.168.0.10/snippet"; |
| 64 | description: Test snippet |
| 65 | enabled: true |
| 66 | subnet: subnet1 |
azvyagintsev | 3ff2ef1 | 2018-06-01 21:30:45 +0300 | [diff] [blame] | 67 | boot_sources_delete_all_others: true |
Jiri Broulik | e30a60f | 2018-04-09 21:15:10 +0200 | [diff] [blame] | 68 | boot_sources: |
azvyagintsev | 3ff2ef1 | 2018-06-01 21:30:45 +0300 | [diff] [blame] | 69 | resources_mirror: |
| 70 | url: http://images.maas.io/ephemeral-v3/ |
Jiri Broulik | e30a60f | 2018-04-09 21:15:10 +0200 | [diff] [blame] | 71 | keyring_file: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg |
azvyagintsev | 3ff2ef1 | 2018-06-01 21:30:45 +0300 | [diff] [blame] | 72 | boot_sources_selections: |
| 73 | xenial: |
| 74 | url: "http://images.maas.io/ephemeral-v3/" # should be same in boot_sources, or other already defined. |
| 75 | os: "ubuntu" |
| 76 | release: "xenial" |
| 77 | arches: "amd64" |
| 78 | subarches: '"*"' |
| 79 | labels: '"*"' |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 80 | package_repositories: |
| 81 | Saltstack: |
| 82 | url: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/ |
| 83 | distributions: |
| 84 | - trusty |
| 85 | components: |
| 86 | - main |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 87 | arches: amd64 |
| 88 | key: "-----BEGIN PGP PUBLIC KEY BLOCK----- |
| 89 | Version: GnuPG v2 |
Pavel Cizinsky | 5a6e272 | 2016-08-31 15:58:13 +0200 | [diff] [blame] | 90 | |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 91 | mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9 |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 92 | ...... |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 93 | fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS |
| 94 | MA== |
| 95 | =dtMN |
| 96 | -----END PGP PUBLIC KEY BLOCK-----" |
| 97 | enabled: true |
| 98 | machines: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 99 | machine1_new_schema: |
| 100 | pxe_interface_mac: "11:22:33:44:55:66" # Node will be identified by those mac |
| 101 | interfaces: |
| 102 | nic01: # could be any, used for iterate only |
| 103 | type: eth # NotImplemented |
| 104 | name: eth0 # Override default nic name. Interface to rename will be identified by mac |
| 105 | mac: "11:22:33:44:55:66" |
| 106 | mode: "static" |
| 107 | ip: "2.2.3.19" # ip should be out of reserved subnet range, but still in subnet range |
| 108 | subnet: "subnet1" |
| 109 | gateway: "2.2.3.2" # override default gateway from subnet |
| 110 | nic02: |
| 111 | type: eth # Not-implemented |
| 112 | mac: "11:22:33:44:55:78" |
| 113 | subnet: "subnet2" |
| 114 | mode: "dhcp" |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 115 | power_parameters: |
| 116 | power_type: ipmi |
| 117 | power_address: '192.168.10.10' |
| 118 | power_user: bmc_user |
| 119 | power_password: bmc_password |
Ondrej Smola | 455003c | 2017-06-01 22:53:39 +0200 | [diff] [blame] | 120 | #Optional (for legacy HW) |
| 121 | power_driver: LAN |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 122 | distro_series: xenial |
| 123 | hwe_kernel: hwe-16.04 |
| 124 | machine1_old_schema: |
| 125 | interface: |
| 126 | mac: "11:22:33:44:55:88" # Node will be identified by those mac |
| 127 | mode: "static" |
| 128 | ip: "2.2.3.15" |
| 129 | subnet: "subnet1" |
| 130 | gateway: "2.2.3.2" |
| 131 | power_parameters: |
| 132 | power_type: ipmi |
| 133 | power_address: '192.168.10.10' |
| 134 | power_user: bmc_user |
| 135 | power_password: bmc_password |
| 136 | #Optional (for legacy HW) |
| 137 | power_driver: LAN |
| 138 | # FIXME: that's should be moved into another,livirt example. |
Petr Ruzicka | 5fe9674 | 2017-11-10 14:22:24 +0100 | [diff] [blame] | 139 | # Used in case of power_type: virsh |
| 140 | power_id: my_libvirt_vm_name |
Maciej Relewicz | 37b12a2 | 2017-04-25 15:23:16 +0200 | [diff] [blame] | 141 | distro_series: xenial |
| 142 | hwe_kernel: hwe-16.04 |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 143 | devices: |
| 144 | machine1-ipmi: |
| 145 | interface: |
| 146 | ip_address: 192.168.10.10 |
| 147 | subnet: cidr:192.168.10.0/24 |
| 148 | mac: '66:55:44:33:22:11' |
Damian Szeluga | 336ff2e | 2017-03-30 11:19:34 +0200 | [diff] [blame] | 149 | commissioning_scripts: |
azvyagintsev | ec61dd6 | 2017-11-16 19:12:05 +0200 | [diff] [blame] | 150 | 00-maas-05-simplify-network-interfaces: /etc/maas/files/commisioning_scripts/00-maas-05-simplify-network-interfaces |
Damian Szeluga | 336ff2e | 2017-03-30 11:19:34 +0200 | [diff] [blame] | 151 | maas_config: |
| 152 | domain: mydomain.local |
| 153 | http_proxy: http://192.168.0.10:3142 |
| 154 | commissioning_distro_series: xenial |
| 155 | default_distro_series: xenial |
| 156 | default_osystem: 'ubuntu' |
| 157 | default_storage_layout: lvm |
| 158 | disk_erase_with_secure_erase: true |
| 159 | dnssec_validation: 'no' |
| 160 | enable_third_party_drivers: true |
| 161 | maas_name: cfg01 |
| 162 | network_discovery: 'enabled' |
| 163 | active_discovery_interval: '600' |
| 164 | ntp_external_only: true |
| 165 | ntp_servers: 10.10.11.23 10.10.11.24 |
| 166 | upstream_dns: 192.168.12.13 |
| 167 | enable_http_proxy: true |
| 168 | default_min_hwe_kernel: '' |
| 169 | sshprefs: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 170 | - 'ssh-rsa ASD.........dfsadf blah@blah' |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 171 | |
Pavel Cizinsky | 0995e8f | 2018-05-04 17:10:37 +0200 | [diff] [blame] | 172 | Update Vlan |
| 173 | |
| 174 | NOTE: Vid 0 has default name untagged in MaaS UI |
| 175 | |
| 176 | .. code-block:: yaml |
| 177 | |
| 178 | maas: |
| 179 | region: |
| 180 | fabrics: |
| 181 | test-fabric: |
| 182 | description: "Test fabric" |
| 183 | vlan: |
| 184 | 0: |
| 185 | description: "Your VLAN 0" |
| 186 | dhcp: True |
| 187 | 13: |
| 188 | description: "Your VLAN 13" |
| 189 | dhcp: False |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 190 | |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 191 | Create disk schema per machine via maas/client.sls with default lvm schema + default values |
| 192 | |
| 193 | NOTE: This should be used mostly for custom root partitioning and RAID configuration. For not-root partitions please use salt-formulas/salt-formula-linux. |
| 194 | |
| 195 | .. code-block:: yaml |
| 196 | |
| 197 | maas: |
| 198 | region: |
| 199 | machines: |
| 200 | server1: |
| 201 | disk_layout: |
| 202 | type: lvm |
| 203 | root_size: 20G |
| 204 | root_device: vda |
| 205 | volume_group: vg1 |
| 206 | volume_name: root |
| 207 | volume_size: 8 |
| 208 | bootable_device: vda |
| 209 | |
| 210 | FLAT layout with custom root size |
| 211 | |
| 212 | .. code-block:: yaml |
| 213 | |
| 214 | maas: |
| 215 | region: |
| 216 | machines: |
| 217 | server2: |
| 218 | disk_layout: |
| 219 | type: flat |
| 220 | root_size: 20 |
| 221 | physical_device: vda |
| 222 | bootable_device: vda |
| 223 | |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 224 | Size specification with `%` char used is not yet supported |
| 225 | |
| 226 | |
| 227 | .. code-block:: yaml |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 228 | |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 229 | maas: |
| 230 | region: |
| 231 | machines: |
| 232 | server3: |
| 233 | disk_layout: |
| 234 | type: flat |
| 235 | bootable_device: sda |
| 236 | disk: |
| 237 | sda: |
| 238 | type: physical |
| 239 | partition_schema: |
| 240 | part1: |
| 241 | size: 100% |
| 242 | type: ext4 |
| 243 | mount: '/' |
| 244 | |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 245 | Define more complex layout |
| 246 | |
| 247 | .. code-block:: yaml |
| 248 | |
| 249 | maas: |
| 250 | region: |
| 251 | machines: |
| 252 | server3: |
| 253 | disk_layout: |
azvyagintsev | bca1f46 | 2018-05-25 19:06:46 +0300 | [diff] [blame] | 254 | type: custom |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 255 | bootable_device: vda |
| 256 | disk: |
| 257 | vda: |
| 258 | type: physical |
| 259 | partition_schema: |
| 260 | part1: |
| 261 | size: 10G |
| 262 | type: ext4 |
| 263 | mount: '/' |
| 264 | part2: |
| 265 | size: 2G |
| 266 | part3: |
| 267 | size: 3G |
| 268 | vdc: |
| 269 | type: physical |
| 270 | partition_schema: |
| 271 | part1: |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 272 | size: 100G |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 273 | vdd: |
| 274 | type: physical |
| 275 | partition_schema: |
| 276 | part1: |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 277 | size: 100G |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 278 | raid0: |
| 279 | type: raid |
| 280 | level: 10 |
| 281 | devices: |
| 282 | - vde |
| 283 | - vdf |
| 284 | partition_schema: |
| 285 | part1: |
| 286 | size: 10G |
| 287 | part2: |
| 288 | size: 2G |
| 289 | part3: |
| 290 | size: 3G |
| 291 | raid1: |
| 292 | type: raid |
| 293 | level: 1 |
| 294 | partitions: |
| 295 | - vdc-part1 |
| 296 | - vdd-part1 |
| 297 | volume_group2: |
| 298 | type: lvm |
| 299 | devices: |
| 300 | - raid1 |
| 301 | volume: |
| 302 | tmp: |
| 303 | size: 5G |
Ondrej Smola | 47b5675 | 2018-03-06 15:38:27 +0100 | [diff] [blame] | 304 | type: ext4 |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 305 | mount: '/tmp' |
| 306 | log: |
| 307 | size: 7G |
Ondrej Smola | 47b5675 | 2018-03-06 15:38:27 +0100 | [diff] [blame] | 308 | type: ext4 |
Ondrej Smola | b57a23b | 2018-01-24 11:18:24 +0100 | [diff] [blame] | 309 | mount: '/var/log' |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 310 | |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 311 | Raid setup, 4x HDD |
| 312 | |
| 313 | .. code-block:: yaml |
| 314 | |
| 315 | maas: |
| 316 | region: |
| 317 | machines: |
| 318 | serverWithRaidExample: |
| 319 | disk_layout: |
azvyagintsev | bca1f46 | 2018-05-25 19:06:46 +0300 | [diff] [blame] | 320 | type: custom |
| 321 | bootable_device: sda |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 322 | disk: |
| 323 | md0: |
| 324 | type: raid |
| 325 | level: 1 |
| 326 | devices: |
| 327 | - sda |
| 328 | - sdb |
| 329 | partition_schema: |
| 330 | part1: |
| 331 | size: 230G |
| 332 | type: ext4 |
| 333 | mount: / |
| 334 | md1: |
| 335 | type: raid |
| 336 | level: 1 |
| 337 | devices: |
| 338 | - sdc |
| 339 | - sdd |
| 340 | partition_schema: |
| 341 | part1: |
| 342 | size: 1890G |
| 343 | type: ext4 |
| 344 | mount: /var/lib/libvirt |
| 345 | |
| 346 | Raid + LVM setup, 2xSSD + 2xHDD |
| 347 | |
| 348 | |
| 349 | Note: This setup lacks the ability run state twice, as of now when "disk_partition_present" is called, it tries blindly to |
| 350 | delete the partition and then recreated. That fails as maas rejects remove partition used in RAID/LVM. |
| 351 | |
| 352 | |
| 353 | .. code-block:: yaml |
| 354 | |
| 355 | maas: |
| 356 | region: |
| 357 | machines: |
| 358 | serverWithRaidExample2: |
| 359 | disk_layout: |
azvyagintsev | bca1f46 | 2018-05-25 19:06:46 +0300 | [diff] [blame] | 360 | type: custom |
Petr Michalec | 16cc5c9 | 2018-05-17 09:56:35 +0200 | [diff] [blame] | 361 | #bootable_device: vgssd-root |
| 362 | disk: |
| 363 | sda: &maas_disk_physical_ssd |
| 364 | type: physical |
| 365 | partition_schema: |
| 366 | part1: |
| 367 | size: 239G |
| 368 | sdb: *maas_disk_physical_ssd |
| 369 | sdc: &maas_disk_physical_hdd |
| 370 | type: physical |
| 371 | partition_schema: |
| 372 | part1: |
| 373 | size: 1990G |
| 374 | sdd: *maas_disk_physical_hdd |
| 375 | md0: |
| 376 | type: raid |
| 377 | level: 1 |
| 378 | partitions: |
| 379 | - sda-part1 |
| 380 | - sdb-part1 |
| 381 | md1: |
| 382 | type: raid |
| 383 | level: 1 |
| 384 | partitions: |
| 385 | - sdc-part1 |
| 386 | - sdd-part1 |
| 387 | vgssd: |
| 388 | type: lvm |
| 389 | devices: |
| 390 | - md0 |
| 391 | volume: |
| 392 | root: |
| 393 | size: 230G |
| 394 | type: ext4 |
| 395 | mount: '/' |
| 396 | vghdd: |
| 397 | type: lvm |
| 398 | devices: |
| 399 | - md1 |
| 400 | volume: |
| 401 | libvirt: |
| 402 | size: 1800G |
| 403 | type: ext4 |
| 404 | mount: '/var/lib/libvirt' |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 409 | Setup image mirror (Maas boot resources,) |
Jiri Broulik | e30a60f | 2018-04-09 21:15:10 +0200 | [diff] [blame] | 410 | |
| 411 | .. code-block:: yaml |
| 412 | |
| 413 | maas: |
| 414 | mirror: |
| 415 | enabled: true |
| 416 | image: |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 417 | sections: |
| 418 | bootloaders: |
| 419 | keyring: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg |
| 420 | upstream: http://images.maas.io/ephemeral-v3/daily/ |
| 421 | local_dir: /var/www/html/maas/images/ephemeral-v3/daily |
| 422 | count: 1 |
| 423 | # i386 need for pxe |
| 424 | filters: ['arch~(i386|amd64)', 'os~(grub*|pxelinux)'] |
Jiri Broulik | e30a60f | 2018-04-09 21:15:10 +0200 | [diff] [blame] | 425 | xenial: |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 426 | keyring: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg |
| 427 | upstream: http://images.maas.io/ephemeral-v3/daily/ |
| 428 | local_dir: /var/www/html/maas/images/ephemeral-v3/daily |
| 429 | count: 1 |
| 430 | filters: ['release~(xenial)', 'arch~(amd64)', 'subarch~(generic|hwe-16.04$|ga-16.04)'] |
Jiri Broulik | e30a60f | 2018-04-09 21:15:10 +0200 | [diff] [blame] | 431 | count: 1 |
| 432 | |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 433 | Usage of local deb repos |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 434 | |
| 435 | .. code-block:: yaml |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 436 | |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 437 | maas: |
| 438 | cluster: |
| 439 | enabled: true |
| 440 | region: |
| 441 | port: 80 |
| 442 | host: localhost |
| 443 | saltstack_repo_key: | |
| 444 | -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 445 | Version: GnuPG v2 |
| 446 | |
| 447 | mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9 |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 448 | ..... |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 449 | fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS |
| 450 | MA== |
| 451 | =dtMN |
| 452 | -----END PGP PUBLIC KEY BLOCK----- |
| 453 | saltstack_repo_xenial: "http://${_param:local_repo_url}/ubuntu-xenial stable salt" |
| 454 | saltstack_repo_trusty: "http://${_param:local_repo_url}/ubuntu-trusty stable salt" |
| 455 | |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 456 | Single MAAS cluster service [multiple racks] |
| 457 | |
| 458 | .. code-block:: yaml |
| 459 | |
| 460 | maas: |
| 461 | cluster: |
| 462 | enabled: true |
Jakub Pavlik | f43512b | 2016-08-30 10:25:42 +0200 | [diff] [blame] | 463 | role: master/slave |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 464 | |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 465 | .. code-block:: yaml |
| 466 | |
| 467 | maas: |
| 468 | cluster: |
| 469 | enabled: true |
| 470 | role: master/slave |
| 471 | |
Martin Polreich | 0764b76 | 2017-11-20 14:08:30 +0100 | [diff] [blame] | 472 | MAAS region service with backup data |
| 473 | |
| 474 | .. code-block:: yaml |
azvyagintsev | 80f9da7 | 2018-06-01 18:01:45 +0300 | [diff] [blame] | 475 | |
Martin Polreich | 0764b76 | 2017-11-20 14:08:30 +0100 | [diff] [blame] | 476 | maas: |
| 477 | region: |
| 478 | database: |
| 479 | initial_data: |
| 480 | source: cfg01.local |
| 481 | host: 192.168.0.11 |
| 482 | |
Petr Michalec | 8a0d52e | 2018-05-30 16:22:56 +0200 | [diff] [blame] | 483 | Test pillars |
| 484 | ============== |
| 485 | |
| 486 | Mind the postgresql and rsyslog `.sls`. Database and syslog service are required for MAAS to properly install and work. |
| 487 | |
| 488 | * https://github.com/salt-formulas/salt-formula-rsyslog/tree/master/tests/pillar |
| 489 | |
| 490 | |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 491 | Module function's example: |
| 492 | ========================== |
| 493 | |
| 494 | * Wait for status of selected machine's: |
| 495 | |
| 496 | .. code-block:: bash |
| 497 | |
| 498 | > cat maas/machines/wait_for_machines_ready.sls |
| 499 | |
| 500 | ... |
| 501 | |
| 502 | wait_for_machines_ready: |
| 503 | module.run: |
| 504 | - name: maas.wait_for_machine_status |
| 505 | - kwargs: |
| 506 | machines: |
| 507 | - kvm01 |
| 508 | - kvm02 |
| 509 | timeout: 1200 # in seconds |
| 510 | req_status: "Ready" |
| 511 | - require: |
| 512 | - cmd: maas_login_admin |
| 513 | ... |
| 514 | |
| 515 | If module run w/\o any extra paremeters - `wait_for_machines_ready` will wait for defined in salt machines. In those case, will be usefull to skip some machines: |
| 516 | |
| 517 | .. code-block:: bash |
| 518 | |
| 519 | > cat maas/machines/wait_for_machines_deployed.sls |
| 520 | |
| 521 | ... |
| 522 | |
| 523 | wait_for_machines_ready: |
| 524 | module.run: |
| 525 | - name: maas.wait_for_machine_status |
| 526 | - kwargs: |
| 527 | timeout: 1200 # in seconds |
Michael Polenchuk | e438bd3 | 2017-11-09 20:42:42 +0400 | [diff] [blame] | 528 | req_status: "Deployed" |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 529 | ignore_machines: |
| 530 | - kvm01 # in case it's broken or whatever |
| 531 | - require: |
| 532 | - cmd: maas_login_admin |
| 533 | ... |
| 534 | |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 535 | List of available `req_status` defined in global variable: |
| 536 | |
| 537 | .. code-block:: python |
| 538 | |
| 539 | STATUS_NAME_DICT = dict([ |
| 540 | (0, 'New'), (1, 'Commissioning'), (2, 'Failed commissioning'), |
| 541 | (3, 'Missing'), (4, 'Ready'), (5, 'Reserved'), (10, 'Allocated'), |
| 542 | (9, 'Deploying'), (6, 'Deployed'), (7, 'Retired'), (8, 'Broken'), |
| 543 | (11, 'Failed deployment'), (12, 'Releasing'), |
| 544 | (13, 'Releasing failed'), (14, 'Disk erasing'), |
| 545 | (15, 'Failed disk erasing')]) |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 546 | |
| 547 | |
Ales Komarek | ef98269 | 2016-02-21 14:56:07 +0100 | [diff] [blame] | 548 | Read more |
| 549 | ========= |
| 550 | |
Roald Nefs | c86d84a | 2017-10-12 21:19:50 +0200 | [diff] [blame] | 551 | * https://maas.io/ |
Filip Pytloun | c07d235 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 552 | |
| 553 | Documentation and Bugs |
| 554 | ====================== |
| 555 | |
| 556 | To learn how to install and update salt-formulas, consult the documentation |
| 557 | available online at: |
| 558 | |
| 559 | http://salt-formulas.readthedocs.io/ |
| 560 | |
| 561 | In the unfortunate event that bugs are discovered, they should be reported to |
| 562 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 563 | formula: |
| 564 | |
| 565 | https://github.com/salt-formulas/salt-formula-maas/issues |
| 566 | |
| 567 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 568 | use Launchpad salt-formulas project: |
| 569 | |
| 570 | https://launchpad.net/salt-formulas |
| 571 | |
| 572 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 573 | |
| 574 | https://launchpad.net/~salt-formulas-users |
| 575 | |
| 576 | Developers wishing to work on the salt-formulas projects should always base |
| 577 | their work on master branch and submit pull request against specific formula. |
| 578 | |
| 579 | https://github.com/salt-formulas/salt-formula-maas |
| 580 | |
| 581 | Any questions or feedback is always welcome so feel free to join our IRC |
| 582 | channel: |
| 583 | |
Pavel Cizinsky | 0995e8f | 2018-05-04 17:10:37 +0200 | [diff] [blame] | 584 | #salt-formulas @ irc.freenode.net |