Neutron: Move OpenVSwitch into its own chart

This PS moves OpenVSwitch into its own chart - decoupling it from neutron,
both making it easier to deploy and use seperately and permitting
use of other network backends.

Partially implements: blueprint split-nova-and-neutron-infra

Change-Id: Ifd637136b950ddf1ba1c26ce76c9bbdeafc232c3
This commit is contained in:
Pete Birley 2017-08-15 00:19:04 -05:00
parent 0252ca776e
commit 37b099e320
16 changed files with 227 additions and 52 deletions

View File

@ -191,6 +191,7 @@ OpenStack services depend upon them.
helm install --name=rabbitmq ./rabbitmq --namespace=openstack
helm install --name=ingress ./ingress --namespace=openstack
helm install --name=libvirt ./libvirt --namespace=openstack
helm install --name=openvswitch ./openvswitch --namespace=openstack
Once the OpenStack infrastructure components are installed and running, the
OpenStack services can be installed. In the below examples the default values

View File

@ -372,7 +372,7 @@ Installation of Other Services
Now you can easily install the other services simply by going in order:
**Install Memcached/Etcd/RabbitMQ/Ingress/Libvirt:**
**Install Memcached/Etcd/RabbitMQ/Ingress/Libvirt/OpenVSwitch:**
::
@ -381,6 +381,7 @@ Now you can easily install the other services simply by going in order:
helm install --name=rabbitmq ./rabbitmq --namespace=openstack
helm install --name=ingress ./ingress --namespace=openstack
helm install --name=libvirt ./libvirt --namespace=openstack
helm install --name=openvswitch ./openvswitch --namespace=openstack
**Install Keystone:**

View File

@ -55,8 +55,4 @@ data:
{{ tuple "bin/_neutron-openvswitch-agent-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
neutron-server.sh: |+
{{ tuple "bin/_neutron-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
openvswitch-db-server.sh: |+
{{ tuple "bin/_openvswitch-db-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
openvswitch-vswitchd.sh: |+
{{ tuple "bin/_openvswitch-vswitchd.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@ -33,8 +33,6 @@ images:
l3: docker.io/kolla/ubuntu-source-neutron-l3-agent:3.0.3
neutron_openvswitch_agent: docker.io/kolla/ubuntu-source-neutron-openvswitch-agent:3.0.3
neutron_linuxbridge_agent: docker.io/kolla/ubuntu-source-neutron-linuxbridge-agent:3.0.3
openvswitch_db_server: docker.io/kolla/ubuntu-source-openvswitch-db-server:3.0.3
openvswitch_vswitchd: docker.io/kolla/ubuntu-source-openvswitch-vswitchd:3.0.3
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
pull_policy: "IfNotPresent"
@ -164,6 +162,9 @@ dependencies:
endpoint: internal
- service: network
endpoint: internal
daemonset:
- ovs-vswitchd
- ovs-db
lb_agent:
services:
- service: oslo_messaging
@ -261,14 +262,6 @@ pod:
enabled: true
min_ready_seconds: 0
max_unavailable: 1
ovs_db:
enabled: false
min_ready_seconds: 0
max_unavailable: 1
ovs_vswitchd:
enabled: false
min_ready_seconds: 0
max_unavailable: 1
disruption_budget:
server:
min_available: 0
@ -313,21 +306,6 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
ovs:
db:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
vswitchd:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
server:
requests:
memory: "128Mi"
@ -936,8 +914,6 @@ manifests:
daemonset_lb_agent: false
daemonset_metadata_agent: true
daemonset_ovs_agent: true
daemonset_ovs_db: true
daemonset_ovs_vswitchd: true
deployment_server: true
ingress_server: true
job_bootstrap: true

25
openvswitch/Chart.yaml Normal file
View File

@ -0,0 +1,25 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# 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.
apiVersion: v1
description: OpenStack-Helm OpenVSwitch
name: openvswitch
version: 0.1.0
home: http://openvswitch.org
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:
- https://github.com/openvswitch/ovs
- https://git.openstack.org/cgit/openstack/openstack-helm
maintainers:
- name: OpenStack-Helm Authors

View File

@ -0,0 +1,18 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# 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.
dependencies:
- name: helm-toolkit
repository: http://localhost:8879/charts
version: 0.1.0

View File

@ -24,4 +24,8 @@ if [[ ! -e "/run/openvswitch/conf.db" ]]; then
fi
umask 000
exec /usr/sbin/ovsdb-server /run/openvswitch/conf.db -vconsole:emer -vconsole:err -vconsole:info --remote=punix:/run/openvswitch/db.sock
exec /usr/sbin/ovsdb-server /run/openvswitch/conf.db \
-vconsole:emer \
-vconsole:err \
-vconsole:info \
--remote=punix:/run/openvswitch/db.sock

View File

@ -50,4 +50,8 @@ if [ -n "{{- $br -}}" ] ; then
fi
{{- end }}
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 \
-vconsole:emer \
-vconsole:err \
-vconsole:info \
--mlockall

View File

@ -0,0 +1,29 @@
{{/*
Copyright 2017 The Openstack-Helm Authors.
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.
*/}}
{{- if .Values.manifests.configmap_bin }}
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openvswitch-bin
data:
openvswitch-db-server.sh: |+
{{ tuple "bin/_openvswitch-db-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
openvswitch-vswitchd.sh: |+
{{ tuple "bin/_openvswitch-vswitchd.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@ -26,10 +26,9 @@ spec:
template:
metadata:
labels:
{{ tuple $envAll "neutron" "ovs-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
{{ tuple $envAll "openvswitch" "ovs-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
@ -46,7 +45,7 @@ spec:
command:
- /tmp/openvswitch-db-server.sh
volumeMounts:
- name: neutron-bin
- name: openvswitch-bin
mountPath: /tmp/openvswitch-db-server.sh
subPath: openvswitch-db-server.sh
readOnly: true
@ -55,19 +54,12 @@ spec:
- name: run
mountPath: /run
volumes:
- name: neutron-bin
- name: openvswitch-bin
configMap:
name: neutron-bin
name: openvswitch-bin
defaultMode: 0555
- name: varlibopenvswitch
emptyDir: {}
- name: neutron-etc
configMap:
name: neutron-etc
defaultMode: 0444
- name: libmodules
hostPath:
path: /lib/modules
- name: run
hostPath:
path: /run

View File

@ -26,10 +26,9 @@ spec:
template:
metadata:
labels:
{{ tuple $envAll "neutron" "ovs-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
{{ tuple $envAll "openvswitch" "ovs-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
@ -53,7 +52,7 @@ spec:
command:
- /tmp/openvswitch-vswitchd.sh
volumeMounts:
- name: neutron-bin
- name: openvswitch-bin
mountPath: /tmp/openvswitch-vswitchd.sh
subPath: openvswitch-vswitchd.sh
readOnly: true
@ -63,9 +62,9 @@ spec:
- name: run
mountPath: /run
volumes:
- name: neutron-bin
- name: openvswitch-bin
configMap:
name: neutron-bin
name: openvswitch-bin
defaultMode: 0555
- name: libmodules
hostPath:

83
openvswitch/values.yaml Normal file
View File

@ -0,0 +1,83 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# 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.
# Default values for neutron.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
release_group: null
images:
openvswitch_db_server: docker.io/kolla/ubuntu-source-openvswitch-db-server:3.0.3
openvswitch_vswitchd: docker.io/kolla/ubuntu-source-openvswitch-vswitchd:3.0.3
pull_policy: "IfNotPresent"
labels:
ovs:
node_selector_key: openvswitch
node_selector_value: enabled
network:
external_bridge: br-ex
ip_address: 0.0.0.0
interface:
# External interface will be automatically added to external_bridge. Default is null.
# 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
# To automatically add a physical interface to a specific bridge using,
# for example eth3 to bridge br-physnet1 define the following key/value
# in auto_bridge_add:
# br-physnet1: eth3
auto_bridge_add:
# br0: if0
# br1: iface_two
pod:
lifecycle:
upgrades:
daemonsets:
pod_replacement_strategy: RollingUpdate
ovs_db:
enabled: false
min_ready_seconds: 0
max_unavailable: 1
ovs_vswitchd:
enabled: false
min_ready_seconds: 0
max_unavailable: 1
resources:
enabled: false
ovs:
db:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
vswitchd:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
manifests:
configmap_bin: true
daemonset_ovs_db: true
daemonset_ovs_vswitchd: true

View File

@ -239,6 +239,28 @@ data:
- helm-toolkit
---
schema: armada/Chart/v1
metadata:
schema: metadata/Document/v1
name: openvswitch
data:
chart_name: openvswitch
release: openvswitch
namespace: openstack
timeout: 300
install:
no_hooks: false
upgrade:
no_hooks: false
values: {}
source:
type: local
location: /opt/openstack-helm/charts
subpath: openvswitch
reference: master
dependencies:
- helm-toolkit
---
schema: armada/Chart/v1
metadata:
schema: metadata/Document/v1
name: libvirt
@ -727,6 +749,7 @@ data:
- memcached
- ingress
- libvirt
- openvswitch
---
schema: armada/ChartGroup/v1
metadata:

View File

@ -232,6 +232,28 @@ data:
- helm-toolkit
---
schema: armada/Chart/v1
metadata:
schema: metadata/Document/v1
name: openvswitch
data:
chart_name: openvswitch
release: openvswitch
namespace: openstack
timeout: 300
install:
no_hooks: false
upgrade:
no_hooks: false
values: {}
source:
type: local
location: /opt/openstack-helm/charts
subpath: openvswitch
reference: master
dependencies:
- helm-toolkit
---
schema: armada/Chart/v1
metadata:
schema: metadata/Document/v1
name: libvirt
@ -720,6 +742,7 @@ data:
- memcached
- ingress
- libvirt
- openvswitch
---
schema: armada/ChartGroup/v1
metadata:

View File

@ -75,6 +75,7 @@ helm install --namespace=openstack ${WORK_DIR}/memcached --name=memcached
helm install --namespace=openstack ${WORK_DIR}/etcd --name=etcd-rabbitmq
helm install --namespace=openstack ${WORK_DIR}/rabbitmq --name=rabbitmq
helm install --namespace=openstack ${WORK_DIR}/libvirt --name=libvirt
helm install --namespace=openstack ${WORK_DIR}/openvswitch --name=openvswitch
kube_wait_for_pods openstack ${SERVICE_LAUNCH_TIMEOUT}
helm install --namespace=openstack ${WORK_DIR}/keystone --name=keystone
if [ "x$PVC_BACKEND" == "xceph" ]; then

View File

@ -29,7 +29,7 @@ sudo ip link set br-ex up
sudo iptables -t nat -A POSTROUTING -o $(net_default_iface) -s ${OSH_EXT_SUBNET} -j MASQUERADE
# Disable In-Band rules on br-ex bridge to ease debugging
OVS_VSWITCHD_POD=$(kubectl get -n openstack pods -l application=neutron,component=ovs-vswitchd --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
OVS_VSWITCHD_POD=$(kubectl get -n openstack pods -l application=openvswitch,component=ovs-vswitchd --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
kubectl exec -n openstack ${OVS_VSWITCHD_POD} -- ovs-vsctl set Bridge br-ex other_config:disable-in-band=true