summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-02-28 08:33:33 -0500
committerAlexis de Talhouët <alexis.de_talhouet@bell.ca>2018-03-24 12:08:18 +0000
commit13fed1118cedf88ea65a92d27f550d02fe23c41a (patch)
tree55d8790ce0fcee512d34df8e5ccc2a639d85abc9 /kubernetes/appc
parent7aa968bb23b924f714a6bfe3436a3ec438bff69a (diff)
Add standardized helm chart for appc
This is a standardization (based on helm community best practices) of a Helm chart for the Application Controller (appc) in ONAP. How to deploy the helm chart (outside of the parent onap chart) from the local oom/kubernetes codebase. Run local helm repository in the background: $ nohup helm serve & In kubernetes directory run: $ make all 2 ways to install (--set are for testing purposes) Full onap: $ helm install onap --name onap --namespace onap --set global.pullPolicy=Never,mysql.replicaCount=2,appc.replicaCount=2 Appc only: $ helm install setup --name onap-setup --namespace onap-apps $ helm install appc --name appc --namespace onap-apps Change-Id: Ib780f979ad25ecafb08110504b5941e980ca8a95 Issue-ID: OOM-733 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com> Signed-off-by: ah415j <ah415j@att.com>
Diffstat (limited to 'kubernetes/appc')
-rw-r--r--kubernetes/appc/.helmignore21
-rw-r--r--kubernetes/appc/Chart.yaml4
-rw-r--r--kubernetes/appc/requirements.yaml10
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/installAppcDb.sh)10
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/startODL.sh)37
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/aaiclient.properties (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/aaiclient.properties)6
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/appc.properties)22
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/dblib.properties)2
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/svclogic.properties)2
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh)2
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties (renamed from kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties)2
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh6
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh4
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties6
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties2
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties2
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh2
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties2
-rw-r--r--kubernetes/appc/resources/config/dgbuilder/svclogic.properties5
-rw-r--r--kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml2
-rwxr-xr-xkubernetes/appc/resources/scripts/dgbuilder/createReleaseDir.sh129
-rw-r--r--kubernetes/appc/resources/scripts/dgbuilder/customSettings.js38
-rw-r--r--kubernetes/appc/templates/NOTES.txt19
-rw-r--r--kubernetes/appc/templates/all-services.yaml99
-rw-r--r--kubernetes/appc/templates/appc-configmap.yaml87
-rw-r--r--kubernetes/appc/templates/appc-deployment.yaml181
-rw-r--r--kubernetes/appc/templates/appc-dgbuilder-configmap.yaml31
-rw-r--r--kubernetes/appc/templates/appc-log-configmap.yaml31
-rw-r--r--kubernetes/appc/templates/appc-pv-pvc.yaml46
-rw-r--r--kubernetes/appc/templates/configmap.yaml79
-rw-r--r--kubernetes/appc/templates/db-deployment.yaml63
-rw-r--r--kubernetes/appc/templates/dgbuilder-deployment.yaml99
-rw-r--r--kubernetes/appc/templates/secrets.yaml13
-rw-r--r--kubernetes/appc/templates/service.yaml62
-rw-r--r--kubernetes/appc/templates/statefulset.yaml186
-rw-r--r--kubernetes/appc/values.yaml112
36 files changed, 561 insertions, 863 deletions
diff --git a/kubernetes/appc/.helmignore b/kubernetes/appc/.helmignore
new file mode 100644
index 0000000000..f0c1319444
--- /dev/null
+++ b/kubernetes/appc/.helmignore
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/appc/Chart.yaml b/kubernetes/appc/Chart.yaml
index f0af9b318a..ca35cd16c4 100644
--- a/kubernetes/appc/Chart.yaml
+++ b/kubernetes/appc/Chart.yaml
@@ -13,6 +13,6 @@
# limitations under the License.
apiVersion: v1
-description: A Helm chart for Kubernetes
+description: Application Controller
name: appc
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/appc/requirements.yaml b/kubernetes/appc/requirements.yaml
new file mode 100644
index 0000000000..1ca4de1815
--- /dev/null
+++ b/kubernetes/appc/requirements.yaml
@@ -0,0 +1,10 @@
+dependencies:
+ - name: common
+ version: ~2.0.0
+ repository: '@local'
+ - name: mysql
+ version: ~2.0.0
+ repository: '@local'
+ - name: dgbuilder
+ version: ~2.0.0
+ repository: '@local' \ No newline at end of file
diff --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/installAppcDb.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh
index 526d6f94ae..f260f3d84a 100755
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/installAppcDb.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh
@@ -20,7 +20,7 @@
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
APPC_HOME=${APPC_HOME:-/opt/openecomp/appc}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
APPC_DB_USER=${APPC_DB_USER:-appcctl}
APPC_DB_PASSWD=${APPC_DB_PASSWD:-appcctl}
@@ -28,7 +28,7 @@ APPC_DB_DATABASE=${SDN_DB_DATABASE:-appcctl}
# Create tablespace and user account
-mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} mysql <<-END
+mysql -h {{.Values.mysql.service.name}}.{{.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}';
@@ -39,16 +39,16 @@ END
if [ -f ${APPC_HOME}/data/appcctl.dump ]
then
- mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} appcctl < ${APPC_HOME}/data/appcctl.dump
+ mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} appcctl < ${APPC_HOME}/data/appcctl.dump
fi
if [ -f ${APPC_HOME}/data/sdnctl.dump ]
then
- mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sdnctl.dump
+ mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sdnctl.dump
fi
if [ -f ${APPC_HOME}/data/sqlData.dump ]
then
- mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sqlData.dump
+ mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${APPC_HOME}/data/sqlData.dump
fi
diff --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
index ba4ff52147..0b9e63127b 100755
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/startODL.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
###
# ============LICENSE_START=======================================================
@@ -26,12 +26,39 @@
# if not already installed, and starts the APPC Docker Container
#
+function enable_odl_cluster(){
+ if [ -z $APPC_REPLICAS ]; then
+ echo "APPC_REPLICAS is not configured in Env field"
+ exit
+ fi
+
+ echo "Installing Opendaylight cluster features"
+ ${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-clustering
+ ${ODL_HOME}/bin/client -u karaf feature:install odl-jolokia
+
+ echo "Update cluster information statically"
+ hm=$(hostname)
+ echo "Get current Hostname ${hm}"
+
+ node=($(echo ${hm} | sed 's/-[0-9]*$//g'))
+ node_index=($(echo ${hm} | awk -F"-" '{print $NF}'))
+ node_list="${node}-0.{{ .Values.service.name }}-cluster.{{.Release.Namespace}}";
+
+ for ((i=1;i<${APPC_REPLICAS};i++));
+ do
+ node_list="${node_list} ${node}-$i.{{ .Values.service.name }}-cluster.{{.Release.Namespace}}"
+ done
+
+ /opt/opendaylight/current/bin/configure_cluster.sh $((node_index+1)) ${node_list}
+}
+
ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
-APPC_HOME=${APPC_HOME:-/opt/openecomp/appc}
+APPC_HOME=${APPC_HOME:-/opt/onap/appc}
SLEEP_TIME=${SLEEP_TIME:-120}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
+ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
#
# Adding the DMAAP_TOPIC_ENV variable into APPC-ASDC-LISTENER properties
@@ -55,7 +82,7 @@ echo "" >> $APPC_HOME/data/properties/appc.properties
# Wait for database to init properly
#
echo "Waiting for mysql"
-until mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} mysql &> /dev/null
+until mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p{{.Values.config.dbRootPassword}} mysql &> /dev/null
do
printf "."
sleep 1
@@ -97,6 +124,8 @@ then
${APPC_HOME}/svclogic/bin/install-converted-dgs.sh
fi
+ if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
+
echo "Restarting OpenDaylight"
${ODL_HOME}/bin/stop
echo "Installed at `date`" > ${SDNC_HOME}/.installed
diff --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/aaiclient.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/aaiclient.properties
index 9e29744bb3..b2f7102d8c 100644
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/aaiclient.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/aaiclient.properties
@@ -39,7 +39,7 @@ org.onap.ccsdk.sli.adaptors.aai.application=openECOMP
#
# Configuration file for A&AI Client
#
-org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.{{.Values.nsPrefix}}:8443
+org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.{{.Release.Namespace}}:8443
# query
@@ -133,8 +133,8 @@ org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v11/service-design-and
# UBB Notify
org.onap.ccsdk.sli.adaptors.aai.path.notify=/aai/v11/actions/notify
-org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.{{.Values.nsPrefix}}:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
-org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.{{.Values.nsPrefix}}:8443/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.{{.Release.Namespace}}:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.{{.Release.Namespace}}:8443/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
# Service
org.onap.ccsdk.sli.adaptors.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id}
diff --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/appc.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
index de577c43cb..f4ee6fcfc7 100644
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/appc.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
@@ -22,7 +22,7 @@
### ###
### Properties for demo ###
### ###
-appc.demo.poolMembers=dmaap.{{.Values.nsPrefix}}:3904
+appc.demo.poolMembers=dmaap.{{.Release.Namespace}}:3904
appc.demo.topic.read=APPC-CL
appc.demo.topic.write=APPC-CL
appc.demo.client.name=appcDemoEventListener
@@ -33,7 +33,7 @@ appc.demo.threads.poolsize.max=2
appc.demo.provider.user=admin
appc.demo.provider.pass=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
appc.demo.provider.url=http://localhost:8181/restconf/operations/appc-provider
-appc.provider.vfodl.url=http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@appc-sdnhost.{{.Values.nsPrefix}}:8282/restconf/config/network-topology:network-topology/topology/topology-netconf/node/NODE_NAME/yang-ext:mount/sample-plugin:sample-plugin/pg-streams/
+appc.provider.vfodl.url=http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@appc-sdnhost.{{.Release.Namespace}}:8282/restconf/config/network-topology:network-topology/topology/topology-netconf/node/NODE_NAME/yang-ext:mount/sample-plugin:sample-plugin/pg-streams/
# The properties right below are needed to properly call the Master DG to serve demo purposes
appc.service.logic.module.name=APPC
@@ -41,11 +41,11 @@ appc.topology.dg.method=topology-operation-all
appc.topology.dg.version=2.0.0
# TEMP - Properties that might be needed to make the AAI-APPC connection
-org.openecomp.appc.db.url.appcctl=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}:3306/appcctl
+org.openecomp.appc.db.url.appcctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/appcctl
org.openecomp.appc.db.user.appcctl=appcctl
org.openecomp.appc.db.pass.appcctl=appcctl
-org.openecomp.appc.db.url.sdnctl=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
+org.openecomp.appc.db.url.sdnctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl
org.openecomp.appc.db.user.sdnctl=sdnctl
org.openecomp.appc.db.pass.sdnctl=gamma
@@ -74,11 +74,11 @@ provider1.tenant1.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
# Property below is valid in appc-command-executor-core, appc-license-manager-core, appc-lifecycle-management-core,
# appc-request-handler-core, appc-workflow-management-core (all from the appc-dispatcher package).
-dmaap.poolMembers=dmaap.{{.Values.nsPrefix}}:3904
+dmaap.poolMembers=dmaap.{{.Release.Namespace}}:3904
# appc-event-listener-bundle properties (only defined in src/test of default.properties)
-appc.LCM.poolMembers=dmaap.{{.Values.nsPrefix}}:3904
+appc.LCM.poolMembers=dmaap.{{.Release.Namespace}}:3904
appc.LCM.topic.read=APPC-LCM-READ
appc.LCM.topic.write=APPC-LCM-WRITE
appc.LCM.client.name=APPC-EVENT-LISTENER-TEST
@@ -87,8 +87,8 @@ appc.LCM.provider.pass=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
appc.LCM.provider.url=http://localhost:8181/restconf/operations/appc-provider-lcm
# properties from appc-netconf-adapter-bundle, appc-dg-common, appc-dmaap-adapter-bundle
-poolMembers=dmaap.{{.Values.nsPrefix}}:3904
-event.pool.members=dmaap.{{.Values.nsPrefix}}:3904
+poolMembers=dmaap.{{.Release.Namespace}}:3904
+event.pool.members=dmaap.{{.Release.Namespace}}:3904
restconf.user=admin
restconf.pass=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
@@ -106,7 +106,7 @@ test.url=http://api.appc.local/vm/9999999/test/99999999-9999-9999-9999-999999999
org.openecomp.appc.iaas.skiphypervisorcheck=true
# Properties from default.properties in the src/test and src/main paths of appc-asdc-listener-bundle
-appc.sdc.host=sdc-be.{{.Values.nsPrefix}}:8443
+appc.sdc.host=sdc-be.{{.Release.Namespace}}:8443
appc.sdc.env=APPC-ASDC-ENV
appc.sdc.user=test
appc.sdc.pass=test
@@ -118,12 +118,12 @@ appc.sdc.provider.url=http://localhost:8181/restconf/operations/AsdcMessage:conf
DCAE.dmaap.event.topic.write=EventSenderTest
DCAE.dmaap.appc.username=test
DCAE.dmaap.appc.password=test
-DCAE.dmaap.event.pool.members=dmaap.{{.Values.nsPrefix}}:3904
+DCAE.dmaap.event.pool.members=dmaap.{{.Release.Namespace}}:3904
#OAM Listener
appc.OAM.disabled=true
appc.OAM.provider.url=http://localhost:8181/restconf/operations/appc-oam
-appc.OAM.poolMembers=dmaap.{{.Values.nsPrefix}}:3904
+appc.OAM.poolMembers=dmaap.{{.Release.Namespace}}:3904
appc.OAM.service=ueb
appc.OAM.topic.read=testOAM
appc.OAM.topic.write=testOAM
diff --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/dblib.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties
index 888ee9f0d9..17b7ffdfb0 100644
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/dblib.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties
@@ -22,7 +22,7 @@
org.onap.ccsdk.sli.dbtype=jdbc
org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/svclogic.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties
index ea38616810..fd62b08b5f 100644
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/svclogic.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties
@@ -20,7 +20,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://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh
index 5409d9e552..03ad425242 100755
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh
@@ -22,7 +22,7 @@
MYSQL_USER=${MYSQL_USER:-sdnctl}
MYSQL_PWD=${MYSQL_PWD:-gamma}
MYSQL_DB=${MYSQL_DB:-sdnctl}
-MYSQL_HOST=${MYSQL_HOST:-appc-dbhost.{{.Values.nsPrefix}}}
+MYSQL_HOST=${MYSQL_HOST:-{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties
index 2f67a5822f..bd581e0241 100644
--- a/kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties
@@ -20,7 +20,7 @@
###
org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh
index 75680bd942..25560fbef4 100755
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh
@@ -22,7 +22,7 @@
###
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma}
@@ -30,7 +30,7 @@ SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl}
# Create tablespace and user account
-mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} mysql <<-END
+mysql -h {{.Values.mysql.service.name}}.{{.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}';
@@ -41,6 +41,6 @@ END
if [ -f ${SDNC_HOME}/data/odlsli.dump ]
then
-mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/odlsli.dump
+mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/odlsli.dump
fi
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh
index 87c95ee3b3..a84893c00f 100755
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh
@@ -28,13 +28,13 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
SLEEP_TIME=${SLEEP_TIME:-120}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
#
# Wait for database
#
echo "Waiting for mysql"
-until mysql -h appc-dbhost.{{.Values.nsPrefix}} -u root -p${MYSQL_PASSWD} mysql &> /dev/null
+until mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p{{.Values.config.dbRootPassword}} mysql &> /dev/null
do
printf "."
sleep 1
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties
index 9e29744bb3..b2f7102d8c 100644
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties
@@ -39,7 +39,7 @@ org.onap.ccsdk.sli.adaptors.aai.application=openECOMP
#
# Configuration file for A&AI Client
#
-org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.{{.Values.nsPrefix}}:8443
+org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.{{.Release.Namespace}}:8443
# query
@@ -133,8 +133,8 @@ org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v11/service-design-and
# UBB Notify
org.onap.ccsdk.sli.adaptors.aai.path.notify=/aai/v11/actions/notify
-org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.{{.Values.nsPrefix}}:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
-org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.{{.Values.nsPrefix}}:8443/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.{{.Release.Namespace}}:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.{{.Release.Namespace}}:8443/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
# Service
org.onap.ccsdk.sli.adaptors.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id}
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties
index 6107a80416..f603977013 100644
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties
@@ -23,7 +23,7 @@
org.onap.ccsdk.sli.dbtype=jdbc
org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties
index 2954bb00a5..908d60a089 100644
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties
@@ -21,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://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
index ceeea5914f..a568dfdc20 100755
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
@@ -22,7 +22,7 @@
MYSQL_USER=${MYSQL_USER:-sdnctl}
MYSQL_PWD=${MYSQL_PWD:-gamma}
MYSQL_DB=${MYSQL_DB:-sdnctl}
-MYSQL_HOST=${MYSQL_HOST:-appc-dbhost.{{.Values.nsPrefix}}}
+MYSQL_HOST=${MYSQL_HOST:-{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties
index bcf321c947..44ae32f9cc 100644
--- a/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties
@@ -20,7 +20,7 @@
###
org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.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 --git a/kubernetes/appc/resources/config/dgbuilder/svclogic.properties b/kubernetes/appc/resources/config/dgbuilder/svclogic.properties
deleted file mode 100644
index 8b0723b72b..0000000000
--- a/kubernetes/appc/resources/config/dgbuilder/svclogic.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-org.onap.ccsdk.sli.dbtype=jdbc
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}:3306/sdnctl
-org.onap.ccsdk.sli.jdbc.database=sdnctl
-org.onap.ccsdk.sli.jdbc.user=sdnctl
-org.onap.ccsdk.sli.jdbc.password=gamma
diff --git a/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml b/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
index 2cd63e1d98..52161aafad 100644
--- a/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
+++ b/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
@@ -29,7 +29,7 @@ output.logstash:
#List of logstash server ip addresses with port number.
#But, in our case, this will be the loadbalancer IP address.
#For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
- hosts: ["logstash.{{.Values.nsPrefix}}:5044"]
+ hosts: ["logstash.{{.Release.Namespace}}:5044"]
#If enable will do load balancing among availabe Logstash, automatically.
loadbalance: true
diff --git a/kubernetes/appc/resources/scripts/dgbuilder/createReleaseDir.sh b/kubernetes/appc/resources/scripts/dgbuilder/createReleaseDir.sh
deleted file mode 100755
index d63687a644..0000000000
--- a/kubernetes/appc/resources/scripts/dgbuilder/createReleaseDir.sh
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-export PATH=$PATH:.
-appDir=$(pwd)
-if [ "$#" != 3 -a "$#" != 4 ]
-then
- echo "Usage $0 releaseDir loginId emailAddress [gitLocalRepository]"
- echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository"
- exit
-fi
-if [ ! -e "releases" ]
-then
- mkdir releases
-fi
-releaseDir="$1"
-name="Release $releaseDir"
-loginId="$2"
-emailid="$3"
-dbHost="appc-dbhost.{{.Values.nsPrefix}}"
-dbPort="3306"
-dbName="sdnctl"
-dbUser="sdnctl"
-dbPassword="gamma"
-gitLocalRepository="$4"
-
-lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f2|sed -e s/,//|sort|tail -1)
-echo $lastPort|grep uiPort >/dev/null 2>&1
-if [ "$?" == "0" ]
-then
-lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f3|sed -e s/,//|sort|tail -1)
-fi
-#echo $lastPort
-if [ "${lastPort}" == "" ]
-then
- lastPort="3099"
-fi
-let nextPort=$(expr $lastPort+1)
-#echo $nextPort
-if [ ! -e "releases/$releaseDir" ]
-then
-mkdir releases/$releaseDir
-cd releases/$releaseDir
-mkdir flows
-mkdir flows/shared
-mkdir flows/shared/backups
-mkdir html
-mkdir xml
-mkdir lib
-mkdir lib/flows
-mkdir logs
-mkdir conf
-mkdir codecloud
-customSettingsFile="customSettings.js"
-if [ ! -e "./$customSettingsFile" ]
-then
- echo "module.exports = {" >$customSettingsFile
- echo " 'name' : '$name'," >>$customSettingsFile
- echo " 'emailAddress' :'$emailid'," >>$customSettingsFile
- echo " 'uiPort' :$nextPort," >>$customSettingsFile
- echo " 'mqttReconnectTime': 15000," >>$customSettingsFile
- echo " 'serialReconnectTime' : 15000," >>$customSettingsFile
- echo " 'debugMaxLength': 1000," >>$customSettingsFile
- echo " 'htmlPath': 'releases/$releaseDir/html/'," >>$customSettingsFile
- echo " 'xmlPath': 'releases/$releaseDir/xml/'," >>$customSettingsFile
- echo " 'flowFile' : 'releases/$releaseDir/flows/flows.json'," >>$customSettingsFile
- echo " 'sharedDir': 'releases/$releaseDir/flows/shared'," >>$customSettingsFile
- echo " 'userDir' : 'releases/$releaseDir'," >>$customSettingsFile
- echo " 'httpAuth': {user:'$loginId',pass:'cc03e747a6afbbcbf8be7668acfebee5'}," >>$customSettingsFile
- echo " 'dbHost': '$dbHost'," >>$customSettingsFile
- echo " 'dbPort': '$dbPort'," >>$customSettingsFile
- echo " 'dbName': '$dbName'," >>$customSettingsFile
- echo " 'dbUser': '$dbUser'," >>$customSettingsFile
- echo " 'dbPassword': '$dbPassword'," >>$customSettingsFile
- echo " 'gitLocalRepository': '$gitLocalRepository'" >>$customSettingsFile
- echo " }" >>$customSettingsFile
-fi
- #echo "Created custom settings file $customSettingsFile"
- echo "Done ....."
-else
- echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"
- exit
-fi
-#echo "Content of custom settings file"
-#echo "============================================================================"
-# cat $customSettingsFile
-#echo "============================================================================"
-svclogicPropFile="./conf/svclogic.properties"
-if [ ! -d "${appDir}/yangFiles" ]
-then
- mkdir -p "${appDir}/yangFiles"
-fi
-if [ ! -d "${appDir}/generatedJS" ]
-then
- mkdir -p "${appDir}/generatedJS"
-fi
-
-if [ ! -e "./$svclogicPropFile" ]
-then
- echo "org.onap.ccsdk.sli.dbtype=jdbc" >$svclogicPropFile
- echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://appc-dbhost.{{.Values.nsPrefix}}: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
-fi
-if [ ! -e "${appDir}/flowShareUsers.js" ]
-then
- echo "module.exports = {\"flowShareUsers\":" >${appDir}/flowShareUsers.js
- echo " [" >>${appDir}/flowShareUsers.js
- echo " ]" >>${appDir}/flowShareUsers.js
- echo "}" >>${appDir}/flowShareUsers.js
-fi
-grep "$releaseDir" ${appDir}/flowShareUsers.js >/dev/null 2>&1
-if [ "$?" != "0" ]
-then
- num_of_lines=$(cat ${appDir}/flowShareUsers.js|wc -l)
- if [ $num_of_lines -gt 4 ]
- then
- content=$(head -n -2 ${appDir}/flowShareUsers.js)
- echo "${content}," > ${appDir}/flowShareUsers.js
- else
- content=$(head -n -2 ${appDir}/flowShareUsers.js)
- echo "$content" > ${appDir}/flowShareUsers.js
- fi
- echo " {" >> ${appDir}/flowShareUsers.js
- echo " \"name\" : \"$name\"," >> ${appDir}/flowShareUsers.js
- echo " \"rootDir\" : \"$releaseDir\"" >> ${appDir}/flowShareUsers.js
- echo " }" >> ${appDir}/flowShareUsers.js
- echo " ]" >> ${appDir}/flowShareUsers.js
- echo "}" >> ${appDir}/flowShareUsers.js
-fi
diff --git a/kubernetes/appc/resources/scripts/dgbuilder/customSettings.js b/kubernetes/appc/resources/scripts/dgbuilder/customSettings.js
deleted file mode 100644
index 40a624d44d..0000000000
--- a/kubernetes/appc/resources/scripts/dgbuilder/customSettings.js
+++ /dev/null
@@ -1,38 +0,0 @@
-module.exports={
- "name": "Release sdnc1.0",
- "emailAddress": "dguser@onap.org",
- "uiPort": 3100,
- "mqttReconnectTime": 15000,
- "serialReconnectTime": 15000,
- "debugMaxLength": 1000,
- "htmlPath": "releases/sdnc1.0/html/",
- "xmlPath": "releases/sdnc1.0/xml/",
- "flowFile": "releases/sdnc1.0/flows/flows.json",
- "sharedDir": "releases/sdnc1.0/flows/shared",
- "userDir": "releases/sdnc1.0",
- "httpAuth": {
- "user": "dguser",
- "pass": "cc03e747a6afbbcbf8be7668acfebee5"
- },
- "dbHost": "appc-dbhost.{{.Values.nsPrefix}}",
- "dbPort": "3306",
- "dbName": "sdnctl",
- "dbUser": "sdnctl",
- "dbPassword": "gamma",
- "gitLocalRepository": "",
- "httpRoot": "/",
- "disableEditor": false,
- "httpAdminRoot": "/",
- "httpAdminAuth": {
- "user": "dguser",
- "pass": "cc03e747a6afbbcbf8be7668acfebee5"
- },
- "httpNodeRoot": "/",
- "httpNodeAuth": {
- "user": "dguser",
- "pass": "cc03e747a6afbbcbf8be7668acfebee5"
- },
- "uiHost": "0.0.0.0",
- "version": "0.9.1",
- "performGitPull": "N"
-}
diff --git a/kubernetes/appc/templates/NOTES.txt b/kubernetes/appc/templates/NOTES.txt
new file mode 100644
index 0000000000..24371d08ab
--- /dev/null
+++ b/kubernetes/appc/templates/NOTES.txt
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+ http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ echo "Visit http://127.0.0.1:8080 to use your application"
+ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/appc/templates/all-services.yaml b/kubernetes/appc/templates/all-services.yaml
deleted file mode 100644
index 09c8110904..0000000000
--- a/kubernetes/appc/templates/all-services.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-dbhost
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - name: "appc-dbhost-port"
- port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnctldb01
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnctldb02
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAppcAppc }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnhost
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc
-spec:
- ports:
- - name: "appc-port-8282"
- port: 8282
- targetPort: 8181
- nodePort: {{ .Values.nodePortPrefix }}30
- - name: "appc-port-1830"
- port: 1830
- nodePort: {{ .Values.nodePortPrefix }}31
- type: NodePort
- selector:
- app: appc
-#{{ end }}
-#{{ if not .Values.disableAppcAppcDgbuilder }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dgbuilder
-spec:
- ports:
- - name: "appc-dgbuilder-port"
- port: 3000
- targetPort: 3100
- nodePort: {{ .Values.nodePortPrefix }}28
- type: NodePort
- selector:
- app: appc-dgbuilder
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-configmap.yaml b/kubernetes/appc/templates/appc-configmap.yaml
deleted file mode 100644
index c5500a4c4c..0000000000
--- a/kubernetes/appc/templates/appc-configmap.yaml
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-data-properties-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/data/properties/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-svclogic-config-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-svclogic-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/bin/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-data-properties-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/data/properties/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-svclogic-config-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-svclogic-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/bin/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-scripts-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/scripts/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-deployment.yaml b/kubernetes/appc/templates/appc-deployment.yaml
deleted file mode 100644
index c80bdd40ec..0000000000
--- a/kubernetes/appc/templates/appc-deployment.yaml
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.appcReplicas }}
- selector:
- matchLabels:
- app: appc
- template:
- metadata:
- labels:
- app: appc
- name: appc
- spec:
- initContainers:
- - command:
- - /root/ready.py
- args:
- - --container-name
- - appc-db-container
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ .Values.image.readiness }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-readiness
- containers:
- - command:
- - /opt/openecomp/appc/bin/startODL.sh
- env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: SDNC_CONFIG_DIR
- value: /opt/openecomp/appc/data/properties
- - name: APPC_CONFIG_DIR
- value: /opt/openecomp/appc/data/properties
- - name: DMAAP_TOPIC_ENV
- value: SUCCESS
- - name: MYSQL_HOST
- value: appc-dbhost
- image: {{ .Values.image.appc }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-controller-container
- volumeMounts:
- - mountPath: /etc/localtime
- name: localtime
- readOnly: true
- - mountPath: /opt/openecomp/appc/data/properties/dblib.properties
- name: appc-openecomp-appc-data-properties
- subPath: dblib.properties
- - mountPath: /opt/openecomp/appc/data/properties/svclogic.properties
- name: appc-openecomp-appc-data-properties
- subPath: svclogic.properties
- - mountPath: /opt/openecomp/appc/data/properties/appc.properties
- name: appc-openecomp-appc-data-properties
- subPath: appc.properties
- - mountPath: /opt/openecomp/appc/data/properties/aaiclient.properties
- name: appc-openecomp-appc-data-properties
- subPath: aaiclient.properties
- - mountPath: /opt/openecomp/appc/svclogic/config/svclogic.properties
- name: appc-openecomp-appc-svclogic-config
- subPath: svclogic.properties
- - mountPath: /opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh
- name: appc-openecomp-appc-svclogic-bin
- subPath: showActiveGraphs.sh
- - mountPath: /opt/openecomp/appc/bin/startODL.sh
- name: appc-openecomp-appc-bin
- subPath: startODL.sh
- - mountPath: /opt/openecomp/appc/bin/installAppcDb.sh
- name: appc-openecomp-appc-bin
- subPath: installAppcDb.sh
- - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
- name: appc-onap-sdnc-data-properties
- subPath: dblib.properties
- - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
- name: appc-onap-sdnc-data-properties
- subPath: svclogic.properties
- - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
- name: appc-onap-sdnc-data-properties
- subPath: aaiclient.properties
- - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
- name: appc-onap-sdnc-svclogic-config
- subPath: svclogic.properties
- - mountPath: /opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
- name: appc-onap-sdnc-svclogic-bin
- subPath: showActiveGraphs.sh
- - mountPath: /opt/onap/sdnc/bin/startODL.sh
- name: appc-onap-sdnc-bin
- subPath: startODL.sh
- - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
- name: appc-onap-sdnc-bin
- subPath: installSdncDb.sh
- - mountPath: /var/log/onap
- name: appc-logs
- - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
- name: appc-log-config
- subPath: org.ops4j.pax.logging.cfg
- ports:
- - containerPort: 8181
- - containerPort: 1830
- readinessProbe:
- tcpSocket:
- port: 8181
- initialDelaySeconds: 5
- periodSeconds: 10
- - image: {{ .Values.image.filebeat }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: filebeat-onap
- volumeMounts:
- - mountPath: /usr/share/filebeat/filebeat.yml
- name: filebeat-conf
- subPath: filebeat.yml
- - mountPath: /var/log/onap
- name: appc-logs
- - mountPath: /usr/share/filebeat/data
- name: appc-data-filebeat
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: filebeat-conf
- configMap:
- name: appc-filebeat-configmap
- - name: appc-log-config
- configMap:
- name: appc-logging-cfg-configmap
- - name: appc-logs
- emptyDir: {}
- - name: appc-data-filebeat
- emptyDir: {}
- - name: appc-openecomp-appc-data-properties
- configMap:
- name: appc-openecomp-appc-data-properties-configmap
- - name: appc-openecomp-appc-svclogic-config
- configMap:
- name: appc-openecomp-appc-svclogic-config-configmap
- - name: appc-openecomp-appc-svclogic-bin
- configMap:
- name: appc-openecomp-appc-svclogic-bin-configmap
- defaultMode: 0755
- - name: appc-openecomp-appc-bin
- configMap:
- name: appc-openecomp-appc-bin-configmap
- defaultMode: 0755
- - name: appc-onap-sdnc-data-properties
- configMap:
- name: appc-onap-sdnc-data-properties-configmap
- - name: appc-onap-sdnc-svclogic-config
- configMap:
- name: appc-onap-sdnc-svclogic-config-configmap
- - name: appc-onap-sdnc-svclogic-bin
- configMap:
- name: appc-onap-sdnc-svclogic-bin-configmap
- defaultMode: 0755
- - name: appc-onap-sdnc-bin
- configMap:
- name: appc-onap-sdnc-bin-configmap
- defaultMode: 0755
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml b/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml
deleted file mode 100644
index d3ccf8f956..0000000000
--- a/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-dgbuilder-conf-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/dgbuilder/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-dgbuilder-scripts-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/scripts/dgbuilder/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-log-configmap.yaml b/kubernetes/appc/templates/appc-log-configmap.yaml
deleted file mode 100644
index a8e1e24247..0000000000
--- a/kubernetes/appc/templates/appc-log-configmap.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-filebeat-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-logging-cfg-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-pv-pvc.yaml b/kubernetes/appc/templates/appc-pv-pvc.yaml
deleted file mode 100644
index 59bf7859e5..0000000000
--- a/kubernetes/appc/templates/appc-pv-pvc.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: "{{ .Values.nsPrefix }}-appc"
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- name: "{{ .Values.nsPrefix }}-appc"
-spec:
- capacity:
- storage: 2Gi
- accessModes:
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/appc/data
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
- name: appc-db
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: 2Gi
- selector:
- matchLabels:
- name: "{{ .Values.nsPrefix }}-appc"
-#{{ end }}
diff --git a/kubernetes/appc/templates/configmap.yaml b/kubernetes/appc/templates/configmap.yaml
new file mode 100644
index 0000000000..0574cfcf22
--- /dev/null
+++ b/kubernetes/appc/templates/configmap.yaml
@@ -0,0 +1,79 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-data-properties
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/data/properties/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-data-properties
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/data/properties/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/svclogic/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-config
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/svclogic/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-filebeat
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-logging-cfg
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/appc/templates/db-deployment.yaml b/kubernetes/appc/templates/db-deployment.yaml
deleted file mode 100644
index 0843d60072..0000000000
--- a/kubernetes/appc/templates/db-deployment.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc-dbhost
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.dbReplicas }}
- selector:
- matchLabels:
- app: appc-dbhost
- template:
- metadata:
- labels:
- app: appc-dbhost
- spec:
- containers:
- - env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: MYSQL_ROOT_HOST
- value: '%'
- image: {{ .Values.image.mysqlServer }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-db-container
- volumeMounts:
- - mountPath: /etc/localtime
- name: localtime
- readOnly: true
- - mountPath: /var/lib/mysql
- name: appc-data
- ports:
- - containerPort: 3306
- readinessProbe:
- tcpSocket:
- port: 3306
- initialDelaySeconds: 5
- periodSeconds: 10
- restartPolicy: Always
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: appc-data
- persistentVolumeClaim:
- claimName: appc-db
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/dgbuilder-deployment.yaml b/kubernetes/appc/templates/dgbuilder-deployment.yaml
deleted file mode 100644
index dc35dfb950..0000000000
--- a/kubernetes/appc/templates/dgbuilder-deployment.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableAppcAppcDgbuilder }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.dgbuilderReplicas }}
- selector:
- matchLabels:
- app: appc-dgbuilder
- template:
- metadata:
- labels:
- app: appc-dgbuilder
- name: appc-dgbuilder
- spec:
- initContainers:
- - command:
- - /root/ready.py
- args:
- - --container-name
- - appc-db-container
- - --container-name
- - appc-controller-container
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ .Values.image.readiness }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-dgbuilder-readiness
- containers:
- - command:
- - /bin/bash
- - -c
- - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
- env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: SDNC_CONFIG_DIR
- value: /opt/onap/sdnc/data/properties
- image: {{ .Values.image.dgbuilderSdnc }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-dgbuilder-container
- ports:
- - containerPort: 3100
- readinessProbe:
- tcpSocket:
- port: 3100
- initialDelaySeconds: 5
- periodSeconds: 10
- volumeMounts:
- - name: localtime
- mountPath: /etc/localtime
- readOnly: true
- - name: dgbuilder-conf
- mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
- subPath: svclogic.properties
- - name: dgbuilder-conf
- mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties
- subPath: svclogic.properties
- - name: dgbuilder-scripts
- mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh
- subPath: createReleaseDir.sh
- - name: dgbuilder-scripts
- mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js
- subPath: customSettings.js
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: dgbuilder-conf
- configMap:
- name: appc-dgbuilder-conf-configmap
- - name: dgbuilder-scripts
- configMap:
- name: appc-dgbuilder-scripts-configmap
- defaultMode: 0755
- restartPolicy: Always
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/secrets.yaml b/kubernetes/appc/templates/secrets.yaml
new file mode 100644
index 0000000000..345c194d96
--- /dev/null
+++ b/kubernetes/appc/templates/secrets.yaml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+type: Opaque
+data:
+ db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }}
diff --git a/kubernetes/appc/templates/service.yaml b/kubernetes/appc/templates/service.yaml
new file mode 100644
index 0000000000..6ffef221a6
--- /dev/null
+++ b/kubernetes/appc/templates/service.yaml
@@ -0,0 +1,62 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+ annotations:
+ msb.onap.org/service-info: '[
+ {
+ "serviceName": "appc",
+ "version": "v1",
+ "url": "/",
+ "protocol": "REST",
+ "port": "{{ .Values.service.externalPort }}",
+ "visualRange":"1",
+ "path": "/"
+ }
+ ]'
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: "{{ .Values.service.name }}-8282"
+ - port: {{ .Values.service.externalPort2 }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+ name: "{{ .Values.service.name }}-1830"
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.name }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.service.name }}-cluster
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ annotations:
+ service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+spec:
+ ports:
+ - name: "{{ .Values.service.name }}-cluster-port"
+ port: {{ .Values.service.clusterPort }}
+ clusterIP: None
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ sessionAffinity: None
+ type: ClusterIP
diff --git a/kubernetes/appc/templates/statefulset.yaml b/kubernetes/appc/templates/statefulset.yaml
new file mode 100644
index 0000000000..6ecfc19342
--- /dev/null
+++ b/kubernetes/appc/templates/statefulset.yaml
@@ -0,0 +1,186 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ serviceName: "{{ .Values.service.name }}-cluster"
+ replicas: {{ .Values.replicaCount }}
+ podManagementPolicy: Parallel
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - {{ .Values.mysql.nameOverride }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}-readiness
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /opt/appc/bin/startODL.sh
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.externalPort2 }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: MYSQL_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}
+ key: db-root-password
+ - name: SDNC_CONFIG_DIR
+ value: "{{ .Values.config.configDir }}"
+ - name: APPC_CONFIG_DIR
+ value: "{{ .Values.config.configDir }}"
+ - name: DMAAP_TOPIC_ENV
+ value: "{{ .Values.config.dmaapTopic }}"
+ - name: ENABLE_ODL_CLUSTER
+ value: "{{ .Values.config.enableClustering }}"
+ - name: APPC_REPLICAS
+ value: "{{ .Values.replicaCount }}"
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /opt/onap/appc/data/properties/dblib.properties
+ name: onap-appc-data-properties
+ subPath: dblib.properties
+ - mountPath: /opt/onap/appc/data/properties/svclogic.properties
+ name: onap-appc-data-properties
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/appc/data/properties/appc.properties
+ name: onap-appc-data-properties
+ subPath: appc.properties
+ - mountPath: /opt/onap/appc/data/properties/aaiclient.properties
+ name: onap-appc-data-properties
+ subPath: aaiclient.properties
+ - mountPath: /opt/onap/appc/svclogic/config/svclogic.properties
+ name: onap-appc-svclogic-config
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/appc/svclogic/bin/showActiveGraphs.sh
+ name: onap-appc-svclogic-bin
+ subPath: showActiveGraphs.sh
+ - mountPath: /opt/onap/appc/bin/startODL.sh
+ name: onap-appc-bin
+ subPath: startODL.sh
+ - mountPath: /opt/onap/appc/bin/installAppcDb.sh
+ name: onap-appc-bin
+ subPath: installAppcDb.sh
+ - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
+ name: onap-sdnc-data-properties
+ subPath: dblib.properties
+ - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
+ name: onap-sdnc-data-properties
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
+ name: onap-sdnc-data-properties
+ subPath: aaiclient.properties
+ - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
+ name: onap-sdnc-svclogic-config
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
+ name: onap-sdnc-svclogic-bin
+ subPath: showActiveGraphs.sh
+ - mountPath: /opt/onap/sdnc/bin/startODL.sh
+ name: onap-sdnc-bin
+ subPath: startODL.sh
+ - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
+ name: onap-sdnc-bin
+ subPath: installSdncDb.sh
+ - mountPath: /var/log/onap
+ name: logs
+ - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
+ name: log-config
+ subPath: org.ops4j.pax.logging.cfg
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+
+ # side car containers
+ - name: filebeat-onap
+ image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /usr/share/filebeat/filebeat.yml
+ name: filebeat-conf
+ subPath: filebeat.yml
+ - mountPath: /var/log/onap
+ name: logs
+ - mountPath: /usr/share/filebeat/data
+ name: data-filebeat
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: filebeat-conf
+ configMap:
+ name: {{ include "common.fullname" . }}-filebeat
+ - name: log-config
+ configMap:
+ name: {{ include "common.fullname" . }}-logging-cfg
+ - name: logs
+ emptyDir: {}
+ - name: data-filebeat
+ emptyDir: {}
+ - name: onap-appc-data-properties
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-data-properties
+ - name: onap-appc-svclogic-config
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-config
+ - name: onap-appc-svclogic-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin
+ defaultMode: 0755
+ - name: onap-appc-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-bin
+ defaultMode: 0755
+ - name: onap-sdnc-data-properties
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-data-properties
+ - name: onap-sdnc-svclogic-config
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
+ - name: onap-sdnc-svclogic-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin
+ defaultMode: 0755
+ - name: onap-sdnc-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-bin
+ defaultMode: 0755
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/appc/values.yaml b/kubernetes/appc/values.yaml
index e2d2ce6b2a..e31980a990 100644
--- a/kubernetes/appc/values.yaml
+++ b/kubernetes/appc/values.yaml
@@ -12,16 +12,104 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-nsPrefix: onap
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:1.1.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+# If mountPath is over NFS (e.g. /dockerdata-nfs is NFS mounted between the nodes), uncomment following lines.
+# persistence:
+# mountPath: /dockerdata
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/appc-image:1.3.0-SNAPSHOT-latest
pullPolicy: Always
-nodePortPrefix: 302
-appcReplicas: 1
-dbReplicas: 1
-dgbuilderReplicas: 1
-dataRootDir: /dockerdata-nfs
-image:
- readiness: oomk8s/readiness-check:1.1.0
- appc: nexus3.onap.org:10001/openecomp/appc-image:v1.2.0
- mysqlServer: mysql/mysql-server:5.6
- dgbuilderSdnc: nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:v0.1.0
- filebeat: docker.elastic.co/beats/filebeat:5.5.0
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+ dbRootPassword: openECOMP1.0
+ enableClustering: true
+ configDir: /opt/onap/appc/data/properties
+ dmaapTopic: SUCCESS
+
+mysql:
+ nameOverride: appc-db
+ service:
+ name: appc-dbhost
+ nfsprovisionerPrefix: appc
+ sdnctlPrefix: appc
+ persistence:
+ mountSubPath: appc/data
+ enabled: true
+ disableNfsProvisioner: true
+
+dgbuilder:
+ nameOverride: appc-dgbuilder
+ dbPodName: appc-db
+ dbServiceName: appc-dbhost
+
+# default number of instances
+replicaCount: 3
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+
+service:
+ type: NodePort
+ name: appc
+ #targetPort
+ internalPort: 8181
+ #port
+ externalPort: 8282
+ nodePort: 30
+
+ externalPort2: 1830
+ nodePort2: 31
+ clusterPort: 2550
+
+ingress:
+ enabled: false
+
+resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ #
+ # Example:
+ # Configure resource requests and limits
+ # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ # Minimum memory for development is 2 CPU cores and 4GB memory
+ # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+# limits:
+# cpu: 2
+# memory: 4Gi
+# requests:
+# cpu: 2
+# memory: 4Gi