Browse Source

Merge "Add subnet property to ctlplane network for server resources"

changes/52/541852/3
Zuul 5 years ago committed by Gerrit Code Review
parent
commit
e8c37e90a4
  1. 5
      deployed-server/ctlplane-port.yaml
  2. 5
      deployed-server/deployed-server.yaml
  3. 16
      network/ports/ctlplane_vip.yaml
  4. 4
      network/ports/from_service.yaml
  5. 4
      network/ports/noop.yaml
  6. 24
      network/ports/port.j2
  7. 4
      network/ports/port_from_pool.j2
  8. 24
      network/ports/vip.yaml
  9. 24
      network/ports/vip_v6.yaml
  10. 11
      overcloud.j2.yaml
  11. 6
      puppet/role.role.j2.yaml

5
deployed-server/ctlplane-port.yaml

@ -9,6 +9,10 @@ parameters:
replacement_policy:
type: string
default: AUTO
ControlPlaneSubnet:
default: ctlplane-subnet
description: The name of the undercloud Neutron control plane subnet
type: string
resources:
@ -16,6 +20,7 @@ resources:
type: OS::Neutron::Port
properties:
network: ctlplane
fixed_ips: [{subnet: {get_param: ControlPlaneSubnet}}]
name:
list_join:
- '-'

5
deployed-server/deployed-server.yaml

@ -48,6 +48,10 @@ parameters:
deployment_swift_data:
type: json
default: {}
ControlPlaneSubnet:
default: ctlplane-subnet
description: The name of the undercloud Neutron control plane subnet
type: string
resources:
deployed-server:
@ -122,6 +126,7 @@ resources:
type: OS::TripleO::DeployedServer::ControlPlanePort
properties:
network: ctlplane
fixed_ips: [{subnet: {get_param: ControlPlaneSubnet}}]
name:
list_join:
- '-'

16
network/ports/ctlplane_vip.yaml

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,23 @@ parameters:
default: []
type: json
conditions:
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
resources:
VipPort:
type: OS::TripleO::Network::Ports::ControlPlaneVipPort
properties:
network: {get_param: ControlPlaneNetwork}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

4
network/ports/from_service.yaml

@ -24,6 +24,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs: # Here for compatibility with ctlplane_vip.yaml
description: >
Control the IP allocation for the VIP port. E.g.

4
network/ports/noop.yaml

@ -15,6 +15,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
PortName:
description: Name of the port
default: ''

24
network/ports/port.j2

@ -21,6 +21,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -34,6 +38,20 @@ parameters:
default: 0
type: number
conditions:
network_is_ctlplane:
equals:
- get_param: {{network.name}}NetName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
{{network.name}}Port:
@ -41,7 +59,11 @@ resources:
properties:
network: {get_param: {{network.name}}NetName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

4
network/ports/port_from_pool.j2

@ -26,6 +26,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
IPPool: # Set in <Role>IPs map, see environments/ips-from-pool-all.yaml
default: {}
type: json

24
network/ports/vip.yaml

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,31 @@ parameters:
default: []
type: json
conditions:
network_is_ctlplane:
equals:
- get_param: NetworkName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: NetworkName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

24
network/ports/vip_v6.yaml

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,31 @@ parameters:
default: []
type: json
conditions:
network_is_ctlplane:
equals:
- get_param: NetworkName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: NetworkName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

11
overcloud.j2.yaml

@ -94,6 +94,10 @@ parameters:
default: nic1
description: Which interface to add to the NeutronPhysicalBridge.
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
ControlFixedIPs:
default: []
description: >
@ -255,6 +259,7 @@ parameter_groups:
conditions:
add_vips_to_etc_hosts: {equals : [{get_param: AddVipsToEtcHosts}, True]}
control_fixed_ip_not_set: {equals : [{get_param: ControlFixedIPs}, []]}
resources:
@ -749,7 +754,11 @@ resources:
properties:
name: control_virtual_ip
network: {get_param: NeutronControlPlaneID}
fixed_ips: {get_param: ControlFixedIPs}
fixed_ips:
if:
- control_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: ControlFixedIPs
replacement_policy: AUTO
RedisVirtualIP:

6
puppet/role.role.j2.yaml

@ -231,6 +231,11 @@ parameters:
container: overcloud-compute
object: 0
default: {}
{{role.name}}ControlPlaneSubnet:
default: ctlplane-subnet
description: |
Name of the subnet on ctlplane network for this role.
type: string
{% if role.uses_deprecated_params is defined %}
parameter_groups:
@ -310,6 +315,7 @@ resources:
key_name: {get_param: KeyName}
networks:
- network: ctlplane
subnet: {get_param: {{role.name}}ControlPlaneSubnet}
user_data_format: SOFTWARE_CONFIG
user_data: {get_resource: UserData}
name:

Loading…
Cancel
Save