aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
blob: 335b9c747e554b913b542552aa0422a39ea3fa57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
##############################################################################
# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
{%- set cluster_arch = [] %}
{%- for node in conf.nodes %}
  {%- if node.node.arch not in cluster_arch %}
    {%- do cluster_arch.append(node.node.arch) %}
  {%- endif %}
{%- endfor %}
{%- set net_admin = [conf.idf.net_config.admin.network,
                     conf.idf.net_config.admin.mask] | join("/") %}
parameters:
  maas:
    region:
      subnets:
        {{ net_admin }}:
          name: {{ net_admin }}
          cidr: {{ net_admin }}
          gateway_ip: ${_param:single_address}
          iprange:
            start: ${_param:opnfv_infra_maas_pxe_start_address}
            end: ${_param:opnfv_infra_maas_pxe_end_address}
            type: dynamic
          vlans:
            untagged:
              vid: 0
              dhcp_on: true
              primary_rack: ${_param:infra_maas_node01_hostname}
      sshprefs:
        - '{{ conf.MAAS_SSH_KEY }}'
{%- if 'aarch64' in cluster_arch %}
      package_repositories:
        armband:
          name: armband
          enabled: '1'
          url: 'http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}'
          distributions: '${_param:openstack_version}-armband'
          components: 'main'
          arches: 'arm64'
          key: &armband_key |
            -----BEGIN PGP PUBLIC KEY BLOCK-----
            Version: GnuPG v2.0.14 (GNU/Linux)

            mQENBFagAroBCADWboNIjuF6lB1mWv2+EbvqY3lKl5mLKhr2DnSUkKeHUPBv8gNM
            qK8Q00AMIyPiyEhgjA+dWizZ+5aBgxoiY7oMeLJ2Xym36U/8SYq2BWd3SGCbMNoz
            SJDxDUSM/HFVs6atF1M3DY9oN65hSVnu4uy5Tu6asf6k4rhAyk0z4+pRcPBCu2vq
            mnGi3COM/+9PShrEKeVOx5W2vRJywUFuq8EDvQnRoJ0GvM28JiJIanw17YwIPxhg
            BKZVpZjan5X+ihVMXwA2h/G/FS5Omhd50RqV6LWSYs94VJJgYqHx8UMm7izcxI+P
            ct3IcbD195bPbJ+SbuiFe45ZLsdY1MyGiU2BABEBAAG0K0VuZWEgQXJtYmFuZCBE
            ZXZvcHMgVGVhbSA8YXJtYmFuZEBlbmVhLmNvbT6JATgEEwECACICGwMGCwkIBwMC
            BhUIAgkKCwQWAgMBAh4BAheABQJaY3bYAAoJEN6rkLp5irHRoQMH/0PYl0A/6eWw
            nQ/szhEFrr76Ln6wA4vEO+PiuWj9kTkZM2NaCnkisrIuHSPIVvOLfFmztbE6sKGe
            t+a2b7Jqw48DZ/gq508aZE4Q307ookxdCOrzIu/796hFO34yXg3sqZoJh3VmKIjY
            4DL8yG1iAiQ5vOw3IFWQnATwIZUgaCcjmE7HGap+9ePuJfFuQ8mIG5cy28t8qocx
            AB/B2tucfBMwomYxKqgbLI5AG7iSt58ajvrrNa9f8IX7Ihj/jiuXhUwX+geEp98K
            IWVI1ftEthZvfBpZW4BS98J4z//dEPi31L4jb9RQXq3afF2RpXchDeUN85bW45nu
            W/9PMAlgE/U=
            =m+zE
            -----END PGP PUBLIC KEY BLOCK-----
{%- endif %}
      machines:
      {%- set pxe_interface = conf.idf.net_config.admin.interface %}
      {#- We only support exactly 5 nodes for now, hardcoded order #}
      {%- set node_roles = ['kvm01', 'kvm02', 'kvm03', 'cmp001', 'cmp002'] %}
      {%- for node in conf.nodes %}
      {%- if node.node.type == 'baremetal' %}
        {{ node_roles[loop.index0] }}:
          interface:
            mac: {{ node.interfaces[pxe_interface].mac_address }}
          power_parameters:
            power_address: {{ node.remote_management.address.rsplit('/')[0] }}
            power_password: {{ node.remote_management.pass }}
            power_type: {{ node.remote_management.type }}
            power_user: {{ node.remote_management.user }}
          architecture: {{ node.node.arch | dpkg_arch }}/generic
          distro_series: xenial
          hwe_kernel: ${_param:hwe_kernel}
      {%- endif %}
      {%- endfor %}