Merge "Adding Beijing Documentation"
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Sat, 24 Mar 2018 12:09:47 +0000 (12:09 +0000)
committerGerrit Code Review <gerrit@onap.org>
Sat, 24 Mar 2018 12:09:47 +0000 (12:09 +0000)
111 files changed:
kubernetes/Makefile
kubernetes/aai/templates/aai-resources-deployment.yaml
kubernetes/aai/templates/aai-traversal-deployment.yaml
kubernetes/aai/templates/data-router-deployment.yaml
kubernetes/aai/templates/elasticsearch-deployment.yaml
kubernetes/aai/templates/hbase-deployment.yaml
kubernetes/aai/values.yaml
kubernetes/appc/.helmignore [moved from kubernetes/setup/.helmignore with 100% similarity]
kubernetes/appc/Chart.yaml
kubernetes/appc/requirements.yaml [new file with mode: 0644]
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/installAppcDb.sh with 75% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/bin/startODL.sh with 75% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/aaiclient.properties [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/aaiclient.properties with 97% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/appc.properties with 87% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/dblib.properties [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/dblib.properties with 93% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/svclogic.properties [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/data/properties/svclogic.properties with 92% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh with 94% similarity]
kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/config/svclogic.properties [moved from kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties with 91% similarity]
kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/installSdncDb.sh
kubernetes/appc/resources/config/appc/opt/onap/sdnc/bin/startODL.sh
kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/aaiclient.properties
kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/dblib.properties
kubernetes/appc/resources/config/appc/opt/onap/sdnc/data/properties/svclogic.properties
kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties
kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
kubernetes/appc/templates/NOTES.txt [new file with mode: 0644]
kubernetes/appc/templates/all-services.yaml [deleted file]
kubernetes/appc/templates/appc-configmap.yaml [deleted file]
kubernetes/appc/templates/appc-deployment.yaml [deleted file]
kubernetes/appc/templates/appc-log-configmap.yaml [deleted file]
kubernetes/appc/templates/appc-pv-pvc.yaml [deleted file]
kubernetes/appc/templates/configmap.yaml [new file with mode: 0644]
kubernetes/appc/templates/db-deployment.yaml [deleted file]
kubernetes/appc/templates/dgbuilder-deployment.yaml [deleted file]
kubernetes/appc/templates/secrets.yaml [new file with mode: 0644]
kubernetes/appc/templates/service.yaml [new file with mode: 0644]
kubernetes/appc/templates/statefulset.yaml [new file with mode: 0644]
kubernetes/appc/values.yaml
kubernetes/clamp/charts/mariadb/templates/pv.yaml
kubernetes/clamp/charts/mariadb/templates/pvc.yaml
kubernetes/common/Makefile [new file with mode: 0644]
kubernetes/common/common/Chart.yaml [moved from kubernetes/common/Chart.yaml with 100% similarity]
kubernetes/common/common/templates/_name.tpl [moved from kubernetes/appc/templates/appc-dgbuilder-configmap.yaml with 53% similarity]
kubernetes/common/common/templates/_namespace.tpl [moved from kubernetes/setup/requirements.yaml with 62% similarity]
kubernetes/common/common/values.yaml [moved from kubernetes/common/values.yaml with 100% similarity]
kubernetes/common/templates/_name.tpl [deleted file]
kubernetes/common/templates/_namespace.tpl [deleted file]
kubernetes/dgbuilder/.helmignore [new file with mode: 0644]
kubernetes/dgbuilder/Chart.yaml [new file with mode: 0644]
kubernetes/dgbuilder/requirements.yaml [new file with mode: 0644]
kubernetes/dgbuilder/resources/config/svclogic.properties [moved from kubernetes/appc/resources/config/dgbuilder/svclogic.properties with 56% similarity]
kubernetes/dgbuilder/resources/scripts/createReleaseDir.sh [moved from kubernetes/appc/resources/scripts/dgbuilder/createReleaseDir.sh with 95% similarity]
kubernetes/dgbuilder/resources/scripts/customSettings.js [moved from kubernetes/appc/resources/scripts/dgbuilder/customSettings.js with 93% similarity]
kubernetes/dgbuilder/templates/NOTES.txt [new file with mode: 0644]
kubernetes/dgbuilder/templates/configmap.yaml [new file with mode: 0644]
kubernetes/dgbuilder/templates/deployment.yaml [new file with mode: 0644]
kubernetes/dgbuilder/templates/secrets.yaml [new file with mode: 0644]
kubernetes/dgbuilder/templates/service.yaml [new file with mode: 0644]
kubernetes/dgbuilder/values.yaml [new file with mode: 0644]
kubernetes/esr/Chart.yaml
kubernetes/log/templates/all-services.yaml
kubernetes/log/templates/log-pv-pvc.yaml
kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties [new file with mode: 0755]
kubernetes/message-router/resources/config/dmaap/cadi.properties [new file with mode: 0755]
kubernetes/message-router/resources/config/dmaap/mykey [new file with mode: 0755]
kubernetes/message-router/templates/dmaap-configmap.yaml [new file with mode: 0644]
kubernetes/message-router/templates/message-router-dmaap.yaml
kubernetes/message-router/templates/message-router-kafka.yaml
kubernetes/message-router/templates/message-router-pv-pvc.yaml
kubernetes/message-router/templates/message-router-zookeeper.yaml
kubernetes/message-router/values.yaml
kubernetes/mso/templates/mso-pv-pvc.yaml
kubernetes/multicloud/resources/config/log/framework/log.yml
kubernetes/multicloud/resources/config/log/ocata/log.yml [new file with mode: 0644]
kubernetes/multicloud/resources/config/log/vio/log.yml
kubernetes/multicloud/resources/config/log/windriver/log.yml [new file with mode: 0644]
kubernetes/multicloud/templates/multicloud-log-configmap.yaml
kubernetes/multicloud/templates/multicloud-ocata-deployment.yaml
kubernetes/multicloud/templates/multicloud-windriver-deployment.yaml
kubernetes/multicloud/values.yaml
kubernetes/mysql/.helmignore [new file with mode: 0644]
kubernetes/mysql/Chart.yaml [new file with mode: 0644]
kubernetes/mysql/requirements.yaml [new file with mode: 0644]
kubernetes/mysql/templates/configmap.yaml [new file with mode: 0644]
kubernetes/mysql/templates/nfs-provisoner.yaml [new file with mode: 0644]
kubernetes/mysql/templates/pv.yaml [new file with mode: 0644]
kubernetes/mysql/templates/pvc.yaml [new file with mode: 0644]
kubernetes/mysql/templates/secrets.yaml [new file with mode: 0644]
kubernetes/mysql/templates/service.yaml [new file with mode: 0644]
kubernetes/mysql/templates/statefulset.yaml [new file with mode: 0644]
kubernetes/mysql/templates/storageclass.yaml [new file with mode: 0644]
kubernetes/mysql/values.yaml [new file with mode: 0644]
kubernetes/onap/requirements.yaml
kubernetes/onap/resources/environments/dev.yaml [moved from kubernetes/onap/resources/environments/onap-demo.yaml with 79% similarity]
kubernetes/onap/templates/clusterrolebinding.yaml [moved from kubernetes/setup/templates/clusterrolebinding.yaml with 100% similarity]
kubernetes/onap/templates/secrets.yaml [moved from kubernetes/setup/templates/secrets.yaml with 100% similarity]
kubernetes/onap/values.yaml
kubernetes/oneclick/setenv.bash
kubernetes/portal/templates/portal-pv-pvc.yaml
kubernetes/portal/templates/portal-vnc-dep.yaml
kubernetes/sdc/templates/sdc-pv-pvc.yaml
kubernetes/sdnc/templates/db-statefulset.yaml
kubernetes/setup/Chart.yaml [deleted file]
kubernetes/setup/values.yaml [deleted file]
kubernetes/so/charts/mariadb/templates/pv.yaml
kubernetes/so/charts/mariadb/templates/pvc.yaml
kubernetes/so/resources/config/mso/mso-docker.json
kubernetes/so/templates/deployment.yaml
kubernetes/so/templates/service.yaml
kubernetes/vid/templates/vid-pv-pvc.yaml

index 4cf9705..9cbf90f 100644 (file)
@@ -1,24 +1,26 @@
 PARENT_CHART := onap
 COMMON_CHARTS_DIR := common
 SETUP_CHARTS_DIR := setup
+#Order is important
+SHARED_CHARTS := common setup mysql dgbuilder
 # FIXME OOM-765
 ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
 OUTPUT_DIR := $(ROOT_DIR)/dist
 PACKAGE_DIR := $(OUTPUT_DIR)/packages
 SECRET_DIR := $(OUTPUT_DIR)/secrets
 
-EXCLUDES := $(SETUP_CHARTS_DIR) $(COMMON_CHARTS_DIR) config oneclick readiness test dist $(PARENT_CHART) dcae
+EXCLUDES := $(COMMON_CHARTS_DIR) config oneclick readiness test dist helm $(PARENT_CHART) dcae
+EXCLUDES := $(SHARED_CHARTS) config oneclick readiness test dist $(PARENT_CHART) dcae
 HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
 
 .PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
-all: $(COMMON_CHARTS_DIR) $(SETUP_CHARTS_DIR) $(HELM_CHARTS)
+all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS)
 
 common:
-       @echo "\n[$@]"
-       @make package-$@
+all: $(SHARED_CHARTS) $(HELM_CHARTS)
 
-setup:
+$(SHARED_CHARTS):
        @echo "\n[$@]"
        @make package-$@
 
@@ -44,4 +46,4 @@ clean:
        @rm -f *tgz */charts/*tgz
        @rm -rf $(PACKAGE_DIR)
 %:
-       @:
\ No newline at end of file
+       @:
index cd4412d..332b890 100644 (file)
@@ -435,7 +435,7 @@ spec:
         - name: AAI_CHEF_ENV
           value: simpledemo
         - name: AAI_CORE_VERSION
-          value: 1.1.0-SNAPSHOT
+          value: {{ .Values.aaicoreversion }}
         - name: AAI_CHEF_LOC
           value: /var/chef/aai-data/environments
         - name: CHEF_GIT_URL
@@ -498,3 +498,4 @@ spec:
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 2445e1e..f039d0f 100644 (file)
@@ -267,7 +267,7 @@ spec:
         - name: AAI_CHEF_ENV
           value: simpledemo
         - name: AAI_CORE_VERSION
-          value: 1.1.0-SNAPSHOT
+          value: {{ .Values.aaicoreversion }}
         - name: AAI_CHEF_LOC
           value: /var/chef/aai-data/environments
         - name: CHEF_GIT_URL
@@ -330,3 +330,4 @@ spec:
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 37b9fb4..b1cb834 100644 (file)
@@ -136,8 +136,9 @@ spec:
           name: aai-data-router-dynamic-configmap
       - name: aai-data-router-logs
         hostPath:
-          path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/logs"
+          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/data-router/logs
       restartPolicy: Always
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 902f31e..a07db04 100644 (file)
@@ -81,7 +81,8 @@ spec:
           name: aai-elasticsearch-configmap
       - name: elasticsearch-data
         hostPath:
-          path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data"
+          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/elasticsearch/data
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 08c2ee3..62b017d 100644 (file)
@@ -56,10 +56,11 @@ spec:
       volumes:
       - name: hbase-data
         hostPath:
-          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aai/hbase
+          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/hbase
       - name: localtime
         hostPath:
           path: /etc/localtime
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 93a0c3e..e283cb6 100644 (file)
@@ -51,3 +51,26 @@ image:
   gremlinServerImage: aaionap/gremlin-server
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
   es_bb: busybox
+aaicoreversion: 1.1.0-SNAPSHOT
+persistence:
+  enabled: true
+  
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: aai/data-router/logs
+
index f0af9b3..ca35cd1 100644 (file)
@@ -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 (file)
index 0000000..1ca4de1
--- /dev/null
@@ -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
@@ -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
 
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 
 ###
 # ============LICENSE_START=======================================================
 #  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
@@ -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}
@@ -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
@@ -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
@@ -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
@@ -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';
@@ -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
index 75680bd..25560fb 100755 (executable)
@@ -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
 
index 87c95ee..a84893c 100755 (executable)
@@ -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
index 9e29744..b2f7102 100644 (file)
@@ -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}
index 6107a80..f603977 100644 (file)
@@ -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
index 2954bb0..908d60a 100644 (file)
@@ -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
index ceeea59..a568dfd 100755 (executable)
@@ -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';
index bcf321c..44ae32f 100644 (file)
@@ -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
index 2cd63e1..52161aa 100644 (file)
@@ -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/templates/NOTES.txt b/kubernetes/appc/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..24371d0
--- /dev/null
@@ -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 (file)
index 09c8110..0000000
+++ /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 (file)
index c5500a4..0000000
+++ /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 (file)
index c80bdd4..0000000
+++ /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-log-configmap.yaml b/kubernetes/appc/templates/appc-log-configmap.yaml
deleted file mode 100644 (file)
index a8e1e24..0000000
+++ /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 (file)
index 59bf785..0000000
+++ /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 (file)
index 0000000..0574cfc
--- /dev/null
@@ -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 (file)
index 0843d60..0000000
+++ /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 (file)
index dc35dfb..0000000
+++ /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 (file)
index 0000000..345c194
--- /dev/null
@@ -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 (file)
index 0000000..6ffef22
--- /dev/null
@@ -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 (file)
index 0000000..6ecfc19
--- /dev/null
@@ -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"
index e2d2ce6..e31980a 100644 (file)
 # 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
index bb4073f..184728f 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolume
index d9e59ca..e27c331 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolumeClaim
diff --git a/kubernetes/common/Makefile b/kubernetes/common/Makefile
new file mode 100644 (file)
index 0000000..b9cc125
--- /dev/null
@@ -0,0 +1,50 @@
+# 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.
+
+# FIXME OOM-765
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
\ No newline at end of file
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # 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 }}
+{{/*
+  Expand the name of a chart.
+*/}}
+{{- define "common.name" -}}
+  {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+  Create a default fully qualified application name.
+  Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "common.fullname" -}}
+  {{- $name := default .Chart.Name .Values.nameOverride -}}
+  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
\ No newline at end of file
similarity index 62%
rename from kubernetes/setup/requirements.yaml
rename to kubernetes/common/common/templates/_namespace.tpl
index 9b24f82..94c9ee7 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # 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
-    # local reference to common chart, as it is
-    # a part of this chart's package and will not
-    # be published independently to a repo (at this point)
-    repository: '@local'
\ No newline at end of file
+{{/*
+  Resolve the namespace to apply to a chart. The default namespace suffix
+  is the name of the chart. This can be overridden if necessary (eg. for subcharts)
+  using the following value:
+
+  - .Values.nsPrefix  : override namespace prefix
+*/}}
+{{- define "common.namespace" -}}
+  {{- default .Release.Namespace .Values.nsPrefix -}}
+{{- end -}}
diff --git a/kubernetes/common/templates/_name.tpl b/kubernetes/common/templates/_name.tpl
deleted file mode 100644 (file)
index f6c221f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{{/*
-  Expand the name of a chart.
-*/}}
-{{- define "common.name" -}}
-  {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-  Create a default fully qualified application name.
-  Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-*/}}
-{{- define "common.fullname" -}}
-  {{- $name := default .Chart.Name .Values.nameOverride -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/common/templates/_namespace.tpl b/kubernetes/common/templates/_namespace.tpl
deleted file mode 100644 (file)
index 3da9fee..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{{/*
-  Resolve the namespace to apply to a chart. The default namespace suffix
-  is the name of the chart. This can be overridden if necessary (eg. for subcharts)
-  using the following value:
-
-  - .Values.nsPrefix  : override namespace prefix
-*/}}
-{{- define "common.namespace" -}}
-  {{- default .Release.Namespace .Values.nsPrefix -}}
-{{- end -}}
diff --git a/kubernetes/dgbuilder/.helmignore b/kubernetes/dgbuilder/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -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/dgbuilder/Chart.yaml b/kubernetes/dgbuilder/Chart.yaml
new file mode 100644 (file)
index 0000000..e1955a1
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: D.G. Builder application
+name: dgbuilder
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/dgbuilder/requirements.yaml b/kubernetes/dgbuilder/requirements.yaml
new file mode 100644 (file)
index 0000000..acca8ef
--- /dev/null
@@ -0,0 +1,4 @@
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
@@ -1,5 +1,5 @@
 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.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
 org.onap.ccsdk.sli.jdbc.database=sdnctl
 org.onap.ccsdk.sli.jdbc.user=sdnctl
 org.onap.ccsdk.sli.jdbc.password=gamma
@@ -15,7 +15,7 @@ releaseDir="$1"
 name="Release $releaseDir"
 loginId="$2"
 emailid="$3"
-dbHost="appc-dbhost.{{.Values.nsPrefix}}"
+dbHost="{{.Values.dbServiceName}}.{{.Release.Namespace}}"
 dbPort="3306"
 dbName="sdnctl"
 dbUser="sdnctl"
@@ -96,7 +96,7 @@ 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.url=jdbc:mysql://{{.Values.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.database=sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.user=sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.password=gamma" >>$svclogicPropFile
@@ -14,7 +14,7 @@ module.exports={
         "user": "dguser",
         "pass": "cc03e747a6afbbcbf8be7668acfebee5"
     },
-    "dbHost": "appc-dbhost.{{.Values.nsPrefix}}",
+    "dbHost": "{{.Values.dbServiceName}}.{{ include "common.namespace" . }}",
     "dbPort": "3306",
     "dbName": "sdnctl",
     "dbUser": "sdnctl",
diff --git a/kubernetes/dgbuilder/templates/NOTES.txt b/kubernetes/dgbuilder/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..2465e03
--- /dev/null
@@ -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 {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.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 {{ include "common.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 {{ include "common.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/dgbuilder/templates/configmap.yaml b/kubernetes/dgbuilder/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..7ef92d0
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-config
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-scripts
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/scripts/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/dgbuilder/templates/deployment.yaml b/kubernetes/dgbuilder/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..4e1f101
--- /dev/null
@@ -0,0 +1,98 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+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:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - {{ .Values.dbPodName }}
+        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:
+          - /bin/bash
+          - -c
+          - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          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: /opt/onap/sdnc/data/properties
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - name: config
+            mountPath: /opt/app/application.properties
+            subPath: application.properties
+          - name: config
+            mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
+            subPath: svclogic.properties
+          - name: config
+            mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties
+            subPath: svclogic.properties
+          - name: scripts
+            mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh
+            subPath: createReleaseDir.sh
+          - name: scripts
+            mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js
+            subPath: customSettings.js
+          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 }}
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: config
+          configMap:
+            name: {{ include "common.fullname" . }}-config
+        - name: scripts
+          configMap:
+            name: {{ include "common.fullname" . }}-scripts
+            defaultMode: 0755
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/dgbuilder/templates/secrets.yaml b/kubernetes/dgbuilder/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..7604be8
--- /dev/null
@@ -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 }}
\ No newline at end of file
diff --git a/kubernetes/dgbuilder/templates/service.yaml b/kubernetes/dgbuilder/templates/service.yaml
new file mode 100644 (file)
index 0000000..c61cdd5
--- /dev/null
@@ -0,0 +1,26 @@
+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 }}
+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 }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/dgbuilder/values.yaml b/kubernetes/dgbuilder/values.yaml
new file mode 100644 (file)
index 0000000..23f8eea
--- /dev/null
@@ -0,0 +1,93 @@
+# Global configuration default values that can be inherited by
+# all subcharts.
+#################################################################
+global:
+  # Change to an unused port prefix range to prevent port conflicts
+  # with other instances running within the same k8s cluster
+  nodePortPrefix: 302
+
+  # image repositories
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+  # readiness check
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+
+  # logging agent
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+  # image pull policy
+  pullPolicy: Always
+
+  # default mount path root directory referenced
+  # by persistent volumes and log files
+  persistence:
+    mountPath: /dockerdata-nfs
+
+  # flag to enable debugging - application support required
+  debugEnabled: true
+  
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/ccsdk-dgbuilder-image:v0.1.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  dbRootPassword: openECOMP1.0
+
+# default number of instances
+replicaCount: 1
+
+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: dgbuilder
+  externalPort: 3000
+  internalPort: 3100
+  nodePort: 28
+
+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
index 1de7295..a80e699 100644 (file)
@@ -15,4 +15,4 @@
 apiVersion: v1
 description: A Helm chart for Kubernetes
 name: esr
-version: v1.0.0
+version: 1.0.0
index a22a1fe..389e7e4 100644 (file)
@@ -74,8 +74,10 @@ spec:
   - name: transport
     port: 5044
     targetPort: 5044
+    nodePort: {{ .Values.nodePortPrefix }}55
   selector:
     app: logstash
+  type: NodePort
 #{{ end }}
 #{{ if not .Values.disableLogKibana }}
 ---
index f76b768..20bcbb1 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disableLogElasticsearch }}
 apiVersion: v1
diff --git a/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties b/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties
new file mode 100755 (executable)
index 0000000..568d0d4
--- /dev/null
@@ -0,0 +1,141 @@
+###############################################################################
+##
+## Cambria API Server config
+##
+##     - Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+##             - 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+##     Both Cambria and Kafka make use of Zookeeper.
+##
+# config.zk.servers=zookeeper.namespace-placeholder:2181
+config.zk.servers=zookeeper:2181
+#config.zk.servers=172.17.0.1:2181
+#dmaap.namespace-placeholder:2181
+#10.208.128.229:2181
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+##     Items below are passed through to Kafka's producer and consumer
+##     configurations (after removing "kafka.")
+##     if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list=global-kafka:9092
+#kafka.metadata.broker.list=172.17.0.1:9092
+#dmaap.namespace-placeholder:9092
+#10.208.128.229:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=6000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+
+###############################################################################
+##
+##     Secured Config
+##
+##     Some data stored in the config system is sensitive -- API keys and secrets,
+##     for example. to protect it, we use an encryption layer for this section
+##     of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+##     Kafka expects live connections from the consumer to the broker, which
+##     obviously doesn't work over connectionless HTTP requests. The Cambria
+##     server proxies HTTP requests into Kafka consumer sessions that are kept
+##     around for later re-use. Not doing so is costly for setup per request,
+##     which would substantially impact a high volume consumer's performance.
+##
+##     This complicates Cambria server failover, because we often need server
+##     A to close its connection before server B brings up the replacement.
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+#cambria.consumer.cache.touchFreqMs=120000
+
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+###############################################################################
+##
+## Metrics Reporting
+##
+##     This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics                                  #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.openecomp.dcae.dmaap.mtnje2.mr.topic
+msgRtr.topicfactory.aaf=org.openecomp.dcae.dmaap.topicFactory|:org.openecomp.dcae.dmaap.mtnje2.mr.topic:
+enforced.topic.name.AAF=org.openecomp
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.openecomp.dmaap.mr.ueb
+##############################################################################
+#Mirror Maker Agent
+msgRtr.mirrormakeradmin.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=org.openecomp.dmaap.mr.dev.topicFactory|:org.openecomp.dmaap.mr.dev.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=org.openecomp.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
diff --git a/kubernetes/message-router/resources/config/dmaap/cadi.properties b/kubernetes/message-router/resources/config/dmaap/cadi.properties
new file mode 100755 (executable)
index 0000000..1cb00a5
--- /dev/null
@@ -0,0 +1,21 @@
+basic_realm=openecomp.org
+basic_warn=TRUE
+
+cadi_loglevel=DEBUG
+#cadi_keyfile=target/swm/package/nix/dist_files/appl/${artifactId}/etc/keyfile2
+cadi_keyfile=/appl/dmaapMR1/etc/keyfile
+# Configure AAF
+aaf_url=https://DME2RESOLVE/service=org.openecomp.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE
+
+aaf_id=dgl@openecomp.org
+aaf_password=enc:f2u5br1mh29M02-
+aaf_timeout=5000
+aaf_clean_interval=1200000
+aaf_user_expires=60000
+aaf_high_count=1000000
+
+
+# The following properties are being set by the AJSC Container and should NOT need to be set here.
+AFT_LATITUDE=33.823589
+AFT_LONGITUDE=-84.366982
+AFT_ENVIRONMENT=AFTUAT
diff --git a/kubernetes/message-router/resources/config/dmaap/mykey b/kubernetes/message-router/resources/config/dmaap/mykey
new file mode 100755 (executable)
index 0000000..c2b8b87
--- /dev/null
@@ -0,0 +1,27 @@
+_sNOLphPzrU7L0L3oWv0pYwgV_ddGF1XoBsQEIAp34jfP-fGJFPfFYaMpDEZ3gwH59rNw6qyMZHk
+k-4irklvVcWk36lC3twNvc0DueRCVrws1bkuhOLCXdxHJx-YG-1xM8EJfRmzh79WPlPkbAdyPmFF
+Ah44V0GjAnInPOFZA6MHP9rNx9B9qECHRfmvzU13vJCcgTsrmOr-CEiWfRsnzPjsICxpq9OaVT_D
+zn6rNaroGm1OiZNCrCgvRkCUHPOOCw3j9G1GeaImoZNYtozbz9u4sj13PU-MxIIAa64b1bMMMjpz
+Upc8lVPI4FnJKg6axMmEGn5zJ6JUq9mtOVyPj__2GEuDgpx5H4AwodXXVjFsVgR8UJwI_BvS2JVp
+JoQk0J1RqXmAXVamlsMAfzmmbARXgmrBfnuhveZnh9ymFVU-YZeujdANniXAwBGI7c6hG_BXkH7i
+Eyf4Fn41_SV78PskP6qgqJahr9r3bqdjNbKBztIKCOEVrE_w3IM5r02l-iStk_NBRkj6cq_7VCpG
+afxZ2CtZMwuZMiypO_wOgbdpCSKNzsL-NH2b4b08OlKiWb263gz634KJmV5WEfCl-6eH-JUFbWOS
+JwQfActLNT2ZQPl2MyZQNBzJEWoJRgS6k7tPRO-zqeUtYYHGHVMCxMuMHGQcoilNNHEFeBCG_fBh
+yAKb9g9F86Cbx9voMLiyTX2T3rwVHiSJFOzfNxGmfN5JWOthIun_c5hEY1tLQ15BomzkDwk7BAj7
+VbRCrVD45B6xrmSTMBSWYmLyr6mnQxQqeh9cMbD-0ZAncE3roxRnRvPKjFFa208ykYUp2V83r_PJ
+fV5I9ZPKSjk9DwFyrjkcQQEYDhdK6IFqcd6nEthjYVkmunu2fsX0bIOm9GGdIbKGqBnpdgBO5hyT
+rBr9HSlZrHcGdti1R823ckDF0Ekcl6kioDr5NLIpLtg9zUEDRm3QrbX2mv5Zs8W0pYnOqglxy3lz
+bJZTN7oR7VasHUtjmp0RT9nLZkUs5TZ6MHhlIq3ZsQ6w_Q9Rv1-ofxfwfCC4EBrWKbWAGCf6By4K
+Ew8321-2YnodhmsK5BrT4zQ1DZlmUvK8BmYjZe7wTljKjgYcsLTBfX4eMhJ7MIW1kpnl8AbiBfXh
+QzN56Mki51Q8PSQWHm0W9tnQ0z6wKdck6zBJ8JyNzewZahFKueDTn-9DOqIDfr3YHvQLLzeXyJ8e
+h4AgjW-hvlLzRGtkCknjLIgXVa3rMTycseAwbW-mgdCqqkw3SdEG8feAcyntmvE8j2jbtSDStQMB
+9JdvyNLuQdNG4pxpusgvVso0-8NQF0YVa9VFwg9U6IPSx5p8FcW68OAHt_fEgT4ZtiH7o9aur4o9
+oYqUh2lALCY-__9QLq1KkNjMKs33Jz9E8LbRerG9PLclkTrxCjYAeUWBjCwSI7OB7xkuaYDSjkjj
+a46NLpdBN1GNcsFFcZ79GFAK0_DsyxGLX8Tq6q0Bvhs8whD8wlSxpTGxYkyqNX-vcb7SDN_0WkCE
+XSdZWkqTHXcYbOvoCOb_e6SFAztuMenuHWY0utX0gBfx_X5lPDFyoYXErxFQHiA7t27keshXNa6R
+ukQRRS8kMjre1U74sc-fRNXkXpl57rG4rgxaEX0eBeowa53KAsVvUAoSac2aC_nfzXrDvoyf9Xi3
+JpEZNhUDLpFCEycV4I7jGQ9wo9qNaosvlsr6kbLDNdb_1xrGVgjT3xEvRNJNPqslSAu-yD-UFhC3
+AmCdYUnugw_eEFqXCHTARcRkdPPvl2XsmEKY2IqEeO5tz4DyXQFaL-5hEVh6lYEU1EOWHk3UGIXe
+Vc5_Ttp82qNLmlJPbZvgmNTJzYTHDQ_27KBcp7IVVZgPDjVKdWqQvZ18KhxvfF3Idgy82LBZniFV
+IbtxllXiPRxoPQriSXMnXjh3XkvSDI2pFxXfEvLRn1tvcFOwPNCz3QfPIzYg8uYXN5bRt3ZOrR_g
+ZhIlrc7HO0VbNbeqEVPKMZ-cjkqGj4VAuDKoQc0eQ6X_wCoAGO78nPpLeIvZPx1X3z5YoqNA
\ No newline at end of file
diff --git a/kubernetes/message-router/templates/dmaap-configmap.yaml b/kubernetes/message-router/templates/dmaap-configmap.yaml
new file mode 100644 (file)
index 0000000..bd1e629
--- /dev/null
@@ -0,0 +1,23 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mr-dmaap-cadi-prop-configmap
+  namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mr-dmaap-msgrtrapi-prop-configmap
+  namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mr-dmaap-mykey-configmap
+  namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/mykey").AsConfig . | indent 2 }}
index f81da76..a0c1380 100644 (file)
@@ -63,10 +63,13 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+          subPath: MsgRtrApi.properties
           name: appprops
         - mountPath: /appl/dmaapMR1/etc/cadi.properties
+          subPath: cadi.properties
           name: cadi
         - mountPath: /appl/dmaapMR1/etc/keyfile
+          subPath: mykey
           name: mykey
       restartPolicy: Always
       volumes:
@@ -74,14 +77,15 @@ spec:
         hostPath:
           path: /etc/localtime
       - name: appprops
-        hostPath:
-          path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/MsgRtrApi.properties
+        configMap:
+          name: mr-dmaap-msgrtrapi-prop-configmap
       - name: cadi
-        hostPath:
-          path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/cadi.properties
+        configMap:
+          name: mr-dmaap-cadi-prop-configmap
       - name: mykey
-        hostPath:
-          path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/mykey
+        configMap:
+          name: mr-dmaap-mykey-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 {{ end }}
+
index 2607ce6..844de04 100644 (file)
@@ -30,6 +30,17 @@ spec:
       name: message-router-global-kafka
     spec:
       initContainers:
+      - command:
+        - bash
+        args:
+        - -c
+        - "if [ -d /var/tmp/SDC-DISTR-NOTIF-TOPIC-SDC-OPENSOURCE-ENV1-0 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/* /var/tmp/; fi"
+        image: {{ .Values.image.config }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /var/tmp
+          name: kafka-data
+        name: kafka-primer
       - command:
         - /root/ready.py
         args:
@@ -88,3 +99,4 @@ spec:
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 3ea9504..a39a975 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disableMessageRouterGlobalKafka }}
 apiVersion: v1
index d232c2e..1b3e8f8 100644 (file)
@@ -29,6 +29,18 @@ spec:
         app: zookeeper
       name: message-router-zookeeper
     spec:
+      initContainers:
+      - command:
+        - bash
+        args:
+        - -c
+        - "if [ -d /var/tmp/version-2 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-zookeeper/* /var/tmp/; fi"
+        image: {{ .Values.image.config }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /var/tmp
+          name: zookeeper-data
+        name: zookeeper-primer
       containers:
       - image: {{ .Values.image.zookeeper }}
         imagePullPolicy: {{ .Values.pullPolicy }}
@@ -57,3 +69,4 @@ spec:
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index add7679..6825147 100644 (file)
@@ -24,3 +24,5 @@ image:
   dmaap: attos/dmaap:latest
   kafka: wurstmeister/kafka:latest
   zookeeper: wurstmeister/zookeeper:latest
+  config: oomk8s/config-init:2.0.0-SNAPSHOT
+
index 19dea04..1ee4ab0 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disableMsoMariadb }}
 apiVersion: v1
index a4943f0..f548871 100644 (file)
@@ -6,21 +6,19 @@ loggers:
       handlers: [multivimbroker_handler]
       level: "DEBUG"
       propagate: False
-
 handlers:
     multivimbroker_handler:
         level: "DEBUG"
         class: "logging.handlers.RotatingFileHandler"
         filename: "/var/log/onap/multicloud/multivimbroker/multivimbroker.log"
         formatter: "mdcFormat"
-        maxBytes: 1024*1024*50
+        maxBytes: 52428800
         backupCount: 10
-
 formatters:
     standard:
-        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s"
+        format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s"
     mdcFormat:
-        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:[%(mdc)s]: %(message)s"
-        mdcfmt: "{requestID}"
+        format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s \t"
+        mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}"
         datefmt: "%Y-%m-%d %H:%M:%S"
         (): onaplogging.mdcformatter.MDCFormatter
\ No newline at end of file
diff --git a/kubernetes/multicloud/resources/config/log/ocata/log.yml b/kubernetes/multicloud/resources/config/log/ocata/log.yml
new file mode 100644 (file)
index 0000000..ef71b90
--- /dev/null
@@ -0,0 +1,34 @@
+version: 1
+disable_existing_loggers: False
+
+loggers:
+    ocata:
+      handlers: [ocata_handler]
+      level: "DEBUG"
+      propagate: False
+    newton_base:
+      handlers: [ocata_handler]
+      level: "DEBUG"
+      propagate: False
+    common:
+      handlers: [ocata_handler]
+      level: "DEBUG"
+      propagate: False
+
+handlers:
+    ocata_handler:
+        level: "DEBUG"
+        class: "logging.handlers.RotatingFileHandler"
+        filename: "/var/log/onap/multicloud/openstack/ocata/ocata.log"
+        formatter: "mdcFormat"
+        maxBytes: 1024*1024*50
+        backupCount: 10
+
+formatters:
+    standard:
+        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s"
+    mdcFormat:
+        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:[%(mdc)s]: %(message)s"
+        mdcfmt: "{requestID}"
+        datefmt: "%Y-%m-%d %H:%M:%S"
+        (): onaplogging.mdcformatter.MDCFormatter
\ No newline at end of file
index c9d2bf8..9165464 100644 (file)
@@ -6,21 +6,19 @@ loggers:
       handlers: [vio_handler]
       level: "DEBUG"
       propagate: False
-
 handlers:
     vio_handler:
         level: "DEBUG"
         class: "logging.handlers.RotatingFileHandler"
         filename: "/var/log/onap/multicloud/vio/vio.log"
         formatter: "mdcFormat"
-        maxBytes: 1024*1024*50
+        maxBytes: 52428800
         backupCount: 10
-
 formatters:
     standard:
-        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s"
+        format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s"
     mdcFormat:
-        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:[%(mdc)s]: %(message)s"
-        mdcfmt: "{requestID}"
+        format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s \t"
+        mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}"
         datefmt: "%Y-%m-%d %H:%M:%S"
         (): onaplogging.mdcformatter.MDCFormatter
\ No newline at end of file
diff --git a/kubernetes/multicloud/resources/config/log/windriver/log.yml b/kubernetes/multicloud/resources/config/log/windriver/log.yml
new file mode 100644 (file)
index 0000000..8e2c5c2
--- /dev/null
@@ -0,0 +1,34 @@
+version: 1
+disable_existing_loggers: False
+
+loggers:
+    titanium_cloud:
+      handlers: [titanium_cloud_handler]
+      level: "DEBUG"
+      propagate: False
+    newton_base:
+      handlers: [titanium_cloud_handler]
+      level: "DEBUG"
+      propagate: False
+    common:
+      handlers: [titanium_cloud_handler]
+      level: "DEBUG"
+      propagate: False
+
+handlers:
+    titanium_cloud_handler:
+        level: "DEBUG"
+        class: "logging.handlers.RotatingFileHandler"
+        filename: "/var/log/onap/multicloud/openstack/windriver/titanium_cloud.log"
+        formatter: "mdcFormat"
+        maxBytes: 1024*1024*50
+        backupCount: 10
+
+formatters:
+    standard:
+        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s"
+    mdcFormat:
+        format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:[%(mdc)s]: %(message)s"
+        mdcfmt: "{requestID}"
+        datefmt: "%Y-%m-%d %H:%M:%S"
+        (): onaplogging.mdcformatter.MDCFormatter
\ No newline at end of file
index 5435d60..1050f10 100644 (file)
@@ -36,4 +36,20 @@ metadata:
   namespace: {{ .Values.nsPrefix }}
 data:
 {{ tpl (.Files.Glob "resources/config/log/vio/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: multicloud-ocata-log-configmap
+  namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/ocata/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: multicloud-windriver-log-configmap
+  namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/windriver/*").AsConfig . | indent 2 }}
 #{{ end }}
index aa1008a..ecbd74b 100644 (file)
@@ -29,7 +29,6 @@ spec:
         app: multicloud-ocata
       name: multicloud-ocata
     spec:
-     hostname: multicloud-ocata
      containers:
      - env:
        - name: MSB_ADDR
@@ -48,8 +47,11 @@ spec:
          value: "AAI"
        name: multicloud-ocata
        volumeMounts:
-       - mountPath: /opt/ocata/logs
+       - mountPath: /var/log/onap
          name: ocata-log
+       - mountPath: /opt/ocata/ocata/pub/config/log.yml
+         name: ocata-logconfig
+         subPath: log.yml
        image: {{ .Values.image.ocata }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        ports:
@@ -64,11 +66,29 @@ spec:
          timeoutSeconds: 10
          successThreshold: 1
          failureThreshold: 5
-     restartPolicy: Always
+     - 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: ocata-log
+       - mountPath: /usr/share/filebeat/data
+         name: ocata-data-filebeat
      volumes:
      - name: ocata-log
-       hostPath:
-         path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/multicloud/ocata/logs
+       emptyDir: {}
+     - name: ocata-data-filebeat
+       emptyDir: {}
+     - name: filebeat-conf
+       configMap:
+         name: multicloud-filebeat-configmap
+     - name: ocata-logconfig
+       configMap:
+         name: multicloud-ocata-log-configmap
      imagePullSecrets:
      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+     restartPolicy: Always
 #{{ end }}
index 6a7d6f4..8d9ec35 100644 (file)
@@ -29,7 +29,6 @@ spec:
         app: multicloud-windriver
       name: multicloud-windriver
     spec:
-     hostname: multicloud-windriver
      containers:
      - env:
        - name: MSB_ADDR
@@ -48,8 +47,11 @@ spec:
          value: "AAI"
        name: multicloud-windriver
        volumeMounts:
-       - mountPath: /opt/windriver/logs
+       - mountPath: /var/log/onap
          name: windriver-log
+       - mountPath: /opt/windriver/titanium_cloud/pub/config/log.yml
+         name: windriver-logconfig
+         subPath: log.yml
        image: {{ .Values.image.windriver }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        ports:
@@ -64,11 +66,29 @@ spec:
          timeoutSeconds: 10
          successThreshold: 1
          failureThreshold: 5
-     restartPolicy: Always
+    - 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: windriver-log
+       - mountPath: /usr/share/filebeat/data
+         name: windriver-data-filebeat
      volumes:
      - name: windriver-log
-       hostPath:
-         path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/multicloud/windriver/logs
+       emptyDir: {}
+     - name: windriver-data-filebeat
+       emptyDir: {}
+     - name: filebeat-conf
+       configMap:
+         name: multicloud-filebeat-configmap
+     - name: windriver-logconfig
+       configMap:
+         name: multicloud-windriver-log-configmap
      imagePullSecrets:
      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+     restartPolicy: Always
 #{{ end }}
index b42e2eb..2f76d6a 100644 (file)
@@ -24,8 +24,8 @@ image:
   readiness: oomk8s/readiness-check:1.1.0
   framework: nexus3.onap.org:10001/onap/multicloud/framework:latest
   vio: nexus3.onap.org:10001/onap/multicloud/vio:latest
-  ocata: nexus3.onap.org:10001/onap/multicloud/openstack-ocata:v1.0.0
-  windriver: nexus3.onap.org:10001/onap/multicloud/openstack-windriver:v1.0.0
+  ocata: nexus3.onap.org:10001/onap/multicloud/openstack-ocata:latest
+  windriver: nexus3.onap.org:10001/onap/multicloud/openstack-windriver:latest
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
 # domain name of msb gateway
 msbgateway: msb-iag.{{ .Values.nsPrefix }}
diff --git a/kubernetes/mysql/.helmignore b/kubernetes/mysql/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -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/mysql/Chart.yaml b/kubernetes/mysql/Chart.yaml
new file mode 100644 (file)
index 0000000..99e7c44
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: MySQL Server
+name: mysql
+version: 2.0.0
diff --git a/kubernetes/mysql/requirements.yaml b/kubernetes/mysql/requirements.yaml
new file mode 100644 (file)
index 0000000..acca8ef
--- /dev/null
@@ -0,0 +1,4 @@
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/mysql/templates/configmap.yaml b/kubernetes/mysql/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..dd2b5b7
--- /dev/null
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-db-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+  master.cnf: |
+    # Apply this config only on the master.
+    [mysqld]
+    log-bin
+    [localpathprefix]
+    master
+  slave.cnf: |
+    # Apply this config only on slaves.
+    [mysqld]
+    super-read-only
+    [localpathprefix]
+    slave
diff --git a/kubernetes/mysql/templates/nfs-provisoner.yaml b/kubernetes/mysql/templates/nfs-provisoner.yaml
new file mode 100644 (file)
index 0000000..478224e
--- /dev/null
@@ -0,0 +1,62 @@
+#{{ if not .Values.disableNfsProvisioner }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  #replicas: {{ .Values.replicaCount }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+          image: "{{ .Values.global.nfsprovisionerRepository | default .Values.nfsprovisionerRepository }}/{{ .Values.nfsprovisionerImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+            - name: nfs
+              containerPort: {{ .Values.service.nfsPort }}
+            - name: mountd
+              containerPort: {{ .Values.service.mountdPort }}
+            - name: rpcbind
+              containerPort: {{ .Values.service.rpcbindPort }}
+            - name: rpcbind-udp
+              containerPort: {{ .Values.service.rpcbindUdpPort }}
+              protocol: UDP
+          securityContext:
+            capabilities:
+              add:
+                - DAC_READ_SEARCH
+                - SYS_RESOURCE
+          args:
+            - "-provisioner={{ include "common.fullname" . }}/nfs"
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: SERVICE_NAME
+              value: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+            - name: export-volume
+              mountPath: /export
+      volumes:
+        - name: export-volume
+          hostPath:
+            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+#{{ end }}
diff --git a/kubernetes/mysql/templates/pv.yaml b/kubernetes/mysql/templates/pv.yaml
new file mode 100644 (file)
index 0000000..ba128b9
--- /dev/null
@@ -0,0 +1,22 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-data
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  storageClassName: "{{ include "common.fullname" . }}-data"
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/kubernetes/mysql/templates/pvc.yaml b/kubernetes/mysql/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..a2949fe
--- /dev/null
@@ -0,0 +1,23 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-data
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+  storageClassName: "{{ include "common.fullname" . }}-data"
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/mysql/templates/secrets.yaml b/kubernetes/mysql/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..7604be8
--- /dev/null
@@ -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 }}
\ No newline at end of file
diff --git a/kubernetes/mysql/templates/service.yaml b/kubernetes/mysql/templates/service.yaml
new file mode 100644 (file)
index 0000000..c6a28c4
--- /dev/null
@@ -0,0 +1,90 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
+#{{ if not .Values.disableNfsProvisioner }}
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+spec:
+  ports:
+    - name: nfs
+      port: {{ .Values.service.nfsPort }}
+    - name: mountd
+      port: {{ .Values.service.mountdPort }}
+    - name: rpcbind
+      port: {{ .Values.service.rpcbindPort }}
+    - name: rpcbind-udp
+      port: {{ .Values.service.rpcbindUdpPort }}
+      protocol: UDP
+  selector:
+    app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+#{{ end }}
+---
+# Client service for connecting to any MySQL instance for reads.
+# Only master: sdnc-dbhost-0 accepts the write request.
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name }}-read
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.sdnctlPrefix }}-sdnctldb01
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.sdnctlPrefix }}-sdnctldb02
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/mysql/templates/statefulset.yaml b/kubernetes/mysql/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..7b55bf2
--- /dev/null
@@ -0,0 +1,238 @@
+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 }}
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+#{{ if not .Values.disableNfsProvisioner }}
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#{{ end }}
+      - name: init-mysql
+        image: "{{ .Values.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - bash
+        - "-c"
+        - |
+          set -ex
+          # Generate mysql server-id from pod ordinal index.
+          [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
+          ordinal=${BASH_REMATCH[1]}
+          echo BASH_REMATCH=${BASH_REMATCH}
+          echo [mysqld] > /mnt/conf.d/server-id.cnf
+          # Add an offset to avoid reserved server-id=0 value.
+          echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf
+          # Copy appropriate conf.d files from config-map to emptyDir.
+          if [[ $ordinal -eq 0 ]]; then
+            cp /mnt/config-map/master.cnf /mnt/conf.d/
+          else
+            cp /mnt/config-map/slave.cnf /mnt/conf.d/
+          fi
+        volumeMounts:
+        - name: conf
+          mountPath: /mnt/conf.d
+        - name: config-map
+          mountPath: /mnt/config-map
+
+      - name: clone-mysql
+        image: "{{ .Values.global.xtrabackupRepository | default .Values.xtrabackupRepository }}/{{ .Values.xtrabackupImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        env:
+          - name: MYSQL_ROOT_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: {{ template "common.fullname" . }}
+                key: db-root-password
+        command:
+        - bash
+        - "-c"
+        - |
+          set -ex
+          # Skip the clone if data already exists.
+          [[ -d /var/lib/mysql/mysql ]] && exit 0
+          # Skip the clone on master (ordinal index 0).
+          [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
+          ordinal=${BASH_REMATCH[1]}
+          echo ${BASH_REMATCH}
+          [[ $ordinal -eq 0 ]] && exit 0
+          # Clone data from previous peer.
+          ncat --recv-only {{ template "common.name" . }}-$(($ordinal-1)).{{ .Values.service.name }}.{{ include "common.namespace" . }} 3307 | xbstream -x -C /var/lib/mysql
+          # Prepare the backup.
+          xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --prepare --target-dir=/var/lib/mysql
+          ls -l /var/lib/mysql
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-data
+          mountPath: /var/lib/mysql
+          subPath: mysql
+        - name: conf
+          mountPath: /etc/mysql/conf.d
+          
+      containers:
+        #sdnc-db-container
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            exec:
+              command: ["mysqladmin", "ping"]
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+            timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          {{end -}}
+          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: MYSQL_ROOT_HOST
+              value: '%'
+            - name: MYSQL_ALLOW_EMPTY_PASSWORD
+              value: {{ .Values.config.dbAllowEmptyPassword | default "0" | quote }}
+          volumeMounts:
+          - mountPath: /var/lib/mysql
+            name: {{ include "common.fullname" . }}-data
+            subPath: mysql
+          - mountPath: /etc/mysql/conf.d
+            name: conf
+          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 }}
+
+        - name: xtrabackup
+          image: "{{ .Values.global.xtrabackupRepository | default .Values.xtrabackupRepository }}/{{ .Values.xtrabackupImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          env:
+            - name: MYSQL_ROOT_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}
+                  key: db-root-password
+          ports:
+          - containerPort: {{ .Values.xtrabackup.internalPort }}
+            name: xtrabackup
+          command:
+          - bash
+          - "-c"
+          - |
+            set -ex
+            cd /var/lib/mysql
+            ls -l
+            # Determine binlog position of cloned data, if any.
+            if [[ -f xtrabackup_slave_info ]]; then
+              echo "Inside xtrabackup_slave_info"
+              # XtraBackup already generated a partial "CHANGE MASTER TO" query
+              # because we're cloning from an existing slave.
+              mv xtrabackup_slave_info change_master_to.sql.in
+              # Ignore xtrabackup_binlog_info in this case (it's useless).
+              rm -f xtrabackup_binlog_info
+            elif [[ -f xtrabackup_binlog_info ]]; then
+              echo "Inside xtrabackup_binlog_info"
+              # We're cloning directly from master. Parse binlog position.
+              [[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1
+              rm xtrabackup_binlog_info
+              echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\
+                    MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in
+            fi
+
+            # Check if we need to complete a clone by starting replication.
+            if [[ -f change_master_to.sql.in ]]; then
+              echo "Waiting for mysqld to be ready (accepting connections)"
+              [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
+              ordinal=${BASH_REMATCH[1]}
+              echo $ordinal
+              until mysql --user=root --password=$MYSQL_ROOT_PASSWORD -h localhost -e "SELECT 1"; do sleep 1; done
+
+              echo "Initializing replication from clone position"
+              # In case of container restart, attempt this at-most-once.
+              mv change_master_to.sql.in change_master_to.sql.orig
+              mysql --user=root --password=$MYSQL_ROOT_PASSWORD -h localhost <<EOF
+            $(<change_master_to.sql.orig),
+              MASTER_HOST="{{ template "common.name" . }}-0.{{ .Values.service.name }}.{{ include "common.namespace" . }}",
+              MASTER_USER="root",
+              MASTER_PASSWORD="$MYSQL_ROOT_PASSWORD",
+              MASTER_CONNECT_RETRY=10;
+            START SLAVE;
+            EOF
+            fi
+
+            # Start a server to send backups when requested by peers.
+            exec ncat --listen --keep-open --send-only --max-conns=1 3307 -c \
+              "xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --backup --slave-info --stream=xbstream --host=localhost"
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-data
+            mountPath: /var/lib/mysql
+            subPath: mysql
+          - name: conf
+            mountPath: /etc/mysql/conf.d
+      volumes:
+      - name: conf
+        emptyDir: {}
+      - name: config-map
+        configMap:
+          name: {{ include "common.fullname" . }}-db-configmap
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: {{ include "common.fullname" . }}-data
+#{{ if not .Values.disableNfsProvisioner }}
+  volumeClaimTemplates:
+  - metadata:
+      name: {{ include "common.fullname" . }}-data
+      annotations:
+        volume.beta.kubernetes.io/storage-class: "{{ include "common.fullname" . }}-data"
+    spec:
+      accessModes: ["ReadWriteMany"]
+      resources:
+        requests:
+          storage: 1Gi
+#{{ else if .Values.persistence.enabled }}
+        persistentVolumeClaim:
+          claimName: {{ include "common.fullname" . }}-data
+#{{ else }}
+        emptyDir: {}
+#{{ end }}
diff --git a/kubernetes/mysql/templates/storageclass.yaml b/kubernetes/mysql/templates/storageclass.yaml
new file mode 100644 (file)
index 0000000..1a4e6b6
--- /dev/null
@@ -0,0 +1,6 @@
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+  name: "{{ include "common.fullname" . }}-data"
+  namespace: {{ include "common.namespace" . }}
+provisioner: {{ include "common.fullname" . }}/nfs
diff --git a/kubernetes/mysql/values.yaml b/kubernetes/mysql/values.yaml
new file mode 100644 (file)
index 0000000..c0beb6f
--- /dev/null
@@ -0,0 +1,111 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  persistence: {}
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+#repository: mysql
+repository: registry.hub.docker.com
+image: library/mysql:5.7
+pullPolicy: Always
+
+# application configuration
+config:
+  dbRootPassword: openECOMP1.0
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 30
+  periodSeconds: 10
+  timeoutSeconds: 5
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 5
+  periodSeconds: 10
+
+## Persist data to a persitent volume
+persistence:
+  enabled: false
+  
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  accessMode: ReadWriteMany
+  size: 1Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: mysql/data
+
+service:
+  name: mysql
+  internalPort: 3306
+  # nfs provisioner ports
+  nfsPort: 2049
+  mountdPort: 20048
+  rpcbindPort: 111
+  rpcbindUdpPort: 111
+
+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
+
+#################################################################
+# Sidecar Configuration.
+#
+# xtrabackup configuration defaults.
+#################################################################
+xtrabackupRepository: gcr.io/google-samples
+xtrabackupImage: xtrabackup:1.0
+xtrabackup:
+  internalPort: 3307
+
+nfsprovisionerRepository: quay.io
+nfsprovisionerImage: kubernetes_incubator/nfs-provisioner:v1.0.8
+nfsprovisionerPrefix: mysql
+
+sdnctlPrefix: mysql
index 1b5ca64..0b51150 100644 (file)
@@ -26,11 +26,11 @@ dependencies:
     repository: '@local'
     condition: aai.enabled
   - name: appc
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: appc.enabled
   - name: clamp
-    version: ~1.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: clamp.enabled
   - name: cli
@@ -49,7 +49,7 @@ dependencies:
     repository: '@local'
     condition: dcaegen2.enabled
   - name: esr
-    version: ~1.1.0
+    version: ~1.0.0
     repository: '@local'
     condition: esr.enabled
   - name: log
@@ -92,9 +92,6 @@ dependencies:
     version: ~0.1.0
     repository: '@local'
     condition: sdnc.enabled
-  - name: setup
-    version: ~2.0.0
-    repository: '@local'
   - name: so
     version: ~2.0.0
     repository: '@local'
@@ -37,7 +37,7 @@ global:
   # override default mount path root directory
   # referenced by persistent volumes and log files
   persistence:
-    mountPath: /dockerdata-nfs
+    mountPath: /dockerdata
 
   # flag to enable debugging - application support required
   debugEnabled: true
@@ -46,17 +46,52 @@ global:
 # Enable/disable and configure helm charts (ie. applications)
 # to customize the ONAP deployment.
 #################################################################
-consul:
+aaf:
+  enabled: false
+aai:
+  enabled: false
+appc:
+  enabled: false
+clamp:
   enabled: true
-
-so:
+cli:
+  enabled: false
+consul: # Consul Health Check Monitoring
+  enabled: false
+dcaegen2:
+  enabled: false
+esr:
+  enabled: false
+log:
+  enabled: false
+message-router:
+  enabled: false
+mock:
+  enabled: false
+msb:
+  enabled: false
+multicloud:
+  enabled: false
+policy:
+  enabled: false
+portal:
+  enabled: false
+robot: # Robot Health Check
+  enabled: true
+sdc:
+  enabled: false
+sdnc:
+  enabled: false
+so: # Service Orchestrator
   enabled: true
+
   replicaCount: 1
+
   liveness:
     # necessary to disable liveness probe when setting breakpoints
     # in debugger so K8s doesn't restart unresponsive container
     enabled: true
-    
+
   # so server configuration
   config:
     # message router configuration
@@ -71,4 +106,12 @@ so:
   # configure embedded mariadb
   mariadb:
     config:
-      mariadbRootPassword: password
\ No newline at end of file
+      mariadbRootPassword: password
+uui:
+  enabled: false
+vfc:
+  enabled: false
+vid:
+  enabled: false
+vnfsdk:
+  enabled: false
\ No newline at end of file
index be4d132..0c3ff85 100644 (file)
@@ -48,41 +48,41 @@ global:
 # to customize the ONAP deployment.
 #################################################################
 aaf:
-  enabled: false
+  enabled: true
 aai:
-  enabled: false
+  enabled: true
 appc:
-  enabled: false
+  enabled: true
 clamp:
-  enabled: false
+  enabled: true
 cli:
-  enabled: false
+  enabled: true
 consul: # Consul Health Check Monitoring
-  enabled: false
+  enabled: true
 dcaegen2:
-  enabled: false
+  enabled: true
 esr:
-  enabled: false
+  enabled: true
 log:
-  enabled: false
+  enabled: true
 message-router:
-  enabled: false
+  enabled: true
 mock:
-  enabled: false
+  enabled: true
 msb:
-  enabled: false
+  enabled: true
 multicloud:
-  enabled: false
+  enabled: true
 policy:
-  enabled: false
+  enabled: true
 portal:
-  enabled: false
+  enabled: true
 robot: # Robot Health Check
   enabled: true
 sdc:
-  enabled: false
+  enabled: true
 sdnc:
-  enabled: false
+  enabled: true
 so: # Service Orchestrator
   enabled: true
 
@@ -109,10 +109,10 @@ so: # Service Orchestrator
     config:
       mariadbRootPassword: password
 uui:
-  enabled: false
+  enabled: true
 vfc:
-  enabled: false
+  enabled: true
 vid:
-  enabled: false
+  enabled: true
 vnfsdk:
-  enabled: false
+  enabled: true
index 3f1af4d..716b76c 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Deploying MSB first so the started ONAP services can be registered to MSB
-HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'uui' 'aaf' 'vfc' 'esr')
+HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'uui' 'aaf' 'vfc' 'esr')
 ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001}
 ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker}
 ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker}
index 46ee285..1ba5fbb 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disablePortalPortaldb }}
 apiVersion: v1
index 232f5b1..f3418e7 100644 (file)
@@ -61,6 +61,7 @@ spec:
         image: {{ .Values.image.readiness }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: portal-vnc-readiness
+{{- if empty .Values.disablePolicyPap  | not }}
       - command:
         - /root/ready.py
         args:
@@ -72,6 +73,7 @@ spec:
         image: {{ .Values.image.readiness }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: vnc-pap-readiness
+{{- end }}
       - command:
         - /root/ready.py
         args:
@@ -132,3 +134,4 @@ spec:
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
+
index 3e2ddff..d4dbc1b 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disableSdcSdcCs }}
 apiVersion: v1
index d0f141f..29d592a 100644 (file)
@@ -82,7 +82,9 @@ spec:
         volumeMounts:
         - name: sdnc-data
           mountPath: /var/lib/mysql
+#{{ if not .Values.disableNfsProvisioner }}
           subPath: mysql
+#{{ end }}
         - name: conf
           mountPath: /etc/mysql/conf.d
       containers:
@@ -99,7 +101,9 @@ spec:
         volumeMounts:
         - mountPath: /var/lib/mysql
           name: sdnc-data
+#{{ if not .Values.disableNfsProvisioner }}
           subPath: mysql
+#{{ end }}
         - name: conf
           mountPath: /etc/mysql/conf.d
         ports:
@@ -178,7 +182,9 @@ spec:
         volumeMounts:
         - name: sdnc-data
           mountPath: /var/lib/mysql
+#{{ if not .Values.disableNfsProvisioner }}
           subPath: mysql
+#{{ end }}
         - name: conf
           mountPath: /etc/mysql/conf.d
         resources:
@@ -197,7 +203,7 @@ spec:
 #{{ if .Values.disableNfsProvisioner }}
       - name: sdnc-data
         hostPath:
-          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data
+          path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data/mysql
 #{{ else }}
   volumeClaimTemplates:
   - metadata:
@@ -211,3 +217,4 @@ spec:
           storage: 1Gi
 #{{ end }}
 #{{ end }}
+
diff --git a/kubernetes/setup/Chart.yaml b/kubernetes/setup/Chart.yaml
deleted file mode 100644 (file)
index d8c48f8..0000000
+++ /dev/null
@@ -1,18 +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.
-
-apiVersion: v1
-description: An ONAP environment setup chart
-name: setup
-version: 2.0.0
diff --git a/kubernetes/setup/values.yaml b/kubernetes/setup/values.yaml
deleted file mode 100644 (file)
index fb4de8a..0000000
+++ /dev/null
@@ -1,18 +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.
-
-global:
-  # image repositories
-  repository: nexus3.onap.org:10001
-  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
index bb4073f..184728f 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolume
index d9e59ca..e27c331 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolumeClaim
index 7a0c579..17f0193 100755 (executable)
@@ -9,9 +9,9 @@
 
     "mso-api-handler-infra-config":
     {
-      "bpelURL": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080",
+      "bpelURL": "http://so:8080",
       "bpelAuth": "786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1",
-      "camundaURL": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080",
+      "camundaURL": "http://so:8080",
       "camundaAuth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1"
     },
 
@@ -23,7 +23,7 @@
         "consumerGroup": "sdc-OpenSource-Env1",
         "consumerId": "sdc-COpenSource-Env11",
         "environmentName": "{{ .Values.config.dmaapTopic }}",
-        "asdcAddress": "sdc-be.onap-sdc.svc.cluster.local:8443",
+        "asdcAddress": "sdc-be:8443",
         "password": "613AF3483E695524F9857643B697FA51C7A9A0951094F53791485BF3458F9EADA37DBACCCEBD0CB242B85B4062745247",
         "pollingInterval": 60,
         "pollingTimeout": 60,
     {
       "sdncurls":
       [
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/L3SDN-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/config/L3SDN-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/Firewall-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/config",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/VNF-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/NBNC-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/NORTHBOUND-API:service-topology-operation",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/GENERIC-RESOURCE-API:",
-        "http://sdnhost.{{ .Release.Name }}-sdnc.svc.cluster.local:8282/restconf/operations/VNFTOPOLOGYAIC-API:"
+        "http://sdnhost:8282/restconf/operations/L3SDN-API:",
+        "http://sdnhost:8282/restconf/config/L3SDN-API:",
+        "http://sdnhost:8282/restconf/operations/Firewall-API:",
+        "http://sdnhost:8282/restconf/config",
+        "http://sdnhost:8282/restconf/operations/VNF-API:",
+        "http://sdnhost:8282/restconf/operations/NBNC-API:",
+        "http://sdnhost:8282/restconf/operations/NORTHBOUND-API:service-topology-operation",
+        "http://sdnhost:8282/restconf/operations/GENERIC-RESOURCE-API:",
+        "http://sdnhost:8282/restconf/operations/VNFTOPOLOGYAIC-API:"
       ],
 
-      "bpelurl": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/SDNCAdapterCallbackService",
-      "restbpelurl": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/WorkflowMessage",
-      "myurl": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/adapters/rest/SDNCNotify",
+      "bpelurl": "http://so:8080/mso/SDNCAdapterCallbackService",
+      "restbpelurl": "http://so:8080/mso/WorkflowMessage",
+      "myurl": "http://so:8080/adapters/rest/SDNCNotify",
       "sdncauth": "263f7d5f944d4d0c76db74b4148bec67d0bc796a874bc0d2a2a12aae89a866aa69133f700f391f784719a37f6a68d29bf5a2fbae1dab0402db7788c800c5ba73",
       "bpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1",
       "sdncconnecttime": "5000"
@@ -92,7 +92,7 @@
 
     "mso-workflow-message-adapter-config":
     {
-      "wmbpelurl": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/WorkflowMessage",
+      "wmbpelurl": "http://so:8080/mso/WorkflowMessage",
       "wmbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1"
     },
 
       "versionIdL3ToHigherLayerDeleteBonding": "52dbec20-47aa-42e4-936c-331d8e350d44",
       "infraCustomerId": "21014aa2-526b-11e6-beb8-9e71128cae77",
       "sniroAuth": "test:testpwd",
-      "sniroEndpoint": "http://sniro-emulator.{{ .Release.Name }}-mock.svc.cluster.local:8080/sniro/api/v2/placement",
+      "sniroEndpoint": "http://sniro-emulator:8080/sniro/api/v2/placement",
       "sniroTimeout": "PT30M",
-      "serviceAgnosticSniroHost": "http://sniro-emulator.{{ .Release.Name }}-mock.svc.cluster.local:8080",
+      "serviceAgnosticSniroHost": "http://sniro-emulator:8080",
       "serviceAgnosticSniroEndpoint": "/sniro/api/v2/placement",
-      "aaiEndpoint": "https://aai-service.{{ .Release.Name }}-aai.svc.cluster.local:8443",
+      "aaiEndpoint": "https://aai-service:8443",
       "aaiAuth": "2630606608347B7124C244AB0FE34F6F",
       "adaptersNamespace": "http://org.openecomp.mso",
-      "adaptersCompletemsoprocessEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/CompleteMsoProcess",
-      "adaptersDbEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/dbadapters/MsoRequestsDbAdapter",
-      "adaptersOpenecompDbEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/dbadapters/RequestsDbAdapter",
-      "catalogDbEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/ecomp/mso/catalog",
-      "adaptersSdncEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/adapters/SDNCAdapter",
-      "adaptersSdncRestEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/adapters/rest/v1/sdnc",
-      "adaptersTenantEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/tenants/TenantAdapter",
+      "adaptersCompletemsoprocessEndpoint": "http://so:8080/CompleteMsoProcess",
+      "adaptersDbEndpoint": "http://so:8080/dbadapters/MsoRequestsDbAdapter",
+      "adaptersOpenecompDbEndpoint": "http://so:8080/dbadapters/RequestsDbAdapter",
+      "catalogDbEndpoint": "http://so:8080/ecomp/mso/catalog",
+      "adaptersSdncEndpoint": "http://so:8080/adapters/SDNCAdapter",
+      "adaptersSdncRestEndpoint": "http://so:8080/adapters/rest/v1/sdnc",
+      "adaptersTenantEndpoint": "http://so:8080/tenants/TenantAdapter",
       "adaptersDbAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74",
-      "adaptersWorkflowMessageEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/workflows/messages/message",
-      "workflowMessageEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/WorkflowMessage",
-      "workflowSdncAdapterCallback": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/SDNCAdapterCallbackService",
+      "adaptersWorkflowMessageEndpoint": "http://so:8080/workflows/messages/message",
+      "workflowMessageEndpoint": "http://so:8080/mso/WorkflowMessage",
+      "workflowSdncAdapterCallback": "http://so:8080/mso/SDNCAdapterCallbackService",
       "workflowSdncReplicationDelay": "PT5S",
       "workflowAaiDistributionDelay": "PT30S",
       "msoKey": "07a7159d3bf51a0e53be7a8f89699be7",
       "adaptersPoAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74",
       "sdncTimeout": "PT5M",
       "rollback": "true",
-      "adaptersNetworkEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/networks/NetworkAdapter",
-      "adaptersNetworkRestEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/networks/rest/v1/networks",
-      "adaptersVnfAsyncEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/vnfs/VnfAdapterAsync",
-      "workflowVnfAdapterDeleteCallback": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/vnfAdapterNotify",
-      "workflowVnfAdapterCreateCallback": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/vnfAdapterNotify",
-      "adaptersVnfRestEndpoint": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/vnfs/rest/v1/vnfs",
-      "workflowVnfAdapterRestCallback": "http://mso.{{ .Release.Name }}-mso.svc.cluster.local:8080/mso/vnfAdapterRestNotify",
+      "adaptersNetworkEndpoint": "http://so:8080/networks/NetworkAdapter",
+      "adaptersNetworkRestEndpoint": "http://so:8080/networks/rest/v1/networks",
+      "adaptersVnfAsyncEndpoint": "http://so:8080/vnfs/VnfAdapterAsync",
+      "workflowVnfAdapterDeleteCallback": "http://so:8080/mso/vnfAdapterNotify",
+      "workflowVnfAdapterCreateCallback": "http://so:8080/mso/vnfAdapterNotify",
+      "adaptersVnfRestEndpoint": "http://so:8080/vnfs/rest/v1/vnfs",
+      "workflowVnfAdapterRestCallback": "http://so:8080/mso/vnfAdapterRestNotify",
       "poTimeout": "PT5M",
       "sdncFirewallYangModel": "http://com/att/svc/mis/firewall-lite-gui",
       "sdncFirewallYangModelVersion": "2015-05-15",
     "mso-config": "~> 1.0.0"
   }
 }
+
index 8706951..0727ce8 100644 (file)
@@ -49,7 +49,7 @@ spec:
         - name: {{ .Chart.Name }}
           command:
           - /tmp/start-jboss-server.sh
-          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -189,3 +189,4 @@ spec:
               mode: 0755
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
+
index de7e1c4..63e41ac 100644 (file)
@@ -15,7 +15,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: so
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
@@ -80,4 +80,5 @@ spec:
     {{- end}}
   selector:
     app: {{ include "common.name" . }}
-    release: {{ .Release.Name }}
\ No newline at end of file
+    release: {{ .Release.Name }}
+
index 0d2205b..4d8db67 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # 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.disableVidVidMariadb }}
 apiVersion: v1