Split neutron server and neutron agent hosts

It is very common usecase when neutron-api is intended to run on
infra hosts (inside lxc containers), while neutron-agents are to run on
independent network nodes.

That was not possible by default, so env.d overrides has to be placed
to fix this behaviour. This patch brings option to do this natively
without extra override.

In the meanwhile it shouldn't break any existing depoyments as leaves
previous groups naming as is.

Change-Id: Ie9fa464561c81b503d6946a7afe4870b92790cee
This commit is contained in:
Dmitriy Rabotyagov 2021-06-24 20:54:27 +03:00
parent cede2dc592
commit 82d7c034a0
5 changed files with 59 additions and 2 deletions

View File

@ -422,6 +422,28 @@
# infra3:
# ip: 172.29.236.103
#
# If you want to deploy neutron agents to different set of hosts (net nodes)
# rather then neutron API, you should define 'network-infra_hosts' and
# 'network-agent_hosts' instead.
#
# Example:
#
# network-infra_hosts:
# infra1:
# ip: 172.29.236.101
# infra2:
# ip: 172.29.236.102
# infra3:
# ip: 172.29.236.103
#
# network-agent_hosts:
# net1:
# ip: 172.29.236.201
# net2:
# ip: 172.29.236.202
# net3:
# ip: 172.29.236.203
#
# --------
#
# Level: compute_hosts (optional)

View File

@ -204,8 +204,8 @@ dashboard_hosts:
infra3:
ip: 172.29.236.13
# neutron server, agents (L3, etc)
network_hosts:
# neutron api
network-infra_hosts:
infra1:
ip: 172.29.236.11
infra2:
@ -213,6 +213,15 @@ network_hosts:
infra3:
ip: 172.29.236.13
# neutron agents (L3, DHCP, etc)
network-agent_hosts:
net1:
ip: 172.29.236.21
net2:
ip: 172.29.236.22
net3:
ip: 172.29.236.23
# ceilometer (telemetry data collection)
metering-infra_hosts:
infra1:

View File

@ -52,6 +52,7 @@ container_skel:
neutron_agents_container:
belongs_to:
- network_containers
- network-agent_containers
contains:
- neutron_agent
- neutron_bgp_dragent
@ -67,6 +68,7 @@ container_skel:
neutron_server_container:
belongs_to:
- network_containers
- network-infra_containers
contains:
- neutron_server
- opendaylight
@ -78,3 +80,15 @@ physical_skel:
network_hosts:
belongs_to:
- hosts
network-agent_containers:
belongs_to:
- all_containers
network-agent_hosts:
belongs_to:
- hosts
network-infra_containers:
belongs_to:
- all_containers
network-infra_hosts:
belongs_to:
- hosts

View File

@ -0,0 +1,8 @@
---
features:
- |
In order to use dedicated net nodes, override of env.d is no longer
required.
Deployers can set ``network-infra_hosts`` to their infra (LXC) hosts
and ``network-agent_hosts`` to their net nodes inside their
openstack_user_config.yml or conf.d files.

View File

@ -394,6 +394,10 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'network_all',
'network_containers',
'network_hosts',
'network-agent_containers',
'network-agent_hosts',
'network-infra_containers',
'network-infra_hosts',
'neutron_agent',
'neutron_agents_container',
'neutron_all',