Make network-isolation-v6 environment rendered for all roles

In change If3989f24f077738845d2edbee405bd9198e7b7db we moved to jinja2
templating to render the networks. This change aims at doing so for the
IPv6 network isolation environment.

Change-Id: Ieebcff3db3f5756a5d23080ea3d09ce78de69e21
This commit is contained in:
Michele Baldessari 2017-06-15 10:22:21 +02:00
parent ee5a92b953
commit 6af919e790
5 changed files with 71 additions and 57 deletions

View File

@ -0,0 +1,58 @@
{%- set primary_role = [roles[0]] -%}
{%- for role in roles -%}
{%- if 'primary' in role.tags and 'controller' in role.tags -%}
{%- set _ = primary_role.pop() -%}
{%- set _ = primary_role.append(role) -%}
{%- endif -%}
{%- endfor -%}
{%- set primary_role_name = primary_role[0].name -%}
# Enable the creation of Neutron networks for isolated Overcloud
# traffic and configure each role to assign ports (related
# to that role) on these networks.
# primary role is: {{primary_role_name}}
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
{%- for role in roles %}
# Port assignments for the {{role.name}}
{%- for network in networks %}
{%- if network.name in role.networks|default([]) and network.enabled|default(true) and network.name != 'Tenant' %}
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}_v6.yaml
{%- elif network.name in role.networks|default([]) and network.enabled|default(true) and network.name == 'Tenant' %}
# IPv4 until OVS and Neutron support IPv6 tunnel endpoints
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
{%- else %}
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/noop.yaml
{%- endif %}
{%- endfor %}
{%- endfor %}
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 IPv6 for MongoDB. This is required when MongoDB is using an IPv6 IP.
MongoDbIPv6: True
# Enable various IPv6 features in Nova.
NovaIPv6: True
# Enable IPv6 environment for RabbitMQ.
RabbitIPv6: True
# Enable IPv6 environment for Memcached.
MemcachedIPv6: True

View File

@ -1,57 +0,0 @@
# Enable the creation of IPv6 Neutron networks for isolated Overcloud
# traffic and configure each role to assign ports (related
# to that role) on these networks.
resource_registry:
OS::TripleO::Network::External: ../network/external_v6.yaml
OS::TripleO::Network::InternalApi: ../network/internal_api_v6.yaml
OS::TripleO::Network::StorageMgmt: ../network/storage_mgmt_v6.yaml
OS::TripleO::Network::Storage: ../network/storage_v6.yaml
# IPv4 until OVS and Neutron support IPv6 tunnel endpoints
OS::TripleO::Network::Tenant: ../network/tenant.yaml
# Port assignments for the VIPs
OS::TripleO::Network::Ports::ExternalVipPort: ../network/ports/external_v6.yaml
OS::TripleO::Network::Ports::InternalApiVipPort: ../network/ports/internal_api_v6.yaml
OS::TripleO::Network::Ports::StorageVipPort: ../network/ports/storage_v6.yaml
OS::TripleO::Network::Ports::StorageMgmtVipPort: ../network/ports/storage_mgmt_v6.yaml
OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/vip_v6.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/external_v6.yaml
OS::TripleO::Controller::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml
OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_v6.yaml
OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant.yaml
# Port assignments for the compute role
OS::TripleO::Compute::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml
OS::TripleO::Compute::Ports::StoragePort: ../network/ports/storage_v6.yaml
OS::TripleO::Compute::Ports::TenantPort: ../network/ports/tenant.yaml
# Port assignments for the ceph storage role
OS::TripleO::CephStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml
OS::TripleO::CephStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
# Port assignments for the swift storage role
OS::TripleO::SwiftStorage::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml
OS::TripleO::SwiftStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml
OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
# Port assignments for the block storage role
OS::TripleO::BlockStorage::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml
OS::TripleO::BlockStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml
OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml
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 IPv6 for MongoDB. This is required when MongoDB is using an IPv6 IP.
MongoDbIPv6: True
# Enable various IPv6 features in Nova.
NovaIPv6: True
# Enable IPv6 environment for RabbitMQ.
RabbitIPv6: true
# Enable IPv6 environment for Memcached.
MemcachedIPv6: true

View File

@ -1,3 +1,7 @@
# ******************************************************************************
# DEPRECATED: Use tripleo-heat-templates/environments/network-isolation-v6.yaml
# and define the needed networks in your custom role file.
# ******************************************************************************
# Enable the creation of an IPv6 system management network. This
# creates a Neutron network for isolated Overcloud
# system management traffic and configures each role to

View File

@ -1,3 +1,7 @@
# ***************************************************************************
# DEPRECATED: Use tripleo-heat-templates/environments/network-isolation.yaml
# and define the needed networks in your custom role file.
# ***************************************************************************
# Enable the creation of a system management network. This
# creates a Neutron network for isolated Overcloud
# system management traffic and configures each role to

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
Both environments/network-management.yaml and environments/network-management-v6.yaml
are now deprecated in favor of specifying the needed networks on each role.