From 70863e11b3d0816ad7b8f938fe60eb293b2748db Mon Sep 17 00:00:00 2001 From: jmac Date: Wed, 16 May 2018 14:53:03 +0000 Subject: make sdnctl user db password configurable for SDNC Change-Id: Ic5eda9c33abca03e2f0bc788261a3a769c5ad7ab Signed-off-by: jmac Issue-ID: OOM-970 --- kubernetes/common/dgbuilder/resources/config/svclogic.properties | 2 +- kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh | 4 ++-- kubernetes/common/dgbuilder/resources/scripts/customSettings.js | 8 ++++---- kubernetes/common/dgbuilder/values.yaml | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'kubernetes/common') diff --git a/kubernetes/common/dgbuilder/resources/config/svclogic.properties b/kubernetes/common/dgbuilder/resources/config/svclogic.properties index dc3980de21..82eeec5e61 100644 --- a/kubernetes/common/dgbuilder/resources/config/svclogic.properties +++ b/kubernetes/common/dgbuilder/resources/config/svclogic.properties @@ -2,4 +2,4 @@ org.onap.ccsdk.sli.dbtype=jdbc org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl -org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.password={{.Values.config.dbSdnctlPassword}} diff --git a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh index 76d17700b0..961792be3f 100755 --- a/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh +++ b/kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh @@ -19,7 +19,7 @@ dbHost="{{.Values.config.dbServiceName}}.{{.Release.Namespace}}" dbPort="3306" dbName="sdnctl" dbUser="sdnctl" -dbPassword="gamma" +dbPassword="{{.Values.config.dbSdnctlPassword}}" gitLocalRepository="$4" lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f2|sed -e s/,//|sort|tail -1) @@ -99,7 +99,7 @@ then echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile echo "org.onap.ccsdk.sli.jdbc.database=sdnctl" >>$svclogicPropFile echo "org.onap.ccsdk.sli.jdbc.user=sdnctl" >>$svclogicPropFile - echo "org.onap.ccsdk.sli.jdbc.password=gamma" >>$svclogicPropFile + echo "org.onap.ccsdk.sli.jdbc.password={{.Values.config.dbSdnctlPassword}}" >>$svclogicPropFile fi if [ ! -e "${appDir}/flowShareUsers.js" ] then diff --git a/kubernetes/common/dgbuilder/resources/scripts/customSettings.js b/kubernetes/common/dgbuilder/resources/scripts/customSettings.js index 22810baabd..e3349b9d5a 100644 --- a/kubernetes/common/dgbuilder/resources/scripts/customSettings.js +++ b/kubernetes/common/dgbuilder/resources/scripts/customSettings.js @@ -27,25 +27,25 @@ module.exports={ "userDir": "releases/sdnc1.0", "httpAuth": { "user": "dguser", - "pass": "cc03e747a6afbbcbf8be7668acfebee5" + "pass": "{{.Values.config.dgUserPassword}}" }, "dbHost": "{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}", "dbPort": "3306", "dbName": "sdnctl", "dbUser": "sdnctl", - "dbPassword": "gamma", + "dbPassword": "{{.Values.config.dbSdnctlPassword}}", "gitLocalRepository": "", "httpRoot": "/", "disableEditor": false, "httpAdminRoot": "/", "httpAdminAuth": { "user": "dguser", - "pass": "cc03e747a6afbbcbf8be7668acfebee5" + "pass": "{{.Values.config.dgUserPassword}}" }, "httpNodeRoot": "/", "httpNodeAuth": { "user": "dguser", - "pass": "cc03e747a6afbbcbf8be7668acfebee5" + "pass": "{{.Values.config.dgUserPassword}}" }, "uiHost": "0.0.0.0", "version": "0.9.1", diff --git a/kubernetes/common/dgbuilder/values.yaml b/kubernetes/common/dgbuilder/values.yaml index e7c18c4140..025e52829b 100644 --- a/kubernetes/common/dgbuilder/values.yaml +++ b/kubernetes/common/dgbuilder/values.yaml @@ -42,9 +42,11 @@ debugEnabled: false # application configuration config: dbRootPassword: openECOMP1.0 + dbSdnctlPassword: gamma dbPodName: mysql-db dbServiceName: sdnc-dbhost - + # MD5 hash of dguser password ( default: test123 ) + dgUserPassword: cc03e747a6afbbcbf8be7668acfebee5 # default number of instances replicaCount: 1 -- cgit 1.2.3-korg