From 3dcbfae101160dd05354b27382c6511a008578cd Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Tue, 4 Sep 2018 12:58:27 -0500 Subject: [PATCH] Openvswitch: Move chart to openstack-helm-infra This moves the openvswitch chart to openstack-helm-infra as part of the effort to move charts to their appropriate repositories Change-Id: I6e00231b8de54c01bc9bb31e0433753a9f281542 Story: 2002204 Task: 21730 --- openvswitch/Chart.yaml | 25 ++++ openvswitch/requirements.yaml | 18 +++ .../bin/_openvswitch-db-server.sh.tpl | 55 ++++++++ .../_openvswitch-vswitchd-init-modules.sh.tpl | 22 +++ .../bin/_openvswitch-vswitchd.sh.tpl | 64 +++++++++ openvswitch/templates/configmap-bin.yaml | 35 +++++ openvswitch/templates/daemonset-ovs-db.yaml | 82 +++++++++++ .../templates/daemonset-ovs-vswitchd.yaml | 108 +++++++++++++++ .../templates/job-image-repo-sync.yaml | 20 +++ openvswitch/values.yaml | 128 ++++++++++++++++++ playbooks/osh-infra-openstack-support.yaml | 6 + .../openstack-support/045-openvswitch.sh | 28 ++++ 12 files changed, 591 insertions(+) create mode 100644 openvswitch/Chart.yaml create mode 100644 openvswitch/requirements.yaml create mode 100644 openvswitch/templates/bin/_openvswitch-db-server.sh.tpl create mode 100644 openvswitch/templates/bin/_openvswitch-vswitchd-init-modules.sh.tpl create mode 100644 openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl create mode 100644 openvswitch/templates/configmap-bin.yaml create mode 100644 openvswitch/templates/daemonset-ovs-db.yaml create mode 100644 openvswitch/templates/daemonset-ovs-vswitchd.yaml create mode 100644 openvswitch/templates/job-image-repo-sync.yaml create mode 100644 openvswitch/values.yaml create mode 100755 tools/deployment/openstack-support/045-openvswitch.sh diff --git a/openvswitch/Chart.yaml b/openvswitch/Chart.yaml new file mode 100644 index 000000000..a11bc469c --- /dev/null +++ b/openvswitch/Chart.yaml @@ -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 diff --git a/openvswitch/requirements.yaml b/openvswitch/requirements.yaml new file mode 100644 index 000000000..53782e69b --- /dev/null +++ b/openvswitch/requirements.yaml @@ -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 diff --git a/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl b/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl new file mode 100644 index 000000000..b19bb0a72 --- /dev/null +++ b/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl @@ -0,0 +1,55 @@ +#!/bin/bash + +{{/* +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. +*/}} + +set -ex +COMMAND="${@:-start}" + +OVS_DB=/run/openvswitch/conf.db +OVS_SCHEMA=/usr/share/openvswitch/vswitch.ovsschema +OVS_PID=/run/openvswitch/ovsdb-server.pid +OVS_SOCKET=/run/openvswitch/db.sock + +function start () { + mkdir -p "$(dirname ${OVS_DB})" + if [[ ! -e "${OVS_DB}" ]]; then + ovsdb-tool create "${OVS_DB}" + fi + + if [[ "$(ovsdb-tool needs-conversion ${OVS_DB} ${OVS_SCHEMA})" == 'yes' ]]; then + ovsdb-tool convert ${OVS_DB} ${OVS_SCHEMA} + fi + + umask 000 + exec /usr/sbin/ovsdb-server ${OVS_DB} \ + -vconsole:emer \ + -vconsole:err \ + -vconsole:info \ + --pidfile=${OVS_PID} \ + --remote=punix:${OVS_SOCKET} \ + --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ + --private-key=db:Open_vSwitch,SSL,private_key \ + --certificate=db:Open_vSwitch,SSL,certificate \ + --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert +} + +function stop () { + PID=$(cat $OVS_PID) + ovs-appctl -T1 -t /run/openvswitch/ovsdb-server.${PID}.ctl exit +} + +$COMMAND diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd-init-modules.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd-init-modules.sh.tpl new file mode 100644 index 000000000..ae06b97c1 --- /dev/null +++ b/openvswitch/templates/bin/_openvswitch-vswitchd-init-modules.sh.tpl @@ -0,0 +1,22 @@ +#!/bin/bash + +{{/* +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. +*/}} + +set -ex +chroot /mnt/host-rootfs modprobe openvswitch +chroot /mnt/host-rootfs modprobe gre +chroot /mnt/host-rootfs modprobe vxlan diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl new file mode 100644 index 000000000..94d937ce1 --- /dev/null +++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl @@ -0,0 +1,64 @@ +#!/bin/bash + +{{/* +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. +*/}} + +set -ex +COMMAND="${@:-start}" + +OVS_SOCKET=/run/openvswitch/db.sock +OVS_PID=/run/openvswitch/ovs-vswitchd.pid + +function start () { + t=0 + while [ ! -e "${OVS_SOCKET}" ] ; do + echo "waiting for ovs socket $sock" + sleep 1 + t=$(($t+1)) + if [ $t -ge 10 ] ; then + echo "no ovs socket, giving up" + exit 1 + fi + done + + ovs-vsctl --no-wait show + + # handle any bridge mappings + {{- range $br, $phys := .Values.network.auto_bridge_add }} + if [ -n "{{- $br -}}" ] ; then + # create {{ $br }}{{ if $phys }} and add port {{ $phys }}{{ end }} + ovs-vsctl --no-wait --may-exist add-br "{{ $br }}" + if [ -n "{{- $phys -}}" ] ; then + ovs-vsctl --no-wait --may-exist add-port "{{ $br }}" "{{ $phys }}" + ip link set dev "{{ $phys }}" up + fi + fi + {{- end }} + + exec /usr/sbin/ovs-vswitchd unix:${OVS_SOCKET} \ + -vconsole:emer \ + -vconsole:err \ + -vconsole:info \ + --pidfile=${OVS_PID} \ + --mlockall +} + +function stop () { + PID=$(cat $OVS_PID) + ovs-appctl -T1 -t /run/openvswitch/ovs-vswitchd.${PID}.ctl exit +} + +$COMMAND diff --git a/openvswitch/templates/configmap-bin.yaml b/openvswitch/templates/configmap-bin.yaml new file mode 100644 index 000000000..74eb59b22 --- /dev/null +++ b/openvswitch/templates/configmap-bin.yaml @@ -0,0 +1,35 @@ +{{/* +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: +{{- if .Values.images.local_registry.active }} + image-repo-sync.sh: | +{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }} +{{- end }} + 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 }} + openvswitch-vswitchd-init-modules.sh: | +{{ tuple "bin/_openvswitch-vswitchd-init-modules.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{- end }} diff --git a/openvswitch/templates/daemonset-ovs-db.yaml b/openvswitch/templates/daemonset-ovs-db.yaml new file mode 100644 index 000000000..6275d71a8 --- /dev/null +++ b/openvswitch/templates/daemonset-ovs-db.yaml @@ -0,0 +1,82 @@ +{{/* +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.daemonset_ovs_db }} +{{- $envAll := . }} + +{{- $serviceAccountName := "openvswitch-db" }} +{{ tuple $envAll "db" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: openvswitch-db + labels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} +spec: + selector: + matchLabels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} +{{ tuple $envAll "ovs_db" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + serviceAccountName: {{ $serviceAccountName }} + nodeSelector: + {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} + dnsPolicy: ClusterFirstWithHostNet + hostNetwork: true + initContainers: +{{ tuple $envAll "db" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: openvswitch-db +{{ tuple $envAll "openvswitch_db_server" | include "helm-toolkit.snippets.image" | indent 10 }} +{{ tuple $envAll $envAll.Values.pod.resources.ovs.db | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + securityContext: + runAsUser: 0 + command: + - /tmp/openvswitch-db-server.sh + - start + lifecycle: + preStop: + exec: + command: + - /tmp/openvswitch-db-server.sh + - stop + volumeMounts: + - name: openvswitch-bin + mountPath: /tmp/openvswitch-db-server.sh + subPath: openvswitch-db-server.sh + readOnly: true + - name: varlibopenvswitch + mountPath: /var/lib/openvswitch/ + - name: run + mountPath: /run + volumes: + - name: openvswitch-bin + configMap: + name: openvswitch-bin + defaultMode: 0555 + - name: varlibopenvswitch + emptyDir: {} + - name: run + hostPath: + path: /run +{{- end }} diff --git a/openvswitch/templates/daemonset-ovs-vswitchd.yaml b/openvswitch/templates/daemonset-ovs-vswitchd.yaml new file mode 100644 index 000000000..f792ed05a --- /dev/null +++ b/openvswitch/templates/daemonset-ovs-vswitchd.yaml @@ -0,0 +1,108 @@ +{{/* +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.daemonset_ovs_vswitchd }} +{{- $envAll := . }} + +{{- $serviceAccountName := "openvswitch-vswitchd" }} +{{ tuple $envAll "vswitchd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: openvswitch-vswitchd + labels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} +spec: + selector: + matchLabels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} +{{ tuple $envAll "ovs_vswitchd" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "openvswitch" "openvswitch-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + serviceAccountName: {{ $serviceAccountName }} + nodeSelector: + {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} + dnsPolicy: ClusterFirstWithHostNet + hostNetwork: true + initContainers: +{{ tuple $envAll "vswitchd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + - name: openvswitch-vswitchd-modules +{{ tuple $envAll "openvswitch_vswitchd" | include "helm-toolkit.snippets.image" | indent 10 }} + securityContext: + capabilities: + add: + - SYS_MODULE + runAsUser: 0 + command: + - /tmp/openvswitch-vswitchd-init-modules.sh + volumeMounts: + - name: openvswitch-bin + mountPath: /tmp/openvswitch-vswitchd-init-modules.sh + subPath: openvswitch-vswitchd-init-modules.sh + readOnly: true + - name: host-rootfs + mountPath: /mnt/host-rootfs + readOnly: true + containers: + - name: openvswitch-vswitchd +{{ tuple $envAll "openvswitch_vswitchd" | include "helm-toolkit.snippets.image" | indent 10 }} +{{ tuple $envAll $envAll.Values.pod.resources.ovs.vswitchd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + securityContext: + runAsUser: 0 + capabilities: + add: + - NET_ADMIN + # ensures this container can speak to the ovs database + # successfully before its marked as ready + readinessProbe: + exec: + command: + - /usr/bin/ovs-vsctl + - show + command: + - /tmp/openvswitch-vswitchd.sh + - start + lifecycle: + preStop: + exec: + command: + - /tmp/openvswitch-db-server.sh + - stop + volumeMounts: + - name: openvswitch-bin + mountPath: /tmp/openvswitch-vswitchd.sh + subPath: openvswitch-vswitchd.sh + readOnly: true + - name: run + mountPath: /run + volumes: + - name: openvswitch-bin + configMap: + name: openvswitch-bin + defaultMode: 0555 + - name: run + hostPath: + path: /run + - name: host-rootfs + hostPath: + path: / +{{- end }} diff --git a/openvswitch/templates/job-image-repo-sync.yaml b/openvswitch/templates/job-image-repo-sync.yaml new file mode 100644 index 000000000..737c48d89 --- /dev/null +++ b/openvswitch/templates/job-image-repo-sync.yaml @@ -0,0 +1,20 @@ +{{/* +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 and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} +{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "openvswitch" -}} +{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} +{{- end }} diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml new file mode 100644 index 000000000..9d27558c8 --- /dev/null +++ b/openvswitch/values.yaml @@ -0,0 +1,128 @@ +# 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 openvswitch. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name: value + +release_group: null + +images: + tags: + openvswitch_db_server: docker.io/openstackhelm/openvswitch:v2.8.1 + openvswitch_vswitchd: docker.io/openstackhelm/openvswitch:v2.8.1 + dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1 + image_repo_sync: docker.io/docker:17.07.0 + pull_policy: "IfNotPresent" + local_registry: + active: false + exclude: + - dep_check + - image_repo_sync + +labels: + ovs: + node_selector_key: openvswitch + node_selector_value: enabled + +network: + # auto_bridge_add is a table of "bridge: interface" pairs, by + # default empty + # To automatically add a physical interfaces to a specific bridges, + # for example eth3 to bridge br-physnet1, if0 to br0 and iface_two + # to br1 do something like: + # + # auto_bridge_add: + # br-physnet1: eth3 + # br0: if0 + # br1: iface_two + auto_bridge_add: {} + +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" + jobs: + image_repo_sync: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + +endpoints: + cluster_domain_suffix: cluster.local + local_image_registry: + name: docker-registry + namespace: docker-registry + hosts: + default: localhost + internal: docker-registry + node: localhost + host_fqdn_override: + default: null + port: + registry: + node: 5000 + +dependencies: + dynamic: + common: + local_image_registry: + jobs: + - openvswitch-image-repo-sync + services: + - endpoint: node + service: local_image_registry + static: + db: null + vswitchd: null + image_repo_sync: + services: + - endpoint: internal + service: local_image_registry + +manifests: + configmap_bin: true + daemonset_ovs_db: true + daemonset_ovs_vswitchd: true + job_image_repo_sync: true diff --git a/playbooks/osh-infra-openstack-support.yaml b/playbooks/osh-infra-openstack-support.yaml index 400c4117e..ee1cfaafc 100644 --- a/playbooks/osh-infra-openstack-support.yaml +++ b/playbooks/osh-infra-openstack-support.yaml @@ -66,3 +66,9 @@ ./tools/deployment/openstack-support/035-mariadb.sh args: chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Openvswitch + shell: | + set -xe; + ./tools/deployment/openstack-support/045-openvswitch.sh + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/tools/deployment/openstack-support/045-openvswitch.sh b/tools/deployment/openstack-support/045-openvswitch.sh new file mode 100755 index 000000000..b903afede --- /dev/null +++ b/tools/deployment/openstack-support/045-openvswitch.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# 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. +set -xe + +#NOTE: Deploy command +helm upgrade --install openvswitch ./openvswitch \ + --namespace=openstack \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_OPENVSWITCH} + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status openvswitch