Feature 11069: Integration of MongoDB helm chart as subchart of OSM helm chart
Change-Id: Ie1abbb1714e2cdf6dccf5fb12ce502c5d4bb7066
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh
index 2875228..a79a143 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -271,24 +271,6 @@
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
-#deploy charmed services
-function deploy_charmed_services() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- juju add-model $OSM_NAMESPACE $OSM_VCA_K8S_CLOUDNAME
- juju deploy ch:mongodb-k8s -m $OSM_NAMESPACE --channel latest/stable
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-#deploy mongodb
-function deploy_mongodb() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- MONGO_OPTS="-d ${OSM_HELM_WORK_DIR} -D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -t ${OSM_DOCKER_TAG} -U ${DOCKER_USER} ${DEBUG_INSTALL}"
- [ -n "${DOCKER_REGISTRY_URL}" ] && MONGO_OPTS="${MONGO_OPTS} -r ${DOCKER_REGISTRY_URL}"
- $OSM_DEVOPS/installers/install_mongodb.sh ${MONGO_OPTS} || \
- FATAL_TRACK install_osm_mongodb_service "install_mongodb.sh failed"
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
function install_osm_ngsa_service() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
NGSA_OPTS="-i ${OSM_K8S_EXTERNAL_IP} -d ${OSM_HELM_WORK_DIR} -D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -t ${OSM_DOCKER_TAG} -U ${DOCKER_USER} ${DEBUG_INSTALL}"
@@ -461,9 +443,8 @@
function deploy_osm() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- deploy_mongodb
- track deploy_osm deploy_mongodb_ok
deploy_osm_helm_chart
+ track deploy_osm deploy_mongodb_ok
track deploy_osm deploy_osm_services_k8s_ok
if [ -n "$INSTALL_NGSA" ]; then
# optional NGSA install
diff --git a/installers/helm/osm/Chart.yaml b/installers/helm/osm/Chart.yaml
index b105bc9..8a441a0 100644
--- a/installers/helm/osm/Chart.yaml
+++ b/installers/helm/osm/Chart.yaml
@@ -26,6 +26,10 @@
repository: "https://charts.bitnami.com/bitnami"
version: "9.12.3"
condition: mysql.enabled
+- name: mongodb
+ repository: "https://charts.bitnami.com/bitnami"
+ version: "13.9.4"
+ condition: mongodb.enabled
- name: kafka
repository: "https://charts.bitnami.com/bitnami"
version: 30.1.6
@@ -42,10 +46,6 @@
repository: "https://prometheus-community.github.io/helm-charts"
version: 25.11.0
condition: prometheus.enabled
-# - name: mongodb
-# repository: "https://charts.bitnami.com/bitnami"
-# version: "13.9.4"
-# condition: mongodb.enabled
# - name: airflow
# repository: "https://airflow.apache.org"
# version: "1.6.0"
diff --git a/installers/helm/osm/values.yaml b/installers/helm/osm/values.yaml
index 695b224..a83911d 100644
--- a/installers/helm/osm/values.yaml
+++ b/installers/helm/osm/values.yaml
@@ -265,6 +265,27 @@
# secretName: "mon-secret"
config: {}
+mongodb:
+ enabled: true
+ replicaCount: 1
+ service:
+ nameOverride: "mongodb-k8s"
+ auth:
+ enabled: false
+ architecture: "replicaset"
+ livenessProbe:
+ initialDelaySeconds: 60
+ periodSeconds: 30
+ timeoutSeconds: 10
+ failureThreshold: 10
+ successThreshold: 1
+ readinessProbe:
+ initialDelaySeconds: 60
+ periodSeconds: 30
+ timeoutSeconds: 10
+ failureThreshold: 10
+ successThreshold: 1
+
mysql:
enabled: false
image: