**/mcp/scripts/user-data.sh
**/mcp/scripts/virsh_net/*.xml
**/mcp/scripts/*.img
+**/net_map.j2
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
-
- {#- Determine interface index for each network (plumbing vars) -#}
- {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%}
-
- {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
- {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
- {%- set nic_private = node['interfaces'][idx_private] -%}
-
- {#- PCI addresses (only for DPDK on private) -#}
- {%- set bus_private = node['busaddr'][idx_private] -%}
-{%- endif -%}
+{%- import 'net_map.j2' as nm with context %}
---
parameters:
reclass:
node:
openstack_compute_node01:
params:
- dpdk0_name: {{ nic_private }}
- dpdk0_pci: '"{{ bus_private }}"'
+ dpdk0_name: {{ nm.cmp001.nic_private }}
+ dpdk0_pci: '"{{ nm.cmp001.bus_private }}"'
openstack_compute_node02:
params:
- dpdk0_name: {{ nic_private }}
- dpdk0_pci: '"{{ bus_private }}"'
+ dpdk0_name: {{ nm.cmp001.nic_private }}
+ dpdk0_pci: '"{{ nm.cmp001.bus_private }}"'
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
##############################################################################
-{# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
-
- {#- Determine interface index for each network (plumbing vars) -#}
- {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%}
- {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%}
- {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%}
- {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%}
-
- {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
- {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
- {%- set nic_admin = node['interfaces'][idx_admin] -%}
- {%- set nic_mgmt = node['interfaces'][idx_mgmt] -%}
- {%- set nic_private = node['interfaces'][idx_private] -%}
- {%- set nic_public = node['interfaces'][idx_public] -%}
-
- {#- PCI addresses (only for DPDK on private) -#}
- {%- set bus_private = node['busaddr'][idx_private] -%}
-
- {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
- {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%}
- {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%}
- {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%}
- {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%}
-{%- else -%}
- {%- set nic_admin = 'enp6s0' -%}
- {%- set nic_mgmt = 'enp6s0' -%}
- {%- set nic_private = None -%}
- {%- set nic_public = None -%}
- {%- set vlan_admin = 'native' -%}
- {%- set vlan_mgmt = '300' -%}
- {%- set vlan_private = '1000' -%}
-{%- endif -%}
-
-{#- Filter-out NIC duplicates by constructing a dict (used NICs only) -#}
-{%- set nics = { nic_admin: True, nic_mgmt: True, nic_public: True } -%}
-
-{%- set vlans = { vlan_admin: nic_admin, vlan_mgmt: nic_mgmt, vlan_public: nic_public } -%}
+{#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
+{%- import 'net_map.j2' as nm with context %}
+{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
+{%- set nics = { nm.ctl01.nic_admin: True, nm.ctl01.nic_mgmt: True, nm.ctl01.nic_public: True } %}
+{%- set vlans = { nm.vlan_admin: nm.ctl01.nic_admin, nm.vlan_mgmt: nm.ctl01.nic_mgmt, nm.vlan_public: nm.ctl01.nic_public } %}
---
parameters:
linux:
proto: dhcp
type: bridge
use_interfaces:
- - {{ nic_admin }}{% if vlan_admin and vlan_admin != 'native' %}.{{ vlan_admin }}{% endif %}
+ - {{ nm.ctl01.nic_admin }}{% if nm.vlan_admin and nm.vlan_admin != 'native' %}.{{ nm.vlan_admin }}{% endif %}
noifupdown: true
br-ctl:
enabled: true
address: ${_param:single_address}
netmask: 255.255.255.0
use_interfaces:
- - {{ nic_mgmt }}{% if vlan_mgmt and vlan_mgmt != 'native' %}.{{ vlan_mgmt }}{% endif %}
+ - {{ nm.ctl01.nic_mgmt }}{% if nm.vlan_mgmt and nm.vlan_mgmt != 'native' %}.{{ nm.vlan_mgmt }}{% endif %}
br-ex:
enabled: true
proto: manual
netmask: ${_param:opnfv_net_public_mask}
type: bridge
use_interfaces:
- - {{ nic_public }}{% if vlan_public and vlan_public != 'native' %}.{{ vlan_public }}{% endif %}
+ - {{ nm.ctl01.nic_public }}{% if nm.vlan_public and nm.vlan_public != 'native' %}.{{ nm.vlan_public }}{% endif %}
noifupdown: true
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
##############################################################################
-{# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
-
- {#- Determine interface index for each network (plumbing vars) -#}
- {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%}
- {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%}
- {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%}
- {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%}
-
- {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
- {%- set iface_names = conf['idf']['fuel']['network']['node'][3]['interfaces'] -%}
- {%- set nic_admin = iface_names[idx_admin] -%}
- {%- set nic_mgmt = iface_names[idx_mgmt] -%}
- {%- set nic_private = iface_names[idx_private] -%}
- {%- set nic_public = iface_names[idx_public] -%}
-
- {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
- {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%}
- {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%}
- {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%}
- {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%}
-{%- else -%}
- {%- set nic_admin = 'enp6s0' -%}
- {%- set nic_mgmt = 'enp6s0' -%}
- {%- set nic_private = None -%}
- {%- set nic_public = None -%}
- {%- set vlan_admin = 'native' -%}
- {%- set vlan_mgmt = '300' -%}
- {%- set vlan_private = '1000' -%}
-{%- endif -%}
-
-{#- Filter-out NIC duplicates by constructing a dict (used NICs only) -#}
-{%- set nics = { nic_admin: True, nic_mgmt: True } -%}
-
-{%- set vlans = { vlan_admin: nic_admin, vlan_mgmt: nic_mgmt } -%}
+{#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
+{%- import 'net_map.j2' as nm with context %}
+{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
+{%- set nics = { nm.cmp001.nic_admin: True, nm.cmp001.nic_mgmt: True } %}
+{%- set vlans = { nm.vlan_admin: nm.cmp001.nic_admin, nm.vlan_mgmt: nm.cmp001.nic_mgmt } %}
---
parameters:
linux:
bridge: openvswitch
interface:
{%- for nic in nics %}
- {%- if nic == nic_admin %}
+ {%- if nic == nm.cmp001.nic_admin %}
{{ nic }}:
enabled: true
type: eth
type: eth
proto: manual
address: 0.0.0.0
- {%- if nic == nic_public %}
+ {%- if nic == nm.cmp001.nic_public %}
netmask: ${_param:opnfv_net_public_mask}
{%- else %}
netmask: 255.255.255.0
address: ${_param:single_address}
netmask: 255.255.255.0
use_interfaces:
- - {{ nic_mgmt }}{% if vlan_mgmt and vlan_mgmt != 'native' %}.{{ vlan_mgmt }}{% endif %}
+ - {{ nm.cmp001.nic_mgmt }}{% if nm.vlan_mgmt and nm.vlan_mgmt != 'native' %}.{{ nm.vlan_mgmt }}{% endif %}
br-floating:
enabled: true
type: ovs_bridge
type: ovs_port
bridge: br-floating
proto: static
- {%- if vlan_public and vlan_public != 'native' %}
- ovs_options: tag={{ vlan_public }}
+ {%- if nm.vlan_public and nm.vlan_public != 'native' %}
+ ovs_options: tag={{ nm.vlan_public }}
{%- endif %}
address: ${_param:external_address}
netmask: 255.255.255.0
address: 0.0.0.0
netmask: 0.0.0.0
gateway: ${_param:opnfv_net_public_gw}
- {{ nic_public }}:
+ {{ nm.cmp001.nic_public }}:
enabled: true
proto: manual
ovs_port_type: OVSPort
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
##############################################################################
-{# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
-
- {#- Determine interface index for each network (plumbing vars) -#}
- {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%}
- {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%}
- {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%}
- {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%}
-
- {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
- {%- set node = conf['idf']['fuel']['network']['node'][3] -%}
- {%- set nic_admin = node['interfaces'][idx_admin] -%}
- {%- set nic_mgmt = node['interfaces'][idx_mgmt] -%}
- {%- set nic_private = node['interfaces'][idx_private] -%}
- {%- set nic_public = node['interfaces'][idx_public] -%}
-
- {#- PCI addresses (only for DPDK on private) -#}
- {%- set bus_private = node['busaddr'][idx_private] -%}
-
- {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
- {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%}
- {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%}
- {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%}
- {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%}
-{%- else -%}
- {%- set nic_admin = 'enp6s0' -%}
- {%- set nic_mgmt = 'enp6s0' -%}
- {%- set nic_private = None -%}
- {%- set nic_public = None -%}
- {%- set vlan_admin = 'native' -%}
- {%- set vlan_mgmt = '300' -%}
- {%- set vlan_private = '1000' -%}
-{%- endif -%}
-
-{#- Filter-out NIC duplicates by constructing a dict (used NICs only) -#}
-{%- set nics = { nic_private: True } -%}
-
-{%- set vlans = { vlan_private: nic_private } -%}
+{%- import 'net_map.j2' as nm with context %}
+{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
+{%- set nics = { nm.cmp001.nic_private: True } %}
+{%- set vlans = { nm.vlan_private: nm.cmp001.nic_private } %}
---
parameters:
linux:
{{ nic }}:
enabled: true
type: eth
- {%- if nic == nic_admin %}
+ {%- if nic == nm.cmp001.nic_admin %}
proto: dhcp
{%- else %}
proto: manual
netmask: 255.255.255.0
mtu: 1500
use_interfaces:
- - {{ nic_private }}{% if vlan_private and vlan_private != 'native' %}.{{ vlan_private }}{% endif %}
+ - {{ nm.cmp001.nic_private }}{% if nm.vlan_private and nm.vlan_private != 'native' %}.{{ nm.vlan_private }}{% endif %}
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%}
-{%- else -%}
- {%- set vlan_private = '1000' -%}
-{%- endif -%}
+{%- import 'net_map.j2' as nm with context %}
---
parameters:
linux:
type: dpdk_ovs_bridge
address: ${_param:tenant_address}
netmask: 255.255.255.0
- {%- if vlan_private and vlan_private != 'native' %}
- tag: {{ vlan_private }}
+ {%- if nm.vlan_private and nm.vlan_private != 'native' %}
+ tag: {{ nm.vlan_private }}
{%- endif %}
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
##############################################################################
-{# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.idf is defined and conf.idf.net_config is defined -%}
- {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
-
- {#- Determine interface index for each network (plumbing vars) -#}
- {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%}
- {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%}
- {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%}
- {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%}
-
- {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
- {%- set node = conf['idf']['fuel']['network']['node'][3] -%}
- {%- set nic_admin = node['interfaces'][idx_admin] -%}
- {%- set nic_mgmt = node['interfaces'][idx_mgmt] -%}
- {%- set nic_private = node['interfaces'][idx_private] -%}
- {%- set nic_public = node['interfaces'][idx_public] -%}
-
- {#- PCI addresses (only for DPDK on private) -#}
- {%- set bus_private = node['busaddr'][idx_private] -%}
-
- {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
- {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%}
- {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%}
- {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%}
- {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%}
-{%- else -%}
- {%- set nic_admin = 'enp6s0' -%}
- {%- set nic_mgmt = 'enp6s0' -%}
- {%- set nic_private = None -%}
- {%- set nic_public = None -%}
- {%- set vlan_admin = 'native' -%}
- {%- set vlan_mgmt = '300' -%}
- {%- set vlan_private = '1000' -%}
-{%- endif -%}
-
-{#- Filter-out NIC duplicates by constructing a dict (used NICs only) -#}
-{%- set nics = { nic_private: True } -%}
-
-{%- set vlans = { vlan_private: nic_private } -%}
+{%- import 'net_map.j2' as nm with context %}
+{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
+{%- set nics = { nm.cmp001.nic_private: True } %}
+{%- set vlans = { nm.vlan_private: nm.cmp001.nic_private } %}
---
parameters:
linux:
{{ nic }}:
enabled: true
type: eth
- {%- if nic == nic_admin %}
+ {%- if nic == nm.cmp001.nic_admin %}
proto: dhcp
{%- else %}
proto: manual
netmask: 255.255.255.0
mtu: 1500
use_interfaces:
- - {{ nic_private }}{% if vlan_private and vlan_private != 'native' %}.{{ vlan_private }}{% endif %}
+ - {{ nm.cmp001.nic_private }}{% if nm.vlan_private and nm.vlan_private != 'native' %}.{{ nm.vlan_private }}{% endif %}
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
- system.ceilometer.agent.cluster
- system.ceilometer.client.nova_compute
- system.ceilometer.client.cinder_volume
+ - cluster.virtual-mcp-pike-common-noha.openstack_compute_pdf
parameters:
_param:
- primary_interface: ${_param:opnfv_fn_vm_secondary_interface}
- tenant_interface: ${_param:opnfv_fn_vm_tertiary_interface}
- external_interface: ${_param:opnfv_fn_vm_quaternary_interface}
interface_mtu: 9000
linux_system_codename: xenial
loopback_device_size: 20
sysctl:
vm.dirty_ratio: 10
vm.dirty_background_ratio: 5
- network:
- bridge: openvswitch
- interface:
- dhcp_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_primary_interface}
- proto: dhcp
- type: eth
- mtu: ${_param:interface_mtu}
- primary_interface:
- enabled: true
- name: ${_param:primary_interface}
- proto: manual
- type: eth
- tenant_interface:
- enabled: true
- name: ${_param:tenant_interface}
- mtu: ${_param:interface_mtu}
- proto: manual
- type: eth
- br-mgmt:
- enabled: true
- type: bridge
- proto: static
- address: ${_param:single_address}
- netmask: 255.255.255.0
- use_interfaces:
- - ${_param:primary_interface}
--- /dev/null
+##############################################################################
+# 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
+##############################################################################
+{#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
+{%- import 'net_map.j2' as nm with context %}
+---
+parameters:
+ _param:
+ primary_interface: {{ nm.cmp001.nic_mgmt }}
+ tenant_interface: {{ nm.cmp001.nic_private }}
+ external_interface: {{ nm.cmp001.nic_public }}
+ linux:
+ network:
+ bridge: openvswitch
+ interface:
+ dhcp_int:
+ enabled: true
+ name: {{ nm.cmp001.nic_admin }}
+ proto: dhcp
+ type: eth
+ mtu: ${_param:interface_mtu}
+ primary_interface:
+ enabled: true
+ name: ${_param:primary_interface}
+ proto: manual
+ type: eth
+ tenant_interface:
+ enabled: true
+ name: ${_param:tenant_interface}
+ mtu: ${_param:interface_mtu}
+ proto: manual
+ type: eth
+ br-mgmt:
+ enabled: true
+ type: bridge
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ use_interfaces:
+ - ${_param:primary_interface}
- system.horizon.server.single
- service.haproxy.proxy.single
- cluster.virtual-mcp-pike-common-noha.haproxy_openstack_api
+ - cluster.virtual-mcp-pike-common-noha.openstack_control_pdf
parameters:
_param:
linux_system_codename: xenial
package:
python-msgpack:
version: latest
- network:
- interface:
- dhcp_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_primary_interface}
- proto: dhcp
- type: eth
- single_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_secondary_interface}
- type: eth
- proto: static
- address: ${_param:single_address}
- netmask: 255.255.255.0
- public_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_quaternary_interface}
- type: eth
- proto: static
- address: ${_param:cluster_public_host}
- netmask: 255.255.255.0
keystone:
server:
admin_email: ${_param:admin_email}
--- /dev/null
+##############################################################################
+# 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
+##############################################################################
+{%- import 'net_map.j2' as nm with context %}
+---
+parameters:
+ linux:
+ network:
+ interface:
+ dhcp_int:
+ enabled: true
+ name: {{ nm.ctl01.nic_admin }}
+ proto: dhcp
+ type: eth
+ single_int:
+ enabled: true
+ name: {{ nm.ctl01.nic_mgmt }}
+ type: eth
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ public_int:
+ enabled: true
+ name: {{ nm.ctl01.nic_public }}
+ type: eth
+ proto: static
+ address: ${_param:cluster_public_host}
+ netmask: 255.255.255.0
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
##############################################################################
---
+classes:
+ - cluster.virtual-mcp-pike-common-noha.openstack_gateway_pdf
parameters:
_param:
- primary_interface: ${_param:opnfv_fn_vm_secondary_interface}
- tenant_interface: ${_param:opnfv_fn_vm_tertiary_interface}
- external_interface: ${_param:opnfv_fn_vm_quaternary_interface}
interface_mtu: 9000
linux_system_codename: xenial
neutron:
notification: true
agent_mode: ${_param:neutron_gateway_agent_mode}
vlan_aware_vms: true
- linux:
- network:
- bridge: openvswitch
- interface:
- dhcp_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_primary_interface}
- proto: dhcp
- type: eth
- mtu: ${_param:interface_mtu}
- primary_interface:
- enabled: true
- name: ${_param:primary_interface}
- mtu: ${_param:interface_mtu}
- proto: manual
- type: eth
- tenant_interface:
- enabled: true
- name: ${_param:tenant_interface}
- mtu: ${_param:interface_mtu}
- proto: manual
- type: eth
- external_interface:
- enabled: true
- name: ${_param:external_interface}
- mtu: ${_param:interface_mtu}
- proto: manual
- type: eth
- br-floating:
- enabled: true
- type: ovs_bridge
- mtu: ${_param:interface_mtu}
- br-mgmt:
- enabled: true
- type: bridge
- proto: static
- address: ${_param:single_address}
- netmask: 255.255.255.0
- mtu: ${_param:interface_mtu}
- use_interfaces:
- - ${_param:primary_interface}
- float-to-ex:
- enabled: true
- type: ovs_port
- mtu: ${_param:interface_mtu}
- bridge: br-floating
- br-ex:
- enabled: true
- type: bridge
- mtu: ${_param:interface_mtu}
- address: ${_param:external_address}
- netmask: 255.255.255.0
- use_interfaces:
- - ${_param:external_interface}
- use_ovs_ports:
- - float-to-ex
--- /dev/null
+##############################################################################
+# 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
+##############################################################################
+---
+{%- import 'net_map.j2' as nm with context %}
+parameters:
+ _param:
+ primary_interface: {{ nm.ctl01.nic_mgmt }}
+ tenant_interface: {{ nm.ctl01.nic_private }}
+ external_interface: {{ nm.ctl01.nic_public }}
+ linux:
+ network:
+ bridge: openvswitch
+ interface:
+ dhcp_int:
+ enabled: true
+ name: {{ nm.ctl01.nic_admin }}
+ proto: dhcp
+ type: eth
+ mtu: ${_param:interface_mtu}
+ primary_interface:
+ enabled: true
+ name: ${_param:primary_interface}
+ mtu: ${_param:interface_mtu}
+ proto: manual
+ type: eth
+ tenant_interface:
+ enabled: true
+ name: ${_param:tenant_interface}
+ mtu: ${_param:interface_mtu}
+ proto: manual
+ type: eth
+ external_interface:
+ enabled: true
+ name: ${_param:external_interface}
+ mtu: ${_param:interface_mtu}
+ proto: manual
+ type: eth
+ br-floating:
+ enabled: true
+ type: ovs_bridge
+ mtu: ${_param:interface_mtu}
+ br-mgmt:
+ enabled: true
+ type: bridge
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ mtu: ${_param:interface_mtu}
+ use_interfaces:
+ - ${_param:primary_interface}
+ float-to-ex:
+ enabled: true
+ type: ovs_port
+ mtu: ${_param:interface_mtu}
+ bridge: br-floating
+ br-ex:
+ enabled: true
+ type: bridge
+ mtu: ${_param:interface_mtu}
+ address: ${_param:external_address}
+ netmask: 255.255.255.0
+ use_interfaces:
+ - ${_param:external_interface}
+ use_ovs_ports:
+ - float-to-ex
##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# 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
- system.linux.system.repo.mcp.extra
- system.opendaylight.server.single
- cluster.virtual-mcp-pike-odl-noha
+ - cluster.virtual-mcp-pike-odl-noha.opendaylight.control_pdf
parameters:
_param:
linux_system_codename: xenial
- linux:
- network:
- interface:
- single_int:
- enabled: true
- name: ${_param:opnfv_fn_vm_secondary_interface}
- type: eth
- proto: static
- address: ${_param:single_address}
- netmask: 255.255.255.0
opendaylight:
server:
odl_bind_ip: ${_param:single_address}
--- /dev/null
+##############################################################################
+# 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
+##############################################################################
+{%- import 'net_map.j2' as nm with context %}
+---
+parameters:
+ linux:
+ network:
+ interface:
+ single_int:
+ enabled: true
+ name: {{ nm.ctl01.nic_mgmt }}
+ type: eth
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
RECLASS_CLUSTER_DIR=$(cd "${git_repo_root}/mcp/reclass/classes/cluster"; pwd)
PHAROS_GEN_CFG="./pharos/config/utils/generate_config.py"
PHAROS_INSTALLER_ADAPTER="./pharos/config/installers/fuel/pod_config.yml.j2"
+ PHAROS_INSTALLER_NETMAP="$(dirname "${PHAROS_INSTALLER_ADAPTER}")/net_map.j2"
BASE_CONFIG_PDF="${lab_config_uri}/labs/${target_lab}/${target_pod}.yaml"
BASE_CONFIG_IDF="${lab_config_uri}/labs/${target_lab}/idf-${target_pod}.yaml"
LOCAL_PDF="${image_dir}/$(basename "${BASE_CONFIG_PDF}")"
# shellcheck disable=SC2086
find ${template_dirs} -name '*.j2' | while read -r tp; do
# Jinja2 import does not allow '..' directory traversal
+ ln -sf "$(readlink -f "${PHAROS_INSTALLER_NETMAP}")" "$(dirname "${tp}")"
if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" -j "${tp}" > "${tp%.j2}"; then
notify_e "[ERROR] ${template_err_str}"
fi
+ rm -f "$(dirname "${tp}")/$(basename "${PHAROS_INSTALLER_NETMAP}")"
done
}