blob: fdfbb3845360f4750894773c9af05a0a9530ae30 [file] [log] [blame]
Ales Komarekef982692016-02-21 14:56:07 +01001
2==================
smolaon552ba582016-02-23 20:35:42 +01003Metal as a Service
Ales Komarekef982692016-02-21 14:56:07 +01004==================
5
6Service maas description
7
8Sample pillars
9==============
10
11Single maas service
12
13.. code-block:: yaml
14
15 maas:
16 server:
17 enabled: true
18
Ondrej Smola9af2b082016-08-25 17:37:29 +020019Single MAAS region service [single UI/API]
20
21.. code-block:: yaml
22
Damian Szelugaa8248102017-03-16 08:48:51 +010023 maas:
Damian Szeluga336ff2e2017-03-30 11:19:34 +020024 salt_master_ip: 192.168.0.10
Damian Szelugaa8248102017-03-16 08:48:51 +010025 region:
Jiri Broulik0df14bc2017-08-07 10:01:55 +020026 upstream_proxy:
27 address: 10.0.0.1
28 port: 8080
Ondrej Smola3ffb6312017-09-22 17:13:10 +020029 user: username #OPTIONAL
30 password: password #OPTIONAL
Damian Szelugaa8248102017-03-16 08:48:51 +010031 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:
azvyagintsev06b71e72017-11-08 17:11:07 +020049 test-fabric1:
50 description: "Test fabric"
51 test-fabric2:
52 description: "Test fabric2"
Damian Szelugaa8248102017-03-16 08:48:51 +010053 subnets:
54 subnet1:
azvyagintsev06b71e72017-11-08 17:11:07 +020055 fabric: test-fabric1
Damian Szelugaa8248102017-03-16 08:48:51 +010056 cidr: 2.2.3.0/24
57 gateway_ip: 2.2.3.2
azvyagintsev06b71e72017-11-08 17:11:07 +020058 iprange: # reserved range for DHCP\auto mapping
Damian Szelugaa8248102017-03-16 08:48:51 +010059 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 Szelugaa8248102017-03-16 08:48:51 +010080 arches: amd64
81 key: "-----BEGIN PGP PUBLIC KEY BLOCK-----
82 Version: GnuPG v2
Pavel Cizinsky5a6e2722016-08-31 15:58:13 +020083
Damian Szelugaa8248102017-03-16 08:48:51 +010084 mQENBFOpvpgBCADkP656H41i8fpplEEB8IeLhugyC2rTEwwSclb8tQNYtUiGdna9
azvyagintsev06b71e72017-11-08 17:11:07 +020085 ......
Damian Szelugaa8248102017-03-16 08:48:51 +010086 fuBmScum8uQTrEF5+Um5zkwC7EXTdH1co/+/V/fpOtxIg4XO4kcugZefVm5ERfVS
87 MA==
88 =dtMN
89 -----END PGP PUBLIC KEY BLOCK-----"
90 enabled: true
91 machines:
azvyagintsev06b71e72017-11-08 17:11:07 +020092 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 Szelugaa8248102017-03-16 08:48:51 +0100108 power_parameters:
109 power_type: ipmi
110 power_address: '192.168.10.10'
111 power_user: bmc_user
112 power_password: bmc_password
Ondrej Smola455003c2017-06-01 22:53:39 +0200113 #Optional (for legacy HW)
114 power_driver: LAN
azvyagintsev06b71e72017-11-08 17:11:07 +0200115 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 Ruzicka5fe96742017-11-10 14:22:24 +0100132 # Used in case of power_type: virsh
133 power_id: my_libvirt_vm_name
Maciej Relewicz37b12a22017-04-25 15:23:16 +0200134 distro_series: xenial
135 hwe_kernel: hwe-16.04
Damian Szelugaa8248102017-03-16 08:48:51 +0100136 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 Szeluga336ff2e2017-03-30 11:19:34 +0200142 commissioning_scripts:
azvyagintsevec61dd62017-11-16 19:12:05 +0200143 00-maas-05-simplify-network-interfaces: /etc/maas/files/commisioning_scripts/00-maas-05-simplify-network-interfaces
Damian Szeluga336ff2e2017-03-30 11:19:34 +0200144 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:
azvyagintsev06b71e72017-11-08 17:11:07 +0200163 - 'ssh-rsa ASD.........dfsadf blah@blah'
Ondrej Smola9af2b082016-08-25 17:37:29 +0200164
165
azvyagintsev7605a662017-11-03 19:05:04 +0200166
Richard Felklce118a22017-09-13 11:09:12 +0200167Usage of local repos
168
169.. code-block:: yaml
azvyagintsev7605a662017-11-03 19:05:04 +0200170
Richard Felklce118a22017-09-13 11:09:12 +0200171 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
azvyagintsev06b71e72017-11-08 17:11:07 +0200182 .....
Richard Felklce118a22017-09-13 11:09:12 +0200183 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 Smola9af2b082016-08-25 17:37:29 +0200190Single MAAS cluster service [multiple racks]
191
192.. code-block:: yaml
193
194 maas:
195 cluster:
196 enabled: true
Jakub Pavlikf43512b2016-08-30 10:25:42 +0200197 role: master/slave
Ondrej Smola9af2b082016-08-25 17:37:29 +0200198
azvyagintsev7605a662017-11-03 19:05:04 +0200199.. code-block:: yaml
200
201 maas:
202 cluster:
203 enabled: true
204 role: master/slave
205
Martin Polreich0764b762017-11-20 14:08:30 +0100206MAAS 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
azvyagintsev7605a662017-11-03 19:05:04 +0200216Module 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
240If 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 Polenchuke438bd32017-11-09 20:42:42 +0400253 req_status: "Deployed"
azvyagintsev7605a662017-11-03 19:05:04 +0200254 ignore_machines:
255 - kvm01 # in case it's broken or whatever
256 - require:
257 - cmd: maas_login_admin
258 ...
259
azvyagintsev06b71e72017-11-08 17:11:07 +0200260List 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')])
azvyagintsev7605a662017-11-03 19:05:04 +0200271
272
Ales Komarekef982692016-02-21 14:56:07 +0100273Read more
274=========
275
Roald Nefsc86d84a2017-10-12 21:19:50 +0200276* https://maas.io/
Filip Pytlounc07d2352017-02-02 13:02:03 +0100277
278Documentation and Bugs
279======================
280
281To learn how to install and update salt-formulas, consult the documentation
282available online at:
283
284 http://salt-formulas.readthedocs.io/
285
286In the unfortunate event that bugs are discovered, they should be reported to
287the appropriate issue tracker. Use Github issue tracker for specific salt
288formula:
289
290 https://github.com/salt-formulas/salt-formula-maas/issues
291
292For feature requests, bug reports or blueprints affecting entire ecosystem,
293use Launchpad salt-formulas project:
294
295 https://launchpad.net/salt-formulas
296
297You can also join salt-formulas-users team and subscribe to mailing list:
298
299 https://launchpad.net/~salt-formulas-users
300
301Developers wishing to work on the salt-formulas projects should always base
302their work on master branch and submit pull request against specific formula.
303
304 https://github.com/salt-formulas/salt-formula-maas
305
306Any questions or feedback is always welcome so feel free to join our IRC
307channel:
308
Martin Polreich0764b762017-11-20 14:08:30 +0100309 #salt-formulas @ irc.freenode.net