diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index c8a53d85e7..4d5300e878 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -491,6 +491,7 @@ enable_neutron_sfc: "no" enable_neutron_infoblox_ipam_agent: "no" enable_nova_serialconsole_proxy: "no" enable_octavia: "no" +enable_onos: "no" enable_opendaylight: "no" enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' | bool }}" enable_ovs_dpdk: "no" @@ -697,7 +698,7 @@ neutron_tenant_network_types: "vxlan" # valid values: ["dvr", "dvr_no_external"] neutron_compute_dvr_mode: "dvr" -computes_need_external_bridge: "{{ enable_neutron_dvr | bool and (neutron_compute_dvr_mode == 'dvr' or inventory_hostname in groups['external-compute']) or enable_neutron_provider_networks | bool or enable_opendaylight | bool and neutron_plugin_agent != 'vmware_dvs' }}" +computes_need_external_bridge: "{{ enable_neutron_dvr | bool and (neutron_compute_dvr_mode == 'dvr' or inventory_hostname in groups['external-compute']) or enable_neutron_provider_networks | bool or enable_opendaylight | bool and neutron_plugin_agent != 'vmware_dvs' and not enable_onos | bool }}" # Default DNS resolvers for virtual networks neutron_dnsmasq_dns_servers: "1.1.1.1,8.8.8.8,8.8.4.4" diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index 4418b6698e..f98e91b66e 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -15,7 +15,7 @@ neutron_services: neutron-openvswitch-agent: container_name: "neutron_openvswitch_agent" image: "{{ neutron_openvswitch_agent_image_full }}" - enabled: "{{ neutron_plugin_agent == 'openvswitch' }}" + enabled: "{{ neutron_plugin_agent == 'openvswitch' and not enable_onos | bool }}" privileged: True host_in_groups: >- {{ @@ -80,7 +80,7 @@ neutron_services: container_name: "neutron_dhcp_agent" image: "{{ neutron_dhcp_agent_image_full }}" privileged: True - enabled: "{{ neutron_plugin_agent not in [ 'vmware_nsxv', 'vmware_nsxv3' ] }}" + enabled: "{{ neutron_plugin_agent not in [ 'vmware_nsxv', 'vmware_nsxv3' ] and not enable_onos | bool }}" group: "neutron-dhcp-agent" host_in_groups: "{{ inventory_hostname in groups['neutron-dhcp-agent'] }}" volumes: @@ -93,7 +93,7 @@ neutron_services: container_name: "neutron_l3_agent" image: "{{ neutron_l3_agent_image_full }}" privileged: True - enabled: "{{ neutron_plugin_agent not in ['vmware_nsxv', 'vmware_nsxv3', 'vmware_dvs'] and not enable_opendaylight_l3 | bool }}" + enabled: "{{ neutron_plugin_agent not in ['vmware_nsxv', 'vmware_nsxv3', 'vmware_dvs'] and not enable_opendaylight_l3 | bool and not enable_onos | bool }}" host_in_groups: >- {{ inventory_hostname in groups['neutron-l3-agent'] @@ -133,7 +133,7 @@ neutron_services: container_name: "neutron_metadata_agent" image: "{{ neutron_metadata_agent_image_full }}" privileged: True - enabled: "{{ neutron_plugin_agent not in [ 'vmware_nsxv', 'vmware_nsxv3' ] }}" + enabled: "{{ neutron_plugin_agent not in [ 'vmware_nsxv', 'vmware_nsxv3' ] and not enable_onos | bool }}" host_in_groups: >- {{ inventory_hostname in groups['neutron-metadata-agent'] @@ -376,3 +376,9 @@ notification_drivers: enabled: "{{ enable_opendaylight_qos | bool }}" neutron_notification_drivers: "{{ notification_drivers|selectattr('enabled', 'equalto', true)|list }}" + +############ +# Onos +############ +onos_url: "127.0.0.1" +onos_username: "username" diff --git a/ansible/roles/neutron/templates/ml2_conf.ini.j2 b/ansible/roles/neutron/templates/ml2_conf.ini.j2 index 83be636310..f12b242079 100644 --- a/ansible/roles/neutron/templates/ml2_conf.ini.j2 +++ b/ansible/roles/neutron/templates/ml2_conf.ini.j2 @@ -7,6 +7,8 @@ tenant_network_types = {{ neutron_tenant_network_types }} {% if neutron_plugin_agent == "openvswitch" %} {% if enable_hyperv | bool %} mechanism_drivers = openvswitch,hyperv +{% elif enable_onos | bool %} +mechanism_drivers = onos_ml2 {% else %} mechanism_drivers = openvswitch,l2population {% endif %} @@ -34,6 +36,13 @@ password = {{ opendaylight_password }} port_binding_controller = {{ opendaylight_port_binding_type }} {% endif %} +{% if enable_onos | bool %} +[onos] +url_path = {{ onos_url }} +username = {{ onos_username }} +password = {{ onos_password }} +{% endif %} + [ml2_type_vlan] {% if enable_ironic | bool %} network_vlan_ranges = physnet1 diff --git a/ansible/roles/openvswitch/handlers/main.yml b/ansible/roles/openvswitch/handlers/main.yml index 3ba4d564f7..6181bac104 100644 --- a/ansible/roles/openvswitch/handlers/main.yml +++ b/ansible/roles/openvswitch/handlers/main.yml @@ -38,6 +38,7 @@ when: - inventory_hostname in groups["network"] or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool ) + - not enable_onos | bool with_together: - "{{ neutron_bridge_name.split(',') }}" - "{{ neutron_external_interface.split(',') }}" diff --git a/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 b/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 index 7e113fe6b3..9f4721b00d 100644 --- a/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 +++ b/ansible/roles/openvswitch/templates/openvswitch-db-server.json.j2 @@ -1,5 +1,5 @@ { - "command": "start-ovsdb-server 127.0.0.1", + "command": "start-ovsdb-server {% if enable_onos | bool %} 0.0.0.0 {% else %} 127.0.0.1 {% endif %}", "config_files": [ { "source": "{{ container_config_directory }}/start-ovsdb-server", diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 33b2c2f63e..41fa35d57f 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -248,6 +248,7 @@ kolla_internal_vip_address: "10.10.10.254" #enable_nova_fake: "no" #enable_nova_serialconsole_proxy: "no" #enable_octavia: "no" +#enable_onos: "no" #enable_opendaylight: "no" #enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' }}" #enable_ovs_dpdk: "no" diff --git a/etc/kolla/passwords.yml b/etc/kolla/passwords.yml index 7da7f26057..805758e7aa 100644 --- a/etc/kolla/passwords.yml +++ b/etc/kolla/passwords.yml @@ -259,3 +259,8 @@ xenserver_password: #################### prometheus_mysql_exporter_database_password: prometheus_alertmanager_password: + +############ +# Onos +############ +onos_password: diff --git a/releasenotes/notes/onos-support-2ea385cceb8104d6.yaml b/releasenotes/notes/onos-support-2ea385cceb8104d6.yaml new file mode 100644 index 0000000000..6ed448abab --- /dev/null +++ b/releasenotes/notes/onos-support-2ea385cceb8104d6.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add onos support, Networking-onos is Neutron’s sub-project to provide + connectivity between Neutron/Neutron’s sub-project’s and ONOS.