From 0bfb2979ecd4a2f89b7852feb728a6157b20e8da Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Tue, 4 Sep 2018 15:10:21 -0500 Subject: [PATCH] Gate: Add gate for openstack support infrastructure As part of the effort to move the supporting infrastructure services to openstack-helm-infra, this adds a gate that will be used for those services specifically Change-Id: Id7c5649330eb41a0017a740ade9465fd66abb32f --- .zuul.yaml | 18 ++++++ playbooks/osh-infra-openstack-support.yaml | 62 +++++++++++++++++++ .../openstack-support/000-install-packages.sh | 1 + .../openstack-support/005-deploy-k8s.sh | 1 + .../openstack-support/010-ingress.sh | 52 ++++++++++++++++ .../deployment/openstack-support/015-ceph.sh | 1 + .../openstack-support/020-ceph-ns-activate.sh | 56 +++++++++++++++++ .../openstack-support/025-rabbitmq.sh | 34 ++++++++++ .../openstack-support/030-memcached.sh | 33 ++++++++++ 9 files changed, 258 insertions(+) create mode 100644 playbooks/osh-infra-openstack-support.yaml create mode 120000 tools/deployment/openstack-support/000-install-packages.sh create mode 120000 tools/deployment/openstack-support/005-deploy-k8s.sh create mode 100755 tools/deployment/openstack-support/010-ingress.sh create mode 120000 tools/deployment/openstack-support/015-ceph.sh create mode 100755 tools/deployment/openstack-support/020-ceph-ns-activate.sh create mode 100755 tools/deployment/openstack-support/025-rabbitmq.sh create mode 100755 tools/deployment/openstack-support/030-memcached.sh diff --git a/.zuul.yaml b/.zuul.yaml index ef4f73eb6..fad1fadc8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -36,6 +36,11 @@ - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ + - openstack-helm-infra-openstack-support: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - openstack-helm-infra-kubernetes-keystone-auth: irrelevant-files: - ^.*\.rst$ @@ -64,6 +69,11 @@ - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ + - openstack-helm-infra-openstack-support: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ - openstack-helm-infra-kubernetes-keystone-auth: irrelevant-files: - ^.*\.rst$ @@ -262,6 +272,14 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node +- job: + name: openstack-helm-infra-openstack-support + timeout: 7200 + pre-run: playbooks/osh-infra-upgrade-host.yaml + run: playbooks/osh-infra-openstack-support.yaml + post-run: playbooks/osh-infra-collect-logs.yaml + nodeset: openstack-helm-single-node + - job: name: openstack-helm-infra-five-ubuntu parent: openstack-helm-infra diff --git a/playbooks/osh-infra-openstack-support.yaml b/playbooks/osh-infra-openstack-support.yaml new file mode 100644 index 000000000..2b77f4c00 --- /dev/null +++ b/playbooks/osh-infra-openstack-support.yaml @@ -0,0 +1,62 @@ +# 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. + +- hosts: primary + tasks: + - name: Deploy Required packages + shell: | + set -xe; + ./tools/deployment/openstack-support/000-install-packages.sh + args: + chdir: "{{ zuul.project.src_dir }}" + environment: + zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" + - name: Deploy Kubernetes + shell: | + set -xe; + ./tools/deployment/openstack-support/005-deploy-k8s.sh + args: + chdir: "{{ zuul.project.src_dir }}" + environment: + zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" + - name: Deploy Cluster and Namespace Ingress + shell: | + set -xe; + ./tools/deployment/openstack-support/010-ingress.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Ceph + shell: | + set -xe; + ./tools/deployment/openstack-support/015-ceph.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Ceph NS Activate + shell: | + set -xe; + ./tools/deployment/openstack-support/020-ceph-ns-activate.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Rabbitmq + shell: | + set -xe; + ./tools/deployment/openstack-support/025-rabbitmq.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Memcached + shell: | + set -xe; + ./tools/deployment/openstack-support/030-memcached.sh + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/tools/deployment/openstack-support/000-install-packages.sh b/tools/deployment/openstack-support/000-install-packages.sh new file mode 120000 index 000000000..d702c4899 --- /dev/null +++ b/tools/deployment/openstack-support/000-install-packages.sh @@ -0,0 +1 @@ +../common/000-install-packages.sh \ No newline at end of file diff --git a/tools/deployment/openstack-support/005-deploy-k8s.sh b/tools/deployment/openstack-support/005-deploy-k8s.sh new file mode 120000 index 000000000..257a39f7a --- /dev/null +++ b/tools/deployment/openstack-support/005-deploy-k8s.sh @@ -0,0 +1 @@ +../common/005-deploy-k8s.sh \ No newline at end of file diff --git a/tools/deployment/openstack-support/010-ingress.sh b/tools/deployment/openstack-support/010-ingress.sh new file mode 100755 index 000000000..0b84db1f1 --- /dev/null +++ b/tools/deployment/openstack-support/010-ingress.sh @@ -0,0 +1,52 @@ +#!/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: Lint and package chart +make ingress + +#NOTE: Deploy global ingress +tee /tmp/ingress-kube-system.yaml << EOF +deployment: + mode: cluster + type: DaemonSet +network: + host_namespace: true +EOF +helm upgrade --install ingress-kube-system ./ingress \ + --namespace=kube-system \ + --values=/tmp/ingress-kube-system.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh kube-system + +#NOTE: Display info +helm status ingress-kube-system + +#NOTE: Deploy namespace ingress +for NAMESPACE in openstack ceph; do + helm upgrade --install ingress-${NAMESPACE} ./ingress \ + --namespace=${NAMESPACE} \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_INGRESS_OPENSTACK} + + #NOTE: Wait for deploy + ./tools/deployment/common/wait-for-pods.sh ${NAMESPACE} + + #NOTE: Display info + helm status ingress-${NAMESPACE} +done diff --git a/tools/deployment/openstack-support/015-ceph.sh b/tools/deployment/openstack-support/015-ceph.sh new file mode 120000 index 000000000..b4fd85f82 --- /dev/null +++ b/tools/deployment/openstack-support/015-ceph.sh @@ -0,0 +1 @@ +../developer/ceph/030-ceph.sh \ No newline at end of file diff --git a/tools/deployment/openstack-support/020-ceph-ns-activate.sh b/tools/deployment/openstack-support/020-ceph-ns-activate.sh new file mode 100755 index 000000000..343bc9679 --- /dev/null +++ b/tools/deployment/openstack-support/020-ceph-ns-activate.sh @@ -0,0 +1,56 @@ +#!/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: Lint and package chart +make ceph-provisioners + +#NOTE: Deploy command +: ${OSH_EXTRA_HELM_ARGS:=""} +tee /tmp/ceph-openstack-config.yaml <