Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
#This file is an example of an environment file for defining the isolated
|
|
|
|
#networks and related parameters.
|
|
|
|
resource_registry:
|
|
|
|
# Network Interface templates to use (these files must exist). You can
|
|
|
|
# override these by including one of the net-*.yaml environment files,
|
|
|
|
# such as net-bond-with-vlans.yaml, or modifying the list here.
|
|
|
|
{%- for role in roles %}
|
|
|
|
# Port assignments for the {{role.name}}
|
|
|
|
OS::TripleO::{{role.name}}::Net::SoftwareConfig:
|
2018-03-05 17:01:08 +01:00
|
|
|
../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower() ~ ".yaml")}}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
parameter_defaults:
|
|
|
|
# This section is where deployment-specific configuration is done
|
2018-05-18 18:11:38 +02:00
|
|
|
#
|
|
|
|
# NOTE: (Since Rocky)
|
|
|
|
# ControlPlaneSubnetCidr: It is no longer a requirement to provide the
|
|
|
|
# parameter. The attribute is resolved from the
|
|
|
|
# ctlplane subnet(s).
|
2018-06-30 17:48:25 +02:00
|
|
|
# ControlPlaneDefaultRoute: It is no longer a requirement to provide this
|
|
|
|
# parameter. The attribute is resolved from the
|
|
|
|
# ctlplane subnet(s).
|
2018-06-30 21:07:55 +02:00
|
|
|
# EC2MetadataIp: It is no longer a requirement to provide this parameter. The
|
|
|
|
# attribute is resolved from the ctlplane subnet(s).
|
2018-05-18 18:11:38 +02:00
|
|
|
#
|
2018-07-12 11:01:55 +02:00
|
|
|
{% for network in networks if network.enabled|default(true) %}
|
|
|
|
# Customize the IP subnet to match the local environment
|
|
|
|
{%- if network.ipv6|default(false) %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}NetCidr: '{{network.ipv6_subnet}}'
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- else %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}NetCidr: '{{network.ip_subnet}}'
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- endif %}
|
|
|
|
# Customize the IP range to use for static IPs and VIPs
|
|
|
|
{%- if network.name == 'External' %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
# Leave room if the external network is also used for floating IPs
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- endif %}
|
|
|
|
{%- if network.ipv6|default(false) %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}AllocationPools: {{network.ipv6_allocation_pools}}
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- else %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}AllocationPools: {{network.allocation_pools}}
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- endif %}
|
|
|
|
{%- if network.ipv6|default(false) and network.gateway_ipv6|default(false) %}
|
|
|
|
# Gateway router for routable networks
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ipv6}}'
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- elif network.gateway_ip|default(false) %}
|
|
|
|
# Gateway router for routable networks
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ip}}'
|
2018-07-12 11:01:55 +02:00
|
|
|
{%- endif %}
|
|
|
|
{%- if network.vlan is defined %}
|
|
|
|
# Customize the VLAN ID to match the local environment
|
|
|
|
{{network.name}}NetworkVlanID: {{network.vlan}}
|
|
|
|
{%- endif %}
|
2018-08-22 10:38:33 +02:00
|
|
|
{%- if network.routes %}
|
2018-07-04 23:05:27 +02:00
|
|
|
# Routes to add to host_routes property of the subnets in neutron.
|
|
|
|
{{network.name}}Routes: {{network.routes|default([])}}
|
|
|
|
{%- endif %}
|
2018-10-23 01:06:20 +02:00
|
|
|
{%- if network.name == 'Tenant' %}
|
|
|
|
# MTU of the underlying physical network. Neutron uses this value to
|
|
|
|
# calculate MTU for all virtual network components. For flat and VLAN
|
|
|
|
# networks, neutron uses this value without modification. For overlay
|
|
|
|
# networks such as VXLAN, neutron automatically subtracts the overlay
|
|
|
|
# protocol overhead from this value.
|
|
|
|
TenantNetPhysnetMtu: {{network.mtu|default('1500')}}
|
|
|
|
{%- endif %}
|
2018-07-12 10:48:05 +02:00
|
|
|
{% for subnet in network.subnets|default({}) if network.subnets[subnet].enabled|default(true) %}
|
|
|
|
{%- if network.ipv6|default(false) %}
|
|
|
|
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ipv6_subnet']}}
|
|
|
|
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['ipv6_allocation_pools']}}
|
|
|
|
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ipv6']}}
|
|
|
|
{%- if network.subnets[subnet][routes_ipv6] %}
|
|
|
|
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes_ipv6']|default([])}}
|
|
|
|
{%- endif %}
|
|
|
|
{%- else %}
|
|
|
|
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ip_subnet']}}
|
|
|
|
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['allocation_pools']}}
|
|
|
|
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ip']}}
|
|
|
|
{%- if network.subnets[subnet][routes] %}
|
|
|
|
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes']|default([])}}
|
|
|
|
{%- endif %}
|
|
|
|
{%- endif %}
|
|
|
|
{%- if network.subnets[subnet]['vlan'] is defined %}
|
|
|
|
{{network.name}}NetworkVlanID_{{subnet}}: {{network.subnets[subnet]['vlan']}}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
2018-07-12 11:01:55 +02:00
|
|
|
{% endfor %}
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
{#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #}
|
|
|
|
# Define the DNS servers (maximum 2) for the overcloud nodes
|
2018-07-12 10:48:05 +02:00
|
|
|
# When the list is not set or empty, the nameservers on the ctlplane subnets will be used.
|
2018-07-01 01:13:49 +02:00
|
|
|
# (ctlplane subnets nameservers are controlled by the ``undercloud_nameservers`` option in ``undercloud.conf``)
|
|
|
|
DnsServers: []
|
Render NIC config templates with jinja2
This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.
The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.
The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).
Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.
Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
2017-11-28 17:00:59 -08:00
|
|
|
# List of Neutron network types for tenant networks (will be used in order)
|
|
|
|
NeutronNetworkType: 'vxlan,vlan'
|
|
|
|
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
|
|
|
|
NeutronTunnelTypes: 'vxlan'
|
|
|
|
# Neutron VLAN ranges per network, for example 'datacentre:1:499,tenant:500:1000':
|
|
|
|
NeutronNetworkVLANRanges: 'datacentre:1:1000'
|
|
|
|
# Customize bonding options, e.g. "mode=4 lacp_rate=1 updelay=1000 miimon=100"
|
|
|
|
# for Linux bonds w/LACP, or "bond_mode=active-backup" for OVS active/backup.
|
|
|
|
BondInterfaceOvsOptions: "bond_mode=active-backup"
|