From 0003a52f4265c5cd879abebe1b8454206f0f2ff7 Mon Sep 17 00:00:00 2001 From: Rajamohan Raj Date: Thu, 2 Jul 2020 23:18:38 +0000 Subject: [PATCH] Script for M3DB operator deployment through orchestrator In this patch, wrote a script for auto deploy of M3DB operator through the orchestrator. Issue-ID: MULTICLOUD-1112 Signed-off-by: Rajamohan Raj Change-Id: Ia1951c5ef0de20e9b47f6ab5330dec8db5a1c46f --- kud/tests/m3db-operator-test.sh | 376 +++++++++++++++++++++ .../etcd-operator/templates/etcd-cluster-crd.yaml | 51 --- .../helm/operator/.helmignore | 0 .../helm/operator/Chart.yaml | 0 .../helm/operator/charts/etcd-operator/.helmignore | 0 .../helm/operator/charts/etcd-operator/Chart.yaml | 0 .../helm/operator/charts/etcd-operator/OWNERS | 0 .../helm/operator/charts/etcd-operator/README.md | 0 .../charts/etcd-operator/templates/NOTES.txt | 0 .../charts/etcd-operator/templates/_helpers.tpl | 0 .../etcd-operator/templates/backup-etcd-crd.yaml | 0 .../templates/backup-operator-deployment.yaml | 0 .../etcd-operator/templates/etcd-cluster-crd.yaml | 25 ++ .../templates/etcd-cluster-creation.yaml | 23 ++ .../templates/operator-cluster-role.yaml | 0 .../templates/operator-clusterrole-binding.yaml | 0 .../templates/operator-deployment.yaml | 0 .../templates/operator-service-account.yaml | 0 .../etcd-operator/templates/restore-etcd-crd.yaml | 0 .../templates/restore-operator-deployment.yaml | 0 .../templates/restore-operator-service.yaml | 0 .../helm/operator/charts/etcd-operator/values.yaml | 0 .../helm/operator/charts/m3db-operator/Chart.yaml | 0 .../helm/operator/charts/m3db-operator/LICENSE | 0 .../helm/operator/charts/m3db-operator/NOTES.txt | 0 .../helm/operator/charts/m3db-operator/README.md | 0 .../m3db-operator/templates/cluster_role.yaml | 0 .../templates/cluster_role_binding.yaml | 0 .../m3db-operator/templates/service_account.yaml | 0 .../m3db-operator/templates/stateful_set.yaml | 0 .../helm/operator/charts/m3db-operator/values.yaml | 0 .../helm/operator/requirements.yaml | 0 .../helm/operator/resources/m3db.labels | 0 .../helm/operator/values.yaml | 0 .../collection/operators/profile/manifest.yaml | 4 + .../operators/profile/override_values.yaml | 6 + 36 files changed, 434 insertions(+), 51 deletions(-) create mode 100755 kud/tests/m3db-operator-test.sh delete mode 100644 kud/tests/vnfs/comp-app/collection/etcd-m3db-operators/helm/operator/charts/etcd-operator/templates/etcd-cluster-crd.yaml rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/.helmignore (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/Chart.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/.helmignore (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/Chart.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/OWNERS (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/README.md (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/NOTES.txt (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/_helpers.tpl (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/backup-etcd-crd.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/backup-operator-deployment.yaml (100%) create mode 100644 kud/tests/vnfs/comp-app/collection/operators/helm/operator/charts/etcd-operator/templates/etcd-cluster-crd.yaml create mode 100644 kud/tests/vnfs/comp-app/collection/operators/helm/operator/charts/etcd-operator/templates/etcd-cluster-creation.yaml rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/operator-cluster-role.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/operator-clusterrole-binding.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/operator-deployment.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/operator-service-account.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/restore-etcd-crd.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/restore-operator-deployment.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/templates/restore-operator-service.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/etcd-operator/values.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/Chart.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/LICENSE (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/NOTES.txt (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/README.md (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/templates/cluster_role.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/templates/cluster_role_binding.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/templates/service_account.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/templates/stateful_set.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/charts/m3db-operator/values.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/requirements.yaml (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/resources/m3db.labels (100%) rename kud/tests/vnfs/comp-app/collection/{etcd-m3db-operators => operators}/helm/operator/values.yaml (100%) create mode 100644 kud/tests/vnfs/comp-app/collection/operators/profile/manifest.yaml create mode 100644 kud/tests/vnfs/comp-app/collection/operators/profile/override_values.yaml diff --git a/kud/tests/m3db-operator-test.sh b/kud/tests/m3db-operator-test.sh new file mode 100755 index 00000000..5642fb69 --- /dev/null +++ b/kud/tests/m3db-operator-test.sh @@ -0,0 +1,376 @@ +# /* +# * Copyright 2020 Intel Corporation, Inc +# * +# * 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 -o errexit +set -o nounset +set -o pipefail + + +source _common_test.sh +source _functions.sh +source _common.sh + + +base_url_clm=${base_url_clm:-"http://192.168.121.29:32551/v2"} +base_url_ncm=${base_url_ncm:-"http://192.168.121.29:31406/v2"} +base_url_orchestrator=${base_url_orchestrator:-"http://192.168.121.29:30356/v2"} +base_url_rysnc=${base_url_orchestrator:-"http://192.168.121.29:31751/v2"} +CSAR_DIR="/opt/csar" +csar_id="operators-cb009bfe-bbee-11e8-9766-525400435678" + + +app1_helm_path="$CSAR_DIR/$csar_id/operator.tar.gz" +app1_profile_path="$CSAR_DIR/$csar_id/operator_profile.tar.gz" + + + + + +# ---------BEGIN: SET CLM DATA--------------- + +clusterprovidername="collection-operator-cluster-provider" +clusterproviderdata="$(cat<