fuel: Switch to Ubuntu Bionic
[pharos.git] / config / installers / fuel / pod_config.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 ---
10 {%- if nm.cluster.has_baremetal_nodes %}
11 parameters:
12   maas:
13     region:
14       machines:
15       {%- set ctl_roles = 3 if 'virtual' not in conf else conf.virtual.nodes.control | length %}
16       {%- set has_cmp = True if 'virtual' not in conf else 'compute' in conf.virtual.nodes %}
17       {%- for node in conf.nodes %}
18       {%- if (node.node.type == 'baremetal' and (
19              (has_cmp and loop.index > nm.cmp001.idx) or loop.index0 < ctl_roles)) %}
20         {%- if loop.index > nm.cmp001.idx %}
21         cmp{{ '%03d' | format(loop.index - nm.cmp001.idx) }}:
22         {%- elif 'virtual' not in conf %} {#- strictly for Pharos verify job #}
23         kvm{{ '%02d' | format(loop.index) }}:
24         {%- else %}
25         {{ conf.virtual.nodes.control[loop.index0] }}:
26         {%- endif %}
27           interface:
28             mac: {{ node.interfaces[nm.idx_admin].mac_address }}
29           power_parameters:
30             power_address: {{ node.remote_management.address.rsplit('/')[0] }}
31             power_pass: {{ node.remote_management.pass }}
32             power_type: {{ node.remote_management.type }}
33             power_user: {{ node.remote_management.user }}
34           architecture: {{ node.node.arch | dpkg_arch }}/generic
35           distro_series: bionic
36           hwe_kernel: ${_param:hwe_kernel}
37           {%- if loop.index > nm.cmp001.idx %}
38           disk_layout:
39             type: lvm
40             root_device: sda
41             volume_group: vgroot
42             volume_name: lvroot
43             volume_size: 100
44           {%- endif %}
45       {%- endif %}
46       {%- endfor %}
47 {%- endif %}