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/container-image-prepare/container-image-prepare-baremetal-ansible.yaml
deployment/haproxy/haproxy-internal-tls-certmonger.yaml deployment/haproxy/haproxy-internal-tls-certmonger.yaml
deployment/octavia/octavia-deployment-config.yaml deployment/octavia/octavia-deployment-config.yaml
environments/deployed-ports.yaml
environments/deployed-server-environment.yaml environments/deployed-server-environment.yaml
environments/net-2-linux-bonds-with-vlans.yaml environments/net-2-linux-bonds-with-vlans.yaml
environments/net-bond-with-vlans-no-external.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 heat_template_version: wallaby
description: " description: "
@ -49,6 +56,17 @@ parameters:
default: '' 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: outputs:
fixed_ips: fixed_ips:
value: value:

View File

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