[akraino] Add IEC K8-calico scenarios
[fuel.git] / mcp / reclass / classes / cluster / mcp-iec-noha / akraino / iec.yml.j2
1 ##############################################################################
2 # Copyright (c) 2019 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 {%- import 'net_macros.j2' as ma with context %}
10 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
11 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
12 {%- set nics = {} %}
13 {%- set vlans = {} %}
14 {%- else %}
15 {%- set nics = { nm.ctl01.nic_mgmt: True, nm.ctl01.nic_public: True } %}
16 {%- set vlans = { nm.vlan_mgmt: nm.ctl01.nic_mgmt, nm.vlan_public: nm.ctl01.nic_public } %}
17 {%- endif %}
18 ---
19 classes:
20   - cluster.mcp-iec-noha
21   - cluster.all-mcp-arch-common.opnfv.maas_proxy
22   - cluster.all-mcp-arch-common.opnfv.lab_proxy_pdf
23 parameters:
24   _param:
25 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
26     pxe_admin_interface: ${_param:opnfv_vcp_vm_primary_interface}
27     external_nic: ${_param:opnfv_vcp_vm_secondary_interface}
28     single_nic: ${_param:opnfv_vcp_vm_tertiary_interface}
29 {%- else %}
30     pxe_admin_interface: {{ nm.ctl01.nic_admin }}
31     external_nic: {{ ma.interface_str(nm.ctl01.nic_public, nm.vlan_public) }}
32     single_nic: {{ ma.interface_str(nm.ctl01.nic_mgmt, nm.vlan_mgmt) }}
33 {%- endif %}
34   linux:
35     network:
36       interface:
37         pxe_admin_int:
38           enabled: true
39           name: ${_param:pxe_admin_interface}
40           proto: static
41           type: eth
42           address: ${_param:pxe_admin_address}
43           netmask: ${_param:opnfv_net_admin_mask}
44           mtu: ${_param:interface_mtu}
45           noifupdown: true
46
47 {#- prevent duplicates for tagged mgmt on the same physical interface as PXE/admin #}
48 {%- if nm.ctl01.nic_admin in nics %}
49   {%- do nics.pop(nm.ctl01.nic_admin) %}
50 {%- endif %}
51
52 {{ ma.linux_network_interfaces_nic(nics) }}
53
54 {{ ma.linux_network_interfaces_vlan(vlans) }}
55
56 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
57         single:
58           enabled: true
59           type: eth
60           proto: manual
61           name: ${_param:single_nic}
62           mtu: ${_param:interface_mtu}
63         external:
64           enabled: true
65           type: eth
66           proto: manual
67           name: ${_param:external_nic}
68           mtu: ${_param:interface_mtu}
69 {%- endif %}
70         br-ctl:
71           enabled: true
72           type: bridge
73           proto: static
74           address: ${_param:single_address}
75           netmask: ${_param:opnfv_net_mgmt_mask}
76           noifupdown: true
77           use_interfaces:
78             - ${_param:single_nic}
79           mtu: ${_param:interface_mtu}
80         br-ex:
81           enabled: true
82           type: bridge
83           proto: static
84           address: ${_param:external_address}
85           netmask: ${_param:opnfv_net_public_mask}
86           noifupdown: true
87           use_interfaces:
88             - ${_param:external_nic}
89           mtu: ${_param:interface_mtu}
90           gateway: ${_param:opnfv_net_public_gw}
91           name_servers: {{ nm.dns_public }}