Add OS::TripleO::NeutronAZConfig

This service is mapped to OS::Heat::None by default, but when enabled,
it allows to configure defaut AZ for neutron, AZ for L3/DHCP agents and
AZ-aware network scheduling/routing. The zone name is the stack
name by default, but can be overridden with parameter values.

Change-Id: Ie5762c61cd615d7c115069381d6c43c468806e47
implements: blueprint split-controlplane-templates
This commit is contained in:
Bogdan Dobrelya 2019-03-20 11:43:47 -04:00
parent e9bb02ebf2
commit 0a5b248c99
4 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,121 @@
heat_template_version: rocky
description: >
Configuration of Neutron Availability Zones in the overcloud
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
AdminPassword:
description: The password for the keystone admin account, used for
monitoring, querying neutron etc.
type: string
hidden: true
NeutronDefaultAvailabilityZones:
description: Comma-separated list of default network availability zones to
be used by Neutron if its resource is created without
availability zone hints. If not set, the default will be equal
to the stack/plan name.
default: ''
type: string
NeutronL3AgentAvailabilityZone:
description: Availability zone for Neutron L3 agent. If not set, the
default will be equal to the stack/plan name
default: ''
type: string
NeutronDhcpAgentAvailabilityZone:
description: Availability zone for Neutron DHCP agent. If not set, the
default will be equal to the stack/plan name
default: ''
type: string
NeutronNetworkSchedulerDriver:
description: The network schedule driver to use for avialability zones.
default: neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler
type: string
NeutronRouterSchedulerDriver:
description: The router schedule driver to use for avialability zones.
default: neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler
type: string
NeutronDhcpLoadType:
description: Additional to the availability zones aware network scheduler.
default: networks
type: string
RootStackName:
description: The name of the stack/plan.
type: string
resources:
NeutronAvailabilityZones:
type: OS::Heat::Value
properties:
value:
if:
- equals:
- {get_param: NeutronDefaultAvailabilityZones}
- ""
- {get_param: RootStackName}
- {get_param: NeutronDefaultAvailabilityZones}
NeutronL3AgentAvailabilityZoneReal:
type: OS::Heat::Value
properties:
value:
if:
- equals:
- {get_param: NeutronL3AgentAvailabilityZone}
- ""
- {get_param: RootStackName}
- {get_param: NeutronL3AgentAvailabilityZone}
NeutronDhcpAgentAvailabilityZoneReal:
type: OS::Heat::Value
properties:
value:
if:
- equals:
- {get_param: NeutronDhcpAgentAvailabilityZone}
- ""
- {get_param: RootStackName}
- {get_param: NeutronDhcpAgentAvailabilityZone}
outputs:
role_data:
description: Role data for the Neutron Availability Zone configuration value
service:
service_name: neutron_az_config
config_settings:
neutron::server::dhcp_load_type: {get_param: NeutronDhcpLoadType}
neutron::server::network_scheduler_driver:
{get_param: NeutronNetworkSchedulerDriver}
neutron::server::router_scheduler_driver:
{get_param: NeutronRouterSchedulerDriver}
neutron::server::default_availability_zones:
{str_split: [',', {get_attr: [NeutronAvailabilityZones, value]}]}
neutron::agents::l3::availability_zone:
{get_attr: [NeutronL3AgentAvailabilityZoneReal, value]}
neutron::agents::dhcp::availability_zone:
{get_attr: [NeutronDhcpAgentAvailabilityZoneReal, value]}

View File

@ -0,0 +1,2 @@
resource_registry:
OS::TripleO::Services::NeutronAZConfig: ../deployment/nova/neutron-az-config.yaml

View File

@ -204,6 +204,7 @@ resource_registry:
OS::TripleO::Services::NovaScheduler: deployment/nova/nova-scheduler-container-puppet.yaml
OS::TripleO::Services::NovaVncProxy: deployment/nova/nova-vnc-proxy-container-puppet.yaml
OS::TripleO::Services::Novajoin: OS::Heat::None
OS::TripleO::Services::NeutronAZConfig: OS::Heat::None
OS::TripleO::Services::NovaAZConfig: OS::Heat::None
OS::TripleO::Services::ContainersLogrotateCrond: deployment/logrotate/logrotate-crond-container-puppet.yaml
OS::TripleO::Services::OpenShift::Master: OS::Heat::None

View File

@ -0,0 +1,14 @@
---
features:
- |
A new service, NeutronAZConfig, is avaialable which can be used to configure
Neutron for using avaialabiity zones. By default the service is mapped to
None, but can be enabled by including `environments/neutron-az-config.yaml`.
``NeutronDefaultAvailabilityZones``, ``NeutronDhcpAgentAvailabilityZone``,
``NeutronL3AgentAvailabilityZone``, ``NeutronDhcpAgentsPerNetwork``,
``NeutronNetworkSchedulerDriver``, ``NeutronRouterSchedulerDriver`` and
``NeutronDhcpLoadType`` parameters can be used to configure various AZ
configurations. By default, ``Neutron*AvailabilityZone`` takes the name of
the heat stack/deployment plan, and ``NeutronDefaultAvailabilityZones``
takes an additional value 'nova'. For details, see
`Official Documentaion <https://docs.openstack.org/neutron/latest/admin/config-az.html>`_.