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 <<EOF +endpoints: + ceph_mon: + namespace: ceph +network: + public: 172.17.0.1/16 + cluster: 172.17.0.1/16 +deployment: + storage_secrets: false + ceph: false + rbd_provisioner: false + cephfs_provisioner: false + client_secrets: true + rgw_keystone_user_and_endpoints: false +bootstrap: + enabled: false +conf: + rgw_ks: + enabled: false +EOF +helm upgrade --install ceph-openstack-config ./ceph-provisioners \ + --namespace=openstack \ + --values=/tmp/ceph-openstack-config.yaml \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE} + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +kubectl get -n osh-infra jobs --show-all +kubectl get -n osh-infra secrets +kubectl get -n osh-infra configmaps diff --git a/tools/deployment/openstack-support/025-rabbitmq.sh b/tools/deployment/openstack-support/025-rabbitmq.sh new file mode 100755 index 000000000..0422e949a --- /dev/null +++ b/tools/deployment/openstack-support/025-rabbitmq.sh @@ -0,0 +1,34 @@ +#!/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 rabbitmq + +#NOTE: Deploy command +: ${OSH_EXTRA_HELM_ARGS:=""} +helm upgrade --install rabbitmq ./rabbitmq \ + --namespace=openstack \ + --set pod.replicas.server=1 \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_RABBITMQ} + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status rabbitmq diff --git a/tools/deployment/openstack-support/030-memcached.sh b/tools/deployment/openstack-support/030-memcached.sh new file mode 100755 index 000000000..776141855 --- /dev/null +++ b/tools/deployment/openstack-support/030-memcached.sh @@ -0,0 +1,33 @@ +#!/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 memcached + +#NOTE: Deploy command +: ${OSH_EXTRA_HELM_ARGS:=""} +helm upgrade --install memcached ./memcached \ + --namespace=openstack \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_MEMCACHED} + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status memcached