From: Mike Elliott Date: Thu, 13 Sep 2018 13:20:01 +0000 (+0000) Subject: Merge "Upgrade APPC to use common mariadb galera charts" X-Git-Tag: 3.0.0-ONAP~374 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a859647740e19b62c44244e256c48a8847900259;hp=-c;p=oom.git Merge "Upgrade APPC to use common mariadb galera charts" --- a859647740e19b62c44244e256c48a8847900259 diff --combined kubernetes/appc/requirements.yaml index 28d64027fa,dab1ad66ed..67e33ba6eb --- a/kubernetes/appc/requirements.yaml +++ b/kubernetes/appc/requirements.yaml @@@ -1,22 -1,8 +1,22 @@@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved. +# +# 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. + dependencies: - name: common version: ~2.0.0 repository: '@local' - - name: mysql + - name: mariadb-galera version: ~2.0.0 repository: '@local' - name: dgbuilder diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh index 5f8b869594,fffb155f2a..b3cf868731 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -21,7 -20,7 +21,7 @@@ SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk} APPC_HOME=${APPC_HOME:-/opt/onap/appc} - MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} + MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.mariadbRootPassword}}} APPC_DB_USER=${APPC_DB_USER:-appcctl} APPC_DB_PASSWD=${APPC_DB_PASSWD:-appcctl} @@@ -29,7 -28,7 +29,7 @@@ APPC_DB_DATABASE=${SDN_DB_DATABASE:-app # Create tablespace and user account - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} mysql <<-END + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} mysql <<-END CREATE DATABASE ${APPC_DB_DATABASE}; CREATE USER '${APPC_DB_USER}'@'localhost' IDENTIFIED BY '${APPC_DB_PASSWD}'; CREATE USER '${APPC_DB_USER}'@'%' IDENTIFIED BY '${APPC_DB_PASSWD}'; @@@ -40,16 -39,16 +40,16 @@@ EN if [ -f ${APPC_HOME}/data/appcctl.dump ] then - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} appcctl < ${APPC_HOME}/data/appcctl.dump + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} appcctl < ${APPC_HOME}/data/appcctl.dump fi if [ -f ${APPC_HOME}/data/sdnctl.dump ] then - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sdnctl.dump + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sdnctl.dump fi if [ -f ${APPC_HOME}/data/sqlData.dump ] then - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sqlData.dump + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sqlData.dump fi diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh index d304a43f51,96590ceccb..3cbee8db5f --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh @@@ -5,7 -5,6 +5,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -54,7 -53,7 +54,7 @@@ ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk} APPC_HOME=${APPC_HOME:-/opt/onap/appc} SLEEP_TIME=${SLEEP_TIME:-120} - MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} + MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.mariadbRootPassword}}} ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} ENABLE_AAF=${ENABLE_AAF:-false} AAF_EXT_IP=${AAF_EXT_IP:-{{.Values.config.aafExtIP}}} @@@ -83,13 -82,13 +83,13 @@@ echo "" >> $APPC_HOME/data/properties/a # # Wait for database to init properly # - echo "Waiting for mysql" - until mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p{{.Values.config.dbRootPassword}} mysql &> /dev/null + echo "Waiting for mariadbgalera" + until mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql &> /dev/null do printf "." sleep 1 done - echo -e "\nmysql ready" + echo -e "\nmariadbgalera ready" if [ ! -f ${SDNC_HOME}/.installed ] then diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties index c7feef2b28,9368514e13..026c399287 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -42,11 -41,11 +42,11 @@@ appc.topology.dg.method=topology-operat appc.topology.dg.version=2.0.0 # TEMP - Properties that might be needed to make the AAI-APPC connection - org.onap.appc.db.url.appcctl=jdbc:mysql://{{.Values.mysql.service.name}}:3306/appcctl + org.onap.appc.db.url.appcctl=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}:3306/appcctl org.onap.appc.db.user.appcctl=appcctl org.onap.appc.db.pass.appcctl=appcctl - org.onap.appc.db.url.sdnctl=jdbc:mysql://{{.Values.mysql.service.name}}:3306/sdnctl + org.onap.appc.db.url.sdnctl=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}:3306/sdnctl org.onap.appc.db.user.sdnctl=sdnctl org.onap.appc.db.pass.sdnctl=gamma diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties index 6089ae4a95,f5ae88489d..a5660522af --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -22,8 -21,8 +22,8 @@@ # dblib.properrties org.onap.ccsdk.sli.dbtype=jdbc - org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 - org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.hosts=dbhost + org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties index dd6265ca11,88bc41981c..5b22ccbba6 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -21,7 -20,7 +21,7 @@@ org.onap.ccsdk.sli.dbtype = dblib #Note : the next 4 fields are only used if org.onap.ccsdk.sli.dbtype = jdbc - org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl org.onap.ccsdk.sli.jdbc.password=gamma diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh index e7b1333631,64ec40d2f3..92e8a36f3d --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -23,7 -22,7 +23,7 @@@ MYSQL_USER=${MYSQL_USER:-sdnctl} MYSQL_PWD=${MYSQL_PWD:-gamma} MYSQL_DB=${MYSQL_DB:-sdnctl} - MYSQL_HOST=${MYSQL_HOST:-{{.Values.mysql.service.name}}.{{.Release.Namespace}}} + MYSQL_HOST=${MYSQL_HOST:-{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}} mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<-END SELECT module, rpc, version, mode from SVC_LOGIC where active='Y'; diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties index adb38d97bd,1319f979a0..247e1ac7c6 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties @@@ -3,7 -3,6 +3,7 @@@ # APPC # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -21,7 -20,7 +21,7 @@@ ### org.onap.ccsdk.sli.dbtype = jdbc - org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.database = sdnctl org.onap.ccsdk.sli.jdbc.user = sdnctl org.onap.ccsdk.sli.jdbc.password = gamma diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/installSdncDb.sh index 8de2af283e,728a67fec7..da16d394af --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/installSdncDb.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/installSdncDb.sh @@@ -6,7 -6,6 +6,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -23,7 -22,7 +23,7 @@@ ### SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk} - MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} + MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.mariadbRootPassword}}} SDNC_DB_USER=${SDNC_DB_USER:-sdnctl} SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma} @@@ -31,7 -30,7 +31,7 @@@ SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdn # Create tablespace and user account - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} mysql <<-END + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} mysql <<-END CREATE DATABASE ${SDNC_DB_DATABASE}; CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWD}'; CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWD}'; @@@ -42,6 -41,6 +42,6 @@@ EN if [ -f ${SDNC_HOME}/data/odlsli.dump ] then - mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/odlsli.dump + mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/odlsli.dump fi diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/startODL.sh index 84ad577c32,5ea17d2344..231fd0a24e --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/startODL.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/bin/startODL.sh @@@ -6,7 -6,6 +6,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -29,18 -28,18 +29,18 @@@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/ ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} SLEEP_TIME=${SLEEP_TIME:-120} - MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} + MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.mariadbRootPassword}}} # # Wait for database # - echo "Waiting for mysql" - until mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p{{.Values.config.dbRootPassword}} mysql &> /dev/null + echo "Waiting for mariadbgalera" + until mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql &> /dev/null do printf "." sleep 1 done - echo -e "\nmysql ready" + echo -e "\nmariadbgalera ready" if [ ! -f ${SDNC_HOME}/.installed ] then diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/dblib.properties index 2833f82677,c680c2dea9..6142032642 --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/dblib.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/dblib.properties @@@ -4,7 -4,6 +4,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -23,8 -22,8 +23,8 @@@ # dblib.properrties org.onap.ccsdk.sli.dbtype=jdbc - org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 - org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.hosts=dbhost + org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/svclogic.properties index e4ac685ed4,60b5233592..ed35d5b4d0 --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/svclogic.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/data/properties/svclogic.properties @@@ -4,7 -4,6 +4,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -22,7 -21,7 +22,7 @@@ org.onap.ccsdk.sli.dbtype = dblib #Note : the next 4 fields are only used if org.onap.ccsdk.sli.dbtype = jdbc - org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl org.onap.ccsdk.sli.jdbc.password=gamma diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh index f14c5846a2,e5d06ff9ba..698bbb19ed --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh @@@ -4,7 -4,6 +4,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -23,7 -22,7 +23,7 @@@ MYSQL_USER=${MYSQL_USER:-sdnctl} MYSQL_PWD=${MYSQL_PWD:-gamma} MYSQL_DB=${MYSQL_DB:-sdnctl} - MYSQL_HOST=${MYSQL_HOST:-{{.Values.mysql.service.name}}.{{.Release.Namespace}}} + MYSQL_HOST=${MYSQL_HOST:-{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}} mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<-END SELECT module, rpc, version, mode from SVC_LOGIC where active='Y'; diff --combined kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/config/svclogic.properties index fae5b55ad8,73eafee0de..914a4a1813 --- a/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/config/svclogic.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/config/svclogic.properties @@@ -4,7 -4,6 +4,7 @@@ # ================================================================================ # Copyright (C) 2017 AT&T Intellectual Property. All rights # reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -21,7 -20,7 +21,7 @@@ ### org.onap.ccsdk.sli.dbtype = jdbc - org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl + org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}}:3306/sdnctl org.onap.ccsdk.sli.jdbc.database = sdnctl org.onap.ccsdk.sli.jdbc.user = sdnctl org.onap.ccsdk.sli.jdbc.password = gamma diff --combined kubernetes/appc/templates/secrets.yaml index d2dbdef7dc,03b2625b4e..57311a0077 --- a/kubernetes/appc/templates/secrets.yaml +++ b/kubernetes/appc/templates/secrets.yaml @@@ -1,17 -1,3 +1,17 @@@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved. +# +# 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. + apiVersion: v1 kind: Secret metadata: @@@ -24,4 -10,4 +24,4 @@@ heritage: {{ .Release.Service }} type: Opaque data: - db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }} + db-root-password: {{ .Values.config.mariadbRootPassword | b64enc | quote }} diff --combined kubernetes/appc/templates/statefulset.yaml index 6dde017e2e,d7d4dc1797..32ff95241b --- a/kubernetes/appc/templates/statefulset.yaml +++ b/kubernetes/appc/templates/statefulset.yaml @@@ -1,17 -1,3 +1,17 @@@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved. +# +# 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. + apiVersion: apps/v1beta1 kind: StatefulSet metadata: @@@ -39,7 -25,7 +39,7 @@@ spec - /root/ready.py args: - --container-name - - {{ .Values.mysql.nameOverride }} + - {{.Values.config.mariadbGaleraContName}} env: - name: NAMESPACE valueFrom: diff --combined kubernetes/appc/values.yaml index a972533117,cdb458d66b..5accce3482 --- a/kubernetes/appc/values.yaml +++ b/kubernetes/appc/values.yaml @@@ -1,5 -1,4 +1,5 @@@ -# Copyright © 2018 Amdocs, Bell Canada, AT&T +# Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 AT&T # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@@ -42,7 -41,12 +42,12 @@@ config aafExtFQDN: aaf-onap-beijing-test.osaaf.org ansibleServiceName: appc-ansible-server ansiblePort: 8000 - dbRootPassword: openECOMP1.0 + mariadbRootPassword: secretpassword + userName: my-user + userPassword: my-password + mysqlDatabase: my-database + mariadbGaleraSVCName: appc-dbhost + mariadbGaleraContName: appc-db enableAAF: false enableClustering: true configDir: /opt/onap/appc/data/properties @@@ -64,7 -68,7 +69,7 @@@ appc-ansible-server config: mysqlServiceName: appc-dbhost - mysql: + mariadb-galera: nameOverride: appc-db service: name: appc-dbhost diff --combined kubernetes/common/mariadb-galera/templates/statefulset.yaml index 5f96ee658e,cddec26abe..20a03499bb --- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml +++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml @@@ -1,17 -1,3 +1,17 @@@ +# Copyright © 2018 Amdocs, Bell Canada +# +# 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. + apiVersion: apps/v1beta1 kind: StatefulSet metadata: @@@ -23,7 -9,7 +23,7 @@@ release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: - serviceName: {{ include "common.fullname" . }} + serviceName: {{ .Values.service.name }} replicas: {{ .Values.replicaCount }} template: metadata: @@@ -48,7 -34,7 +48,7 @@@ imagePullSecrets: - name: {{ include "common.namespace" . }}-docker-registry-key containers: - - name: {{ include "common.fullname" . }} + - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}} env: @@@ -107,7 -93,6 +107,6 @@@ {{- if .Values.persistence.enabled }} - mountPath: /var/lib/mysql name: {{ include "common.fullname" . }}-data - subPath: data initContainers: - name: mariadb-galera-prepare image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}" @@@ -118,15 -103,12 +117,12 @@@ volumeClaimTemplates: - metadata: name: {{ include "common.fullname" . }}-data - annotations: - {{- if .Values.persistence.storageClass }} - volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} - {{- else }} - volume.alpha.kubernetes.io/storage-class: default - {{- end }} + labels: + name: {{ include "common.fullname" . }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} + storageClassName: {{ include "common.fullname" . }}-data resources: requests: storage: {{ .Values.persistence.size | quote }} diff --combined kubernetes/common/mariadb-galera/values.yaml index b2ff4c0d4a,4b9837da59..aea2c45d4a --- a/kubernetes/common/mariadb-galera/values.yaml +++ b/kubernetes/common/mariadb-galera/values.yaml @@@ -1,17 -1,3 +1,17 @@@ +# Copyright © 2018 Amdocs, Bell Canada +# +# 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. + ################################################################# # Global configuration defaults. ################################################################# @@@ -60,7 -46,7 +60,7 @@@ readiness ## Persist data to a persitent volume persistence: - enabled: false + enabled: true ## A manually managed Persistent Volume and Claim ## Requires persistence.enabled: true @@@ -76,9 -62,11 +76,11 @@@ ## GKE, AWS & OpenStack) ## # storageClass: "-" - accessMode: ReadWriteOnce + accessMode: ReadWriteMany size: 2Gi - + mountPath: /dockerdata-nfs + mountSubPath: "mariadb-galera/data" + mysqlPath: /var/lib/mysql service: internalPort: 3306