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