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 |
| 67 | boot_resources: |
| 68 | bootscript1: |
| 69 | title: bootscript |
| 70 | architecture: amd64/generic |
| 71 | filetype: tgz |
| 72 | content: /srv/salt/reclass/nodes/path_to_file |
| 73 | package_repositories: |
| 74 | Saltstack: |
| 75 | url: http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/ |
| 76 | distributions: |
| 77 | - trusty |
| 78 | components: |
| 79 | - main |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 80 | arches: amd64 |
| 81 | key: "-----BEGIN PGP PUBLIC KEY BLOCK----- |
| 82 | Version: GnuPG v2 |
Pavel Cizinsky | 5a6e272 | 2016-08-31 15:58:13 +0200 | [diff] [blame] | 83 | |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 84 | mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9 |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 85 | ...... |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 86 | fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS |
| 87 | MA== |
| 88 | =dtMN |
| 89 | -----END PGP PUBLIC KEY BLOCK-----" |
| 90 | enabled: true |
| 91 | machines: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 92 | machine1_new_schema: |
| 93 | pxe_interface_mac: "11:22:33:44:55:66" # Node will be identified by those mac |
| 94 | interfaces: |
| 95 | nic01: # could be any, used for iterate only |
| 96 | type: eth # NotImplemented |
| 97 | name: eth0 # Override default nic name. Interface to rename will be identified by mac |
| 98 | mac: "11:22:33:44:55:66" |
| 99 | mode: "static" |
| 100 | ip: "2.2.3.19" # ip should be out of reserved subnet range, but still in subnet range |
| 101 | subnet: "subnet1" |
| 102 | gateway: "2.2.3.2" # override default gateway from subnet |
| 103 | nic02: |
| 104 | type: eth # Not-implemented |
| 105 | mac: "11:22:33:44:55:78" |
| 106 | subnet: "subnet2" |
| 107 | mode: "dhcp" |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 108 | power_parameters: |
| 109 | power_type: ipmi |
| 110 | power_address: '192.168.10.10' |
| 111 | power_user: bmc_user |
| 112 | power_password: bmc_password |
Ondrej Smola | 455003c | 2017-06-01 22:53:39 +0200 | [diff] [blame] | 113 | #Optional (for legacy HW) |
| 114 | power_driver: LAN |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 115 | distro_series: xenial |
| 116 | hwe_kernel: hwe-16.04 |
| 117 | machine1_old_schema: |
| 118 | interface: |
| 119 | mac: "11:22:33:44:55:88" # Node will be identified by those mac |
| 120 | mode: "static" |
| 121 | ip: "2.2.3.15" |
| 122 | subnet: "subnet1" |
| 123 | gateway: "2.2.3.2" |
| 124 | power_parameters: |
| 125 | power_type: ipmi |
| 126 | power_address: '192.168.10.10' |
| 127 | power_user: bmc_user |
| 128 | power_password: bmc_password |
| 129 | #Optional (for legacy HW) |
| 130 | power_driver: LAN |
| 131 | # FIXME: that's should be moved into another,livirt example. |
Petr Ruzicka | 5fe9674 | 2017-11-10 14:22:24 +0100 | [diff] [blame] | 132 | # Used in case of power_type: virsh |
| 133 | power_id: my_libvirt_vm_name |
Maciej Relewicz | 37b12a2 | 2017-04-25 15:23:16 +0200 | [diff] [blame] | 134 | distro_series: xenial |
| 135 | hwe_kernel: hwe-16.04 |
Damian Szeluga | a824810 | 2017-03-16 08:48:51 +0100 | [diff] [blame] | 136 | devices: |
| 137 | machine1-ipmi: |
| 138 | interface: |
| 139 | ip_address: 192.168.10.10 |
| 140 | subnet: cidr:192.168.10.0/24 |
| 141 | mac: '66:55:44:33:22:11' |
Damian Szeluga | 336ff2e | 2017-03-30 11:19:34 +0200 | [diff] [blame] | 142 | commissioning_scripts: |
azvyagintsev | ec61dd6 | 2017-11-16 19:12:05 +0200 | [diff] [blame] | 143 | 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] | 144 | maas_config: |
| 145 | domain: mydomain.local |
| 146 | http_proxy: http://192.168.0.10:3142 |
| 147 | commissioning_distro_series: xenial |
| 148 | default_distro_series: xenial |
| 149 | default_osystem: 'ubuntu' |
| 150 | default_storage_layout: lvm |
| 151 | disk_erase_with_secure_erase: true |
| 152 | dnssec_validation: 'no' |
| 153 | enable_third_party_drivers: true |
| 154 | maas_name: cfg01 |
| 155 | network_discovery: 'enabled' |
| 156 | active_discovery_interval: '600' |
| 157 | ntp_external_only: true |
| 158 | ntp_servers: 10.10.11.23 10.10.11.24 |
| 159 | upstream_dns: 192.168.12.13 |
| 160 | enable_http_proxy: true |
| 161 | default_min_hwe_kernel: '' |
| 162 | sshprefs: |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 163 | - 'ssh-rsa ASD.........dfsadf blah@blah' |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 164 | |
| 165 | |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 166 | |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 167 | Usage of local repos |
| 168 | |
| 169 | .. code-block:: yaml |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 170 | |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 171 | maas: |
| 172 | cluster: |
| 173 | enabled: true |
| 174 | region: |
| 175 | port: 80 |
| 176 | host: localhost |
| 177 | saltstack_repo_key: | |
| 178 | -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 179 | Version: GnuPG v2 |
| 180 | |
| 181 | mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9 |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 182 | ..... |
Richard Felkl | ce118a2 | 2017-09-13 11:09:12 +0200 | [diff] [blame] | 183 | fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS |
| 184 | MA== |
| 185 | =dtMN |
| 186 | -----END PGP PUBLIC KEY BLOCK----- |
| 187 | saltstack_repo_xenial: "http://${_param:local_repo_url}/ubuntu-xenial stable salt" |
| 188 | saltstack_repo_trusty: "http://${_param:local_repo_url}/ubuntu-trusty stable salt" |
| 189 | |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 190 | Single MAAS cluster service [multiple racks] |
| 191 | |
| 192 | .. code-block:: yaml |
| 193 | |
| 194 | maas: |
| 195 | cluster: |
| 196 | enabled: true |
Jakub Pavlik | f43512b | 2016-08-30 10:25:42 +0200 | [diff] [blame] | 197 | role: master/slave |
Ondrej Smola | 9af2b08 | 2016-08-25 17:37:29 +0200 | [diff] [blame] | 198 | |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 199 | .. code-block:: yaml |
| 200 | |
| 201 | maas: |
| 202 | cluster: |
| 203 | enabled: true |
| 204 | role: master/slave |
| 205 | |
Martin Polreich | 0764b76 | 2017-11-20 14:08:30 +0100 | [diff] [blame] | 206 | MAAS region service with backup data |
| 207 | |
| 208 | .. code-block:: yaml |
| 209 | maas: |
| 210 | region: |
| 211 | database: |
| 212 | initial_data: |
| 213 | source: cfg01.local |
| 214 | host: 192.168.0.11 |
| 215 | |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 216 | Module function's example: |
| 217 | ========================== |
| 218 | |
| 219 | * Wait for status of selected machine's: |
| 220 | |
| 221 | .. code-block:: bash |
| 222 | |
| 223 | > cat maas/machines/wait_for_machines_ready.sls |
| 224 | |
| 225 | ... |
| 226 | |
| 227 | wait_for_machines_ready: |
| 228 | module.run: |
| 229 | - name: maas.wait_for_machine_status |
| 230 | - kwargs: |
| 231 | machines: |
| 232 | - kvm01 |
| 233 | - kvm02 |
| 234 | timeout: 1200 # in seconds |
| 235 | req_status: "Ready" |
| 236 | - require: |
| 237 | - cmd: maas_login_admin |
| 238 | ... |
| 239 | |
| 240 | 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: |
| 241 | |
| 242 | .. code-block:: bash |
| 243 | |
| 244 | > cat maas/machines/wait_for_machines_deployed.sls |
| 245 | |
| 246 | ... |
| 247 | |
| 248 | wait_for_machines_ready: |
| 249 | module.run: |
| 250 | - name: maas.wait_for_machine_status |
| 251 | - kwargs: |
| 252 | timeout: 1200 # in seconds |
Michael Polenchuk | e438bd3 | 2017-11-09 20:42:42 +0400 | [diff] [blame] | 253 | req_status: "Deployed" |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 254 | ignore_machines: |
| 255 | - kvm01 # in case it's broken or whatever |
| 256 | - require: |
| 257 | - cmd: maas_login_admin |
| 258 | ... |
| 259 | |
azvyagintsev | 06b71e7 | 2017-11-08 17:11:07 +0200 | [diff] [blame] | 260 | List of available `req_status` defined in global variable: |
| 261 | |
| 262 | .. code-block:: python |
| 263 | |
| 264 | STATUS_NAME_DICT = dict([ |
| 265 | (0, 'New'), (1, 'Commissioning'), (2, 'Failed commissioning'), |
| 266 | (3, 'Missing'), (4, 'Ready'), (5, 'Reserved'), (10, 'Allocated'), |
| 267 | (9, 'Deploying'), (6, 'Deployed'), (7, 'Retired'), (8, 'Broken'), |
| 268 | (11, 'Failed deployment'), (12, 'Releasing'), |
| 269 | (13, 'Releasing failed'), (14, 'Disk erasing'), |
| 270 | (15, 'Failed disk erasing')]) |
azvyagintsev | 7605a66 | 2017-11-03 19:05:04 +0200 | [diff] [blame] | 271 | |
| 272 | |
Ales Komarek | ef98269 | 2016-02-21 14:56:07 +0100 | [diff] [blame] | 273 | Read more |
| 274 | ========= |
| 275 | |
Roald Nefs | c86d84a | 2017-10-12 21:19:50 +0200 | [diff] [blame] | 276 | * https://maas.io/ |
Filip Pytloun | c07d235 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 277 | |
| 278 | Documentation and Bugs |
| 279 | ====================== |
| 280 | |
| 281 | To learn how to install and update salt-formulas, consult the documentation |
| 282 | available online at: |
| 283 | |
| 284 | http://salt-formulas.readthedocs.io/ |
| 285 | |
| 286 | In the unfortunate event that bugs are discovered, they should be reported to |
| 287 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 288 | formula: |
| 289 | |
| 290 | https://github.com/salt-formulas/salt-formula-maas/issues |
| 291 | |
| 292 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 293 | use Launchpad salt-formulas project: |
| 294 | |
| 295 | https://launchpad.net/salt-formulas |
| 296 | |
| 297 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 298 | |
| 299 | https://launchpad.net/~salt-formulas-users |
| 300 | |
| 301 | Developers wishing to work on the salt-formulas projects should always base |
| 302 | their work on master branch and submit pull request against specific formula. |
| 303 | |
| 304 | https://github.com/salt-formulas/salt-formula-maas |
| 305 | |
| 306 | Any questions or feedback is always welcome so feel free to join our IRC |
| 307 | channel: |
| 308 | |
Martin Polreich | 0764b76 | 2017-11-20 14:08:30 +0100 | [diff] [blame] | 309 | #salt-formulas @ irc.freenode.net |