3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 # Helm chart 13.9.4 correspondes to Mongo DB 6.0.5
19 MONGODB_HELM_VERSION
=13.9.4
22 # Install MongoDB helm chart
23 function install_mongodb
() {
24 [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of
function
25 # copy mongodb-values.yaml to the destination folder
26 sudo mkdir
-p ${OSM_HELM_WORK_DIR}
27 sudo
cp ${OSM_DEVOPS}/installers
/helm
/values
/mongodb-values.yaml
${OSM_HELM_WORK_DIR}
28 # update mongodb-values.yaml to use the right tag
30 helm repo add bitnami https
://charts.bitnami.com
/bitnami
32 helm upgrade mongodb-k8s bitnami
/mongodb
-n ${OSM_NAMESPACE} --create-namespace --install -f ${OSM_HELM_WORK_DIR}/mongodb-values.yaml --version ${MONGODB_HELM_VERSION} --timeout 10m || FATAL_TRACK mongodb
"Failed installing mongodb helm chart"
33 [ -z "${DEBUG_INSTALL}" ] || DEBUG end of
function
39 DOCKER_USER
="opensourcemano"
40 OSM_DEVOPS
="/usr/share/osm-devops"
41 OSM_DOCKER_TAG
="testing-daily"
42 OSM_HELM_WORK_DIR
="/etc/osm/helm"
45 while getopts ":D:d:s:t:r:U:-: " o
; do
48 OSM_DEVOPS
="${OPTARG}"
51 OSM_HELM_WORK_DIR
="${OPTARG}"
54 OSM_NAMESPACE
="${OPTARG}"
57 OSM_DOCKER_TAG
="${OPTARG}"
60 DOCKER_REGISTRY_URL
="${OPTARG}"
63 DOCKER_USER
="${OPTARG}"
66 [ "${OPTARG}" == "debug" ] && DEBUG_INSTALL
="y" && continue
67 echo -e "Invalid option: '--$OPTARG'\n" >&2
71 echo "Option -$OPTARG requires an argument" >&2
75 echo -e "Invalid option: '-$OPTARG'\n" >&2
84 source $OSM_DEVOPS/common
/logging
85 source $OSM_DEVOPS/common
/track
87 echo "DEBUG_INSTALL=$DEBUG_INSTALL"
88 echo "OSM_DEVOPS=$OSM_DEVOPS"
89 echo "OSM_DOCKER_TAG=$OSM_DOCKER_TAG"
90 echo "OSM_HELM_WORK_DIR=$OSM_HELM_WORK_DIR"
91 echo "OSM_NAMESPACE=$OSM_NAMESPACE"