
This commit provides baseline changes to the os_neutron role to support Open Virtual Networking (OVN). Change-Id: I9af0a1d70d3381f1e5e074aaf21b15cfb40a7b60 Implements: networking-ovn support Partial-Bug: #1782625
88 lines
3.0 KiB
YAML
88 lines
3.0 KiB
YAML
# (c) 2018, James Denton <james.denton@rackspace.com>
|
|
#
|
|
# Copyright 2018, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Set openvswitch hostname
|
|
command: "ovs-vsctl set open_vswitch . external-ids:hostname='{{ inventory_hostname }}'"
|
|
tags:
|
|
- ovn-config
|
|
|
|
- name: Create ovsdb-server Listener
|
|
command: "ovs-vsctl set-manager ptcp:6640"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-northd']['group'] in group_names
|
|
|
|
- name: Configure OVN Northbound Listener
|
|
command: "ovn-nbctl set-connection ptcp:6641:0.0.0.0 -- set connection . inactivity_probe=60000"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-northd']['group'] in group_names
|
|
|
|
- name: Configure OVN Southbound Listener
|
|
command: "ovn-sbctl set-connection ptcp:6642:0.0.0.0 -- set connection . inactivity_probe=60000"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-northd']['group'] in group_names
|
|
|
|
# (NOTE) This makes all computes eligible to be gateway nodes
|
|
- name: Set CMS Options for Gateway Scheduling
|
|
command: "ovs-vsctl set open . external-ids:ovn-cms-options=enable-chassis-as-gw"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|
|
|
|
- name: Configure OVN Southbound Connection
|
|
command: "ovs-vsctl set open . external-ids:ovn-remote=tcp:{{ neutron_ovn_ip }}:6642"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|
|
|
|
# (todo) Dynamic encap type
|
|
- name: Configure Supported OVN Overlay Protocols
|
|
command: "ovs-vsctl set open . external-ids:ovn-encap-type=geneve,vxlan"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|
|
|
|
- name: Configure Encapsulation Address for Overlay Traffic
|
|
command: "ovs-vsctl set open . external-ids:ovn-encap-ip={{ neutron_local_ip }}"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|
|
|
|
- name: Setup Network Provider Bridge
|
|
openvswitch_bridge:
|
|
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
|
|
state: present
|
|
when:
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|
|
- neutron_provider_networks.network_mappings is defined
|
|
|
|
- name: Set the Bridge Mappings
|
|
command: "ovs-vsctl set open . external-ids:ovn-bridge-mappings={{ neutron_provider_networks.network_mappings }}"
|
|
tags:
|
|
- ovn-config
|
|
when:
|
|
- neutron_provider_networks.network_mappings is defined
|
|
- neutron_services['neutron-ovn-controller']['group'] in group_names
|