Merge "Neutron chart: add tunnel types, bridge mappings and default interfaces"
This commit is contained in:
commit
4f1aecb9c4
@ -26,9 +26,14 @@ chown neutron: /run/openvswitch/db.sock
|
|||||||
# see https://github.com/att-comdev/openstack-helm/issues/88
|
# see https://github.com/att-comdev/openstack-helm/issues/88
|
||||||
timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --ovsdb_native --nokeepalived_ipv6_support
|
timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --ovsdb_native --nokeepalived_ipv6_support
|
||||||
|
|
||||||
|
tunnel_interface={{ .Values.network.interface.tunnel }}
|
||||||
|
if [ not $tunnel_interface ] ; then
|
||||||
|
# search for interface with default routing
|
||||||
|
tunnel_interface=$(ip r | grep default | grep -oP '(?<=dev ).*')
|
||||||
|
fi
|
||||||
|
|
||||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||||
IP=$(ip a s {{ .Values.network.interface.tunnel | default .Values.network.interface.default}} | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||||
cat <<EOF>/tmp/ml2-local-ip.ini
|
cat <<EOF>/tmp/ml2-local-ip.ini
|
||||||
[ovs]
|
[ovs]
|
||||||
local_ip = $IP
|
local_ip = $IP
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
{{- if not .Values.ml2 -}}{{- set . "Values.ml2" dict -}}{{- end -}}
|
||||||
|
{{- if not .Values.ml2.ovs -}}{{- set . "Values.ml2.ovs" dict -}}{{- end -}}
|
||||||
|
{{- if not .Values.ml2.ovs.auto_bridge_add -}}{{- set . "Values.ml2.ovs.auto_bridge_add" dict -}}{{- end -}}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
bridge=$1
|
bridge=$1
|
||||||
@ -23,12 +27,16 @@ port=$2
|
|||||||
# and br-int and br-tun are assumed and handled
|
# and br-int and br-tun are assumed and handled
|
||||||
# by the agent
|
# by the agent
|
||||||
ovs-vsctl --no-wait --may-exist add-br $bridge
|
ovs-vsctl --no-wait --may-exist add-br $bridge
|
||||||
ovs-vsctl --no-wait --may-exist add-port $bridge $port
|
if [ $port] ; then
|
||||||
ip link set dev $port up
|
ovs-vsctl --no-wait --may-exist add-port $bridge $port
|
||||||
|
ip link set dev $port up
|
||||||
|
fi
|
||||||
|
|
||||||
# handle any bridge mappings
|
# handle any bridge mappings
|
||||||
{{- range $bridge, $port := .Values.ml2.ovs.auto_bridge_add }}
|
{{- range $bridge, $port := .Values.ml2.ovs.auto_bridge_add }}
|
||||||
ovs-vsctl --no-wait --may-exist add-br {{ $bridge }}
|
ovs-vsctl --no-wait --may-exist add-br {{ $bridge }}
|
||||||
ovs-vsctl --no-wait --may-exist add-port {{ $bridge }} {{ $port }}
|
if [ {{ $port }} ] ; then
|
||||||
ip link set dev {{ $port }} up
|
ovs-vsctl --no-wait --may-exist add-port {{ $bridge }} {{ $port }}
|
||||||
|
ip link set dev {{ $port }} up
|
||||||
|
fi
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
@ -23,5 +23,5 @@ modprobe gre
|
|||||||
modprobe vxlan
|
modprobe vxlan
|
||||||
|
|
||||||
ovs-vsctl --no-wait show
|
ovs-vsctl --no-wait show
|
||||||
bash /tmp/openvswitch-ensure-configured.sh {{ .Values.network.external_bridge }} {{ .Values.network.interface.external | default .Values.network.interface.default }}
|
bash /tmp/openvswitch-ensure-configured.sh {{ .Values.network.external_bridge }} {{ .Values.network.interface.external }}
|
||||||
exec /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock --mlockall -vconsole:emer -vconsole:err -vconsole:info
|
exec /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock --mlockall -vconsole:emer -vconsole:err -vconsole:info
|
||||||
|
@ -76,8 +76,11 @@ network:
|
|||||||
external_bridge: br-ex
|
external_bridge: br-ex
|
||||||
ip_address: 0.0.0.0
|
ip_address: 0.0.0.0
|
||||||
interface:
|
interface:
|
||||||
external: enp12s0f0
|
# External interface will be automatically added to external_bridge. Default is null.
|
||||||
default: enp11s0f0
|
# Tunnel interface will be used for VXLAN tunneling. Default is null, with
|
||||||
|
# fallback mechanism to search for interface with default routing.
|
||||||
|
external: null
|
||||||
|
tunnel: null
|
||||||
server:
|
server:
|
||||||
name: "neutron-server"
|
name: "neutron-server"
|
||||||
port: 9696
|
port: 9696
|
||||||
@ -112,12 +115,14 @@ metadata_agent:
|
|||||||
metadata:
|
metadata:
|
||||||
workers: 4
|
workers: 4
|
||||||
|
|
||||||
|
|
||||||
ml2:
|
ml2:
|
||||||
ovs:
|
ovs:
|
||||||
auto_bridge_add:
|
auto_bridge_add: []
|
||||||
br-physnet1: enp11s0f0
|
# To automatically add a physical interface to a specific bridge using,
|
||||||
bridge_mappings:
|
# for example eth3 to bridge br-physnet1 define the following key/value
|
||||||
- "physnet1:br-physnet1"
|
# in auto_bridge_add:
|
||||||
|
# - br-physnet1:eth3
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
db_init:
|
db_init:
|
||||||
@ -341,10 +346,13 @@ conf:
|
|||||||
neutron:
|
neutron:
|
||||||
ml2:
|
ml2:
|
||||||
flat_networks: "*"
|
flat_networks: "*"
|
||||||
ml2_type_vlan:
|
# If you want to use the external network as a tagged provider network,
|
||||||
neutron:
|
# a range should be specified including the intended VLAN target
|
||||||
ml2:
|
# using ml2_type_vlan.neutron.ml2.network_vlan_ranges:
|
||||||
network_vlan_ranges: "physnet1:1100:1110"
|
# ml2_type_vlan:
|
||||||
|
# neutron:
|
||||||
|
# ml2:
|
||||||
|
# network_vlan_ranges: "external:1100:1110"
|
||||||
ml2_conf_sriov:
|
ml2_conf_sriov:
|
||||||
override:
|
override:
|
||||||
append:
|
append:
|
||||||
@ -377,12 +385,18 @@ conf:
|
|||||||
openvswitch_agent:
|
openvswitch_agent:
|
||||||
override:
|
override:
|
||||||
append:
|
append:
|
||||||
ovs:
|
agent:
|
||||||
neutron:
|
neutron:
|
||||||
ml2:
|
ml2:
|
||||||
ovs:
|
ovs:
|
||||||
agent:
|
agent:
|
||||||
tunnel_types: vxlan
|
tunnel_types: vxlan
|
||||||
|
ovs:
|
||||||
|
neutron:
|
||||||
|
ml2:
|
||||||
|
ovs:
|
||||||
|
agent:
|
||||||
|
bridge_mappings: "external:br-ex"
|
||||||
ovsdb_connection: unix:/var/run/openvswitch/db.sock
|
ovsdb_connection: unix:/var/run/openvswitch/db.sock
|
||||||
securitygroup:
|
securitygroup:
|
||||||
neutron:
|
neutron:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user