diff --git a/Makefile b/Makefile index fd991edd..1c17f7a2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ IMAGE_NAME ?= $@ IMAGE_TAG ?= latest BUILD_DIR := $(shell mktemp -d) HELM ?= $(BUILD_DIR)/helm -CHARTS := $(filter-out deps, $(patsubst charts/%/.,%,$(wildcard charts/*/.))) +CHARTS := $(filter-out deps values_overrides, $(patsubst charts/%/.,%,$(wildcard charts/*/.))) IMAGES := $(addprefix porthole-,$(patsubst images/%/.,%,$(wildcard images/*/.))) PROXY ?= http://proxy.foo.com:8000 NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local diff --git a/charts/calicoctl-utility/.helmignore b/charts/calicoctl-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/calicoctl-utility/.helmignore +++ b/charts/calicoctl-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/ceph-utility/.helmignore b/charts/ceph-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/ceph-utility/.helmignore +++ b/charts/ceph-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/compute-utility/.helmignore b/charts/compute-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/compute-utility/.helmignore +++ b/charts/compute-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/etcdctl-utility/.helmignore b/charts/etcdctl-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/etcdctl-utility/.helmignore +++ b/charts/etcdctl-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/mysqlclient-utility/.helmignore b/charts/mysqlclient-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/mysqlclient-utility/.helmignore +++ b/charts/mysqlclient-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/openstack-utility/.helmignore b/charts/openstack-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/openstack-utility/.helmignore +++ b/charts/openstack-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/postgresql-utility/.helmignore b/charts/postgresql-utility/.helmignore index 51ccab8d..06e1663c 100644 --- a/charts/postgresql-utility/.helmignore +++ b/charts/postgresql-utility/.helmignore @@ -1 +1,22 @@ -values_overrides \ No newline at end of file +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj + diff --git a/charts/calicoctl-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/calicoctl-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/calicoctl-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/calicoctl-utility/images-ubuntu_bionic.yaml diff --git a/charts/calicoctl-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/calicoctl-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/calicoctl-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/calicoctl-utility/images-ubuntu_focal.yaml diff --git a/charts/calicoctl-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/calicoctl-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/calicoctl-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/calicoctl-utility/images-ubuntu_jammy.yaml diff --git a/charts/ceph-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/ceph-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/ceph-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/ceph-utility/images-ubuntu_bionic.yaml diff --git a/charts/ceph-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/ceph-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/ceph-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/ceph-utility/images-ubuntu_focal.yaml diff --git a/charts/ceph-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/ceph-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/ceph-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/ceph-utility/images-ubuntu_jammy.yaml diff --git a/charts/compute-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/compute-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/compute-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/compute-utility/images-ubuntu_bionic.yaml diff --git a/charts/compute-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/compute-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/compute-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/compute-utility/images-ubuntu_focal.yaml diff --git a/charts/compute-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/compute-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/compute-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/compute-utility/images-ubuntu_jammy.yaml diff --git a/charts/etcdctl-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/etcdctl-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/etcdctl-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/etcdctl-utility/images-ubuntu_bionic.yaml diff --git a/charts/etcdctl-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/etcdctl-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/etcdctl-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/etcdctl-utility/images-ubuntu_focal.yaml diff --git a/charts/etcdctl-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/etcdctl-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/etcdctl-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/etcdctl-utility/images-ubuntu_jammy.yaml diff --git a/charts/mysqlclient-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/mysqlclient-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/mysqlclient-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/mysqlclient-utility/images-ubuntu_bionic.yaml diff --git a/charts/mysqlclient-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/mysqlclient-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/mysqlclient-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/mysqlclient-utility/images-ubuntu_focal.yaml diff --git a/charts/mysqlclient-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/mysqlclient-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/mysqlclient-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/mysqlclient-utility/images-ubuntu_jammy.yaml diff --git a/charts/openstack-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/openstack-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/openstack-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/openstack-utility/images-ubuntu_bionic.yaml diff --git a/charts/openstack-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/openstack-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/openstack-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/openstack-utility/images-ubuntu_focal.yaml diff --git a/charts/openstack-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/openstack-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/openstack-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/openstack-utility/images-ubuntu_jammy.yaml diff --git a/charts/postgresql-utility/values_overrides/images-ubuntu_bionic.yaml b/charts/values_overrides/postgresql-utility/images-ubuntu_bionic.yaml similarity index 100% rename from charts/postgresql-utility/values_overrides/images-ubuntu_bionic.yaml rename to charts/values_overrides/postgresql-utility/images-ubuntu_bionic.yaml diff --git a/charts/postgresql-utility/values_overrides/images-ubuntu_focal.yaml b/charts/values_overrides/postgresql-utility/images-ubuntu_focal.yaml similarity index 100% rename from charts/postgresql-utility/values_overrides/images-ubuntu_focal.yaml rename to charts/values_overrides/postgresql-utility/images-ubuntu_focal.yaml diff --git a/charts/postgresql-utility/values_overrides/images-ubuntu_jammy.yaml b/charts/values_overrides/postgresql-utility/images-ubuntu_jammy.yaml similarity index 100% rename from charts/postgresql-utility/values_overrides/images-ubuntu_jammy.yaml rename to charts/values_overrides/postgresql-utility/images-ubuntu_jammy.yaml diff --git a/tools/deployment/002-build-charts.sh b/tools/deployment/002-build-charts.sh index 8b23b554..146384e5 100755 --- a/tools/deployment/002-build-charts.sh +++ b/tools/deployment/002-build-charts.sh @@ -7,7 +7,7 @@ cd "${PORTHOLE_PATH}" || exit mkdir -p artifacts -make all +make all || { echo "[!] Failed to build Helm charts. Aborting..."; exit 1; } cd charts || exit for i in $(find . -maxdepth 1 -name "*.tgz" -print | sed -e 's/\-[0-9.]*\.tgz//'| cut -d / -f 2 | sort) diff --git a/tools/deployment/005-calicoctl-utility.sh b/tools/deployment/005-calicoctl-utility.sh index 268146e4..907550e9 100755 --- a/tools/deployment/005-calicoctl-utility.sh +++ b/tools/deployment/005-calicoctl-utility.sh @@ -12,15 +12,18 @@ # under the License. set -xe -namespace=utility -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_CALICOCTL_UTILITY:="$(helm osh get-values-overrides -c calicoctl-utility)"} +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_CALICOCTL_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c calicoctl-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -helm upgrade --install calicoctl-utility ./artifacts/calicoctl-utility.tgz --namespace=$namespace \ - ${PORTHOLE_EXTRA_HELM_ARGS_CALICOCTL_UTILITY} +# NOTE: Deploy calicoctl-utility helm chart +helm upgrade --install calicoctl-utility ./artifacts/calicoctl-utility.tgz \ + --namespace=${NAMESPACE} \ + ${PORTHOLE_EXTRA_HELM_ARGS_CALICOCTL_UTILITY} + +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace \ No newline at end of file diff --git a/tools/deployment/010-ceph-utility.sh b/tools/deployment/010-ceph-utility.sh index 88f5979f..4baccada 100755 --- a/tools/deployment/010-ceph-utility.sh +++ b/tools/deployment/010-ceph-utility.sh @@ -1,23 +1,37 @@ #!/bin/bash -CURRENT_DIR="$(pwd)" - : "${OSH_PATH:="../openstack-helm"}" - : "${OSH_INFRA_PATH:="../openstack-helm-infra"}" +# +# 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 + +CURRENT_DIR="$(pwd)" + +# NOTE: Define variables +: ${OSH_PATH:="../openstack-helm"} +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +: ${NAMESPACE:=utility} cd "${OSH_INFRA_PATH}" || exit -# Lint and package ceph charts +# NOTE: Lint and package ceph helm charts for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do - make "${CHART}" + make "${CHART}" SKIP_CHANGELOG=1 done ./tools/deployment/ceph/ceph.sh -namespace="utility" -: ${OSH_EXTRA_HELM_ARGS:=""} - cd "${OSH_INFRA_PATH}" -#Deploy Ceph-provisioners + tee /tmp/ceph-utility-config.yaml <<EOF endpoints: identity: @@ -50,23 +64,33 @@ pod: init: runtime/default EOF -helm upgrade --install ceph-utility-config ./ceph-provisioners \ - --namespace=$namespace \ - --values=/tmp/ceph-utility-config.yaml \ - ${OSH_EXTRA_HELM_ARGS} \ - ${OSH_INFRA_EXTRA_HELM_ARGS_CEPH_DEPLOY:-$(helm osh get-values-overrides -c ceph-provisioners)} \ - ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE} +: ${OSH_EXTRA_HELM_ARGS:=""} +: ${OSH_INFRA_VALUES_OVERRIDES_PATH:="../openstack-helm-infra/values_overrides"} +: ${OSH_INFRA_EXTRA_HELM_ARGS_CEPH_DEPLOY:="$(helm osh get-values-overrides -p ${OSH_INFRA_VALUES_OVERRIDES_PATH} -c ceph-provisioners ${FEATURES})"} + +# NOTE: Deploy ceph-provisioners helm chart +helm upgrade --install ceph-utility-config ./ceph-provisioners \ + --namespace=${NAMESPACE} \ + --values=/tmp/ceph-utility-config.yaml \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_INFRA_EXTRA_HELM_ARGS_CEPH_DEPLOY} \ + ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE} + +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Deploy Ceph-Utility cd ${CURRENT_DIR} -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_CEPH_UTILITY:="$(helm osh get-values-overrides -c ceph-utility)"} +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_CEPH_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c ceph-utility ${FEATURES})"} -helm upgrade --install ceph-utility ./artifacts/ceph-utility.tgz --namespace=$namespace \ - ${PORTHOLE_EXTRA_HELM_ARGS_CEPH_UTILITY} +# NOTE: Deploy ceph-utility helm chart +helm upgrade --install ceph-utility ./artifacts/ceph-utility.tgz \ + --namespace=${NAMESPACE} \ + ${PORTHOLE_EXTRA_HELM_ARGS_CEPH_UTILITY} + +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace diff --git a/tools/deployment/020-compute-utility.sh b/tools/deployment/020-compute-utility.sh index f814c4a8..6eefb9a6 100755 --- a/tools/deployment/020-compute-utility.sh +++ b/tools/deployment/020-compute-utility.sh @@ -13,16 +13,18 @@ # under the License. set -xe -namespace="utility" -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_COMPUTE_UTILITY:="$(helm osh get-values-overrides -c compute-utility)"} +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_COMPUTE_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c compute-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -helm upgrade --install compute-utility ./artifacts/compute-utility.tgz --namespace=$namespace \ - ${PORTHOLE_EXTRA_HELM_ARGS_COMPUTE_UTILITY} +# NOTE: Deploy compute-utility helm chart +helm upgrade --install compute-utility ./artifacts/compute-utility.tgz \ + --namespace=${NAMESPACE} \ + ${PORTHOLE_EXTRA_HELM_ARGS_COMPUTE_UTILITY} +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace \ No newline at end of file diff --git a/tools/deployment/030-etcdctl-utility.sh b/tools/deployment/030-etcdctl-utility.sh index 889347ea..ab9a4ae0 100755 --- a/tools/deployment/030-etcdctl-utility.sh +++ b/tools/deployment/030-etcdctl-utility.sh @@ -12,16 +12,18 @@ # under the License. set -xe -namespace="utility" -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_ETCDCTL_UTILITY:="$(helm osh get-values-overrides -c etcdctl-utility)"} +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_ETCDCTL_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c etcdctl-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -helm upgrade --install etcdctl-utility ./artifacts/etcdctl-utility.tgz --namespace=$namespace \ - ${PORTHOLE_EXTRA_HELM_ARGS_ETCDCTL_UTILITY} +# NOTE: Deploy etcdctl-utility helm chart +helm upgrade --install etcdctl-utility ./artifacts/etcdctl-utility.tgz \ + --namespace=${NAMESPACE} \ + ${PORTHOLE_EXTRA_HELM_ARGS_ETCDCTL_UTILITY} +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace \ No newline at end of file diff --git a/tools/deployment/040-mysqlclient-utility.sh b/tools/deployment/040-mysqlclient-utility.sh index 99a52906..7f73959b 100755 --- a/tools/deployment/040-mysqlclient-utility.sh +++ b/tools/deployment/040-mysqlclient-utility.sh @@ -14,10 +14,11 @@ set -xe CURRENT_DIR="$(pwd)" - : "${OSH_PATH:="../openstack-helm"}" -# Deploy mariadb server -cd "${OSH_PATH}" +# NOTE: Define variables +: ${OSH_PATH:="../openstack-helm"} +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} + tee /tmp/mariadb-server-config.yaml <<EOF conf: backup: @@ -31,37 +32,40 @@ manifests: pvc_backup: true EOF -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../openstack-helm-infra"}"}" -: ${OSH_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides -c mariadb)"} +cd "${OSH_INFRA_PATH}" || exit -#NOTE: Lint and package chart -make -C "${HELM_CHART_ROOT_PATH}" mariadb SKIP_CHANGELOG=1 +# NOTE: Lint and package mariadb helm chart +make mariadb SKIP_CHANGELOG=1 -#NOTE: Deploy command : ${OSH_EXTRA_HELM_ARGS:=""} -helm upgrade --install mariadb ${HELM_CHART_ROOT_PATH}/mariadb \ - --namespace=openstack \ - --values /tmp/mariadb-server-config.yaml \ - --set pod.replicas.server=1 \ - ${OSH_EXTRA_HELM_ARGS} \ - ${OSH_EXTRA_HELM_ARGS_MARIADB} +: ${OSH_INFRA_VALUES_OVERRIDES_PATH:="../openstack-helm-infra/values_overrides"} +: ${OSH_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides -p ${OSH_INFRA_VALUES_OVERRIDES_PATH} -c mariadb ${FEATURES})"} -#NOTE: Wait for deploy +# NOTE: Deploy mariadb helm chart +helm upgrade --install mariadb ./mariadb \ + --namespace=openstack \ + --values /tmp/mariadb-server-config.yaml \ + --set pod.replicas.server=1 \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_MARIADB} + +# NOTE: Wait for deploy helm osh wait-for-pods openstack -# Deploy mysqlclient-utility cd "${CURRENT_DIR}" -namespace="utility" +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_MYSQLCLIENT_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c mysqlclient-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -export HELM_CHART_ROOT_PATH="${PORTHOLE_PATH:="../porthole/charts"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_MYSQLCLIENT_UTILITY:="$(helm osh get-values-overrides -c mysqlclient-utility)"} +# NOTE: Deploy mysqlclient-utility helm chart +helm upgrade --install mysqlclient-utility ./artifacts/mysqlclient-utility.tgz \ + --namespace=${NAMESPACE} \ + --set "conf.mariadb_backup_restore.enabled_namespaces=openstack" \ + ${PORTHOLE_EXTRA_HELM_ARGS_MYSQLCLIENT_UTILITY} -helm upgrade --install mysqlclient-utility ./artifacts/mysqlclient-utility.tgz --namespace=$namespace \ - --set "conf.mariadb_backup_restore.enabled_namespaces=openstack" \ - ${PORTHOLE_EXTRA_HELM_ARGS_MYSQLCLIENT_UTILITY} +# Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace diff --git a/tools/deployment/050-openstack-utility.sh b/tools/deployment/050-openstack-utility.sh index c241c16e..632e209e 100755 --- a/tools/deployment/050-openstack-utility.sh +++ b/tools/deployment/050-openstack-utility.sh @@ -12,15 +12,18 @@ # under the License. set -xe -namespace="utility" -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_OPENSTACK_UTILITY:="$(helm osh get-values-overrides -c openstack-utility)"} +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_OPENSTACK_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c openstack-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -helm upgrade --install openstack-utility ./artifacts/openstack-utility.tgz --namespace=$namespace \ - ${PORTHOLE_EXTRA_HELM_ARGS_OPENSTACK_UTILITY} +# NOTE: Deploy openstack-utility helm chart +helm upgrade --install openstack-utility ./artifacts/openstack-utility.tgz \ + --namespace=${NAMESPACE} \ + ${PORTHOLE_EXTRA_HELM_ARGS_OPENSTACK_UTILITY} + +# NOTE: Wait for deploy +helm osh wait-for-pods ${NAMESPACE} -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace diff --git a/tools/deployment/060-postgresql-utility.sh b/tools/deployment/060-postgresql-utility.sh index b0f17ff9..f00f0af6 100755 --- a/tools/deployment/060-postgresql-utility.sh +++ b/tools/deployment/060-postgresql-utility.sh @@ -10,48 +10,51 @@ # 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 CURRENT_DIR="$(pwd)" - : "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -# Deploy postgresql server -cd "${OSH_INFRA_PATH}" -# bash -c "./tools/deployment/common/postgresql.sh" +# NOTE: Define variables +: ${OSH_PATH:="../openstack-helm"} +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} -#NOTE: Lint and package chart +cd "${OSH_INFRA_PATH}" || exit + +# NOTE: Lint and package postgresql helm chart make postgresql SKIP_CHANGELOG=1 -#NOTE: Deploy command : ${OSH_INFRA_EXTRA_HELM_ARGS:=""} -: ${OSH_INFRA_EXTRA_HELM_ARGS_POSTGRESQL:="$(helm osh get-values-overrides -c postgresql)"} +: ${OSH_INFRA_VALUES_OVERRIDES_PATH:="../openstack-helm-infra/values_overrides"} +: ${OSH_INFRA_EXTRA_HELM_ARGS_POSTGRESQL:="$(helm osh get-values-overrides -p ${OSH_INFRA_VALUES_OVERRIDES_PATH} -c postgresql ${FEATURES})"} +# NOTE: Deploy postgresql helm chart helm upgrade --install postgresql ./postgresql \ - --namespace=osh-infra \ - --set monitoring.prometheus.enabled=true \ - --set storage.pvc.size=1Gi \ - --set storage.pvc.enabled=true \ - --set pod.replicas.server=1 \ - ${OSH_INFRA_EXTRA_HELM_ARGS} \ - ${OSH_INFRA_EXTRA_HELM_ARGS_POSTGRESQL} + --namespace=osh-infra \ + --set monitoring.prometheus.enabled=true \ + --set storage.pvc.size=1Gi \ + --set storage.pvc.enabled=true \ + --set pod.replicas.server=1 \ + ${OSH_INFRA_EXTRA_HELM_ARGS} \ + ${OSH_INFRA_EXTRA_HELM_ARGS_POSTGRESQL} -#NOTE: Wait for deploy +# NOTE: Wait for deploy helm osh wait-for-pods osh-infra -# Deploy postgresql-utility cd ${CURRENT_DIR} -namespace="utility" +# NOTE: Define variables +: ${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"} +: ${PORTHOLE_VALUES_OVERRIDES_PATH:="../porthole/charts/values_overrides"} +: ${PORTHOLE_EXTRA_HELM_ARGS_POSTGRESQL_UTILITY:="$(helm osh get-values-overrides -p ${PORTHOLE_VALUES_OVERRIDES_PATH} -c postgresql-utility ${FEATURES})"} +: ${NAMESPACE:=utility} -export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${PORTHOLE_PATH:="../porthole/charts"}"}" -: ${PORTHOLE_EXTRA_HELM_ARGS_POSTGRESQL_UTILITY:="$(./tools/deployment/get-values-overrides.sh -c postgresql-utility)"} +# NOTE: Deploy postgresql-utility helm chart +helm upgrade --install postgresql-utility ./artifacts/postgresql-utility.tgz \ + --namespace=${NAMESPACE} \ + --set "conf.postgresql_backup_restore.enabled_namespaces=osh-infra" \ + ${PORTHOLE_EXTRA_HELM_ARGS_POSTGRESQL_UTILITY} -helm upgrade --install postgresql-utility ./artifacts/postgresql-utility.tgz --namespace=$namespace \ - --set "conf.postgresql_backup_restore.enabled_namespaces=osh-infra" \ - ${PORTHOLE_EXTRA_HELM_ARGS_POSTGRESQL_UTILITY} +# Wait for deploy +helm osh wait-for-pods ${NAMESPACE} - -# Wait for Deployment -: "${OSH_INFRA_PATH:="../openstack-helm-infra"}" -cd "${OSH_INFRA_PATH}" -helm osh wait-for-pods $namespace diff --git a/tools/gate/playbooks/roles/airship-run-script/tasks/main.yaml b/tools/gate/playbooks/roles/airship-run-script/tasks/main.yaml index 9799d374..f7bb2545 100644 --- a/tools/gate/playbooks/roles/airship-run-script/tasks/main.yaml +++ b/tools/gate/playbooks/roles/airship-run-script/tasks/main.yaml @@ -38,4 +38,5 @@ OSH_INFRA_COMMIT: "{{ OSH_INFRA_COMMIT | default('cfff60ec10a6c386f38db79bb9f59a552c2b032f') }}" OSH_COMMIT: "{{ OSH_COMMIT | default('2d9457e34ca4200ed631466bd87569b0214c92e7') }}" COREDNS_VERSION: "{{ coredns_version | default('v1.11.1') }}" + FEATURES: "images {{ osh_params.feature_gates | default('') | regex_replace(',', ' ') }} {{ osh_params.openstack_release | default('') }} {{ osh_params.container_distro_name | default('') }}_{{ osh_params.container_distro_version | default('') }} {{ osh_params.container_distro_name | default('') }}" ... diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 6e934050..40039c0f 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -311,7 +311,7 @@ chdir: ../porthole - job: - name: airship-porthole-deploy-functional-tests-kubeadm + name: airship-porthole-deploy-functional-tests-kubeadm abstract: true description: Deploys all UC's and Executes functional tests nodeset: treasuremap-airskiff-1node-ubuntu_jammy