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
|
|
|
# NOTE: This template is now deprecated, and is only included for compatibility
|
|
|
|
# when upgrading a deployment where this template was originally used. For new
|
|
|
|
# deployments, set "ipv6: true" on desired networks in network_data.yaml, and
|
|
|
|
# include network-isolation.yaml.
|
|
|
|
#
|
2017-06-15 10:22:21 +02:00
|
|
|
# Enable the creation of Neutron networks for isolated Overcloud
|
|
|
|
# traffic and configure each role to assign ports (related
|
|
|
|
# to that role) on these networks.
|
|
|
|
resource_registry:
|
|
|
|
# networks as defined in network_data.yaml
|
|
|
|
{%- for network in networks if network.enabled|default(true) %}
|
|
|
|
{%- if network.name != 'Tenant' %}
|
|
|
|
OS::TripleO::Network::{{network.name}}: ../network/{{network.name_lower|default(network.name.lower())}}_v6.yaml
|
|
|
|
{%- else %}
|
|
|
|
# IPv4 until OVS and Neutron support IPv6 tunnel endpoints
|
|
|
|
OS::TripleO::Network::{{network.name}}: ../network/{{network.name_lower|default(network.name.lower())}}.yaml
|
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
# Port assignments for the VIPs
|
|
|
|
{%- for network in networks if network.vip and network.enabled|default(true) %}
|
|
|
|
OS::TripleO::Network::Ports::{{network.name}}VipPort: ../network/ports/{{network.name_lower|default(network.name.lower())}}_v6.yaml
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/vip_v6.yaml
|
|
|
|
|
2017-09-14 13:26:53 -06:00
|
|
|
# Port assignments by role, edit role definition to assign networks to roles.
|
2017-06-15 10:22:21 +02:00
|
|
|
{%- for role in roles %}
|
2018-07-12 18:27:08 +02:00
|
|
|
{#- Convert net map or net list to internal list of networks #}
|
|
|
|
{#- NOTE(hjensas): For backward compatibility support role data with both #}
|
|
|
|
{#- networks map (new schema) and network list (old schema). #}
|
|
|
|
{%- set _role_networks = [] %}
|
|
|
|
{%- if role.networks is mapping %}
|
|
|
|
{%- for key,val in role.networks.items() %}
|
|
|
|
{%- set _role_networks = _role_networks.append(key) %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- else %}
|
|
|
|
{%- set _role_networks = role.networks %}
|
|
|
|
{%- endif %}
|
2017-06-15 10:22:21 +02:00
|
|
|
# Port assignments for the {{role.name}}
|
2018-07-12 18:27:08 +02:00
|
|
|
{%- for network in networks %}
|
|
|
|
{%- if network.name in _role_networks and network.enabled|default(true) and network.name != 'Tenant' %}
|
2017-06-15 10:22:21 +02:00
|
|
|
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}_v6.yaml
|
2018-07-12 18:27:08 +02:00
|
|
|
{%- elif network.name in _role_networks and network.enabled|default(true) and network.name == 'Tenant' %}
|
|
|
|
# IPv4 until OVS and Neutron support IPv6 tunnel endpoints
|
2017-06-15 10:22:21 +02:00
|
|
|
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
|
2018-07-12 18:27:08 +02:00
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endfor %}
|
2017-06-15 10:22:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
parameter_defaults:
|
|
|
|
# Enable IPv6 for Ceph.
|
|
|
|
CephIPv6: True
|
|
|
|
# Enable IPv6 for Corosync. This is required when Corosync is using an IPv6 IP in the cluster.
|
|
|
|
CorosyncIPv6: True
|
|
|
|
# Enable various IPv6 features in Nova.
|
|
|
|
NovaIPv6: True
|
|
|
|
# Enable IPv6 environment for RabbitMQ.
|
|
|
|
RabbitIPv6: True
|
|
|
|
# Enable IPv6 environment for Memcached.
|
|
|
|
MemcachedIPv6: True
|
2017-09-29 22:32:07 +02:00
|
|
|
# Enable IPv6 environment for MySQL.
|
|
|
|
MysqlIPv6: True
|
2017-12-18 19:47:29 -05:00
|
|
|
# Enable IPv6 environment for Manila
|
|
|
|
ManilaIPv6: True
|
2017-12-13 13:44:09 +00:00
|
|
|
# Enable IPv6 environment for Redis.
|
|
|
|
RedisIPv6: True
|
2018-07-24 01:08:12 +05:30
|
|
|
# Enable IPv6 environment for OpenDaylight
|
|
|
|
OpenDaylightEnableIPv6Deployment: True
|