From df1c999e41abf07993b5568d3233994107cc4f80 Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Fri, 12 Apr 2024 14:54:43 -0500 Subject: [PATCH] Utilize OSH plugin for deployment test scripts Depends-On: I8f30fbdf94d76ef9fa2985a25c033df290995326 Change-Id: I35b3793a660cfc27faf700b9679529b154e41df4 --- doc/source/install/before_deployment.rst | 8 +++++ tools/deployment/common/ingress.sh | 6 ++-- tools/deployment/common/prepare-charts.sh | 24 +++++++++++++++ tools/deployment/component/aodh/aodh.sh | 5 +--- .../deployment/component/barbican/barbican.sh | 7 ++--- .../component/ceilometer/ceilometer.sh | 5 +--- .../component/ceph/ceph-ns-activate.sh | 7 ++--- tools/deployment/component/cinder/cinder.sh | 7 ++--- tools/deployment/component/common/mariadb.sh | 7 ++--- .../deployment/component/common/memcached.sh | 7 ++--- .../deployment/component/common/openstack.sh | 29 +++++++++---------- tools/deployment/component/common/rabbitmq.sh | 7 ++--- .../compute-kit/compute-kit-sr-iov.sh | 2 +- .../component/compute-kit/compute-kit.sh | 17 +++-------- .../component/compute-kit/libvirt.sh | 8 ++--- .../component/compute-kit/openvswitch.sh | 7 ++--- tools/deployment/component/glance/glance.sh | 7 ++--- tools/deployment/component/heat/heat.sh | 7 ++--- tools/deployment/component/horizon/horizon.sh | 7 ++--- .../deployment/component/keystone/keystone.sh | 7 ++--- tools/deployment/component/magnum/magnum.sh | 5 +--- tools/deployment/component/manila/manila.sh | 7 ++--- tools/deployment/component/mistral/mistral.sh | 5 +--- .../nfs-provisioner/nfs-provisioner.sh | 2 +- .../component/octavia/200-octavia.sh | 4 +-- .../component/ovn/120-openvswitch.sh | 7 ++--- .../component/ovn/140-compute-kit.sh | 18 +++--------- tools/deployment/component/ovn/ovn.sh | 7 ++--- tools/deployment/component/senlin/senlin.sh | 5 +--- tools/deployment/component/tacker/tacker.sh | 7 ++--- zuul.d/base.yaml | 12 ++++++++ 31 files changed, 110 insertions(+), 150 deletions(-) create mode 100755 tools/deployment/common/prepare-charts.sh diff --git a/doc/source/install/before_deployment.rst b/doc/source/install/before_deployment.rst index eb8f8df06e..3f595f4c4a 100644 --- a/doc/source/install/before_deployment.rst +++ b/doc/source/install/before_deployment.rst @@ -20,6 +20,14 @@ deployment process. All further steps assume these two repositories are cloned into the `~/osh` directory. +Next, you need to update the dependencies for all the charts in both OpenStack-Helm +repositories. This can be done by running the following commands: + +.. code-block:: bash + + cd ~/osh/openstack-helm + ./tools/deployment/common/prepare-charts.sh + Also before deploying the OpenStack cluster you have to specify the OpenStack and the operating system version that you would like to use for deployment. For doing this export the following environment variables diff --git a/tools/deployment/common/ingress.sh b/tools/deployment/common/ingress.sh index b3a6f14430..93d38cf8b1 100755 --- a/tools/deployment/common/ingress.sh +++ b/tools/deployment/common/ingress.sh @@ -35,7 +35,7 @@ if ! [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])metallb($|[[:space:]]) ]]; then --set controller.labels.app=ingress-api #NOTE: Wait for deploy - ./tools/deployment/common/wait-for-pods.sh kube-system + helm osh wait-for-pods kube-system fi #NOTE: Deploy namespace ingress @@ -52,7 +52,7 @@ helm upgrade --install ingress-nginx-openstack ingress-nginx/ingress-nginx \ --set controller.labels.app=ingress-api #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +helm osh wait-for-pods openstack helm upgrade --install ingress-nginx-ceph ingress-nginx/ingress-nginx \ --version ${HELM_INGRESS_NGINX_VERSION} \ @@ -67,4 +67,4 @@ helm upgrade --install ingress-nginx-ceph ingress-nginx/ingress-nginx \ --set controller.labels.app=ingress-api #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh ceph +helm osh wait-for-pods ceph diff --git a/tools/deployment/common/prepare-charts.sh b/tools/deployment/common/prepare-charts.sh new file mode 100755 index 0000000000..0faccb3e8a --- /dev/null +++ b/tools/deployment/common/prepare-charts.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# 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 + +# Build all OSH Infra charts (necessary for Openstack deployment) +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +( + cd ${OSH_INFRA_PATH} && + make all +) + +# Build all OSH charts +make all diff --git a/tools/deployment/component/aodh/aodh.sh b/tools/deployment/component/aodh/aodh.sh index 2adb09be6d..ccc2059c30 100755 --- a/tools/deployment/component/aodh/aodh.sh +++ b/tools/deployment/component/aodh/aodh.sh @@ -13,9 +13,6 @@ # under the License. set -xe -#NOTE: Lint and package chart -make aodh - #NOTE: Wait for deploy helm upgrade --install aodh ./aodh \ --namespace=openstack \ @@ -27,7 +24,7 @@ helm upgrade --install aodh ./aodh \ ${OSH_EXTRA_HELM_ARGS_AODH} #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +helm osh wait-for-pods openstack #NOTE: Validate Deployment info export OS_CLOUD=openstack_helm diff --git a/tools/deployment/component/barbican/barbican.sh b/tools/deployment/component/barbican/barbican.sh index 20cb66f11e..03ff596081 100755 --- a/tools/deployment/component/barbican/barbican.sh +++ b/tools/deployment/component/barbican/barbican.sh @@ -15,12 +15,9 @@ set -xe #NOTE: Get the over-rides to use -: ${OSH_EXTRA_HELM_ARGS_BARBICAN:="$(./tools/deployment/common/get-values-overrides.sh barbican)"} +: ${OSH_EXTRA_HELM_ARGS_BARBICAN:="$(helm osh get-values-overrides -c barbican ${FEATURES})"} : ${RUN_HELM_TESTS:="yes"} -#NOTE: Lint and package chart -make barbican - #NOTE: Deploy command helm upgrade --install barbican ./barbican \ --namespace=openstack \ @@ -28,7 +25,7 @@ helm upgrade --install barbican ./barbican \ ${OSH_EXTRA_HELM_ARGS_BARBICAN} #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +helm osh wait-for-pods openstack # Run helm test if [ "x${RUN_HELM_TESTS}" != "xno" ]; then diff --git a/tools/deployment/component/ceilometer/ceilometer.sh b/tools/deployment/component/ceilometer/ceilometer.sh index 623ef88ef8..654af3d914 100755 --- a/tools/deployment/component/ceilometer/ceilometer.sh +++ b/tools/deployment/component/ceilometer/ceilometer.sh @@ -13,9 +13,6 @@ # under the License. set -xe -#NOTE: Lint and package chart -make ceilometer - #NOTE: Wait for deploy helm upgrade --install ceilometer ./ceilometer \ --namespace=openstack \ @@ -27,7 +24,7 @@ helm upgrade --install ceilometer ./ceilometer \ ${OSH_EXTRA_HELM_ARGS_CEILOMETER} #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +helm osh wait-for-pods openstack #NOTE: Validate Deployment info export OS_CLOUD=openstack_helm diff --git a/tools/deployment/component/ceph/ceph-ns-activate.sh b/tools/deployment/component/ceph/ceph-ns-activate.sh index 9574d4f0fd..e9b481ea96 100755 --- a/tools/deployment/component/ceph/ceph-ns-activate.sh +++ b/tools/deployment/component/ceph/ceph-ns-activate.sh @@ -16,10 +16,7 @@ set -xe #NOTE: Get the over-rides to use export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../openstack-helm-infra"}"}" -: ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE:="$(./tools/deployment/common/get-values-overrides.sh ceph-provisioners)"} - -#NOTE: Lint and package chart -make -C ${HELM_CHART_ROOT_PATH} ceph-provisioners +: ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE:="$(helm osh get-values-overrides -p ${HELM_CHART_ROOT_PATH} -c ceph-provisioners ${FEATURES})"} #NOTE: Deploy command tee /tmp/ceph-openstack-config.yaml <