Merge "Deprecate DeployedServerPortMap"

This commit is contained in:
Zuul 2021-06-29 10:04:19 +00:00 committed by Gerrit Code Review
commit 122f4bf4b1
6 changed files with 85 additions and 8 deletions

1
.gitignore vendored
View File

@ -65,6 +65,7 @@ deployment/apache/apache-baremetal-puppet.yaml
deployment/container-image-prepare/container-image-prepare-baremetal-ansible.yaml
deployment/haproxy/haproxy-internal-tls-certmonger.yaml
deployment/octavia/octavia-deployment-config.yaml
environments/deployed-ports.yaml
environments/deployed-server-environment.yaml
environments/net-2-linux-bonds-with-vlans.yaml
environments/net-bond-with-vlans-no-external.yaml

View File

@ -1,3 +1,10 @@
# ******************************************************************************
# DEPRECATED: The environment
# environments/deployed-server-deployed-neutron-ports.yaml, the
# deployed-neutron-port.yaml template, and DeployedServerPortMap parameter are
# deprecated in favor of NodePortMap, ControlPlaneVipData, and VipPortMap,
# which can be used with the generated environments/deployed-ports.yaml
# ******************************************************************************
heat_template_version: wallaby
description: "
@ -49,6 +56,17 @@ parameters:
default: ''
parameter_groups:
- label: deprecated
description: |
The following parameters are deprecated and will be removed. They should not
be relied on for new deployments. If you have concerns regarding deprecated
parameters, please contact the TripleO development team on IRC or the
Openstack mailing list.
parameters:
- DeployedServerPortMap
outputs:
fixed_ips:
value:

View File

@ -62,6 +62,11 @@ parameters:
default: ctlplane-subnet
description: The name of the undercloud Neutron control plane subnet
type: string
NodePortMap:
description: >
A map of deployed port data
default: {}
type: json
resources:
deployed-server:
@ -70,7 +75,7 @@ resources:
name: {get_param: name}
software_config_transport: {get_param: software_config_transport}
ControlPlanePort:
ControlPlanePortDeployedServerPortMap:
type: OS::TripleO::DeployedServer::ControlPlanePort
properties:
network: ctlplane
@ -87,18 +92,34 @@ resources:
params:
$STACK_NAME: {get_param: RootStackName}
ControlPlanePortNodePortMap:
type: OS::Heat::Value
properties:
value: {get_param: [NodePortMap, {get_param: name}, ctlplane]}
outputs:
OS::stack_id:
value: {get_resource: deployed-server}
networks:
value:
ctlplane:
- {get_attr: [ControlPlanePort, fixed_ips, 0, ip_address]}
if:
- equals:
- {get_param: [NodePortMap]}
- {}
- ctlplane:
- {get_attr: [ControlPlanePortDeployedServerPortMap, fixed_ips, 0, ip_address]}
- ctlplane:
- {get_attr: [ControlPlanePortNodePortMap, value, ip_address]}
addresses:
value:
ctlplane:
- subnets: {get_attr: [ControlPlanePort, subnets]}
if:
- equals:
- {get_param: [NodePortMap]}
- {}
- ctlplane:
- {get_attr: [ControlPlanePortDeployedServerPortMap, fixed_ips, 0, ip_address]}
- ctlplane:
- subnets:
- cidr: {get_attr: [ControlPlanePortNodePortMap, value, ip_subnet]}
name:
value: {get_param: name}
os_collect_config:
value: {get_attr: [deployed-server, os_collect_config]}

View File

@ -0,0 +1,24 @@
# Map all ports by role and network to their equivalent
# deployed_<network.name_lower>.yaml template.
resource_registry:
# Port assignments for the VIPs
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
OS::TripleO::Network::Ports::{{network.name}}VipPort: ../network/ports/deployed_vip_{{network.name_lower|default(network.name.lower())}}.yaml
{%- endfor %}
{%- for role in roles %}
{%- if role.networks is mapping %}
{%- set _role_networks = [] %}
{%- for key, _ in role.networks.items() %}
{%- set _ = _role_networks.append(key) %}
{%- endfor %}
{%- else %}
{%- set _role_networks = role.networks %}
{%- endif %}
# Port assignments for the {{role.name}}
{%- for network in networks %}
{%- if network.name in _role_networks and network.enabled|default(true) %}
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/deployed_{{network.name_lower|default(network.name.lower())}}.yaml
{%- endif %}
{%- endfor %}
{%- endfor %}

View File

@ -1,4 +1,10 @@
# ******************************************************************************
# DEPRECATED: The environment
# environments/deployed-server-deployed-neutron-ports.yaml, the
# deployed-neutron-port.yaml template, and DeployedServerPortMap parameter are
# deprecated in favor of NodePortMap, ControlPlaneVipData, and VipPortMap,
# which can be used with the generated environments/deployed-ports.yaml
# ******************************************************************************
resource_registry:
OS::TripleO::Network::Ports::ControlPlaneVipPort: ../deployed-server/deployed-neutron-port.yaml
OS::TripleO::DeployedServer::ControlPlanePort: ../deployed-server/deployed-neutron-port.yaml

View File

@ -0,0 +1,7 @@
---
deprecations:
- The environment environments/deployed-server-deployed-neutron-ports.yaml,
the deployed-neutron-port.yaml template, and DeployedServerPortMap
parameter are deprecated in favor of NodePortMap, ControlPlaneVipData, and
VipPortMap, which can be used with the generated
environments/deployed-ports.yaml.