Convert PublicVirtualIP to new port creation method

This change brings PublicVirtualIP in line with the rest of the
VIPs in how it is created. This allows the network where
PublicVirtualIP is instantiated to be on cltplane when network
isolation is not used, and on the external network when network
isolation is used. This change removes the PublicVirtualNetwork
parameter, since it is no longer used. In order to continue to
support the PublicVirtualFixedIPs parameter, which is used to
provide a specific IP for the PublicVirtualIP, the FixedIP
parameter was added to cltplane_vip.yaml, vip.yaml, and
noop.yaml. The value of PublicVirtualIP is passed to FixedIP
in the VIP templates. This change also moves the default
network for keystone public api to the external net (which will
fallback to ctlplane if network isolation isn't used).

Change-Id: I3f5d35cbe55d3a148e95cf49dfbaad4874df960b
changes/28/195328/17
Dan Sneddon 8 years ago
parent 53810fd7c0
commit 9b89dd2016

@ -2,6 +2,7 @@ heat_template_version: 2015-04-30
description: >
Creates a port for a VIP on the undercloud ctlplane network.
The IP address will be chosen automatically if FixedIPs is empty.
parameters:
NetworkName:
@ -19,15 +20,20 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
[{'ip_address':'1.2.3.4'}]
default: []
type: json
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: ControlPlaneNetwork}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
replacement_policy: AUTO
outputs:
@ -36,7 +42,7 @@ outputs:
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the internal API network IP
description: IP/Subnet CIDR for the ctlplane network.
value:
list_join:
- ''

@ -1,7 +1,8 @@
heat_template_version: 2015-04-30
description: >
Creates a port on the external network.
Creates a port on the external network. The IP address will be chosen
automatically if FixedIPs is empty.
parameters:
ExternalNetName:
@ -15,6 +16,16 @@ parameters:
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
type: string
ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
[{'ip_address':'1.2.3.4'}]
default: []
type: json
resources:
@ -23,6 +34,7 @@ resources:
properties:
network: {get_param: ExternalNetName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
replacement_policy: AUTO
outputs:

@ -19,6 +19,10 @@ parameters:
description: # Here for compatability with vip.yaml
default: ''
type: string
FixedIPs:
description: # Here for compatibility with vip.yaml
default: []
type: json
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.

@ -2,6 +2,7 @@ heat_template_version: 2015-04-30
description: >
Creates a port for a VIP on the isolated network NetworkName.
The IP address will be chosen automatically if FixedIPs is empty.
parameters:
NetworkName:
@ -19,14 +20,20 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
[{'ip_address':'1.2.3.4'}]
default: []
type: json
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: NetworkName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
replacement_policy: AUTO
outputs:
@ -35,7 +42,7 @@ outputs:
value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the internal API network IP
description: IP/Subnet CIDR for the network associated with this IP
value:
list_join:
- ''

@ -46,7 +46,7 @@ resource_registry:
OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml
# Port assignments for the controller role
OS::TripleO::Controller::Ports::ExternalPort: network/ports/noop.yaml
OS::TripleO::Controller::Ports::ExternalPort: network/ports/ctlplane_vip.yaml
OS::TripleO::Controller::Ports::InternalApiPort: network/ports/noop.yaml
OS::TripleO::Controller::Ports::StoragePort: network/ports/noop.yaml
OS::TripleO::Controller::Ports::StorageMgmtPort: network/ports/noop.yaml

@ -180,11 +180,6 @@ parameters:
Control the IP allocation for the PublicVirtualInterface port. E.g.
[{'ip_address':'1.2.3.4'}]
type: json
PublicVirtualNetwork:
default: 'ctlplane'
type: string
description: >
Neutron network to allocate public virtual IP port on.
RabbitCookieSalt:
type: string
default: unset
@ -782,7 +777,7 @@ resources:
SwiftPassword: {get_param: SwiftPassword}
SwiftReplicas: { get_param: SwiftReplicas}
VirtualIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} # deprecated. Use per service VIP settings instead now.
PublicVirtualIP: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]} # deprecated. Use per service VIP settings instead now.
PublicVirtualIP: {get_attr: [PublicVirtualIP, ip_address]}
ServiceNetMap: {get_param: ServiceNetMap}
HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
@ -842,7 +837,7 @@ resources:
NovaComputeExtraConfig: {get_param: NovaComputeExtraConfig}
NovaComputeLibvirtType: {get_param: NovaComputeLibvirtType}
NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend}
NovaPublicIP: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
NovaPublicIP: {get_attr: [PublicVirtualIP, ip_address]}
NovaPassword: {get_param: NovaPassword}
NtpServer: {get_param: NtpServer}
RabbitHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
@ -1018,15 +1013,15 @@ resources:
PortName: redis_virtual_ip
NetworkName: {get_param: [ServiceNetMap, RedisNetwork]}
# same as external
# The public VIP is on the External net, falls back to ctlplane
PublicVirtualIP:
type: OS::Neutron::Port
depends_on: Networks
type: OS::TripleO::Controller::Ports::ExternalPort
properties:
name: public_virtual_ip
network: {get_param: PublicVirtualNetwork}
fixed_ips: {get_param: PublicVirtualFixedIPs}
replacement_policy: AUTO
ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
PortName: public_virtual_ip
FixedIPs: {get_param: PublicVirtualFixedIPs}
InternalApiVirtualIP:
depends_on: Networks
@ -1052,7 +1047,7 @@ resources:
VipMap:
type: OS::TripleO::Network::Ports::NetIpMap
properties:
ExternalIp: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
ExternalIp: {get_attr: [PublicVirtualIP, ip_address]}
InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]}
StorageIp: {get_attr: [StorageVirtualIP, ip_address]}
StorageMgmtIp: {get_attr: [StorageMgmtVirtualIP, ip_address]}
@ -1085,7 +1080,7 @@ resources:
rabbit_vip: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
# direct configuration of Virtual IPs for each network
control_virtual_ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
public_virtual_ip: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
public_virtual_ip: {get_attr: [PublicVirtualIP, ip_address]}
internal_api_virtual_ip: {get_attr: [InternalApiVirtualIP, ip_address]}
storage_virtual_ip: {get_attr: [StorageVirtualIP, ip_address]}
storage_mgmt_virtual_ip: {get_attr: [StorageMgmtVirtualIP, ip_address]}
@ -1244,11 +1239,11 @@ outputs:
list_join:
- ''
- - http://
- {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
- {get_attr: [PublicVirtualIP, ip_address]}
- :5000/v2.0/
PublicVip:
description: Controller VIP for public API endpoints
value: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
value: {get_attr: [PublicVirtualIP, ip_address]}
CeilometerInternalVip:
description: VIP for Ceilometer API internal endpoint
value: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}

Loading…
Cancel
Save