Implement ironic_neutron_agent and baremetal driver

This patch implements changes to support the ironic_neutron_agent
and baremetal plugin for Neutron (Ironic).

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/813006
Change-Id: If37161aaee17d72d9463b361489d5febac434e83
This commit is contained in:
James Denton 2021-10-07 08:42:03 -05:00 committed by Jonathan Rosser
parent 18024df25d
commit 23964743a5
4 changed files with 48 additions and 0 deletions

View File

@ -67,6 +67,8 @@ networking_bgpvpn_git_repo: https://opendev.org/openstack/networking-bgpvpn
networking_bgpvpn_git_install_branch: master
ceilometer_git_repo: https://opendev.org/openstack/ceilometer
ceilometer_git_install_branch: master
networking_baremetal_git_repo: https://opendev.org/openstack/networking-baremetal
networking_baremetal_git_install_branch: master
networking_generic_switch_git_repo: https://opendev.org/openstack/networking-generic-switch
networking_generic_switch_git_install_branch: master
networking_nsx_git_repo: https://opendev.org/x/vmware-nsx
@ -145,6 +147,8 @@ neutron_calico_felix_ini_overrides: {}
neutron_calico_felix_init_overrides: {}
neutron_dhcp_agent_ini_overrides: {}
neutron_dhcp_agent_init_overrides: {}
neutron_ironic_neutron_agent_ini_overrides: {}
neutron_ironic_neutron_agent_init_overrides: {}
neutron_l3_agent_ini_overrides: {}
neutron_l3_agent_init_overrides: {}
neutron_linuxbridge_agent_ini_overrides: {}

View File

@ -0,0 +1,8 @@
---
features:
- |
Support for the networking-baremetal mechanism driver and agent has been implemented.
The ironic-neutron-agent is a neutron agent that populates the host to physical network
mapping for baremetal nodes in neutron. Neutron uses this to calculate the segment to
host mapping information. This feature may be enabled by adding ``ml2.baremetal``
to the ``neutron_plugin_types`` list in ``/etc/openstack_deploy/user_variables.yml``.

View File

@ -0,0 +1,11 @@
# {{ ansible_managed }}
[ironic]
project_domain_name = Default
project_name = service
user_domain_name = Default
password = {{ ironic_service_password }}
username = ironic
auth_url = {{ keystone_service_internalurl }}
auth_type = password
os_region = RegionOne

View File

@ -69,6 +69,9 @@ neutron_proprietary_nuage_pip_packages:
- nuage-openstack-neutronclient
- nuagenetlib
neutron_optional_baremetal_pip_packages:
- "git+{{ networking_baremetal_git_repo }}@{{ networking_baremetal_git_install_branch }}#egg=networking-baremetal"
neutron_optional_ngs_pip_packages:
- "git+{{ networking_generic_switch_git_repo }}@{{ networking_generic_switch_git_install_branch }}#egg=networking-generic-switch"
@ -110,6 +113,11 @@ neutron_venv_packages: >-
(neutron_services['neutron-server']['group'] in group_names) %}
{%- set _ = pkg_list.extend(neutron_optional_ngs_pip_packages) %}
{%- endif %}
{%- if ('ml2.baremetal' in neutron_plugin_types) and
((neutron_services['neutron-server']['group'] in group_names) or
(neutron_services['ironic-neutron-agent']['group'] in group_names)) %}
{%- set _ = pkg_list.extend(neutron_optional_baremetal_pip_packages) %}
{%- endif %}
{%- if (neutron_plugin_type.split('.')[-1] == "nsx") and
(neutron_services['neutron-server']['group'] in group_names) %}
{%- set _ = pkg_list.extend(neutron_optional_nsx_pip_packages) %}
@ -218,6 +226,12 @@ neutron_plugins:
plugin_conf_ini_overrides: "{{ neutron_ml2_conf_genericswitch_ini_overrides }}"
plugin_core: ml2
plugin_ini: plugins/ml2/ml2_conf_genericswitch.ini
ml2.baremetal:
drivers_type: "vlan"
mechanisms: "baremetal"
plugin_conf_ini_overrides: "{{ neutron_ironic_neutron_agent_ini_overrides }}"
plugin_core: ml2
plugin_ini: plugins/ml2/ironic_neutron_agent.ini
vmware.nsx:
plugin_core: vmware_nsx.plugin.NsxPolicyPlugin
plugin_ini: plugins/vmware/nsx.ini
@ -508,6 +522,17 @@ neutron_services:
config_type: "ini"
init_config_overrides: "{{ neutron_ovn_metadata_agent_init_overrides }}"
start_order: 3
ironic-neutron-agent:
group: ironic_neutron_agent
service_name: ironic-neutron-agent
service_en: "{{ 'ml2.baremetal' in neutron_plugin_types }}"
service_conf_path: "{{ neutron_conf_version_dir }}"
service_conf: plugins/ml2/ironic_neutron_agent.ini
execstarts: "{{ neutron_bin }}/ironic-neutron-agent --config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/plugins/ml2/ml2_conf.ini --config-file {{ neutron_conf_dir }}/plugins/ml2/ironic_neutron_agent.ini"
config_overrides: "{{ neutron_ironic_neutron_agent_ini_overrides }}"
config_type: "ini"
init_config_overrides: "{{ neutron_ironic_neutron_agent_init_overrides }}"
start_order: 3
###
### Overrides for services where required