Merge "External dependencies config"
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>
Fri, 6 Apr 2018 15:12:12 +0000 (15:12 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 6 Apr 2018 15:12:12 +0000 (15:12 +0000)
245 files changed:
docs/oom_quickstart_guide.rst
docs/oom_user_guide.rst
kubernetes/README.md
kubernetes/aaf/charts/aaf-cs/templates/deployment.yaml
kubernetes/aaf/charts/aaf-cs/values.yaml
kubernetes/aaf/charts/sms/Chart.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/Chart.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/templates/pv.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/templates/pvc.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/templates/service.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/templates/statefulset.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/charts/vault/values.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/templates/configmap.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/templates/deployment.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/templates/service.yaml [new file with mode: 0644]
kubernetes/aaf/charts/sms/values.yaml [new file with mode: 0644]
kubernetes/aaf/templates/deployment.yaml
kubernetes/aaf/values.yaml
kubernetes/aai/charts/aai-champ/Chart.yaml [moved from kubernetes/aai/charts/champ/Chart.yaml with 91% similarity]
kubernetes/aai/charts/aai-champ/requirements.yaml [moved from kubernetes/aai/charts/champ/requirements.yaml with 100% similarity]
kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/champ_policy.json [moved from kubernetes/aai/charts/champ/resources/config/appconfig/auth/champ_policy.json with 100% similarity]
kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore [moved from kubernetes/aai/charts/champ/resources/config/appconfig/auth/tomcat_keystore with 100% similarity]
kubernetes/aai/charts/aai-champ/resources/config/appconfig/champ-api.properties [moved from kubernetes/aai/charts/champ/resources/config/appconfig/champ-api.properties with 100% similarity]
kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml [moved from kubernetes/aai/charts/champ/resources/config/dynamic/conf/champ-beans.xml with 97% similarity]
kubernetes/aai/charts/aai-champ/templates/configmap.yaml [moved from kubernetes/aai/charts/champ/templates/configmap.yaml with 89% similarity]
kubernetes/aai/charts/aai-champ/templates/deployment.yaml [moved from kubernetes/aai/charts/champ/templates/deployment.yaml with 87% similarity]
kubernetes/aai/charts/aai-champ/templates/secrets.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-champ/templates/service.yaml [moved from kubernetes/aai/charts/champ/templates/service.yaml with 100% similarity]
kubernetes/aai/charts/aai-champ/values.yaml [moved from kubernetes/aai/charts/champ/values.yaml with 88% similarity]
kubernetes/aai/charts/aai-gizmo/.helmignore [moved from kubernetes/aai/charts/gizmo/.helmignore with 100% similarity]
kubernetes/aai/charts/aai-gizmo/Chart.yaml [moved from kubernetes/aai/charts/gizmo/Chart.yaml with 95% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/README.txt [moved from kubernetes/aai/charts/gizmo/resources/config/README.txt with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/auth/champ-cert.p12 [moved from kubernetes/aai/charts/gizmo/resources/config/auth/champ-cert.p12 with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/auth/crud_policy.json [moved from kubernetes/aai/charts/gizmo/resources/config/auth/crud_policy.json with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/auth/datarouter-cert.p12 [moved from kubernetes/aai/charts/gizmo/resources/config/auth/datarouter-cert.p12 with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/auth/tomcat_keystore [moved from kubernetes/aai/charts/gizmo/resources/config/auth/tomcat_keystore with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/crud-api.properties [moved from kubernetes/aai/charts/gizmo/resources/config/crud-api.properties with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/crud-beans.xml [moved from kubernetes/aai/charts/gizmo/resources/config/crud-beans.xml with 95% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/log/filebeat/filebeat.yml [moved from kubernetes/aai/charts/gizmo/resources/config/log/filebeat/filebeat.yml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/log/logback.xml [moved from kubernetes/aai/charts/gizmo/resources/config/log/logback.xml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v11.json [moved from kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v11.json with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v12.json [moved from kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v12.json with 100% similarity]
kubernetes/aai/charts/aai-gizmo/resources/config/model/edge_properties_v13.json [moved from kubernetes/aai/charts/gizmo/resources/config/model/edge_properties_v13.json with 100% similarity]
kubernetes/aai/charts/aai-gizmo/templates/NOTES.txt [moved from kubernetes/aai/charts/gizmo/templates/NOTES.txt with 100% similarity]
kubernetes/aai/charts/aai-gizmo/templates/configmap.yaml [moved from kubernetes/aai/charts/gizmo/templates/configmap.yaml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml [moved from kubernetes/aai/charts/gizmo/templates/deployment.yaml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/templates/secrets.yaml [moved from kubernetes/aai/charts/gizmo/templates/secrets.yaml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/templates/service.yaml [moved from kubernetes/aai/charts/gizmo/templates/service.yaml with 100% similarity]
kubernetes/aai/charts/aai-gizmo/values.yaml [moved from kubernetes/aai/charts/gizmo/values.yaml with 100% similarity]
kubernetes/appc/values.yaml
kubernetes/common/common/templates/_repository.tpl [new file with mode: 0644]
kubernetes/common/dgbuilder/resources/config/svclogic.properties
kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh
kubernetes/common/dgbuilder/resources/scripts/customSettings.js
kubernetes/common/dgbuilder/templates/deployment.yaml
kubernetes/common/dgbuilder/values.yaml
kubernetes/common/mysql/templates/service.yaml
kubernetes/common/mysql/templates/statefulset.yaml
kubernetes/common/mysql/values.yaml
kubernetes/common/postgres/.helmignore [new file with mode: 0644]
kubernetes/common/postgres/Chart.yaml [new file with mode: 0644]
kubernetes/common/postgres/requirements.yaml [new file with mode: 0644]
kubernetes/common/postgres/templates/pv.yaml [new file with mode: 0644]
kubernetes/common/postgres/templates/secrets.yaml [new file with mode: 0644]
kubernetes/common/postgres/templates/service.yaml [new file with mode: 0644]
kubernetes/common/postgres/templates/statefulset.yaml [new file with mode: 0644]
kubernetes/common/postgres/values.yaml [new file with mode: 0644]
kubernetes/config/docker/init/src/config/message-router/dmaap/MsgRtrApi.properties [deleted file]
kubernetes/config/docker/init/src/config/message-router/dmaap/cadi.properties [deleted file]
kubernetes/config/docker/init/src/config/message-router/dmaap/mykey [deleted file]
kubernetes/consul/Chart.yaml
kubernetes/consul/charts/consul-server/Chart.yaml [new file with mode: 0644]
kubernetes/consul/charts/consul-server/requirements.yaml [new file with mode: 0644]
kubernetes/consul/charts/consul-server/templates/NOTES.txt [new file with mode: 0644]
kubernetes/consul/charts/consul-server/templates/deployment.yaml [moved from kubernetes/consul/templates/consul-server-deployment.yaml with 54% similarity]
kubernetes/consul/charts/consul-server/templates/service.yaml [new file with mode: 0644]
kubernetes/consul/charts/consul-server/values.yaml [new file with mode: 0644]
kubernetes/consul/requirements.yaml [new file with mode: 0644]
kubernetes/consul/resources/config/consul-agent-config/vfc-health.json
kubernetes/consul/templates/configmap.yaml [moved from kubernetes/consul/templates/consul-agent-configmap.yaml with 67% similarity]
kubernetes/consul/templates/deployment.yaml [moved from kubernetes/consul/templates/consul-agent-deployment.yaml with 59% similarity]
kubernetes/consul/templates/secrets.yaml [new file with mode: 0644]
kubernetes/consul/values.yaml
kubernetes/helm/starters/onap-app/templates/deployment.yaml
kubernetes/helm/starters/onap-app/values.yaml
kubernetes/message-router/.helmignore [new file with mode: 0644]
kubernetes/message-router/Chart.yaml
kubernetes/message-router/charts/kafka/.helmignore [new file with mode: 0644]
kubernetes/message-router/charts/kafka/Chart.yaml [new file with mode: 0644]
kubernetes/message-router/charts/kafka/templates/NOTES.txt [new file with mode: 0644]
kubernetes/message-router/charts/kafka/templates/deployment.yaml [moved from kubernetes/message-router/templates/message-router-kafka.yaml with 50% similarity]
kubernetes/message-router/charts/kafka/templates/pv.yaml [new file with mode: 0644]
kubernetes/message-router/charts/kafka/templates/pvc.yaml [new file with mode: 0644]
kubernetes/message-router/charts/kafka/templates/service.yaml [new file with mode: 0644]
kubernetes/message-router/charts/kafka/values.yaml [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/.helmignore [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/Chart.yaml [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/templates/NOTES.txt [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/templates/deployment.yaml [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/templates/pv.yaml [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/templates/pvc.yaml [new file with mode: 0644]
kubernetes/message-router/charts/zookeeper/templates/service.yaml [moved from kubernetes/consul/templates/consul-server-service.yaml with 59% similarity]
kubernetes/message-router/charts/zookeeper/values.yaml [new file with mode: 0644]
kubernetes/message-router/requirements.yaml [new file with mode: 0644]
kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties
kubernetes/message-router/resources/config/dmaap/cadi.properties
kubernetes/message-router/templates/NOTES.txt [new file with mode: 0644]
kubernetes/message-router/templates/all-services.yaml [deleted file]
kubernetes/message-router/templates/configmap.yaml [new file with mode: 0644]
kubernetes/message-router/templates/deployment.yaml [new file with mode: 0644]
kubernetes/message-router/templates/dmaap-configmap.yaml [deleted file]
kubernetes/message-router/templates/message-router-dmaap.yaml [deleted file]
kubernetes/message-router/templates/message-router-pv-pvc.yaml [deleted file]
kubernetes/message-router/templates/message-router-zookeeper.yaml [deleted file]
kubernetes/message-router/templates/secrets.yaml [moved from kubernetes/aai/charts/champ/templates/secrets.yaml with 65% similarity]
kubernetes/message-router/templates/service.yaml [new file with mode: 0644]
kubernetes/message-router/values.yaml
kubernetes/msb/charts/kube2msb/templates/deployment.yaml
kubernetes/msb/charts/kube2msb/values.yaml
kubernetes/msb/charts/msb-discovery/templates/deployment.yaml
kubernetes/msb/charts/msb-eag/templates/deployment.yaml
kubernetes/msb/charts/msb-iag/templates/deployment.yaml
kubernetes/onap/requirements.yaml
kubernetes/onap/resources/environments/dev.yaml
kubernetes/onap/resources/environments/disable-allcharts.yaml [new file with mode: 0644]
kubernetes/onap/values.yaml
kubernetes/policy/Chart.yaml
kubernetes/policy/charts/brmsgw/Chart.yaml
kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf
kubernetes/policy/charts/brmsgw/templates/NOTES.txt
kubernetes/policy/charts/brmsgw/values.yaml
kubernetes/policy/charts/drools/Chart.yaml
kubernetes/policy/charts/drools/charts/nexus/Chart.yaml
kubernetes/policy/charts/drools/charts/nexus/values.yaml
kubernetes/policy/charts/drools/resources/config/drools/settings.xml
kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf
kubernetes/policy/charts/drools/templates/NOTES.txt
kubernetes/policy/charts/drools/templates/statefulset.yaml [moved from kubernetes/policy/charts/drools/templates/deployment.yaml with 96% similarity]
kubernetes/policy/charts/drools/values.yaml
kubernetes/policy/charts/mariadb/Chart.yaml
kubernetes/policy/charts/mariadb/templates/pv.yaml
kubernetes/policy/charts/pdp/Chart.yaml
kubernetes/policy/charts/pdp/resources/config/pe/pdp.conf
kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf
kubernetes/policy/charts/pdp/templates/NOTES.txt
kubernetes/policy/charts/pdp/templates/service.yaml
kubernetes/policy/charts/pdp/values.yaml
kubernetes/policy/charts/policy-common/Chart.yaml
kubernetes/policy/charts/policy-common/resources/config/pe/base.conf
kubernetes/policy/charts/policy-common/templates/NOTES.txt
kubernetes/policy/charts/policy-common/values.yaml
kubernetes/policy/requirements.yaml
kubernetes/policy/resources/config/pe/console.conf
kubernetes/policy/resources/config/pe/pap.conf
kubernetes/policy/resources/config/pe/paplp.conf
kubernetes/policy/resources/config/pe/push-policies.sh
kubernetes/policy/templates/NOTES.txt
kubernetes/policy/values.yaml
kubernetes/sdc/Chart.yaml
kubernetes/sdc/charts/sdc-be/Chart.yaml
kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
kubernetes/sdc/charts/sdc-be/templates/job.yaml
kubernetes/sdc/charts/sdc-be/templates/service.yaml
kubernetes/sdc/charts/sdc-be/values.yaml
kubernetes/sdc/charts/sdc-cs/Chart.yaml
kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml
kubernetes/sdc/charts/sdc-cs/templates/job.yaml
kubernetes/sdc/charts/sdc-cs/templates/pv.yaml
kubernetes/sdc/charts/sdc-cs/templates/pvc.yaml
kubernetes/sdc/charts/sdc-cs/templates/secrets.yaml
kubernetes/sdc/charts/sdc-cs/templates/service.yaml
kubernetes/sdc/charts/sdc-cs/values.yaml
kubernetes/sdc/charts/sdc-es/Chart.yaml
kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
kubernetes/sdc/charts/sdc-es/templates/job.yaml
kubernetes/sdc/charts/sdc-es/templates/pv.yaml
kubernetes/sdc/charts/sdc-es/templates/pvc.yaml
kubernetes/sdc/charts/sdc-es/templates/service.yaml
kubernetes/sdc/charts/sdc-es/values.yaml
kubernetes/sdc/charts/sdc-fe/Chart.yaml
kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml
kubernetes/sdc/charts/sdc-fe/templates/service.yaml
kubernetes/sdc/charts/sdc-fe/values.yaml
kubernetes/sdc/charts/sdc-kb/Chart.yaml
kubernetes/sdc/charts/sdc-kb/templates/deployment.yaml
kubernetes/sdc/charts/sdc-kb/templates/service.yaml
kubernetes/sdc/charts/sdc-kb/values.yaml
kubernetes/sdc/charts/sdc-wfd/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-wfd/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-wfd/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-wfd/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-wfd/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-wfd/values.yaml [new file with mode: 0644]
kubernetes/sdc/requirements.yaml
kubernetes/sdc/templates/configmap.yaml
kubernetes/sdc/values.yaml
kubernetes/sdnc/.helmignore [new file with mode: 0644]
kubernetes/sdnc/Chart.yaml
kubernetes/sdnc/charts/dmaap-listener/Chart.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/dmaap-listener/requirements.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/dmaap-listener/resources/config/dhcpalert.properties [moved from kubernetes/sdnc/resources/config/dmaap/dhcpalert.properties with 88% similarity]
kubernetes/sdnc/charts/dmaap-listener/templates/configmap.yaml [moved from kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml with 80% similarity]
kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml [moved from kubernetes/sdnc/templates/dmaap-deployment.yaml with 51% similarity]
kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml [moved from kubernetes/sdnc/templates/mysql-configmap.yaml with 64% similarity]
kubernetes/sdnc/charts/dmaap-listener/values.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/.helmignore [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/Chart.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/requirements.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json [moved from kubernetes/sdnc/resources/config/conf/admportal.json with 94% similarity, mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml [moved from kubernetes/sdnc/templates/sdnc-conf-configmap.yaml with 77% similarity]
kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/sdnc-portal/values.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/ueb-listener/Chart.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/ueb-listener/requirements.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/ueb-listener/resources/config/ueb-listener.properties [moved from kubernetes/sdnc/resources/config/ueb/ueb-listener.properties with 91% similarity]
kubernetes/sdnc/charts/ueb-listener/templates/configmap.yaml [moved from kubernetes/sdnc/templates/ueb-deployment-configmap.yaml with 81% similarity]
kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml [moved from kubernetes/sdnc/templates/ueb-deployment.yaml with 53% similarity]
kubernetes/sdnc/charts/ueb-listener/templates/service.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/ueb-listener/values.yaml [new file with mode: 0644]
kubernetes/sdnc/requirements.yaml [new file with mode: 0644]
kubernetes/sdnc/resources/config/bin/installSdncDb.sh [new file with mode: 0644]
kubernetes/sdnc/resources/config/bin/startODL.sh [new file with mode: 0755]
kubernetes/sdnc/resources/config/conf/aaiclient.properties
kubernetes/sdnc/resources/config/conf/dblib.properties [new file with mode: 0644]
kubernetes/sdnc/resources/config/conf/svclogic.properties [new file with mode: 0644]
kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg
kubernetes/sdnc/templates/all-services.yaml [deleted file]
kubernetes/sdnc/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/db-statefulset.yaml [deleted file]
kubernetes/sdnc/templates/dgbuilder-deployment.yaml [deleted file]
kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml [deleted file]
kubernetes/sdnc/templates/sdnc-data-storageclass.yaml [deleted file]
kubernetes/sdnc/templates/sdnc-log-configmap.yaml [deleted file]
kubernetes/sdnc/templates/sdnc-statefulset.yaml [deleted file]
kubernetes/sdnc/templates/secrets.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/service.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/statefulset.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/web-deployment.yaml [deleted file]
kubernetes/sdnc/values.yaml
kubernetes/vfc/templates/all-services.yaml
kubernetes/vfc/templates/vfc-nokiav2vnfmdriver-deployment.yaml [new file with mode: 0644]
kubernetes/vfc/values.yaml

index 879bbb9..eb5d373 100644 (file)
@@ -166,7 +166,7 @@ follows::
 **Step 7.** Once the repo is setup, installation of ONAP can be done with a
 single command::
 
-  > helm install local/onap -name dev --namespace onap
+  > helm install local/onap -n dev --namespace onap
 
 .. note::
   The requirement for the use of the `onap` namespace will be lifted once the OOM team completes their Beijing deveivers.
index 97b2fde..1b9a3ea 100644 (file)
@@ -48,7 +48,48 @@ The OOM team with assistance from the ONAP project teams, have built a
 comprehensive set of Helm charts, yaml files very similar to TOSCA files, that
 describe the composition of each of the ONAP components and the relationship
 within and between components. Using this model Helm is able to deploy all of
-ONAP this simple command::
+ONAP with a few simple commands.
+
+Pre-requisites
+--------------
+Your environment must have both the Kubernetes `kubectl` and Helm setup as a one time activity.
+
+Install Kubectl
+~~~~~~~~~~~~~~~
+Enter the following to install kubectl (on Ubuntu, there are slight differences on other O/Ss), the Kubernetes command line interface used to manage a Kubernetes cluster::
+
+  > curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.8.6/bin/linux/amd64/kubectl
+  > chmod +x ./kubectl
+  > sudo mv ./kubectl /usr/local/bin/kubectl
+  > mkdir ~/.kube
+
+Paste kubectl config from Rancher (see the :ref:`cloud-setup-guide-label` for alternative Kubenetes environment setups) into the `~/.kube/config` file.
+
+Verify that the Kubernetes config is correct::
+
+  > kubectl get pods --all-namespaces
+
+At this point you should see six Kubernetes pods running.
+
+Install Helm
+~~~~~~~~~~~~
+Helm is used by OOM for package and configuration management. To install Helm, enter the following::
+
+  > wget http://storage.googleapis.com/kubernetes-helm/helm-v2.6.1-linux-amd64.tar.gz
+  > tar -zxvf helm-v2.6.1-linux-amd64.tar.gz
+  > sudo mv linux-amd64/helm /usr/local/bin/helm
+
+Verify the Helm version with::
+
+  > helm version
+
+Install the Helm Tiller application and initialize with::
+
+  > helm init
+
+Install the Helm Repo
+---------------------
+Once kubectl and Helm are setup, one needs to setup a local Helm server to server up the ONAP charts::
 
   > helm install osn/onap
 
@@ -68,10 +109,12 @@ stable which should be removed to avoid confusion::
 To prepare your system for an installation of ONAP, you'll need to::
 
   > git clone http://gerrit.onap.org/r/oom
-  > cd kubernetes
+  > cd oom/kubernetes
+
 
 To setup a local Helm server to server up the ONAP charts::
 
+  > helm init
   > helm serve &
 
 Note the port number that is listed and use it in the Helm repo add as follows::
index 9c315cb..9d8d4cc 100644 (file)
@@ -18,7 +18,7 @@ Step 1. Clone the OOM repository from ONAP gerrit:
 > cd oom/kubernetes
 ```
 
-Step 2. Customize the oom/kubernetes/onap parent chart, like the values.yaml file, to suit your deployment. You may want to selectively enable or disable ONAP components by changing the subchart **enabled** flags to *true* or *false*.
+Step 2. Customize the oom/kubernetes/onap parent chart, like the values.yaml file, to suit your deployment. You may want to selectively enable or disable ONAP components by changing the subchart **enabled** flags to *true* or *false*.  The .yaml file for OpenStackEncryptedPassword should be the MSO ecnrypted value of the openstack tenant password
 ```
 Example:
 ...
@@ -32,8 +32,8 @@ so: # Service Orchestrator
   enabled: true
 ...
 ```
-
 Step 3. To setup a local Helm repository to serve up the local ONAP charts:
+        [Note: ensure helm init has been executed on the node, or run helm init --client-only]
 ```
 > helm serve &
 ```
@@ -64,7 +64,7 @@ Setup of this Helm repository is a one time activity. If you make changes to you
 
 Step 6. Once the repo is setup, installation of ONAP can be done with a single command:
 ```
-> helm install local/onap -name dev --namespace onap
+> helm install local/onap --name dev --namespace onap
 ```
 **Note:** the **--namespace onap** is currently required while all onap helm charts are migrated to version 2.0. After this activity is complete, namespaces will be optional.
 
index 80b99b2..15e574f 100644 (file)
@@ -36,7 +36,7 @@ spec:
       hostname: {{ include "common.name" . }}
       containers:
       - args:
-        image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}
         volumeMounts:
index ea5445f..89b83cd 100644 (file)
 global:
   nodePortPrefix: 302
   repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
-  
-# If mountPath is over NFS (e.g. /dockerdata-nfs is NFS mounted between the nodes), uncomment following lines.
-#  persistence:
-#    mountPath: /dockerdata
+
 
 #################################################################
 # Application configuration defaults.
diff --git a/kubernetes/aaf/charts/sms/Chart.yaml b/kubernetes/aaf/charts/sms/Chart.yaml
new file mode 100644 (file)
index 0000000..962ef38
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# 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: ONAP Secret Management Service
+name: sms
+version: 2.0.0
diff --git a/kubernetes/aaf/charts/sms/charts/vault/Chart.yaml b/kubernetes/aaf/charts/sms/charts/vault/Chart.yaml
new file mode 100644 (file)
index 0000000..bf1af99
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# 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: Chart to launch Vault as SMS backend
+name: vault
+appVersion: 0.9.5
+version: 2.0.0
diff --git a/kubernetes/aaf/charts/sms/charts/vault/templates/configmap.yaml b/kubernetes/aaf/charts/sms/charts/vault/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..daf8cad
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-vault
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  config.json: |
+    {{ .Values.config.vault | toJson }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-consul
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  config.json: |
+    {{ .Values.config.consul | toJson }}
diff --git a/kubernetes/aaf/charts/sms/charts/vault/templates/pv.yaml b/kubernetes/aaf/charts/sms/charts/vault/templates/pv.yaml
new file mode 100644 (file)
index 0000000..37ed28e
--- /dev/null
@@ -0,0 +1,37 @@
+{{/*
+# Copyright 2018 Intel Corporation, Inc
+#
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+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 }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/aaf/charts/sms/charts/vault/templates/pvc.yaml b/kubernetes/aaf/charts/sms/charts/vault/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..e6aacd1
--- /dev/null
@@ -0,0 +1,48 @@
+{{/*
+# Copyright 2018 Intel Corporation, Inc
+#
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
diff --git a/kubernetes/aaf/charts/sms/charts/vault/templates/service.yaml b/kubernetes/aaf/charts/sms/charts/vault/templates/service.yaml
new file mode 100644 (file)
index 0000000..cb2f286
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Service
+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 }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  - name: {{ .Values.service.name }}
+    {{if eq .Values.service.type "NodePort" -}}
+    port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
+    {{- else -}}
+    port: {{ .Values.service.externalPort }}
+    targetPort: {{ .Values.service.internalPort }}
+    {{- end}}
+    protocol: TCP
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/aaf/charts/sms/charts/vault/templates/statefulset.yaml b/kubernetes/aaf/charts/sms/charts/vault/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..26f0304
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  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 }}
+  serviceName:
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+      - image: "{{ include "common.repository" . }}/{{ .Values.image.vault }}"
+        name: {{ include "common.name" . }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command: ["vault","server","-config","/vault/config/config.json"]
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        volumeMounts:
+        - mountPath: /vault/config/config.json
+          name: {{ include "common.fullname" . }}-vault
+          subPath: config.json
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+
+      - image: "{{ include "common.repository" . }}/{{ .Values.image.consul }}"
+        name: {{ include "common.name" . }}-backend
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command: ["consul","agent","-server","-client","0.0.0.0","-bootstrap-expect=1","-config-file","/consul/config/config.json"]
+        ports:
+        - name: http
+          containerPort: 8500
+        volumeMounts:
+        - mountPath: /consul/data
+          name: {{ include "common.fullname" . }}-consuldata
+        - mountPath: /consul/config/config.json
+          name: {{ include "common.fullname" . }}-consulconfiguration
+          subPath: config.json
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+      volumes:
+        - name: {{ include "common.fullname" . }}-consuldata
+          persistentVolumeClaim:
+            claimName: {{ include "common.fullname" . }}
+        - name: {{ include "common.fullname" . }}-consulconfiguration
+          configMap:
+            name: {{ include "common.fullname" . }}-consul
+        - name: {{ include "common.fullname" . }}-vault
+          configMap:
+            name: {{ include "common.fullname" . }}-vault
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+
diff --git a/kubernetes/aaf/charts/sms/charts/vault/values.yaml b/kubernetes/aaf/charts/sms/charts/vault/values.yaml
new file mode 100644 (file)
index 0000000..c65e6e1
--- /dev/null
@@ -0,0 +1,112 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  persistence: {}
+
+# application image
+repository: docker.io
+image:
+  consul: consul:1.0.6
+  vault: vault:0.9.6
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+config:
+  consul:
+    server: true
+    log_level: INFO
+    server: true
+    data_dir: '/consul/data'
+    ports:
+      http: 8500
+      https: -1
+
+  vault:
+    storage:
+      consul:
+        address: localhost:8500
+        path: smsvault
+    listener:
+      tcp:
+        address: '[::]:8200'
+        tls_disable: true
+    disable_mlock: true
+
+# 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
+
+persistence:
+  enabled: true
+
+  volumeReclaimPolicy: Retain
+
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: sms/consul/data
+
+service:
+  type: NodePort
+  name: vault
+  internalPort: 8200
+  nodePort: 44
+
+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
diff --git a/kubernetes/aaf/charts/sms/templates/configmap.yaml b/kubernetes/aaf/charts/sms/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..72ce6fb
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+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 }}
+data:
+  smsconfig.json: |
+    {{ .Values.config | toJson }}
diff --git a/kubernetes/aaf/charts/sms/templates/deployment.yaml b/kubernetes/aaf/charts/sms/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..66c649c
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# 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: 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:
+      containers:
+      - image: "{{ .Values.repository }}/{{ .Values.image }}"
+        name: {{ include "common.name" . }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        command: ["/sms/bin/sms"]
+        workingDir: /sms/
+        env:
+        - name: {{ .Values.config.smsdburlenv }}
+          value: "http://{{ include "common.namespace" . }}-smsdb:8200"
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /sms/smsconfig.json
+            name: {{ include "common.name" .}}
+            subPath: smsconfig.json
+        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 : {{ include "common.name" . }}
+        configMap:
+          name: {{ include "common.fullname" . }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aaf/charts/sms/templates/service.yaml b/kubernetes/aaf/charts/sms/templates/service.yaml
new file mode 100644 (file)
index 0000000..cb2f286
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Service
+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 }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  - name: {{ .Values.service.name }}
+    {{if eq .Values.service.type "NodePort" -}}
+    port: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }}
+    {{- else -}}
+    port: {{ .Values.service.externalPort }}
+    targetPort: {{ .Values.service.internalPort }}
+    {{- end}}
+    protocol: TCP
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/aaf/charts/sms/values.yaml b/kubernetes/aaf/charts/sms/values.yaml
new file mode 100644 (file)
index 0000000..3db9b9a
--- /dev/null
@@ -0,0 +1,95 @@
+# Copyright 2018 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.1
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/aaf/sms
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+  smsdburlenv: "SMSDB_URL"
+  cafile: "/sms/auth/selfsignedca.pem"
+  servercert: "/sms/auth/server.cert"
+  serverkey: "/sms/auth/server.key"
+  disable_tls: true
+
+# subchart configuration
+vault:
+  nameOverride: smsdb
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 20
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 20
+
+service:
+  type: NodePort
+  name: sms
+  internalPort: 10443
+  nodePort: 43
+
+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 03506b5..2a4e7d2 100644 (file)
@@ -52,7 +52,7 @@ spec:
       - env:
         - name: CASSANDRA_CLUSTER
           value: cassandra_container
-        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /data
index 4f9c1c6..ffdfaa5 100644 (file)
@@ -17,7 +17,6 @@
 #################################################################
 global:
   nodePortPrefix: 302
-  repository: nexus3.onap.org:10001
   repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
   readinessRepository: oomk8s
   readinessImage: readiness-check:1.1.0
similarity index 91%
rename from kubernetes/aai/charts/champ/Chart.yaml
rename to kubernetes/aai/charts/aai-champ/Chart.yaml
index a4ee888..1704337 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Champ microservice
-name: champ
+description: ONAP AAI Champ microservice
+name: aai-champ
 version: 2.0.0
@@ -23,7 +23,7 @@ xsi:schemaLocation="
 
         <entry key="graph.name" value="aaigraph.dev"/>
         <entry key="storage.backend" value="hbase"/>
-        <entry key="storage.hostname" value="hbase.{{.Release.Namespace}}"/>
+        <entry key="storage.hostname" value="aai-hbase.{{.Release.Namespace}}"/>
 
         <!-- Hbase Config -->
         <entry key="storage.hbase.ext.hbase.zookeeper.property.clientPort" value="2181"/>
@@ -15,7 +15,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-configmap
+  name: {{ include "common.fullname" . }}
   namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/appconfig/*").AsConfig . | indent 2 }}
@@ -23,7 +23,7 @@ data:
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-dynamic-configmap
+  name: {{ include "common.fullname" . }}-dynamic
   namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/dynamic/conf/*").AsConfig . | indent 2 }}
@@ -55,6 +55,16 @@ spec:
               value: "/opt/app/champ-service/appconfig"
             - name: GRAPHIMPL
               value: "janus-deps"
+            - name: KEY_STORE_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}-pass
+                  key: KEY_STORE_PASSWORD
+            - name: KEY_MANAGER_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}-pass
+                  key: KEY_MANAGER_PASSWORD
             - name: SERVICE_BEANS
               value: "/opt/app/champ-service/dynamic/conf"
           volumeMounts:
@@ -88,16 +98,16 @@ spec:
             path: /etc/localtime
         - name: {{ include "common.fullname" . }}-config
           configMap:
-            name: {{ include "common.fullname" . }}-configmap
+            name: {{ include "common.fullname" . }}
             items:
             - key: champ-api.properties
               path: champ-api.properties
         - name: {{ include "common.fullname" . }}-secrets
           secret:
-            secretName: {{ include "common.fullname" . }}-champ-secrets
+            secretName: {{ include "common.fullname" . }}-champ
         - name: {{ include "common.fullname" . }}-dynamic-config
           configMap:
-            name: {{ include "common.fullname" . }}-dynamic-configmap
+            name: {{ include "common.fullname" . }}-dynamic
             items:
             - key: champ-beans.xml
               path: champ-beans.xml
diff --git a/kubernetes/aai/charts/aai-champ/templates/secrets.yaml b/kubernetes/aai/charts/aai-champ/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..c0e2559
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright © 2018 Amdocs, AT&T
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-champ
+  namespace: {{ include "common.namespace" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/appconfig/auth/*").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-pass
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+type: Opaque
+data:
+  KEY_STORE_PASSWORD: {{ .Values.config.keyStorePassword | b64enc | quote }}
+  KEY_MANAGER_PASSWORD: {{ .Values.config.keyManagerPassword | b64enc | quote }}
+
similarity index 88%
rename from kubernetes/aai/charts/champ/values.yaml
rename to kubernetes/aai/charts/aai-champ/values.yaml
index 91a1e52..d5d9b39 100644 (file)
@@ -24,7 +24,12 @@ global:
 #################################################################
 
 # application image
-image: onap/champ:1.2.0
+image: onap/champ:1.2-STAGING-latest
+
+# application configuration
+config:
+  keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+  keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
 
 # default number of instances
 replicaCount: 1
@@ -48,7 +53,6 @@ readiness:
 service:
   type: NodePort
   name: champ
-  externalPort: 78
   internalPort: 9522
   nodePort: 78
 
similarity index 95%
rename from kubernetes/aai/charts/gizmo/Chart.yaml
rename to kubernetes/aai/charts/aai-gizmo/Chart.yaml
index 4633b06..86f3643 100644 (file)
@@ -14,5 +14,5 @@
 
 apiVersion: v1
 description: Gizmo service
-name: gizmo
-version: 2.0.0
\ No newline at end of file
+name: aai-gizmo
+version: 2.0.0
@@ -9,7 +9,7 @@
                 ">
 
      <bean id="champDao" class="org.onap.crud.dao.champ.ChampDao">
-         <constructor-arg name="champUrl" value="https://{{.Release.Name}}-champ.{{.Release.Namespace}}:9522/services/champ-service/v1/"/>
+         <constructor-arg name="champUrl" value="https://{{.Release.Name}}-aai-champ.{{.Release.Namespace}}:9522/services/champ-service/v1/"/>
          <constructor-arg name="certPassword" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10"/>
      </bean>
 
@@ -32,4 +32,4 @@
          <constructor-arg name="graphDataService" ref="graphDataService" />
      </bean>
 
-</beans>
\ No newline at end of file
+</beans>
index b5a13ef..ea3239e 100644 (file)
@@ -22,9 +22,8 @@ global:
   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
+  persistence:
+    mountPath: /dockerdata-nfs
 
 #################################################################
 # Application configuration defaults.
@@ -59,8 +58,9 @@ mysql:
 
 dgbuilder:
   nameOverride: appc-dgbuilder
-  dbPodName: appc-db
-  dbServiceName: appc-dbhost
+  config:
+    dbPodName: appc-db
+    dbServiceName: appc-dbhost
 
 # default number of instances
 replicaCount: 3
diff --git a/kubernetes/common/common/templates/_repository.tpl b/kubernetes/common/common/templates/_repository.tpl
new file mode 100644 (file)
index 0000000..e054b57
--- /dev/null
@@ -0,0 +1,31 @@
+{{/*
+# 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.
+*/}}
+
+{{/*
+  Resolve the name of the common image repository.
+  The value for .Values.repository is used by default,
+  unless either override mechanism is used.
+
+  - .Values.global.repository  : override default image repository for all images
+  - .Values.repositoryOverride : override global and default image repository on a per image basis
+*/}}
+{{- define "common.repository" -}}
+  {{if .Values.repositoryOverride }}
+    {{- printf "%s" .Values.repositoryOverride -}}
+  {{else}}
+    {{- default .Values.repository .Values.global.repository -}}
+  {{end}}
+{{- end -}}
\ No newline at end of file
index fdaf577..dc3980d 100644 (file)
@@ -1,5 +1,5 @@
 org.onap.ccsdk.sli.dbtype=jdbc
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
 org.onap.ccsdk.sli.jdbc.database=sdnctl
 org.onap.ccsdk.sli.jdbc.user=sdnctl
 org.onap.ccsdk.sli.jdbc.password=gamma
index 38f7fe2..76d1770 100755 (executable)
@@ -6,7 +6,7 @@ then
        echo "Usage $0 releaseDir  loginId emailAddress [gitLocalRepository]"
        echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository"
        exit
-fi 
+fi
 if [ ! -e "releases" ]
 then
        mkdir releases
@@ -15,7 +15,7 @@ releaseDir="$1"
 name="Release $releaseDir"
 loginId="$2"
 emailid="$3"
-dbHost="{{.Values.dbServiceName}}.{{.Release.Namespace}}"
+dbHost="{{.Values.config.dbServiceName}}.{{.Release.Namespace}}"
 dbPort="3306"
 dbName="sdnctl"
 dbUser="sdnctl"
@@ -76,7 +76,7 @@ fi
        #echo "Created custom settings  file $customSettingsFile"
        echo "Done ....."
 else
-       echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"     
+       echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir"
        exit
 fi
 #echo "Content of custom settings file"
@@ -86,17 +86,17 @@ fi
 svclogicPropFile="./conf/svclogic.properties"
 if [ ! -d "${appDir}/yangFiles" ]
 then
-       mkdir -p "${appDir}/yangFiles" 
+       mkdir -p "${appDir}/yangFiles"
 fi
 if [ ! -d "${appDir}/generatedJS" ]
 then
-       mkdir -p "${appDir}/generatedJS" 
+       mkdir -p "${appDir}/generatedJS"
 fi
 
 if [ ! -e "./$svclogicPropFile" ]
 then
        echo "org.onap.ccsdk.sli.dbtype=jdbc" >$svclogicPropFile
-       echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile
+       echo "org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{.Release.Namespace}}:3306/sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.database=sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.user=sdnctl" >>$svclogicPropFile
        echo "org.onap.ccsdk.sli.jdbc.password=gamma" >>$svclogicPropFile
index 01bbcc7..22810ba 100644 (file)
@@ -29,7 +29,7 @@ module.exports={
         "user": "dguser",
         "pass": "cc03e747a6afbbcbf8be7668acfebee5"
     },
-    "dbHost": "{{.Values.dbServiceName}}.{{ include "common.namespace" . }}",
+    "dbHost": "{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}",
     "dbPort": "3306",
     "dbName": "sdnctl",
     "dbUser": "sdnctl",
index 4e1f101..a1e9568 100644 (file)
@@ -21,7 +21,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.dbPodName }}
+        - {{ .Values.config.dbPodName }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -35,10 +35,8 @@ spec:
         - 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
+          command: ["/bin/bash"]
+          args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"]
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           readinessProbe:
index 23f8eea..a53ed83 100644 (file)
@@ -28,13 +28,13 @@ global:
 
   # 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
+image: onap/ccsdk-dgbuilder-image:0.2.1-SNAPSHOT
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -43,6 +43,9 @@ debugEnabled: false
 # application configuration
 config:
   dbRootPassword: openECOMP1.0
+  dbPodName: mysql-db
+  dbServiceName: sdnc-dbhost
+
 
 # default number of instances
 replicaCount: 1
index c6a28c4..db08c3a 100644 (file)
@@ -88,3 +88,27 @@ spec:
     app: {{ include "common.name" . }}
     release: {{ .Release.Name }}
   clusterIP: None
+---
+{{ if .Values.geoEnabled }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name }}-nodeport
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+spec:
+  ports:
+  - name: {{ .Values.service.internalPort }}
+    port: {{ .Values.service.internalPort }}
+    targetPort: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort1 }}
+  - name: {{ .Values.xtrabackup.internalPort }}
+    port: {{ .Values.xtrabackup.internalPort }}
+    targetPort: {{ .Values.xtrabackup.internalPort }}
+    nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort2 }}
+  type: NodePort
+  selector:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+    release: {{ .Release.Name }}
+{{ end }}
index 7b55bf2..e3f3428 100644 (file)
@@ -45,10 +45,11 @@ spec:
           # Generate mysql server-id from pod ordinal index.
           [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
           ordinal=${BASH_REMATCH[1]}
+          siteId={{ .Values.geoSiteId }}
           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
+          echo server-id=$(($siteId*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/
@@ -93,7 +94,7 @@ spec:
           subPath: mysql
         - name: conf
           mountPath: /etc/mysql/conf.d
-          
+
       containers:
         #sdnc-db-container
         - name: {{ include "common.name" . }}
@@ -236,3 +237,4 @@ spec:
 #{{ else }}
         emptyDir: {}
 #{{ end }}
+
index c0beb6f..43b690a 100644 (file)
@@ -109,3 +109,6 @@ nfsprovisionerImage: kubernetes_incubator/nfs-provisioner:v1.0.8
 nfsprovisionerPrefix: mysql
 
 sdnctlPrefix: mysql
+
+geoEnabled: false
+geoSiteId: 1
diff --git a/kubernetes/common/postgres/.helmignore b/kubernetes/common/postgres/.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/common/postgres/Chart.yaml b/kubernetes/common/postgres/Chart.yaml
new file mode 100644 (file)
index 0000000..1d00b85
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 Amdocs, AT&T, 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: ONAP Postgres Server
+name: postgres
+version: 2.0.0
diff --git a/kubernetes/common/postgres/requirements.yaml b/kubernetes/common/postgres/requirements.yaml
new file mode 100644 (file)
index 0000000..e597fca
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 Amdocs, AT&T, 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
diff --git a/kubernetes/common/postgres/templates/pv.yaml b/kubernetes/common/postgres/templates/pv.yaml
new file mode 100644 (file)
index 0000000..e08c934
--- /dev/null
@@ -0,0 +1,58 @@
+{{/*
+# Copyright © 2018 Amdocs, AT&T, 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-data0
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.fullname" . }}
+    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 }}0
+---
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-data1
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.fullname" . }}
+    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 }}1
+{{- end -}}
diff --git a/kubernetes/common/postgres/templates/secrets.yaml b/kubernetes/common/postgres/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..29de3af
--- /dev/null
@@ -0,0 +1,31 @@
+{{/*
+# Copyright © 2018 Amdocs, AT&T, 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
+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:
+  pg-primary-password: {{ .Values.config.pgPrimaryPassword | b64enc | quote }}
+  pg-user-password: {{ .Values.config.pgUserPassword | b64enc | quote }}
+  pg-root-password: {{ .Values.config.pgRootPassword | b64enc | quote }}
+  
diff --git a/kubernetes/common/postgres/templates/service.yaml b/kubernetes/common/postgres/templates/service.yaml
new file mode 100644 (file)
index 0000000..2a4e369
--- /dev/null
@@ -0,0 +1,95 @@
+{{/*
+# Copyright © 2018 Amdocs, AT&T, 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
+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 }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      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 }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name2 }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type2 }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: {{ .Values.service.name2 }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort2 }}
+      targetPort: {{ .Values.service.internalPort2 }}
+      name: {{ .Values.service.name2 }}
+    {{- end}}
+  selector:
+    name: "{{.Values.container.name.primary}}"
+    release: {{ .Release.Name }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.service.name3 }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type3 }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort3 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
+      name: {{ .Values.service.name3 }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort3 }}
+      targetPort: {{ .Values.service.internalPort3 }}
+      name: {{ .Values.service.name3 }}
+    {{- end}}
+  selector:
+    name: "{{.Values.container.name.replica}}"
+    release: {{ .Release.Name }}
diff --git a/kubernetes/common/postgres/templates/statefulset.yaml b/kubernetes/common/postgres/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..e42e9eb
--- /dev/null
@@ -0,0 +1,147 @@
+{{/*
+# Copyright © 2018 Amdocs, AT&T, Bell Canada
+# #
+# # Licensed under the Apache License, Version 2.0 (the "License");
+# # you may not use this file except in compliance with the License.
+# # You may obtain a copy of the License at
+# #
+# #       http://www.apache.org/licenses/LICENSE-2.0
+# #
+# # Unless required by applicable law or agreed to in writing, software
+# # distributed under the License is distributed on an "AS IS" BASIS,
+# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# # See the License for the specific language governing permissions and
+# # limitations under the License.
+*/}}
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  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:
+      - command:
+        - /bin/sh
+        - -c
+        - |
+          for i in $(seq 0 $(({{ .Values.replicaCount }}-1))); do mkdir -p /podroot/data$i; done
+          chmod 777 /podroot/*
+        env:
+        - name: POD_NAME
+          valueFrom: { fieldRef: { fieldPath: metadata.name } }
+        securityContext:
+          privileged: true
+        image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.busyboxImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: init-sysctl
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-init
+          mountPath: /podroot/
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.postgresRepository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+          name: postgres
+        # disable liveness probe when breakpoints set in debugger
+        # so K8s doesn't restart unresponsive container
+        {{- if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          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: PGHOST
+          value: /tmp
+        - name: PG_PRIMARY_USER
+          value: primaryuser
+        - name: PG_MODE
+          value: set
+        - name: PG_PRIMARY_HOST
+          value: "{{.Values.container.name.primary}}"
+        - name: PG_REPLICA_HOST
+          value: "{{.Values.container.name.replica}}"
+        - name: PG_PRIMARY_PORT
+          value: "{{.Values.service.internalPort}}"
+        - name: PG_PRIMARY_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}
+              key: pg-primary-password
+        - name: PG_USER
+          value: "{{.Values.config.pgUserName}}"
+        - name: PG_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}
+              key: pg-user-password
+        - name: PG_DATABASE
+          value: "{{.Values.config.pgDatabase}}"
+        - name: PG_ROOT_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}
+              key: pg-root-password
+        volumeMounts:
+        - mountPath: /pgdata
+          name: {{ include "common.fullname" . }}-data
+        - mountPath: /backup
+          name: {{ include "common.fullname" . }}-backup
+          readOnly: true
+        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: {{ include "common.fullname" . }}-init
+        hostPath:
+          path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountInitPath }}
+      - name: {{ include "common.fullname" . }}-backup
+        emptyDir: {}
+#{{ if not .Values.persistence.enabled }}
+      - name: {{ include "common.fullname" . }}-data
+        emptyDir: {}
+#{{ else }}
+  volumeClaimTemplates:
+  - metadata:
+      name: {{ include "common.fullname" . }}-data
+      labels:
+        name: {{ include "common.fullname" . }}
+    spec:
+      accessModes: [ {{ .Values.persistence.accessMode }} ]
+      storageClassName: {{ include "common.fullname" . }}-data
+      resources:
+        requests:
+          storage: {{ .Values.persistence.size }}
+#{{ end }}
diff --git a/kubernetes/common/postgres/values.yaml b/kubernetes/common/postgres/values.yaml
new file mode 100644 (file)
index 0000000..781345a
--- /dev/null
@@ -0,0 +1,127 @@
+# Copyright © 2018 Amdocs, AT&T, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  persistence: {}
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# BusyBox image
+busyboxRepository: registry.hub.docker.com
+busyboxImage: library/busybox:latest
+
+postgresRepository: crunchydata
+image: crunchy-postgres:centos7-10.3-1.8.2
+pullPolicy: Always
+
+# application configuration
+config:
+  pgUserName: testuser
+  pgDatabase: userdb
+  pgPrimaryPassword: password
+  pgUserPassword: password
+  pgRootPassword: password
+
+container:
+  name:
+    primary: pgset-primary
+    replica: pgset-replica
+
+# default number of instances
+replicaCount: 2
+
+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: 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)
+  accessMode: ReadWriteOnce
+  size: 1Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: postgres/data
+  mountInitPath: postgres
+
+service:
+  type: ClusterIP
+  name: pgset
+  externalPort: 5432
+  internalPort: 5432
+  type2: ClusterIP
+  name2: pgset-primary
+  externalPort2: 5432
+  internalPort2: 5432
+  type3: ClusterIP
+  name3: pgset-replica
+  externalPort3: 5432
+  internalPort3: 5432
+
+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
+
diff --git a/kubernetes/config/docker/init/src/config/message-router/dmaap/MsgRtrApi.properties b/kubernetes/config/docker/init/src/config/message-router/dmaap/MsgRtrApi.properties
deleted file mode 100755 (executable)
index db8d911..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-###############################################################################
-##
-## 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=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.namespace-placeholder: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/config/docker/init/src/config/message-router/dmaap/cadi.properties b/kubernetes/config/docker/init/src/config/message-router/dmaap/cadi.properties
deleted file mode 100755 (executable)
index 1cb00a5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-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/config/docker/init/src/config/message-router/dmaap/mykey b/kubernetes/config/docker/init/src/config/message-router/dmaap/mykey
deleted file mode 100755 (executable)
index c2b8b87..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-_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
index b82c39b..8cb1f1b 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: ONAP Consul Heath Monitor
+description: ONAP Consul Agent
 name: consul
-version: 1.1.0
+version: 2.0.0
diff --git a/kubernetes/consul/charts/consul-server/Chart.yaml b/kubernetes/consul/charts/consul-server/Chart.yaml
new file mode 100644 (file)
index 0000000..13be087
--- /dev/null
@@ -0,0 +1,18 @@
+# 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: ONAP Consul Server
+name: consul-server
+version: 2.0.0
diff --git a/kubernetes/consul/charts/consul-server/requirements.yaml b/kubernetes/consul/charts/consul-server/requirements.yaml
new file mode 100644 (file)
index 0000000..f639633
--- /dev/null
@@ -0,0 +1,21 @@
+# 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.
+
+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'
diff --git a/kubernetes/consul/charts/consul-server/templates/NOTES.txt b/kubernetes/consul/charts/consul-server/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 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableConsulConsulServer }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
   labels:
-    app: consul-server
-  name: consul-server
-  namespace: "{{ .Values.nsPrefix }}"
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
-  replicas: {{ .Values.consulServerReplicas }}
+  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
-      app: consul-server
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
-        app: consul-server
-      name: consul-server
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
     spec:
       containers:
-      - image: "{{ .Values.consulserverRegistry }}"
+      - image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}"
         command: ["/usr/local/bin/docker-entrypoint.sh"]
-        args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","consul-server.{{ .Values.nsPrefix }}"]
-        name: consul-server
-#{{ end }}
+        args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","{{ include "common.fullname" . }}.{{ include "common.namespace" . }}"]
+        name: {{ include "common.name" . }}
diff --git a/kubernetes/consul/charts/consul-server/templates/service.yaml b/kubernetes/consul/charts/consul-server/templates/service.yaml
new file mode 100644 (file)
index 0000000..3b17164
--- /dev/null
@@ -0,0 +1,38 @@
+# 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
+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:
+    - port: {{ .Values.service.internalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.internalPort2 }}
+      targetPort: {{ .Values.service.internalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: {{ .Values.service.name2 }}
+  selector:
+    app: {{ template "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/consul/charts/consul-server/values.yaml b/kubernetes/consul/charts/consul-server/values.yaml
new file mode 100644 (file)
index 0000000..2a57e3a
--- /dev/null
@@ -0,0 +1,67 @@
+# 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 configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: docker.io
+image: consul:1.0.6
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+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: consul-ui
+  nodePort: 70
+  internalPort: 8500
+  name2: consul-join
+  nodePort2: 71
+  internalPort2: 8301
+
+ingress:
+  enabled: false
+
+resources: {}
diff --git a/kubernetes/consul/requirements.yaml b/kubernetes/consul/requirements.yaml
new file mode 100644 (file)
index 0000000..f639633
--- /dev/null
@@ -0,0 +1,21 @@
+# 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.
+
+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'
index 5ace3e4..25e670c 100644 (file)
         "interval": "15s",
         "timeout": "1s"
       },
+      {
+        "id": "vfc-nokiav2vnfmdriver.{{ .Values.nsPrefix }}",
+        "name": "VFC nokiav2vnfmdriver Health Check",
+        "tcp": "vfc-nokiav2vnfmdriver.{{ .Values.nsPrefix }}:8089",
+        "interval": "15s",
+        "timeout": "1s"
+      },
       {
         "id": "vfc-nslcm.{{ .Values.nsPrefix }}",
         "name": "VFC nslcm Health Check",
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableConsulConsulAgent }}
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: consul-agent-configmap
-  namespace: {{ .Values.nsPrefix }}
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/consul-agent-config/*").AsConfig . | indent 2 }}
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: consul-agent-scripts-configmap
-  namespace: {{ .Values.nsPrefix }}
+  name: {{ include "common.fullname" . }}-scripts-configmap
+  namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/consul-agent-config/scripts/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: consul-agent-certs-secret
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/consul-agent-config/certs/*").AsSecrets . | indent 2 }}
-#{{ end }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableConsulConsulAgent }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
   labels:
-    app: consul-agent
-  name: consul-agent
-  namespace: "{{ .Values.nsPrefix }}"
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
-  replicas: {{ .Values.consulAgentReplicas }}
+  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
-      app: consul-agent
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
-        app: consul-agent
-      name: consul-agent
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
     spec:
       containers:
-      - image: "{{ .Values.consulagentRegistry }}"
+      - image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}"
         command: ["/usr/local/bin/docker-entrypoint.sh"]
-        args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","consul-server.{{ .Values.nsPrefix }}"]
-        name: consul-server
+        args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","{{ .Release.Name }}-{{ index .Values "consul-server" "nameOverride" }}.{{ include "common.namespace" .}}"]
+        name: {{ include "common.name" . }}
         volumeMounts:
         - mountPath: /consul/config
           name: consul-agent-config
@@ -45,13 +48,13 @@ spec:
           name: consul-agent-certs-config
       volumes:
       - configMap:
-          name: consul-agent-configmap
+          name: {{ include "common.fullname" . }}-configmap
         name: consul-agent-config
       - configMap:
-          name: consul-agent-scripts-configmap
+          name: {{ include "common.fullname" . }}-scripts-configmap
           defaultMode: 0755
         name: consul-agent-scripts-config
       - secret:
-          secretName: consul-agent-certs-secret
+          secretName: {{ include "common.fullname" . }}-certs-secret
         name: consul-agent-certs-config
-#{{ end }}
+
diff --git a/kubernetes/consul/templates/secrets.yaml b/kubernetes/consul/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..2535437
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-certs-secret
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/consul-agent-config/certs/*").AsSecrets . | indent 2 }}
index e86937a..74d0ccd 100644 (file)
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
 
-nsPrefix: "onap"
-nodePortPrefix: 302
-consulserverRegistry: "docker.io/consul:1.0.6"
-consulagentRegistry: "oomk8s/consul:1.0.0"
-consulAgentReplicas: 1
-consulServerReplicas: 3
-service:
-      type: NodePort
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: oomk8s
+image: consul:1.0.0
+pullPolicy: Always
+
+#subchart name
+consul-server:
+  nameOverride: consul-server
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# 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: {}
+
+ingress:
+  enabled: false
+
+resources: {}
index 8b2bb4e..71aae08 100644 (file)
@@ -48,7 +48,7 @@ spec:
 #        name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
index 60b4682..2e0d7b7 100644 (file)
@@ -17,6 +17,7 @@
 #################################################################
 global:
   nodePortPrefix: 302
+  repository: nexus3.onap.org:10001
   repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
   readinessRepository: oomk8s
   readinessImage: readiness-check:1.0.0
diff --git a/kubernetes/message-router/.helmignore b/kubernetes/message-router/.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
index 109cce2..b3a7491 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 apiVersion: v1
-description: A Helm chart for Kubernetes
+appVersion: "1.0"
+description: ONAP Message Router
 name: message-router
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/message-router/charts/kafka/.helmignore b/kubernetes/message-router/charts/kafka/.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/message-router/charts/kafka/Chart.yaml b/kubernetes/message-router/charts/kafka/Chart.yaml
new file mode 100644 (file)
index 0000000..b26f91a
--- /dev/null
@@ -0,0 +1,19 @@
+# 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: ONAP Global Kafka Service
+name: kafka
+version: 2.0.0
+
diff --git a/kubernetes/message-router/charts/kafka/templates/NOTES.txt b/kubernetes/message-router/charts/kafka/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c60c745
--- /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.name" . }})
+  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.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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={{ include "common.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 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableMessageRouterGlobalKafka }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: message-router-global-kafka
-  namespace: "{{ .Values.nsPrefix }}"
+  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.kafkaReplicas }}
-  selector:
-    matchLabels:
-      app: global-kafka
+  replicas: {{ .Values.replicaCount }}
   template:
     metadata:
       labels:
-        app: global-kafka
-      name: message-router-global-kafka
+        app:  {{ include "common.name" . }}
+        release: {{ .Release.Name }}
     spec:
       initContainers:
       - command:
@@ -35,8 +36,8 @@ spec:
         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 }}
+        image: "{{ .Values.global.configRepository }}/{{ .Values.global.configImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /var/tmp
           name: kafka-data
@@ -45,38 +46,47 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - zookeeper
+        - {{ .Values.zookeeper.nameOverride }}
         env:
         - name: NAMESPACE
           valueFrom:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: kafka-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
-      - image: {{ .Values.image.kafka }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: global-kafka
+      - name: {{ include "common.name" .  }}
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports:
-        - containerPort: 9092
+        - 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:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
         readinessProbe:
           tcpSocket:
-            port: 9092
-          initialDelaySeconds: 5
-          periodSeconds: 10
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
         env:
         - name: KAFKA_ZOOKEEPER_CONNECT
-          value: "zookeeper.{{ .Values.nsPrefix }}:2181"
+          value: "{{.Values.zookeeper.nameOverride}}:{{.Values.config.zookeeperPort}}"
         - name: KAFKA_ADVERTISED_HOST_NAME
-          value: "global-kafka"
+          value: "{{ include "common.fullname" .  }}"
         - name: KAFKA_BROKER_ID
           value: "1"
         - name: KAFKA_ADVERTISED_PORT
-          value: "9092"
+          value: "{{.Values.service.internalPort}}"
         - name: KAFKA_PORT
-          value: "9092"
+          value: "{{.Values.service.internalPort}}"
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
@@ -85,7 +95,6 @@ spec:
           name: docker-socket
         - mountPath: /kafka
           name: kafka-data
-      restartPolicy: Always
       volumes:
       - name: localtime
         hostPath:
@@ -95,8 +104,6 @@ spec:
           path: /var/run/docker.sock
       - name: kafka-data
         persistentVolumeClaim:
-          claimName: message-router-kafka
+          claimName: {{ include "common.fullname" . }}
       imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/message-router/charts/kafka/templates/pv.yaml b/kubernetes/message-router/charts/kafka/templates/pv.yaml
new file mode 100644 (file)
index 0000000..8be3d4c
--- /dev/null
@@ -0,0 +1,37 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+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 }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/kubernetes/message-router/charts/kafka/templates/pvc.yaml b/kubernetes/message-router/charts/kafka/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..e27c331
--- /dev/null
@@ -0,0 +1,48 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
diff --git a/kubernetes/message-router/charts/kafka/templates/service.yaml b/kubernetes/message-router/charts/kafka/templates/service.yaml
new file mode 100644 (file)
index 0000000..c57d190
--- /dev/null
@@ -0,0 +1,32 @@
+# 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
+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.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/message-router/charts/kafka/values.yaml b/kubernetes/message-router/charts/kafka/values.yaml
new file mode 100644 (file)
index 0000000..ff05104
--- /dev/null
@@ -0,0 +1,115 @@
+# 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 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
+  configRepository: oomk8s
+  configImage: config-init:2.0.0-SNAPSHOT
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: wurstmeister
+image: kafka:latest
+pullPolicy: Always
+
+zookeeper:
+  nameOverride: zookeeper
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  zookeeperPort: 2181
+
+# 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
+
+## Persist data to a persitent volume
+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: message-router/data-kafka
+
+service:
+  type: NodePort
+  name: global-kafka
+  internalPort: 9092
+  externalPort: 9092
+
+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
diff --git a/kubernetes/message-router/charts/zookeeper/.helmignore b/kubernetes/message-router/charts/zookeeper/.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/message-router/charts/zookeeper/Chart.yaml b/kubernetes/message-router/charts/zookeeper/Chart.yaml
new file mode 100644 (file)
index 0000000..dd999e5
--- /dev/null
@@ -0,0 +1,19 @@
+# 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: ONAP Dmaap Zookeeper Service
+name: zookeeper
+version: 2.0.0
+
diff --git a/kubernetes/message-router/charts/zookeeper/templates/NOTES.txt b/kubernetes/message-router/charts/zookeeper/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c60c745
--- /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.name" . }})
+  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.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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={{ include "common.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/message-router/charts/zookeeper/templates/deployment.yaml b/kubernetes/message-router/charts/zookeeper/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..678b83e
--- /dev/null
@@ -0,0 +1,79 @@
+# 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: 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:
+        - 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.global.configRepository }}/{{ .Values.global.configImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /var/tmp
+          name: zookeeper-data
+        name: zookeeper-primer
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ include "common.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:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end -}}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/zookeeper-3.4.9/data
+          name: zookeeper-data
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: zookeeper-data
+        persistentVolumeClaim:
+          claimName: {{ include "common.fullname" .  }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/message-router/charts/zookeeper/templates/pv.yaml b/kubernetes/message-router/charts/zookeeper/templates/pv.yaml
new file mode 100644 (file)
index 0000000..8be3d4c
--- /dev/null
@@ -0,0 +1,37 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+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 }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/kubernetes/message-router/charts/zookeeper/templates/pvc.yaml b/kubernetes/message-router/charts/zookeeper/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..e27c331
--- /dev/null
@@ -0,0 +1,48 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableConsulConsulServer }}
 apiVersion: v1
 kind: Service
 metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
   labels:
-    app: consul-server
-  name: consul-server
-  namespace: "{{ .Values.nsPrefix }}"
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
   ports:
-  - name: consul-ui
-    nodePort: {{ .Values.nodePortPrefix }}70
-    port: 8500
-    protocol: TCP
-    targetPort: 8500
-  - name: consul-join
-    nodePort: {{ .Values.nodePortPrefix }}71
-    port: 8301
-    protocol: TCP
-    targetPort: 8301
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
   selector:
-    app: consul-server
-  type: {{ .Values.service.type | quote }}
-#{{ end }}
\ No newline at end of file
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+  clusterIP: None
diff --git a/kubernetes/message-router/charts/zookeeper/values.yaml b/kubernetes/message-router/charts/zookeeper/values.yaml
new file mode 100644 (file)
index 0000000..66dc67e
--- /dev/null
@@ -0,0 +1,110 @@
+# 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 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
+  configRepository: oomk8s
+  configImage: config-init:2.0.0-SNAPSHOT
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: wurstmeister
+image: zookeeper:latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config: {}
+
+# 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
+
+## Persist data to a persitent volume
+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: message-router/data-zookeeper/
+
+service:
+  type: NodePort
+  name: zookeeper
+  internalPort: 2181
+
+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
diff --git a/kubernetes/message-router/requirements.yaml b/kubernetes/message-router/requirements.yaml
new file mode 100644 (file)
index 0000000..7beecb3
--- /dev/null
@@ -0,0 +1,22 @@
+# 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.
+
+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'
+
index 568d0d4..ed3999d 100755 (executable)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, Bell Canada, AT&T
+#
+# 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.
+
 ###############################################################################
 ##
 ## Cambria API Server config
@@ -5,7 +19,7 @@
 ##     - Default values are shown as commented settings.
 ##
 
-###############################################################################
+##############################################################################
 ##
 ## HTTP service
 ##
 ##
 ##     Both Cambria and Kafka make use of Zookeeper.
 ##
-# config.zk.servers=zookeeper.namespace-placeholder:2181
-config.zk.servers=zookeeper:2181
+config.zk.servers={{.Values.zookeeper.nameOverride}}:{{.Values.config.zookeeperPort}}
 #config.zk.servers=172.17.0.1:2181
-#dmaap.namespace-placeholder:2181
+#dmaap.onap-message-router:2181
 #10.208.128.229:2181
 #config.zk.root=/fe3c/cambria/config
 
@@ -31,9 +44,9 @@ config.zk.servers=zookeeper:2181
 ##     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={{.Values.kafka.nameOverride}}:{{.Values.config.kafkaPort}}
 #kafka.metadata.broker.list=172.17.0.1:9092
-#dmaap.namespace-placeholder:9092
+#dmaap.onap-message-router:9092
 #10.208.128.229:9092
 ##kafka.request.required.acks=-1
 #kafka.client.zookeeper=${config.zk.servers}
index 1cb00a5..9079794 100755 (executable)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, Bell Canada, AT&T
+#
+# 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.
+
 basic_realm=openecomp.org
 basic_warn=TRUE
 
diff --git a/kubernetes/message-router/templates/NOTES.txt b/kubernetes/message-router/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c60c745
--- /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.name" . }})
+  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.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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={{ include "common.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/message-router/templates/all-services.yaml b/kubernetes/message-router/templates/all-services.yaml
deleted file mode 100644 (file)
index da6fee1..0000000
+++ /dev/null
@@ -1,80 +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.disableMessageRouterZookeeper }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: zookeeper
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: zookeeper
-spec:
-  ports:
-  - name: zookeeper1
-    port: 2181
-  selector:
-    app: zookeeper
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableMessageRouterGlobalKafka }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: global-kafka
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: global-kafka
-spec:
-  ports:
-  - name: kafka1
-    port: 9092
-  selector:
-    app: global-kafka
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableMessageRouterDmaap }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: dmaap
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: dmaap
-    version: 1.0.0
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "message-router",
-          "version": "v1",
-          "url": "/",
-          "protocol": "REST",
-          "port": "3904",
-          "visualRange":"1"
-      }
-      ]'
-spec:
-  ports:
-  - name: mr1
-    port: 3904
-    nodePort: {{ .Values.nodePortPrefix }}27
-  - name: mr2
-    port: 3905
-    nodePort: {{ .Values.nodePortPrefix }}26
-  selector:
-    app: dmaap
-  type: NodePort
-#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/message-router/templates/configmap.yaml b/kubernetes/message-router/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..911d2e9
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-cadi-prop-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }}
diff --git a/kubernetes/message-router/templates/deployment.yaml b/kubernetes/message-router/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..ed3c4eb
--- /dev/null
@@ -0,0 +1,95 @@
+# 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: 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.kafka.nameOverride }}
+        - --container-name
+        - {{ .Values.zookeeper.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: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.externalPort }}
+          - containerPort: {{ .Values.service.externalPort2 }}
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.externalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.externalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          volumeMounts:
+          - mountPath: /etc/localtime
+            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
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: appprops
+          configMap:
+            name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
+        - name: cadi
+          configMap:
+            name: {{ include "common.fullname" . }}-cadi-prop-configmap
+        - name: mykey
+          secret:
+            secretName: {{ include "common.fullname" . }}-secret
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/message-router/templates/dmaap-configmap.yaml b/kubernetes/message-router/templates/dmaap-configmap.yaml
deleted file mode 100644 (file)
index bd1e629..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-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 }}
diff --git a/kubernetes/message-router/templates/message-router-dmaap.yaml b/kubernetes/message-router/templates/message-router-dmaap.yaml
deleted file mode 100644 (file)
index a0c1380..0000000
+++ /dev/null
@@ -1,91 +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.disableMessageRouterDmaap }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: message-router-dmaap
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.dmaapReplicas }}
-  selector:
-    matchLabels:
-      app: dmaap
-  template:
-    metadata:
-      labels:
-        app: dmaap
-      name: message-router-dmaap
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - global-kafka
-        - --container-name
-        - zookeeper
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: dmaap-readiness
-      containers:
-      - image: {{ .Values.image.dmaap }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: dmaap
-        ports:
-        - containerPort: 3904
-        - containerPort: 3905
-        readinessProbe:
-          tcpSocket:
-            port: 3904
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        volumeMounts:
-        - mountPath: /etc/localtime
-          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:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: appprops
-        configMap:
-          name: mr-dmaap-msgrtrapi-prop-configmap
-      - name: cadi
-        configMap:
-          name: mr-dmaap-cadi-prop-configmap
-      - name: mykey
-        configMap:
-          name: mr-dmaap-mykey-configmap
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-{{ end }}
-
diff --git a/kubernetes/message-router/templates/message-router-pv-pvc.yaml b/kubernetes/message-router/templates/message-router-pv-pvc.yaml
deleted file mode 100644 (file)
index a39a975..0000000
+++ /dev/null
@@ -1,81 +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.disableMessageRouterGlobalKafka }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
-  name: "{{ .Values.nsPrefix }}-message-router-kafka"
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    name: "{{ .Values.nsPrefix }}-message-router-kafka"
-spec:
-  capacity:
-    storage: 2Gi
-  accessModes:
-    - ReadWriteMany
-  persistentVolumeReclaimPolicy: Retain
-  hostPath:
-    path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: message-router-kafka
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  accessModes:
-    - ReadWriteMany
-  resources:
-    requests:
-      storage: 2Gi
-  selector:
-    matchLabels:
-      name: "{{ .Values.nsPrefix }}-message-router-kafka"
-#{{ end }}
-#{{ if not .Values.disableMessageRouterZookeeper }}
----
-apiVersion: v1
-kind: PersistentVolume
-metadata:
-  name: "{{ .Values.nsPrefix }}-message-router-zookeeper"
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    name: "{{ .Values.nsPrefix }}-message-router-zookeeper"
-spec:
-  capacity:
-    storage: 2Gi
-  accessModes:
-    - ReadWriteMany
-  persistentVolumeReclaimPolicy: Retain
-  hostPath:
-    path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/data-zookeeper
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: message-router-zookeeper
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  accessModes:
-    - ReadWriteMany
-  resources:
-    requests:
-      storage: 2Gi
-  selector:
-    matchLabels:
-      name: "{{ .Values.nsPrefix }}-message-router-zookeeper"
-#{{ end }}
diff --git a/kubernetes/message-router/templates/message-router-zookeeper.yaml b/kubernetes/message-router/templates/message-router-zookeeper.yaml
deleted file mode 100644 (file)
index 1b3e8f8..0000000
+++ /dev/null
@@ -1,72 +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.disableMessageRouterZookeeper }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: message-router-zookeeper
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.zookeeperReplicas }}
-  selector:
-    matchLabels:
-      app: zookeeper
-  template:
-    metadata:
-      labels:
-        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 }}
-        name: zookeeper
-        ports:
-        - containerPort: 2181
-        readinessProbe:
-          tcpSocket:
-            port: 2181
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/zookeeper-3.4.9/data
-          name: zookeeper-data
-      restartPolicy: Always
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: zookeeper-data
-        persistentVolumeClaim:
-          claimName: message-router-zookeeper
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
-
@@ -1,4 +1,4 @@
-# Copyright © 2018 Amdocs, AT&T
+# 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.
 apiVersion: v1
 kind: Secret
 metadata:
-  name: {{ include "common.fullname" . }}-champ-secrets
+  name: {{ include "common.fullname" . }}-secret
   namespace: {{ include "common.namespace" . }}
-type: Opaque
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
-{{ tpl (.Files.Glob "resources/config/appconfig/auth/*").AsSecrets . | indent 2 }}
+{{ (.Files.Glob "resources/config/dmaap/mykey").AsSecrets | indent 2 }}
+type: Opaque
diff --git a/kubernetes/message-router/templates/service.yaml b/kubernetes/message-router/templates/service.yaml
new file mode 100644 (file)
index 0000000..7265ecb
--- /dev/null
@@ -0,0 +1,54 @@
+# 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
+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 }}
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "{{ include "common.fullname" . }}",
+          "version": "v1",
+          "url": "/",
+          "protocol": "REST",
+          "port": "{{.Values.service.internalPort}}",
+          "visualRange":"1"
+      }
+      ]'
+
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}-{{ .Values.service.externalPort }}
+    - port: {{ .Values.service.externalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: {{ .Values.service.name }}-{{ .Values.service.externalPort2 }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
index 6825147..df3cefa 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
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/dmaap/dmaap-mr:latest
 pullPolicy: Always
-nodePortPrefix: 302
-dmaapReplicas: 1
-kafkaReplicas: 1
-zookeeperReplicas: 1
-dataRootDir: /dockerdata-nfs
-image:
-  readiness: oomk8s/readiness-check:1.1.0
-  dmaap: attos/dmaap:latest
-  kafka: wurstmeister/kafka:latest
-  zookeeper: wurstmeister/zookeeper:latest
-  config: oomk8s/config-init:2.0.0-SNAPSHOT
 
+nameOverride: dmaap
+
+kafka:
+  nameOverride: global-kafka
+zookeeper:
+  nameOverride: zookeeper
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  zookeeperPort: 2181
+  kafkaPort: 9092
+
+# 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: message-router
+  externalPort: 3904
+  nodePort: 27
+  externalPort2: 3905
+  nodePort2: 26
+
+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 94b25a1..ad38750 100644 (file)
@@ -33,11 +33,6 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          # TODO: Temporary command:
-          command:
-          - /bin/sh
-          - -c
-          - export AUTH_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token); /bin/kube2msb --kube_master_url=${KUBE_MASTER_URL} --msb_url=${MSB_URL}
           image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           env:
index 43810a9..8c494c0 100644 (file)
@@ -19,7 +19,7 @@ pullPolicy: Always
 config:
   routeLabels: "visualRange:1"
   kubeMasterUrl: https://kubernetes.default:443
-  discoveryUrl: http://{{.Release.Name}}-msb-discovery.{{include "common.namespace" .}}:10081
+  discoveryUrl: http://msb-discovery.{{include "common.namespace" .}}:10081
 
 # default number of instances
 replicaCount: 1
index f32a5d1..0fb2cc6 100644 (file)
@@ -53,7 +53,7 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           - name: CONSUL_IP
-            value: {{.Release.Name}}-msb-consul.{{ include "common.namespace" . }}
+            value: msb-consul.{{ include "common.namespace" . }}
           volumeMounts:
           - mountPath: /etc/localtime
             name: localtime
index d41518d..2df82ac 100644 (file)
@@ -56,9 +56,9 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           - name: CONSUL_IP
-            value: {{.Release.Name}}-msb-consul.{{ include "common.namespace" . }}
+            value: msb-consul.{{ include "common.namespace" . }}
           - name: SDCLIENT_IP
-            value: {{.Release.Name}}-msb-discovery.{{ include "common.namespace" . }}
+            value: msb-discovery.{{ include "common.namespace" . }}
           - name: ROUTE_LABELS
             value: {{ .Values.config.routeLabels }}
           volumeMounts:
index d41518d..2df82ac 100644 (file)
@@ -56,9 +56,9 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           - name: CONSUL_IP
-            value: {{.Release.Name}}-msb-consul.{{ include "common.namespace" . }}
+            value: msb-consul.{{ include "common.namespace" . }}
           - name: SDCLIENT_IP
-            value: {{.Release.Name}}-msb-discovery.{{ include "common.namespace" . }}
+            value: msb-discovery.{{ include "common.namespace" . }}
           - name: ROUTE_LABELS
             value: {{ .Values.config.routeLabels }}
           volumeMounts:
index 434acb0..c361588 100644 (file)
@@ -34,14 +34,14 @@ dependencies:
     repository: '@local'
     condition: clamp.enabled
   - name: cli
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: cli.enabled
   - name: common
     version: ~2.0.0
     repository: '@local'
   - name: consul
-    version: ~1.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: consul.enabled
   - name: dcaegen2
@@ -57,7 +57,7 @@ dependencies:
     repository: '@local'
     condition: log.enabled
   - name: message-router
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: message-router.enabled
   - name: mock
@@ -89,7 +89,7 @@ dependencies:
     repository: '@local'
     condition: sdc.enabled
   - name: sdnc
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: sdnc.enabled
   - name: so
index 8bbaa27..61a7546 100644 (file)
@@ -23,12 +23,17 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefix: 302
 
-  # image repositories
-  repository: nexus3.onap.org:10001
-  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
-  # readiness check
+  # ONAP Repository
+  # Uncomment the following to enable the use of a single docker
+  # repository but ONLY if your repository mirrors all ONAP
+  # docker images. This includes all images from dockerhub and
+  # any other repository that hosts images for ONAP components.
+  #repository: nexus3.onap.org:10001
+  #repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+
+  # readiness check - temporary repo until images migrated to nexus3
   readinessRepository: oomk8s
-  # logging agent
+  # logging agent - temporary repo until images migrated to nexus3
   loggingRepository: docker.elastic.co
 
   # image pull policy
@@ -56,7 +61,7 @@ clamp:
   enabled: true
 cli:
   enabled: false
-consul: # Consul Health Check Monitoring
+consul:
   enabled: false
 dcaegen2:
   enabled: false
@@ -76,13 +81,17 @@ policy:
   enabled: false
 portal:
   enabled: false
-robot: # Robot Health Check
+robot:
   enabled: true
 sdc:
   enabled: false
 sdnc:
   enabled: false
-so: # Service Orchestrator
+
+  dmaap-listener:
+    config:
+      dmaapPort: 3904
+so:
   enabled: true
 
   replicaCount: 1
diff --git a/kubernetes/onap/resources/environments/disable-allcharts.yaml b/kubernetes/onap/resources/environments/disable-allcharts.yaml
new file mode 100644 (file)
index 0000000..7e27a31
--- /dev/null
@@ -0,0 +1,73 @@
+# 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.
+
+
+# This override file is useful to test one or more subcharts.
+# It overrides the default ONAP parent chart behaviour to deploy
+# all of ONAP.
+#
+# Example use to enable a single subchart (from this directory):
+#
+# helm install local/onap -n onap --namespace onap -f disable-allcharts.yaml --set so.enabled=true
+
+#################################################################
+# Enable/disable and configure helm charts (ie. applications)
+# to customize the ONAP deployment.
+#################################################################
+aaf:
+  enabled: false
+aai:
+  enabled: false
+appc:
+  enabled: false
+clamp:
+  enabled: false
+cli:
+  enabled: false
+consul:
+  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:
+  enabled: false
+sdc:
+  enabled: false
+sdnc:
+  enabled: false
+so:
+  enabled: false
+uui:
+  enabled: false
+vfc:
+  enabled: false
+vid:
+  enabled: false
+vnfsdk:
+  enabled: false
\ No newline at end of file
index ee7d00b..f784eeb 100644 (file)
@@ -23,12 +23,17 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefix: 302
 
-  # image repositories
-  repository: nexus3.onap.org:10001
+  # ONAP Repository
+  # Uncomment the following to enable the use of a single docker
+  # repository but ONLY if your repository mirrors all ONAP
+  # docker images. This includes all images from dockerhub and
+  # any other repository that hosts images for ONAP components.
+  #repository: nexus3.onap.org:10001
   repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
-  # readiness check
+
+  # readiness check - temporary repo until images migrated to nexus3
   readinessRepository: oomk8s
-  # logging agent
+  # logging agent - temporary repo until images migrated to nexus3
   loggingRepository: docker.elastic.co
 
   # image pull policy
@@ -57,13 +62,13 @@ clamp:
   enabled: true
 cli:
   enabled: true
-consul: # Consul Health Check Monitoring
+consul:
   enabled: true
 dcaegen2:
   enabled: true
 esr:
   enabled: true
-log: # ONAP Logging ElasticStack
+log:
   enabled: true
 message-router:
   enabled: true
@@ -77,13 +82,17 @@ policy:
   enabled: true
 portal:
   enabled: true
-robot: # Robot Health Check
+robot:
   enabled: true
 sdc:
   enabled: true
 sdnc:
   enabled: true
-so: # Service Orchestrator
+
+  dmaap-listener:
+    config:
+      dmaapPort: 3904
+so:
   enabled: true
 
   replicaCount: 1
index d033bf1..5922cf8 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy access point
+description: ONAP Policy Administration Point
 name: policy
 version: 2.0.0
index d6aafe4..2a16757 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy BRMS GW
+description: ONAP Policy BRMS GW
 name: brmsgw
 version: 2.0.0
index 6a0012d..ab8ce5e 100644 (file)
@@ -18,8 +18,8 @@ BRMSGW_JMX_PORT=9989
 COMPONENT_X_MX_MB=1024
 COMPONENT_X_MS_MB=1024
 
-REST_PAP_URL=http://{{ .Release.Name }}-{{ .Values.global.pap.nameOverride }}:9091/pap/
-REST_PDP_ID=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}:8081/pdp/
+REST_PAP_URL=http://{{ .Release.Name }}-{{ .Values.global.pap.nameOverride }}:{{.Values.config.papPort}}/pap/
+REST_PDP_ID=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}:{{.Values.config.pdpPort}}/pdp/
 
 PDP_HTTP_USER_ID=testpdp
 PDP_HTTP_PASSWORD=alpha123
@@ -29,10 +29,10 @@ PDP_PAP_PDP_HTTP_PASSWORD=alpha123
 M2_HOME=/usr/share/maven
 snapshotRepositoryID=policy-nexus-snapshots
 snapshotRepositoryName=Snapshots
-snapshotRepositoryURL=http://{{ .Release.Name }}-{{ .Values.global.nexus.nameOverride }}:8081/nexus/content/repositories/snapshots
+snapshotRepositoryURL=http://{{ .Release.Name }}-{{ .Values.global.nexus.nameOverride }}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots
 releaseRepositoryID=policy-nexus-releases
 releaseRepositoryName=Releases
-releaseRepositoryURL=http://{{ .Release.Name }}-{{ .Values.global.nexus.nameOverride }}:8081/nexus/content/repositories/releases
+releaseRepositoryURL=http://{{ .Release.Name }}-{{ .Values.global.nexus.nameOverride }}:{{.Values.config.nexusPort}}/nexus/content/repositories/releases
 repositoryUsername=admin
 repositoryPassword=admin123
 UEB_URL=dmaap
index 91d8ed4..c60c745 100644 (file)
@@ -13,7 +13,7 @@
   export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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}")
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.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 }}
index 3890e9e..708e570 100644 (file)
@@ -33,10 +33,10 @@ pullPolicy: Always
 debugEnabled: false
 
 # application configuration
-# Example:
-config: {}
-#  username: myusername
-#  password: mypassword
+config:
+  papPort: 9091
+  pdpPort: 8081
+  nexusPort: 8081
 
 # default number of instances
 replicaCount: 1
index 4f753c0..15ad44b 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Drools Policy Engine 
+description: ONAP Drools Policy Engine 
 name: drools
 version: 2.0.0
index 65916b6..c16f645 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy Nexus
+description: ONAP Policy Nexus
 name: nexus
 version: 2.0.0
index f8d80b0..2ed55ef 100644 (file)
@@ -33,10 +33,7 @@ pullPolicy: Always
 debugEnabled: false
 
 # application configuration
-# Example:
 config: {}
-#  username: myusername
-#  password: mypassword
 
 # default number of instances
 replicaCount: 1
index e899a00..8b110bd 100755 (executable)
@@ -47,7 +47,7 @@
       <repositories>
         <repository>
           <id>policy-nexus-snapshots</id>
-          <url>http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:8081/nexus/content/repositories/snapshots/</url>
+          <url>http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots/</url>
           <releases>
             <enabled>false</enabled>
             <updatePolicy>always</updatePolicy>
@@ -60,7 +60,7 @@
 
         <repository>
           <id>policy-nexus-releases</id>
-          <url>http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:8081/nexus/content/repositories/releases/</url>
+          <url>http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/releases/</url>
           <releases>
             <enabled>true</enabled>
             <updatePolicy>always</updatePolicy>
index aec7bf2..127a483 100644 (file)
@@ -29,9 +29,9 @@ ENGINE_MANAGEMENT_PASSWORD=31nst31n
 # nexus repository
 
 snapshotRepositoryID=policy-nexus-snapshots
-snapshotRepositoryUrl=http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:8081/nexus/content/repositories/snapshots/
+snapshotRepositoryUrl=http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots/
 releaseRepositoryID=policy-nexus-releases
-releaseRepositoryUrl=http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:8081/nexus/content/repositories/releases/
+releaseRepositoryUrl=http://{{.Release.Name}}-{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/releases/
 repositoryUsername=admin
 repositoryPassword=admin123
 
index 91d8ed4..c60c745 100644 (file)
@@ -13,7 +13,7 @@
   export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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}")
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.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 }}
@@ -12,8 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: extensions/v1beta1
-kind: Deployment
+apiVersion: apps/v1beta1
+kind: StatefulSet
 metadata:
   name: {{ include "common.fullname" . }}
   namespace: {{ include "common.namespace" . }}
@@ -23,7 +23,11 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
+  serviceName: {{ include "common.fullname" . }}
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
@@ -48,7 +52,7 @@ spec:
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       hostAliases:
-      - ip: "{{ .Values.aaiServiceClusterIp }}"
+      - ip: "{{ .Values.config.aaiServiceClusterIp }}"
         hostnames:
         - "aai.api.simpledemo.openecomp.org"
       containers:
index 14ebe31..07499cd 100644 (file)
@@ -34,15 +34,13 @@ pullPolicy: Always
 # flag to enable debugging - application support required
 debugEnabled: false
 
-aaiServiceClusterIp: 10.43.255.254
 # application configuration
-# Example:
-config: {}
-#  username: myusername
-#  password: mypassword
+config:
+  nexusPort: 8081
+  aaiServiceClusterIp: 10.43.255.254
 
 # default number of instances
-replicaCount: 1
+replicaCount: 4
 
 nodeSelector: {}
 
index c420e67..c7c9a7d 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy MariaDB Service
+description: ONAP Policy MariaDB Service
 name: mariadb
 version: 2.0.0
index da117f4..8be3d4c 100644 (file)
@@ -33,5 +33,5 @@ spec:
     - {{ .Values.persistence.accessMode }}
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
 {{- end -}}
index 09a65ea..b849e18 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy PDP
+description: ONAP Policy PDP
 name: pdp
 version: 2.0.0
index 9dae9f2..8325d42 100644 (file)
@@ -29,8 +29,8 @@ TOMCAT_X_MX_MB=1024
 
 UEB_CLUSTER=dmaap
 
-REST_PAP_URL=http://{{ .Release.Name }}-{{ .Values.global.pap.nameOverride }}:9091/pap/
-REST_PDP_ID=http://{{ include "common.fullname" . }}:8081/pdp/
+REST_PAP_URL=http://{{ .Release.Name }}-{{ .Values.global.pap.nameOverride }}:{{.Values.config.papPort}}/pap/
+REST_PDP_ID=http://{{ include "common.fullname" . }}:{{.Values.service.externalPort}}/pdp/
 REST_PDP_CONFIG=/opt/app/policy/servers/pdp/bin/config
 REST_PDP_WEBAPPS=/opt/app/policy/servers/pdp/webapps
 REST_PDP_REGISTER=true
index 141eb28..2021c09 100644 (file)
@@ -17,7 +17,7 @@ LOGPARSER_JMX_PORT=9997
 LOGPARSER_X_MS_MB=1024
 LOGPARSER_X_MX_MB=1024
 
-SERVER=http://{{ include "common.fullname" . }}:8081/pdp/
+SERVER=http://{{ include "common.fullname" . }}:{{.Values.service.externalPort}}/pdp/
 LOGPATH=/opt/app/policy/servers/pdp/logs/pdp-rest.log
 PARSERLOGPATH=IntegrityMonitor.log
 
index 91d8ed4..c60c745 100644 (file)
@@ -13,7 +13,7 @@
   export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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}")
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.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 }}
index aed3fd1..df63d38 100644 (file)
@@ -29,7 +29,7 @@ metadata:
           "version": "v1",
           "url": "/pdp",
           "protocol": "REST",
-          "port": "8081",
+          "port": "{{ .Values.service.externalPort }}",
           "visualRange":"1"
       },
       ]'
@@ -49,4 +49,3 @@ spec:
     app: {{ include "common.name" . }}
     release: {{ .Release.Name }}
   sessionAffinity: None
-  
index c2b7580..1fdc56e 100644 (file)
@@ -35,13 +35,11 @@ pullPolicy: Always
 debugEnabled: false
 
 # application configuration
-# Example:
-config: {}
-#  username: myusername
-#  password: mypassword
+config:
+  papPort: 9091
 
 # default number of instances
-replicaCount: 1
+replicaCount: 2
 
 nodeSelector: {}
 
index f853be0..be87249 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Policy Common
+description: ONAP Policy Common
 name: policy-common
 version: 2.0.0
index 885a114..c335d4a 100644 (file)
@@ -17,8 +17,8 @@ POLICY_HOME=/opt/app/policy
 KEYSTORE_PASSWD=PolicyR0ck$
 
 JDBC_DRIVER=org.mariadb.jdbc.Driver
-JDBC_URL=jdbc:mariadb://{{ .Release.Name }}-{{ .Values.global.mariadb.nameOverride }}:3306/onap_sdk?failOverReadOnly=false&autoReconnect=true
-JDBC_LOG_URL=jdbc:mariadb://{{ .Release.Name }}-{{ .Values.global.mariadb.nameOverride }}:3306/log?failOverReadOnly=false&autoReconnect=true
+JDBC_URL=jdbc:mariadb://{{ .Release.Name }}-{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/onap_sdk?failOverReadOnly=false&autoReconnect=true
+JDBC_LOG_URL=jdbc:mariadb://{{ .Release.Name }}-{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/log?failOverReadOnly=false&autoReconnect=true
 JDBC_USER=policy_user
 JDBC_PASSWORD=policy_user
 
index 91d8ed4..c60c745 100644 (file)
@@ -13,7 +13,7 @@
   export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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}")
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.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 }}
index 8ac609d..3cee7cc 100644 (file)
@@ -27,10 +27,10 @@ global:
 debugEnabled: false
 
 # application configuration
-# Example:
 config:
   logstashServiceName: log-ls
   logstashPort: 5044
+  mariadbPort: 3306
 
 # default number of instances
 replicaCount: 1
index 2bf0d7b..f639633 100644 (file)
@@ -18,4 +18,4 @@ dependencies:
     # 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' 
+    repository: '@local'
index 3ed6ed4..a47956b 100644 (file)
@@ -91,7 +91,7 @@ REFRESH_RATE=40000
 #
 
 
-REST_PAP_URL=http://{{.Release.Name}}-{{.Values.global.pap.nameOverride}}:9091/pap/
+REST_PAP_URL=http://{{.Release.Name}}-{{.Values.global.pap.nameOverride}}:{{.Values.service.externalPort2}}/pap/
 
 #
 # Config/Action Properties location.
@@ -99,7 +99,7 @@ REST_PAP_URL=http://{{.Release.Name}}-{{.Values.global.pap.nameOverride}}:9091/p
 
 REST_CONFIG_HOME=/opt/app/policy/servers/pap/webapps/Config/
 REST_ACTION_HOME=/opt/app/policy/servers/pap/webapps/Action/
-REST_CONFIG_URL=http://{{.Release.Name}}-{{.Values.global.pap.nameOverride}}:9091/
+REST_CONFIG_URL=http://{{.Release.Name}}-{{.Values.global.pap.nameOverride}}:{{.Values.service.externalPort2}}/
 REST_CONFIG_WEBAPPS=/opt/app/policy/servers/pap/webapps/
 
 # PAP account information
index 28c2da1..768ebc9 100644 (file)
@@ -28,7 +28,7 @@ TOMCAT_X_MX_MB=1024
 # pap properties
 
 PAP_PDPS=/opt/app/policy/servers/pap/bin/pdps
-PAP_URL=http://{{ include "common.fullname" . }}:9091/pap/
+PAP_URL=http://{{ include "common.fullname" . }}:{{.Values.service.externalPort2}}/pap/
 
 PAP_INITIATE_PDP=true
 PAP_HEARTBEAT_INTERVAL=10000
@@ -39,8 +39,7 @@ REST_ADMIN_REPOSITORY=repository
 REST_ADMIN_WORKSPACE=workspace
 
 # PDP related properties
-
-PAP_PDP_URL=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}:8081/pdp/
+PAP_PDP_URL=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-0.{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}:{{ .Values.config.pdpPort }}/pdp/,http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-1.{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}:{{ .Values.config.pdpPort }}/pdp/
 PAP_PDP_HTTP_USER_ID=testpdp
 PAP_PDP_HTTP_PASSWORD=alpha123
 
index 7124fde..430feb4 100644 (file)
@@ -17,7 +17,7 @@ LOGPARSER_JMX_PORT=9996
 LOGPARSER_X_MS_MB=1024
 LOGPARSER_X_MX_MB=1024
 
-SERVER=http://{{ include "common.fullname" . }}:9091/pap/
+SERVER=http://{{ include "common.fullname" . }}:{{.Values.service.externalPort2}}/pap/
 LOGPATH=/opt/app/policy/servers/pap/logs/pap-rest.log
 PARSERLOGPATH=IntegrityMonitor.log
 
index 5e0172b..3392fc7 100644 (file)
@@ -26,7 +26,7 @@ wget -O cl-amsterdam-template.drl https://git.onap.org/policy/drools-application
 
 sleep 2
 
-curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/policyEngineImport' 
+curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/policyEngineImport' 
 
 echo "PRELOAD_POLICIES is $PRELOAD_POLICIES"
 
@@ -56,7 +56,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
                        "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+TBD+-+Cannot+be+known+until+instantiation+is+done%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                }
        }
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 sleep 2
 
@@ -76,7 +76,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
                        "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                }
        }
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 sleep 2
 
@@ -96,7 +96,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
                        "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                }
        }
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 sleep 2
 
@@ -116,7 +116,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
                        "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                }
        }
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 #########################################Create Micro Service Config policies##########################################
 
@@ -130,7 +130,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevFirewall",
        "onapName": "DCAE"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 
 sleep 2
@@ -141,7 +141,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevDNS",
        "onapName": "DCAE"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 
 sleep 2
@@ -152,7 +152,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevCPE",
        "onapName": "DCAE"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 
 #########################################Creating Decision Guard policy######################################### 
@@ -179,7 +179,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
                        "guardActiveEnd": "00:00:00-05:00" 
                } 
        } 
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/createPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/createPolicy'
 
 #########################################Push Decision policy#########################################
 
@@ -190,7 +190,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default", 
   "policyName": "com.AllPermitGuard", 
   "policyType": "DECISION" 
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 #########################################Pushing BRMS Param policies##########################################
 
@@ -203,7 +203,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.BRMSParamvFirewall",
   "policyType": "BRMS_Param"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 sleep 2
 
@@ -212,7 +212,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.BRMSParamvDNS",
   "policyType": "BRMS_Param"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 sleep 2
 
@@ -221,7 +221,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.BRMSParamVOLTE",
   "policyType": "BRMS_Param"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 sleep 2
 
@@ -230,7 +230,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.BRMSParamvCPE",
   "policyType": "BRMS_Param"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 #########################################Pushing MicroService Config policies##########################################
 
@@ -243,7 +243,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.MicroServicevFirewall",
   "policyType": "MicroService"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy'
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy'
 
 sleep 10
 
@@ -252,7 +252,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.MicroServicevDNS",
   "policyType": "MicroService"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy' 
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy' 
 
 sleep 10
 
@@ -261,4 +261,4 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
   "pdpGroup": "default",
   "policyName": "com.MicroServicevCPE",
   "policyType": "MicroService"
-}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:8081/pdp/api/pushPolicy' 
+}' 'http://{{.Release.Name}}-{{.Values.global.pdp.nameOverride}}:{{.Values.config.pdpPort}}/pdp/api/pushPolicy' 
index 91d8ed4..c60c745 100644 (file)
@@ -13,7 +13,7 @@
   export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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}")
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.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 }}
index 171ea10..10480a0 100644 (file)
@@ -64,9 +64,9 @@ nexus:
 debugEnabled: false
 
 # application configuration
-# Example:
 config:
   preloadPolicies: true
+  pdpPort: 8081
 
 # default number of instances
 replicaCount: 1
index ad56334..92e836f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2017 Amdocs, AT&T, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index 9c36487..de59fd5 100644 (file)
@@ -1,3 +1,17 @@
+# 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: Service Design and Creation Backend API
 name: sdc-be
index 4869966..4a08504 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: extensions/v1beta1
 kind: Deployment
 metadata:
index 7338d2e..e4f3807 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: batch/v1
 kind: Job
 metadata:
index 83e9bb4..ec9d300 100644 (file)
@@ -1,3 +1,17 @@
+# 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
 kind: Service
 metadata:
index ebd5f8f..4f48143 100644 (file)
@@ -1,3 +1,17 @@
+# 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 configuration defaults.
 #################################################################
index 9632644..0e99a9a 100644 (file)
@@ -1,3 +1,17 @@
+# 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: Service Design and Creation Cassandra
 name: sdc-cs
index 10fabae..d7e8afd 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: extensions/v1beta1
 kind: Deployment
 metadata:
index da2ec3d..c6e9c19 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: batch/v1
 kind: Job
 metadata:
index 31230a9..184728f 100644 (file)
@@ -1,3 +1,19 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolume
 apiVersion: v1
index b0cd3bf..e27c331 100644 (file)
@@ -1,3 +1,19 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolumeClaim
 apiVersion: v1
index 72d9634..0b6c838 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2017 Amdocs, AT&T, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index a41fc38..30297a3 100644 (file)
@@ -1,3 +1,17 @@
+# 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
 kind: Service
 metadata:
index 5e2b77c..108a1b2 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 #################################################################
 # Global configuration defaults.
 #################################################################
index f2097a5..2accff1 100644 (file)
@@ -1,3 +1,17 @@
+# 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: Service Design and Creation Elasticsearch
 name: sdc-es
index bb08a2a..75ea024 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: extensions/v1beta1
 kind: Deployment
 metadata:
index 03a21c0..0d2512c 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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: batch/v1
 kind: Job
 metadata:
index 31230a9..184728f 100644 (file)
@@ -1,3 +1,19 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolume
 apiVersion: v1
index b0cd3bf..e27c331 100644 (file)
@@ -1,3 +1,19 @@
+{{/*
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
 kind: PersistentVolumeClaim
 apiVersion: v1
index a41fc38..30297a3 100644 (file)
@@ -1,3 +1,17 @@
+# 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
 kind: Service
 metadata:
index b32ed11..4c49abd 100644 (file)
@@ -1,3 +1,17 @@
+# 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 configuration defaults.
 #################################################################
index dc60986..9cbffba 100644 (file)
@@ -1,3 +1,17 @@
+# 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: Service Design and Creation Front End
 name: sdc-fe
index 818a279..1a6e01b 100644 (file)
@@ -1,3 +1,17 @@
+# 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: extensions/v1beta1
 kind: Deployment
 metadata:
index fc7a3c7..dccb751 100644 (file)
@@ -1,3 +1,17 @@
+# 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
 kind: Service
 metadata:
index 828ec41..d0ca009 100644 (file)
@@ -1,3 +1,17 @@
+# 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 configuration defaults.
 #################################################################
index 2bb4e49..f9bc14a 100644 (file)
@@ -1,3 +1,17 @@
+# 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: Service Design and Creation Kibana
 name: sdc-kb
index 73c01f5..4501ded 100644 (file)
@@ -1,3 +1,17 @@
+# 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: extensions/v1beta1
 kind: Deployment
 metadata:
index 0fbaae9..14d0b82 100644 (file)
@@ -1,3 +1,17 @@
+# 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
 kind: Service
 metadata:
index b1796f4..aa97467 100644 (file)
@@ -1,3 +1,17 @@
+# 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 configuration defaults.
 #################################################################
diff --git a/kubernetes/sdc/charts/sdc-wfd/.helmignore b/kubernetes/sdc/charts/sdc-wfd/.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/sdc/charts/sdc-wfd/Chart.yaml b/kubernetes/sdc/charts/sdc-wfd/Chart.yaml
new file mode 100644 (file)
index 0000000..a04b2e5
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 ZTE
+#
+# 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: Common Workflow Design
+name: sdc-wfd
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-wfd/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-wfd/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..d83c152
--- /dev/null
@@ -0,0 +1,20 @@
+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={{ include "common.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/sdc/charts/sdc-wfd/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-wfd/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..eb1f479
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright © 2018 ZTE
+#
+# 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: 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:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.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:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-wfd/templates/service.yaml b/kubernetes/sdc/charts/sdc-wfd/templates/service.yaml
new file mode 100644 (file)
index 0000000..09c7e04
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright © 2018 ZTE
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: 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": "workflow-modeler",
+          "version": "v1",
+          "url": "/api/workflow-modeler/v1",
+          "protocol": "REST",
+          "port": "{{ .Values.service.internalPort }}",
+          "enable_ssl": true,
+          "visualRange":"1"
+      },
+      {
+          "serviceName": "workflow-modeler-ui",
+          "version": "v1",
+          "url": "/workflow-modeler",
+          "protocol": "UI",
+          "path": "/workflow-modeler",
+          "port": "{{ .Values.service.internalPort }}",
+          "visualRange":"1"
+      }
+      ]'
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/sdc/charts/sdc-wfd/values.yaml b/kubernetes/sdc/charts/sdc-wfd/values.yaml
new file mode 100644 (file)
index 0000000..507d7a3
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright © 2018 ZTE
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/sdc/sdc-workflow-designer:1.1.0-STAGING-latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# default number of instances
+replicaCount: 1
+
+# 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: sdc-wfd
+  nodePort: "56"
+  internalPort: 8080
+
+ingress:
+  enabled: false
+
index acca8ef..1e8f788 100644 (file)
@@ -1,3 +1,17 @@
+# 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.
+
 dependencies:
   - name: common
     version: ~2.0.0
index f09c482..ec5e95f 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, 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
 kind: ConfigMap
 metadata:
index 90a4d28..d5664a7 100644 (file)
@@ -26,8 +26,6 @@ config:
     vnfRepoPort: 8702
     vnfRepoHost: 192.168.50.5
 
-
-
 sdc-es:
   service:
     name: sdc-es
\ No newline at end of file
diff --git a/kubernetes/sdnc/.helmignore b/kubernetes/sdnc/.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
index 6e0ec8d..fe27426 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: A Helm chart for Kubernetes
+description: SDN Controller
 name: sdnc
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/sdnc/charts/dmaap-listener/Chart.yaml b/kubernetes/sdnc/charts/dmaap-listener/Chart.yaml
new file mode 100644 (file)
index 0000000..ba2e574
--- /dev/null
@@ -0,0 +1,18 @@
+# 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: SDNC DMaaP Listener
+name: dmaap-listener
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdnc/charts/dmaap-listener/requirements.yaml b/kubernetes/sdnc/charts/dmaap-listener/requirements.yaml
new file mode 100644 (file)
index 0000000..ce82a2f
--- /dev/null
@@ -0,0 +1,18 @@
+# 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
@@ -14,7 +14,7 @@ password =admin
 contenttype =application/json
 authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM=
 authDate=2016-02-18T13:57:37-0800
-host=dmaap.{{.Values.nsPrefix}}:3904
+host=dmaap.{{.Release.Namespace}}:3904
 topic=VCPE-DHCP-EVENT
 group=jmsgrp
 id=sdnc1
@@ -32,4 +32,4 @@ sessionstickinessrequired=NO
 DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt
 sdnc.odl.user=admin
 sdnc.odl.password=admin
-sdnc.odl.url-base=https://sdnhost.{{.Values.nsPrefix}}:8443/restconf/operations
+sdnc.odl.url-base=https://sdnhost.{{.Release.Namespace}}:8443/restconf/operations
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableSdncDmaap }}
 apiVersion: v1
 kind: ConfigMap
 metadata:
   name: sdnc-dmaap-configmap
-  namespace: {{ .Values.nsPrefix }}
+  namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/dmaap/*").AsConfig . | indent 2 }}
-#{{ end }}
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableSdncDmaap }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: sdnc-dmaap-listener
-  namespace: "{{ .Values.nsPrefix }}"
+  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.dmaapReplicas }}
-  selector:
-    matchLabels:
-      app: dmaap-listener
+  replicas: {{ .Values.replicaCount }}
   template:
     metadata:
       labels:
-        app: dmaap-listener
-      name: sdnc-dmaap-listener
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
     spec:
       initContainers:
       - command:
         - /root/ready.py
         args:
         - --container-name
-        - sdnc-db-container
+        - {{ .Values.config.mysqlChartName }}
         - --container-name
-        - sdnc-controller-container
+        - {{ .Values.config.sdncChartName }}
         env:
         - name: NAMESPACE
           valueFrom:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-dmaap-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
       - command:
         - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh
+        name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: PROPERTY_DIR
-          value: /opt/onap/sdnc/data/properties
+          value: "{{ .Values.config.configDir }}"
         - name: SDNC_CONFIG_DIR
-          value: /opt/onap/sdnc/data/properties
-        image: {{ .Values.image.dmaaplistener }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: dmaapp-listener-container
+          value: "{{ .Values.config.configDir }}"
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/onap/sdnc/data/properties/dhcpalert.properties
+        - mountPath: {{ .Values.config.configDir }}/dhcpalert.properties
           subPath: dhcpalert.properties
           name: dmaap-dhcapalert-config
+        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:
@@ -72,5 +84,4 @@ spec:
           configMap:
             name: sdnc-dmaap-configmap
       imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
 # limitations under the License.
 
 apiVersion: v1
-kind: ConfigMap
+kind: Service
 metadata:
-  name: sdnc-mysql
-  namespace: "{{ .Values.nsPrefix }}"
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
   labels:
-    app: mysql
-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
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: ClusterIP
+  clusterIP: None
diff --git a/kubernetes/sdnc/charts/dmaap-listener/values.yaml b/kubernetes/sdnc/charts/dmaap-listener/values.yaml
new file mode 100644 (file)
index 0000000..601e9bb
--- /dev/null
@@ -0,0 +1,73 @@
+# 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 configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/sdnc-dmaap-listener-image:1.3-STAGING-latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  dmaapPort: 3904
+  mysqlChartName: sdnc-dbhost
+  sdncChartName: sdnc
+  configDir: /opt/onap/sdnc/data/properties
+
+# 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
+
+ingress:
+  enabled: false
+
+resources: {}
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdnc/charts/sdnc-portal/.helmignore b/kubernetes/sdnc/charts/sdnc-portal/.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/sdnc/charts/sdnc-portal/Chart.yaml b/kubernetes/sdnc/charts/sdnc-portal/Chart.yaml
new file mode 100644 (file)
index 0000000..193c38f
--- /dev/null
@@ -0,0 +1,18 @@
+# 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: SDN-C Admin Portal
+name: sdnc-portal
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdnc/charts/sdnc-portal/requirements.yaml b/kubernetes/sdnc/charts/sdnc-portal/requirements.yaml
new file mode 100644 (file)
index 0000000..1e8f788
--- /dev/null
@@ -0,0 +1,18 @@
+# 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from kubernetes/sdnc/resources/config/conf/admportal.json
rename to kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json
index ee575c2..4c0754b
@@ -39,8 +39,8 @@
   "dbPassword": "gamma",
   "dbName": "sdnctl",
   "odlProtocol": "http",
-  "odlHost": "sdnhost.{{.Values.nsPrefix}}",
-  "odlConexusHost": "sdnhost.{{.Values.nsPrefix}}",
+  "odlHost": "sdnhost.{{.Release.Namespace}}",
+  "odlConexusHost": "sdnhost.{{.Release.Namespace}}",
   "odlPort": "8181",
   "odlConexusPort": "8181",
   "odlUser": "admin",
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableSdncSdnc }}
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: sdnc-conf-configmap
-  namespace: {{ .Values.nsPrefix }}
+  name: sdnc-portal-configmap
+  namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }}
-#{{ end }}
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..5e1293c
--- /dev/null
@@ -0,0 +1,104 @@
+# 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: 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.config.mysqlChartName }}
+        - --container-name
+        - {{ .Values.config.sdncChartName }}
+        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" . }}
+          command: ["/bin/bash"]
+          args: ["-c", "cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh"]
+          image: "{{ .Values.global.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:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ 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: SDNC_CONFIG_DIR
+              value: "{{ .Values.config.configDir }}"
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: {{ .Values.config.configDir }}
+            name: sdnc-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 }}
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: sdnc-conf
+          configMap:
+            name: sdnc-portal-configmap
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml b/kubernetes/sdnc/charts/sdnc-portal/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/sdnc/charts/sdnc-portal/templates/service.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml
new file mode 100644 (file)
index 0000000..2d67c1f
--- /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.
+
+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": "sdnc-portal",
+          "version": "v1",
+          "url": "/",
+          "protocol": "UI",
+          "port": "{{ .Values.service.externalPort }}",
+          "visualRange":"0|1"
+      }
+      ]'
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      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/sdnc/charts/sdnc-portal/values.yaml b/kubernetes/sdnc/charts/sdnc-portal/values.yaml
new file mode 100644 (file)
index 0000000..b5be3a6
--- /dev/null
@@ -0,0 +1,80 @@
+# 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 configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/admportal-sdnc-image:1.3-STAGING-latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  mysqlChartName: sdnc-dbhost
+  dbRootPassword: openECOMP1.0
+  sdncChartName: sdnc
+  configDir: /opt/onap/sdnc/data/properties
+
+# 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: sdnc-portal
+  internalPort: 8443
+  externalPort: 8443
+  nodePort: "01"
+
+ingress:
+  enabled: false
+
+resources: {}
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdnc/charts/ueb-listener/Chart.yaml b/kubernetes/sdnc/charts/ueb-listener/Chart.yaml
new file mode 100644 (file)
index 0000000..35b2a2e
--- /dev/null
@@ -0,0 +1,18 @@
+# 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: SDNC UEB Listener
+name: ueb-listener
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdnc/charts/ueb-listener/requirements.yaml b/kubernetes/sdnc/charts/ueb-listener/requirements.yaml
new file mode 100644 (file)
index 0000000..ce82a2f
--- /dev/null
@@ -0,0 +1,18 @@
+# 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
@@ -1,4 +1,4 @@
-org.onap.ccsdk.sli.northbound.uebclient.asdc-address=sdc-be.{{.Values.nsPrefix}}:8443
+org.onap.ccsdk.sli.northbound.uebclient.asdc-address=sdc-be.{{.Release.Namespace}}:8443
 org.onap.ccsdk.sli.northbound.uebclient.consumer-group=sdc-OpenSource-Env1-sdnc-dockero
 org.onap.ccsdk.sli.northbound.uebclient.consumer-id=sdc-COpenSource-Env11-sdnc-dockero
 org.onap.ccsdk.sli.northbound.uebclient.environment-name=AUTO
@@ -6,7 +6,7 @@ org.onap.ccsdk.sli.northbound.uebclient.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84
 org.onap.ccsdk.sli.northbound.uebclient.user=sdnc
 org.onap.ccsdk.sli.northbound.uebclient.sdnc-user=admin
 org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
-org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url=http://sdnhost.{{.Values.nsPrefix}}:8282/restconf/operations/
+org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url=http://sdnhost.{{.Release.Namespace}}:8282/restconf/operations/
 org.onap.ccsdk.sli.northbound.uebclient.asdc-api-namespace=org:onap:ccsdk
 org.onap.ccsdk.sli.northbound.uebclient.spool.incoming=/opt/onap/sdnc/ueb-listener/spool/incoming
 org.onap.ccsdk.sli.northbound.uebclient.spool.archive=/opt/onap/sdnc/ueb-listener/spool/archive
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableSdncUeb }}
 apiVersion: v1
 kind: ConfigMap
 metadata:
   name: sdnc-ueb-configmap
-  namespace: {{ .Values.nsPrefix }}
+  namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/ueb/*").AsConfig . | indent 2 }}
-#{{ end }}
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#{{ if not .Values.disableSdncUeb }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: sdnc-ueb-listener
-  namespace: "{{ .Values.nsPrefix }}"
+  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.uebReplicas }}
-  selector:
-    matchLabels:
-      app: ueb-listener
+  replicas: {{ .Values.replicaCount }}
   template:
     metadata:
       labels:
-        app: ueb-listener
-      name: sdnc-ueb-listener
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
     spec:
       initContainers:
       - command:
         - /root/ready.py
         args:
         - --container-name
-        - sdnc-db-container
+        - {{ .Values.config.mysqlChartName }}
         - --container-name
-        - sdnc-controller-container
+        - {{ .Values.config.sdncChartName }}
         env:
         - name: NAMESPACE
           valueFrom:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-ueb-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
       - command:
         - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh
+        name: {{ include "common.name" . }}
+        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: PROPERTY_DIR
-          value: /opt/onap/sdnc/data/properties
+          value: "{{ .Values.config.configDir }}"
         - name: SDNC_CONFIG_DIR
-          value: /opt/onap/sdnc/data/properties
-        image: {{ .Values.image.ueblistener }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: ueb-listener-container
+          value: "{{ .Values.config.configDir }}"
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
@@ -64,6 +65,17 @@ spec:
         - mountPath: /opt/onap/sdnc/data/properties/ueb-listener.properties
           subPath: ueb-listener.properties
           name: ueb-config
+        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:
@@ -72,5 +84,4 @@ spec:
           configMap:
             name: sdnc-ueb-configmap
       imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml
new file mode 100644 (file)
index 0000000..a76592e
--- /dev/null
@@ -0,0 +1,28 @@
+# 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
+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:
+spec:
+  type: ClusterIP
+  clusterIP: None
diff --git a/kubernetes/sdnc/charts/ueb-listener/values.yaml b/kubernetes/sdnc/charts/ueb-listener/values.yaml
new file mode 100644 (file)
index 0000000..0f22647
--- /dev/null
@@ -0,0 +1,74 @@
+# 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 configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/sdnc-ueb-listener-image:1.3-STAGING-latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  uebPort: 3904
+  mysqlChartName: sdnc-dbhost
+  sdncChartName: sdnc
+  configDir: /opt/onap/sdnc/data/properties
+
+
+# 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
+
+ingress:
+  enabled: false
+
+resources: {}
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdnc/requirements.yaml b/kubernetes/sdnc/requirements.yaml
new file mode 100644 (file)
index 0000000..c458755
--- /dev/null
@@ -0,0 +1,24 @@
+# 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
+  - name: mysql
+    version: ~2.0.0
+    repository: '@local'
+  - name: dgbuilder
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/sdnc/resources/config/bin/installSdncDb.sh b/kubernetes/sdnc/resources/config/bin/installSdncDb.sh
new file mode 100644 (file)
index 0000000..f2c133c
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+#                                                      reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+
+SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
+SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma}
+SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl}
+
+
+# Create tablespace and user account
+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}';
+GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'localhost' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'%' WITH GRANT OPTION;
+commit;
+END
+
+# load schema
+if [ -f ${SDNC_HOME}/data/sdnctl.dump ]
+then
+  mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/sdnctl.dump
+fi
+
+for datafile in ${SDNC_HOME}/data/*.data.dump
+do
+  mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p${MYSQL_PASSWD} sdnctl < $datafile
+done
+
+# Create VNIs 100-199
+${SDNC_HOME}/bin/addVnis.sh 100 199
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh
new file mode 100755 (executable)
index 0000000..ee8106c
--- /dev/null
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# SDNC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+function enable_odl_cluster(){
+  if [ -z $SDNC_REPLICAS ]; then
+     echo "SDNC_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<${SDNC_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}
+SLEEP_TIME=${SLEEP_TIME:-120}
+MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
+ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
+
+#
+# Wait for database to init properly
+#
+echo "Waiting for mysql"
+until mysql -h {{.Values.mysql.service.name}}.{{.Release.Namespace}} -u root -p{{.Values.config.dbRootPassword}} mysql &> /dev/null
+do
+  printf "."
+  sleep 1
+done
+echo -e "\nmysql ready"
+
+if [ ! -f ${SDNC_HOME}/.installed ]
+then
+        echo "Installing SDNC database"
+        ${SDNC_HOME}/bin/installSdncDb.sh
+        echo "Installing SDN-C keyStore"
+        ${SDNC_HOME}/bin/addSdncKeyStore.sh
+        echo "Starting OpenDaylight"
+        ${ODL_HOME}/bin/start
+        echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
+        sleep ${SLEEP_TIME}
+        echo "Installing SDN-C platform features"
+        ${SDNC_HOME}/bin/installFeatures.sh
+        if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
+        then
+                echo "Installing directed graphs"
+                ${SDNC_HOME}/svclogic/bin/install.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
+fi
+
+exec ${ODL_HOME}/bin/karaf
+
index 81f63ec..b5d1560 100755 (executable)
@@ -40,7 +40,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
@@ -134,8 +134,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}}:8543/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}}:8543/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
 
 # Service
 org.onap.ccsdk.sli.adaptors.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id}
diff --git a/kubernetes/sdnc/resources/config/conf/dblib.properties b/kubernetes/sdnc/resources/config/conf/dblib.properties
new file mode 100644 (file)
index 0000000..4edae2b
--- /dev/null
@@ -0,0 +1,37 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+#                                              reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+# dblib.properrties
+org.onap.ccsdk.sli.dbtype=jdbc
+
+org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
+org.onap.ccsdk.sli.jdbc.database=sdnctl
+org.onap.ccsdk.sli.jdbc.user=sdnctl
+org.onap.ccsdk.sli.jdbc.password=gamma
+org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01
+org.onap.ccsdk.sli.jdbc.connection.timeout=50
+org.onap.ccsdk.sli.jdbc.request.timeout=100
+org.onap.ccsdk.sli.jdbc.limit.init=10
+org.onap.ccsdk.sli.jdbc.limit.min=10
+org.onap.ccsdk.sli.jdbc.limit.max=20
+org.onap.dblib.connection.recovery=false
diff --git a/kubernetes/sdnc/resources/config/conf/svclogic.properties b/kubernetes/sdnc/resources/config/conf/svclogic.properties
new file mode 100644 (file)
index 0000000..44ae32f
--- /dev/null
@@ -0,0 +1,27 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+#                                                       reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.onap.ccsdk.sli.dbtype = jdbc
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.database = sdnctl
+org.onap.ccsdk.sli.jdbc.user = sdnctl
+org.onap.ccsdk.sli.jdbc.password = gamma
+
index 50818a3..7b65636 100644 (file)
-################################################################################\r
-#\r
-#    Licensed to the Apache Software Foundation (ASF) under one or more\r
-#    contributor license agreements.  See the NOTICE file distributed with\r
-#    this work for additional information regarding copyright ownership.\r
-#    The ASF licenses this file to You under the Apache License, Version 2.0\r
-#    (the "License"); you may not use this file except in compliance with\r
-#    the License.  You may obtain a copy of the License at\r
-#\r
-#       http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-#    Unless required by applicable law or agreed to in writing, software\r
-#    distributed under the License is distributed on an "AS IS" BASIS,\r
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-#    See the License for the specific language governing permissions and\r
-#    limitations under the License.\r
-#\r
-################################################################################\r
-\r
-# Root logger\r
-log4j.rootLogger=INFO, async, osgi:*\r
-log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer\r
-\r
-# Log Directory\r
-logDir=/var/log/onap\r
-componentName=sdnc\r
-logDirectory=${logDir}/${componentName}\r
-maxFileSize=100MB\r
-maxBackupIndex=20\r
-\r
-# CONSOLE appender not used by default\r
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender\r
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n\r
-\r
-# Async appender forwarding to file appender \r
-log4j.appender.async=org.apache.log4j.AsyncAppender\r
-log4j.appender.async.appenders=out\r
-\r
-# File appender\r
-log4j.appender.out=org.apache.log4j.RollingFileAppender\r
-log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout\r
-log4j.appender.out.layout.Properties=true\r
-log4j.appender.out.file=${logDirectory}/karaf.log\r
-log4j.appender.out.append=true\r
-log4j.appender.out.maxFileSize=${maxFileSize}\r
-log4j.appender.out.maxBackupIndex=${maxBackupIndex}\r
-\r
-# Sift appender\r
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender\r
-log4j.appender.sift.key=bundle.name\r
-log4j.appender.sift.default=karaf\r
-log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender\r
-log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout\r
-log4j.appender.sift.appender.layout.Properties=true\r
-log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log\r
-log4j.appender.sift.appender.append=true\r
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You 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.
+#
+################################################################################
+
+# Root logger
+log4j.rootLogger=INFO, async, osgi:*
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+maxFileSize=100MB
+maxBackupIndex=20
+logDir=/var/log/onap
+componentName=sdnc
+logDirectory=${logDir}/${componentName}
+karafLogName=karaf
+errorLogName=error
+metricsLogName=metrics
+auditLogName=audit
+debugLogName=debug
+
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n
+
+# Async appender forwarding to file appender
+log4j.appender.async=org.apache.log4j.AsyncAppender
+log4j.appender.async.appenders=out
+
+# File appender
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.out.layout.Properties=true
+log4j.appender.out.file=${logDirectory}/${karafLogName}.log
+log4j.appender.out.append=true
+log4j.appender.out.maxFileSize=${maxFileSize}
+log4j.appender.out.maxBackupIndex=${maxBackupIndex}
+
+# Sift appender
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=karaf
+log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.sift.appender.layout.Properties=true
+log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+
+
+
+log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPusherImpl=DEBUG
+log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator=DEBUG
+
+
+#ECOMP Debug appender
+log4j.appender.debug=org.apache.log4j.RollingFileAppender
+log4j.appender.debug.key=bundle.name
+log4j.appender.debug.default=karaf
+log4j.appender.debug.appName=EELFDebug
+log4j.appender.debug.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.debug.layout.Properties=true
+log4j.appender.debug.file=${logDirectory}/${debugLogName}.log
+log4j.appender.debug.append=true
+log4j.appender.debug.maxFileSize=${maxFileSize}
+log4j.appender.debug.maxBackupIndex=${maxBackupIndex}
+#log4j.appender.debug.filter.f1=org.apache.log4j.varia.LevelRangeFilter
+#log4j.appender.debug.filter.f1.LevelMax=WARN
+#log4j.appender.debug.filter.f1.LevelMin=TRACE
+
+
+#Error appender
+log4j.appender.error=org.apache.log4j.RollingFileAppender
+log4j.appender.error.appName=EELFError
+log4j.appender.error.File=${logDirectory}/${errorLogName}.log
+log4j.appender.error.Threshold=ERROR
+log4j.appender.error.maxFileSize=${maxFileSize}
+log4j.appender.error.maxBackupIndex=${maxBackupIndex}
+log4j.appender.error.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.error.layout.Properties=true
+
+#Metrics appender
+log4j.appender.metric=org.apache.log4j.RollingFileAppender
+log4j.appender.metric.appName=EELFMetrics
+log4j.appender.metric.File=${logDirectory}/${metricsLogName}.log
+log4j.appender.metric.maxFileSize=${maxFileSize}
+log4j.appender.metric.maxBackupIndex=${maxBackupIndex}
+log4j.appender.metric.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.metric.layout.Properties=true
+
+#Audit appender
+log4j.appender.audit=org.apache.log4j.RollingFileAppender
+log4j.appender.audit.appName=EELFAudit
+log4j.appender.audit.File=${logDirectory}/${auditLogName}.log
+log4j.appender.audit.maxFileSize=${maxFileSize}
+log4j.appender.audit.maxBackupIndex=${maxBackupIndex}
+log4j.appender.audit.layout=org.apache.log4j.xml.XMLLayout
+log4j.appender.audit.layout.Properties=true
+
+#Loggers
+#Routing of all messages from root logger
+log4j.logger.com.att=TRACE, debug, error
+#Store to the same log file messages from upper level appender or not
+log4j.additivity.com.att=false
+
+#EELFManager loggers
+#EELF parent logger
+log4j.logger.com.att.eelf=TRACE, debug
+log4j.additivity.com.att.eelf=false
+
+#Audit logger routing
+log4j.logger.com.att.eelf.audit=DEBUG, audit
+log4j.additivity.com.att.eelf.audit=false
+
+#Metric logger routing
+log4j.logger.com.att.eelf.metrics=DEBUG, metric
+log4j.additivity.com.att.eelf.metrics=false
+
+#Performance logger routing
+log4j.logger.com.att.eelf.perf=DEBUG, metric
+log4j.additivity.com.att.eelf.perf=false
+
+#Server logger routing
+log4j.logger.com.att.eelf.server=DEBUG, debug
+log4j.additivity.com.att.eelf.server=false
+
+#Policy logger routing
+log4j.logger.com.att.eelf.policy=DEBUG, debug
+log4j.additivity.com.att.eelf.policy=false
+
+#Error logger routing
+log4j.logger.com.att.eelf.error=DEBUG, error
+log4j.additivity.com.att.eelf.error=false
+
+#Debug logger routing
+log4j.logger.com.att.eelf.debug=DEBUG, debug
+log4j.additivity.com.att.eelf.debug=false
diff --git a/kubernetes/sdnc/templates/all-services.yaml b/kubernetes/sdnc/templates/all-services.yaml
deleted file mode 100644 (file)
index 14d7b01..0000000
+++ /dev/null
@@ -1,200 +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.disableSdncSdncDbhost }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: dbhost
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-dbhost
-spec:
-  ports:
-    - port: 3306
-  selector:
-    app: sdnc-dbhost
-  clusterIP: None
----
-# 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: dbhost-read
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-dbhost
-spec:
-  ports:
-  - name: sdnc-dbhost
-    port: 3306
-  selector:
-    app: sdnc-dbhost
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnctldb01
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-dbhost
-spec:
-  ports:
-    - port: 3306
-  selector:
-    app: sdnc-dbhost
-  clusterIP: None
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnctldb02
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-dbhost
-spec:
-  ports:
-    - port: 3306
-  selector:
-    app: sdnc-dbhost
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableSdncSdnc }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnc-dgbuilder
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-dgbuilder
-spec:
-  ports:
-  - name: "sdnc-dgbuilder-port"
-    port: 3000
-    targetPort: 3100
-    nodePort: {{ .Values.nodePortPrefix }}03
-  type: NodePort
-  selector:
-    app: sdnc-dgbuilder
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnhost
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "sdnc",
-          "version": "v1",
-          "url": "/",
-          "protocol": "REST",
-          "port": "8282",
-          "visualRange":"1",
-          "path": "/"
-      }
-      ]'
-spec:
-  ports:
-  - name: "sdnc-port-8181"
-    port: 8282
-    targetPort: 8181
-    nodePort: {{ .Values.nodePortPrefix }}02
-  - name: "sdnc-port-8101"
-    port: 8201
-    targetPort: 8101
-    nodePort: {{ .Values.nodePortPrefix }}08
-  - name: "sdnc-jolokia-port-8080"
-    port: 8280
-    targetPort: 8080
-    nodePort: {{ .Values.nodePortPrefix }}46
-  type: NodePort
-  selector:
-    app: sdnc
----
-kind: Service
-apiVersion: v1
-metadata:
-  name: nfs-provisioner
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: nfs-provisioner
-spec:
-  ports:
-    - name: nfs
-      port: 2049
-    - name: mountd
-      port: 20048
-    - name: rpcbind
-      port: 111
-    - name: rpcbind-udp
-      port: 111
-      protocol: UDP
-  selector:
-    app: nfs-provisioner
-#{{ end }}
-#{{ if not .Values.disableSdncSdncPortal }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnc-portal
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc-portal
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "sdnc-portal",
-          "version": "v1",
-          "url": "/",
-          "protocol": "UI",
-          "port": "8843",
-          "visualRange":"0|1"
-      }
-      ]'
-spec:
-  ports:
-  - name: "sdnc-portal-port"
-    port: 8843
-    nodePort: {{ .Values.nodePortPrefix }}01
-  type: NodePort
-  selector:
-    app: sdnc-portal
-#{{ end }}
-#{{ if .Values.enableODLCluster }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: sdnhost-cluster
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    app: sdnc
-  annotations:
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
-spec:
-  ports:
-   - name: "sdnc-cluster-port"
-     port: 2550
-  clusterIP: None
-  selector:
-    app: sdnc
-  sessionAffinity: None
-  type: ClusterIP
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/configmap.yaml b/kubernetes/sdnc/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..54de05c
--- /dev/null
@@ -0,0 +1,77 @@
+# 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
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-filebeat-configmap
+  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" . }}-log-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-startodl
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/bin/startODL.sh").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-installsdncdb
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/bin/installSdncDb.sh").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-aaiclient-properties
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/conf/aaiclient.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dblib-properties
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/conf/dblib.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-svclogic-config
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/conf/svclogic.properties").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/conf/svclogic.properties").AsConfig . | indent 2 }}
diff --git a/kubernetes/sdnc/templates/db-statefulset.yaml b/kubernetes/sdnc/templates/db-statefulset.yaml
deleted file mode 100644 (file)
index 29d592a..0000000
+++ /dev/null
@@ -1,220 +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.disableSdncSdncDbhost }}
-apiVersion: apps/v1beta1
-kind: StatefulSet
-metadata:
-  name: sdnc-dbhost
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  serviceName: "dbhost"
-  replicas: {{ .Values.numberOfDbReplicas }}
-  selector:
-    matchLabels:
-      app: sdnc-dbhost
-  template:
-    metadata:
-      labels:
-        app: sdnc-dbhost
-      name: sdnc-dbhost
-    spec:
-      initContainers:
-      - name: init-mysql
-        image: {{ .Values.image.mysql }}
-        imagePullPolicy: {{ .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.image.xtrabackup }}
-        env:
-        - name: MYSQL_ROOT_PASSWORD
-          value: openECOMP1.0
-        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 sdnc-dbhost-$(($ordinal-1)).dbhost.{{ .Values.nsPrefix }} 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: sdnc-data
-          mountPath: /var/lib/mysql
-#{{ if not .Values.disableNfsProvisioner }}
-          subPath: mysql
-#{{ end }}
-        - name: conf
-          mountPath: /etc/mysql/conf.d
-      containers:
-      - env:
-        - name: MYSQL_ROOT_PASSWORD
-          value: openECOMP1.0
-        - name: MYSQL_ROOT_HOST
-          value: '%'
-        - name: MYSQL_ALLOW_EMPTY_PASSWORD
-          value: "0"
-        image: {{ .Values.image.mysql }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-db-container
-        volumeMounts:
-        - mountPath: /var/lib/mysql
-          name: sdnc-data
-#{{ if not .Values.disableNfsProvisioner }}
-          subPath: mysql
-#{{ end }}
-        - name: conf
-          mountPath: /etc/mysql/conf.d
-        ports:
-        - containerPort: 3306
-        resources:
-          requests:
-            cpu: 500m
-            memory: 1Gi
-        livenessProbe:
-          exec:
-            command: ["mysqladmin", "ping"]
-          initialDelaySeconds: 30
-          periodSeconds: 10
-          timeoutSeconds: 5
-        readinessProbe:
-          tcpSocket:
-            port: 3306
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - name: xtrabackup
-        image: {{ .Values.image.xtrabackup }}
-        env:
-        - name: MYSQL_ROOT_PASSWORD
-          value: openECOMP1.0
-        ports:
-        - name: xtrabackup
-          containerPort: 3307
-        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 127.0.0.1 -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 127.0.0.1 <<EOF
-          $(<change_master_to.sql.orig),
-            MASTER_HOST="sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}",
-            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=127.0.0.1"
-        volumeMounts:
-        - name: sdnc-data
-          mountPath: /var/lib/mysql
-#{{ if not .Values.disableNfsProvisioner }}
-          subPath: mysql
-#{{ end }}
-        - name: conf
-          mountPath: /etc/mysql/conf.d
-        resources:
-          requests:
-            cpu: 100m
-            memory: 100Mi
-      volumes:
-      - name: conf
-        emptyDir: {}
-      - name: config-map
-        configMap:
-          name: sdnc-mysql
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-#{{ if .Values.disableNfsProvisioner }}
-      - name: sdnc-data
-        hostPath:
-          path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data/mysql
-#{{ else }}
-  volumeClaimTemplates:
-  - metadata:
-      name: sdnc-data
-      annotations:
-        volume.beta.kubernetes.io/storage-class: "{{ .Values.nsPrefix }}-sdnc-data"
-    spec:
-      accessModes: ["ReadWriteMany"]
-      resources:
-        requests:
-          storage: 1Gi
-#{{ end }}
-#{{ end }}
-
diff --git a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
deleted file mode 100644 (file)
index 62f1d00..0000000
+++ /dev/null
@@ -1,80 +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.disableSdncSdncDgbuilder }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: sdnc-dgbuilder
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.dgbuilderReplicas }}
-  selector:
-    matchLabels:
-      app: sdnc-dgbuilder
-  template:
-    metadata:
-      labels:
-        app: sdnc-dgbuilder
-      name: sdnc-dgbuilder
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdnc-db-container
-        - --container-name
-        - sdnc-controller-container
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-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: sdnc-dgbuilder-container
-        ports:
-        - containerPort: 3100
-        readinessProbe:
-          tcpSocket:
-            port: 3100
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        volumeMounts:
-        - name: localtime
-          mountPath: /etc/localtime
-          readOnly: true
-      restartPolicy: Always
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
deleted file mode 100644 (file)
index 12713a1..0000000
+++ /dev/null
@@ -1,72 +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.disableSdncSdncDbhost }}
-#{{ if not .Values.disableNfsProvisioner }}
-kind: Deployment
-apiVersion: extensions/v1beta1
-metadata:
-  name: sdnc-nfs-provisioner
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.nfsReplicas }}
-  strategy:
-    type: Recreate
-  template:
-    metadata:
-      labels:
-        app: nfs-provisioner
-      name: sdnc-nfs-provisioner
-    spec:
-      containers:
-        - name: nfs-provisioner
-          image: quay.io/kubernetes_incubator/nfs-provisioner:v1.0.8
-          ports:
-            - name: nfs
-              containerPort: 2049
-            - name: mountd
-              containerPort: 20048
-            - name: rpcbind
-              containerPort: 111
-            - name: rpcbind-udp
-              containerPort: 111
-              protocol: UDP
-          securityContext:
-            capabilities:
-              add:
-                - DAC_READ_SEARCH
-                - SYS_RESOURCE
-          args:
-            - "-provisioner=sdnc/nfs"
-          env:
-            - name: POD_IP
-              valueFrom:
-                fieldRef:
-                  fieldPath: status.podIP
-            - name: SERVICE_NAME
-              value: nfs-provisioner
-            - name: POD_NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-          imagePullPolicy: "IfNotPresent"
-          volumeMounts:
-            - name: export-volume
-              mountPath: /export
-      volumes:
-        - name: export-volume
-          hostPath:
-            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data
-#{{ end }}
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml b/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml
deleted file mode 100644 (file)
index 1e6bf53..0000000
+++ /dev/null
@@ -1,24 +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.disableSdncSdncDbhost }}
-#{{ if not .Values.disableNfsProvisioner }}
-kind: StorageClass
-apiVersion: storage.k8s.io/v1
-metadata:
-  name: "{{ .Values.nsPrefix }}-sdnc-data"
-  namespace: "{{ .Values.nsPrefix }}"
-provisioner: sdnc/nfs
-#{{ end }}
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml
deleted file mode 100644 (file)
index a0bf0e2..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.disableSdncSdnc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: sdnc-log-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: sdnc-logging-cfg-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-statefulset.yaml b/kubernetes/sdnc/templates/sdnc-statefulset.yaml
deleted file mode 100644 (file)
index 3b07896..0000000
+++ /dev/null
@@ -1,131 +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.disableSdncSdnc }}
-apiVersion: apps/v1beta1
-kind: StatefulSet
-metadata:
-  name: sdnc
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  serviceName: "sdnhost-cluster"
-  replicas: {{ .Values.numberOfODLReplicas }}
-  podManagementPolicy: Parallel
-  selector:
-    matchLabels:
-      app: sdnc
-  template:
-    metadata:
-      labels:
-        app: sdnc
-      name: sdnc
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdnc-db-container
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-readiness
-      containers:
-      - command:
-        - bash
-        - "-c"
-        - |
-          sed -i 's/dbhost/sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties
-          sed -i 's/^\(org.onap.ccsdk.sli.jdbc.hosts=\).*/\1sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties
-          /opt/onap/sdnc/bin/startODL.sh
-        env:
-        - name: MYSQL_ROOT_PASSWORD
-          value: openECOMP1.0
-        - name: SDNC_CONFIG_DIR
-          value: /opt/onap/sdnc/data/properties
-        - name: ENABLE_ODL_CLUSTER
-          value: "{{ .Values.enableODLCluster }}"
-        - name: SDNC_REPLICAS
-          value: "{{ .Values.numberOfODLReplicas }}"
-        image: {{ .Values.image.sdnc }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-controller-container
-        volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
-        - mountPath: /opt/onap/sdnc/data/properties/admportal.json
-          name: sdnc-conf
-          subPath: admportal.json
-        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
-          name: sdnc-conf
-          subPath: aaiclient.properties
-        - mountPath: /var/log/onap
-          name: sdnc-logs
-        - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
-          name: sdnc-logging-cfg-config
-          subPath: org.ops4j.pax.logging.cfg
-        ports:
-        - containerPort: 8181
-        - containerPort: 8101
-        - containerPort: 2550
-        - containerPort: 8080
-        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: sdnc-logs
-        - mountPath: /usr/share/filebeat/data
-          name: sdnc-data-filebeat
-      volumes:
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
-        - name: filebeat-conf
-          configMap:
-            name: sdnc-log-configmap
-        - name: sdnc-logging-cfg-config
-          configMap:
-            name: sdnc-logging-cfg-configmap
-        - name: sdnc-logs
-          emptyDir: {}
-        - name: sdnc-data-filebeat
-          emptyDir: {}
-        - name: sdnc-conf
-          configMap:
-            name: sdnc-conf-configmap
-            items:
-            - key: admportal.json
-              path: admportal.json
-              mode: 0755
-            - key: aaiclient.properties
-              path: aaiclient.properties
-              mode: 0755
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdnc/templates/secrets.yaml b/kubernetes/sdnc/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/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml
new file mode 100644 (file)
index 0000000..487368e
--- /dev/null
@@ -0,0 +1,153 @@
+# 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
+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": "sdnc",
+          "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 }}
+      targetPort: {{ .Values.service.internalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: "{{ .Values.service.name }}-8202"
+    - port: {{ .Values.service.externalPort3 }}
+      targetPort: {{ .Values.service.internalPort3 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
+      name: "{{ .Values.service.name }}-8280"
+    {{- 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
+
+{{ if .Values.geoEnabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: sdnhost-{{ include "common.fullname" . }}-0
+  namespace: {{ .Release.Namespace }}
+  labels:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+spec:
+  ports:
+  - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort4 }}
+    port: {{ .Values.service.clusterPort2 }}
+    targetPort: {{ .Values.service.internalPort4 }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }}
+  - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort }}
+    port: {{ .Values.service.clusterPort3 }}
+    targetPort: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }}
+  type: NodePort
+  selector:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+{{ end }}
+{{ if .Values.geoEnabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: sdnhost-{{ include "common.fullname" . }}-1
+  namespace: {{ .Release.Namespace }}
+  labels:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
+spec:
+  ports:
+  - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort4 }}
+    port: {{ .Values.service.clusterPort2 }}
+    targetPort: {{ .Values.service.internalPort4 }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }}
+  - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort }}
+    port: {{ .Values.service.clusterPort3 }}
+    targetPort: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }}
+  type: NodePort
+  selector:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
+{{ end }}
+{{ if .Values.geoEnabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: sdnhost-{{ include "common.fullname" . }}-2
+  namespace: {{ .Release.Namespace }}
+  labels:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
+spec:
+  ports:
+  - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort4 }}
+    port: {{ .Values.service.clusterPort2 }}
+    targetPort: {{ .Values.service.internalPort4 }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }}
+  - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort }}
+    port: {{ .Values.service.clusterPort3 }}
+    targetPort: {{ .Values.service.internalPort }}
+    nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }}
+  type: NodePort
+  selector:
+    statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
+---
+{{ end }}
+
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..8b4055e
--- /dev/null
@@ -0,0 +1,188 @@
+# 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: 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: ["/bin/bash"]
+          args: ["-c", "/opt/sdnc/bin/startODL.sh"]
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          - containerPort: {{ .Values.service.internalPort2 }}
+          - containerPort: {{ .Values.service.internalPort3 }}
+          - containerPort: {{ .Values.service.clusterPort }}
+          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: ENABLE_ODL_CLUSTER
+              value: "{{ .Values.config.enableClustering }}"
+            - name: SDNC_REPLICAS
+              value: "{{ .Values.replicaCount }}"
+            - name: MYSQL_HOST
+              value: "{{.Values.mysql.service.name}}.{{.Release.Namespace}}"
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
+            name: sdnc-logging-cfg-config
+            subPath: org.ops4j.pax.logging.cfg
+          - mountPath: /opt/onap/sdnc/bin/startODL.sh
+            name: startodl
+            subPath: startODL.sh
+          - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
+            name: installsdncdb
+            subPath: installSdncDb.sh
+          - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
+            name: aaiclient-conf
+            subPath: aaiclient.properties
+          - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
+            name: sdnc-dblib-properties
+            subPath: dblib.properties
+          - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
+            name: sdnc-svclogic-config
+            subPath: svclogic.properties
+          - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
+            name: onap-sdnc-svclogic-config
+            subPath: svclogic.properties
+          - mountPath: /var/log/onap
+            name: logs
+          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: logs
+          emptyDir: {}
+        - name: data-filebeat
+          emptyDir: {}
+        - name: filebeat-conf
+          configMap:
+            name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: sdnc-logging-cfg-config
+          configMap:
+            name: {{ include "common.fullname" . }}-log-configmap
+        - name: startodl
+          configMap:
+            name: {{ include "common.fullname" . }}-startodl
+            items:
+            - key: startODL.sh
+              path: startODL.sh
+              mode: 0755
+        - name: installsdncdb
+          configMap:
+            name: {{ include "common.fullname" . }}-installsdncdb
+            items:
+            - key: installSdncDb.sh
+              path: installSdncDb.sh
+              mode: 0755
+        - name: aaiclient-conf
+          configMap:
+            name: {{ include "common.fullname" . }}-aaiclient-properties
+            items:
+            - key: aaiclient.properties
+              path: aaiclient.properties
+              mode: 0644
+        - name: sdnc-dblib-properties
+          configMap:
+            name: {{ include "common.fullname" . }}-dblib-properties
+            items:
+            - key: dblib.properties
+              path: dblib.properties
+              mode: 0644
+        - name: sdnc-svclogic-config
+          configMap:
+            name: {{ include "common.fullname" . }}-svclogic-config
+            items:
+            - key: svclogic.properties
+              path: svclogic.properties
+              mode: 0644
+        - name: onap-sdnc-svclogic-config
+          configMap:
+            name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
+            items:
+            - key: svclogic.properties
+              path: svclogic.properties
+              mode: 0644
+
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/sdnc/templates/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml
deleted file mode 100644 (file)
index ef469ac..0000000
+++ /dev/null
@@ -1,85 +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.disableSdncSdncPortal }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: sdnc-portal
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  replicas: {{ .Values.portalReplicas }}
-  selector:
-    matchLabels:
-      app: sdnc-portal
-  template:
-    metadata:
-      labels:
-        app: sdnc-portal
-      name: sdnc-portal
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdnc-db-container
-        - --container-name
-        - sdnc-controller-container
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-portal-readiness
-      containers:
-      - command:
-        - /bin/bash
-        - -c
-        - cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh
-        env:
-        - name: MYSQL_ROOT_PASSWORD
-          value: openECOMP1.0
-        - name: SDNC_CONFIG_DIR
-          value: /opt/onap/sdnc/data/properties
-        image: {{ .Values.image.admportalSdnc }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdnc-portal-container
-        ports:
-        - containerPort: 8843
-        volumeMounts:
-        - name: localtime
-          mountPath: /etc/localtime
-          readOnly: true
-        - mountPath: /opt/onap/sdnc/data/properties/
-          name: sdnc-conf
-        readinessProbe:
-          tcpSocket:
-            port: 8843
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      restartPolicy: Always
-      volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
-      - name: sdnc-conf
-        configMap:
-          name: sdnc-conf-configmap
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
index 9402917..38d6424 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-nsPrefix: onap
-pullPolicy: IfNotPresent
-nodePortPrefix: 302
-dataRootDir: /dockerdata-nfs
-image:
-  readiness: oomk8s/readiness-check:1.1.0
-  mysql: mysql:5.7
-  xtrabackup: gcr.io/google-samples/xtrabackup:1.0
-  dgbuilderSdnc: nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:v0.1.0
-  sdnc: nexus3.onap.org:10001/onap/sdnc-image:v1.2.1
-  admportalSdnc: nexus3.onap.org:10001/onap/admportal-sdnc-image:v1.2.1
-  ueblistener: nexus3.onap.org:10001/onap/sdnc-ueb-listener-image:v1.2.1
-  dmaaplistener: nexus3.onap.org:10001/onap/sdnc-dmaap-listener-image:v1.2.1
-  filebeat: docker.elastic.co/beats/filebeat:5.5.0
-enableODLCluster: false
-numberOfODLReplicas: 1
-numberOfDbReplicas: 1
-dgbuilderReplicas: 1
-dmaapReplicas: 1
-nfsReplicas: 1
-uebReplicas: 1
-portalReplicas: 1
-disableSdncSdncDgbuilder: false
-disableSdncSdncPortal: false
-disableNfsProvisioner: false
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repository: nexus3.onap.org:10001
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  persistence:
+    mountPath: /dockerdata-nfs
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application images
+repository: nexus3.onap.org:10001
+pullPolicy: Always
+image: onap/sdnc-image:1.3-STAGING-latest
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+geoEnabled: false
+
+# application configuration
 config:
+  dbRootPassword: openECOMP1.0
+  enableClustering: true
+  configDir: /opt/onap/sdnc/data/properties
+  dmaapTopic: SUCCESS
   logstashServiceName: log-ls
   logstashPort: 5044
+
+# dependency / sub-chart configuration
+dmaap-listener:
+  nameOverride: sdnc-dmaap-listener
+  config:
+    sdncChartName: sdnc
+    mysqlChartName: sdnc-db
+    configDir: /opt/onap/sdnc/data/properties
+
+ueb-listener:
+  nameOverride: sdnc-ueb-listener
+  config:
+    sdncChartName: sdnc
+    mysqlChartName: sdnc-db
+    configDir: /opt/onap/sdnc/data/properties
+
+sdnc-portal:
+  config:
+    sdncChartName: sdnc
+    mysqlChartName: sdnc-db
+    configDir: /opt/onap/sdnc/data/properties
+    dbRootPassword: openECOMP1.0
+
+mysql:
+  nameOverride: sdnc-db
+  service:
+    name: sdnc-dbhost
+  nfsprovisionerPrefix: sdnc
+  sdnctlPrefix: sdnc
+  persistence:
+    mountSubPath: sdnc/data
+    enabled: true
+  disableNfsProvisioner: false
+  replicaCount: 1
+
+dgbuilder:
+  nameOverride: sdnc-dgbuilder
+  config:
+    dbPodName: sdnc-db
+    dbServiceName: sdnc-dbhost
+    dbRootPassword: openECOMP1.0
+  service:
+    nodePort: "03"
+
+# 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: sdnc
+  #targetPort
+  internalPort: 8181
+  internalPort2: 8101
+  internalPort3: 8080
+  internalPort4: 2550
+
+  #port
+  externalPort: 8282
+  nodePort: "02"
+
+  externalPort2: 8202
+  nodePort2: "08"
+
+  externalPort3: 8280
+  nodePort3: 46
+
+  clusterPort: 2550
+  clusterPort2: 2650
+  clusterPort3: 2681
+
+  geoNodePort1: 61
+  geoNodePort2: 62
+  geoNodePort3: 63
+  geoNodePort4: 64
+  geoNodePort5: 65
+  geoNodePort6: 66
+
+ingress:
+  enabled: false
+
+resources: {}
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
index 819ecff..1e8abe2 100644 (file)
@@ -156,6 +156,35 @@ spec:
     app: vfc-nokiavnfmdriver
   type: NodePort
 #{{ end }}
+#{{ if not .Values.disableVfcVfcNokiav2vnfmdriver }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: vfc-nokiav2vnfmdriver
+  name: vfc-nokiav2vnfmdriver
+  namespace: "{{ .Values.nsPrefix }}"
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "NokiaSVNFM",
+          "version": "v1",
+          "url": "/api/NokiaSVNFM/v1",
+          "protocol": "REST",
+          "port": "{{.Values.nokiav2vnfmdriver.port}}",
+          "visualRange":"1"
+      }
+      ]'
+spec:
+  ports:
+  - name: vfc-nokiav2vnfmdriver
+    port: {{.Values.nokiav2vnfmdriver.port}}
+    nodePort: {{.Values.nokiav2vnfmdriver.nodePort}}
+  selector:
+    app: vfc-nokiav2vnfmdriver
+  type: NodePort
+#{{ end }}
 #{{ if not .Values.disableVfcVfcHwvnfmdriver }}
 ---
 apiVersion: v1
@@ -445,4 +474,4 @@ spec:
   selector:
     app: vfc-catalog
   type: NodePort
-#{{ end }}
\ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/vfc/templates/vfc-nokiav2vnfmdriver-deployment.yaml b/kubernetes/vfc/templates/vfc-nokiav2vnfmdriver-deployment.yaml
new file mode 100644 (file)
index 0000000..7c021fd
--- /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.
+
+#{{ if not .Values.disableVfcNokiav2VnfmDriver }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: vfc-nokiav2vnfmdriver
+  namespace: "{{ .Values.nsPrefix }}"
+spec:
+  replicas: {{ .Values.nokiav2vnfmdriver.replicas }}
+  selector:
+    matchLabels:
+      app: vfc-nokiav2vnfmdriver
+  template:
+    metadata:
+      labels:
+        app: vfc-nokiav2vnfmdriver
+      name: vfc-nokiav2vnfmdriver
+    spec:
+      hostname: vfc-nokiav2vnfmdriver
+      containers:
+      - args:
+        image:  {{.Values.nokiav2vnfmdriver.image}}
+        name: "vfc-nokiav2vnfmdriver"
+        env:
+        - name: MSB_ADDR
+          value: {{ tpl .Values.msbaddr . }}
+        ports:
+        - containerPort: {{ .Values.nokiav2vnfmdriver.port }}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.nokiav2vnfmdriver.port }}
+          initialDelaySeconds: 5
+          periodSeconds: 10
+        imagePullPolicy: "{{ .Values.pullPolicy }}"
+      imagePullSecrets:
+      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
index b301d2d..5bd6b09 100644 (file)
@@ -50,6 +50,11 @@ nokiavnfmdriver:
   port: 8486
   nodePort: 30412
   replicas: 1
+nokiav2vnfmdriver:
+  image: nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/nokiav2:1.1.0-STAGING-latest
+  port: 8089
+  nodePort: 30413
+  replicas: 1
 jujudriver:
   image: nexus3.onap.org:10001/onap/vfc/jujudriver:v1.0.0
   port: 8483