Merge "Add AAF style creds to realm.props"
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>
Tue, 18 Sep 2018 17:56:51 +0000 (17:56 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 18 Sep 2018 17:56:51 +0000 (17:56 +0000)
64 files changed:
TOSCA/Helm/k8s_setup_env.sh [deleted file]
TOSCA/Helm/onap-blueprint.yaml [deleted file]
TOSCA/ONAP_TOSCA/onap_tosca.yaml [new file with mode: 0644]
kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore
kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml
kubernetes/aai/charts/aai-champ/templates/deployment.yaml
kubernetes/aai/charts/aai-champ/values.yaml
kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml
kubernetes/aai/charts/aai-data-router/resources/dynamic/routes/entity-event.route
kubernetes/aai/charts/aai-graphadmin/resources/config/application.properties
kubernetes/aai/charts/aai-modelloader/resources/config/auth/tomcat_keystore [new file with mode: 0644]
kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties
kubernetes/aai/charts/aai-resources/resources/config/application.properties
kubernetes/aai/charts/aai-sparky-be/resources/config/application-sync.properties [new file with mode: 0644]
kubernetes/aai/charts/aai-sparky-be/resources/config/application.properties
kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore
kubernetes/aai/charts/aai-spike/resources/config/spike-beans.xml
kubernetes/aai/charts/aai-spike/values.yaml
kubernetes/aai/charts/aai-traversal/resources/config/application.properties
kubernetes/clamp/charts/clamp-dash-logstash/resources/config/pipeline.conf
kubernetes/cli/templates/deployment.yaml
kubernetes/cli/values.yaml
kubernetes/common/pgpool/Chart.yaml [moved from TOSCA/Helm/helmdelete.sh with 60% similarity]
kubernetes/common/pgpool/configs/pgpool.conf [new file with mode: 0644]
kubernetes/common/pgpool/configs/pool_hba.conf [new file with mode: 0644]
kubernetes/common/pgpool/configs/pool_passwd [new file with mode: 0644]
kubernetes/common/pgpool/requirements.yaml [moved from kubernetes/vid/templates/dbcmd-configmap.yaml with 57% similarity]
kubernetes/common/pgpool/templates/configmap.yaml [new file with mode: 0755]
kubernetes/common/pgpool/templates/deployment.yaml [new file with mode: 0644]
kubernetes/common/pgpool/templates/service.yaml [new file with mode: 0644]
kubernetes/common/pgpool/values.yaml [moved from TOSCA/Helm/helminstall.sh with 55% similarity]
kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml
kubernetes/contrib/charts/netbox/charts/netbox-nginx/templates/service.yaml
kubernetes/contrib/charts/netbox/charts/netbox-nginx/values.yaml
kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml
kubernetes/contrib/charts/netbox/values.yaml
kubernetes/nbi/templates/deployment.yaml
kubernetes/nbi/values.yaml
kubernetes/sdnc/charts/dmaap-listener/resources/config/aai.properties [new file with mode: 0644]
kubernetes/sdnc/charts/dmaap-listener/templates/configmap.yaml
kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml
kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml
kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml
kubernetes/sdnc/charts/ueb-listener/templates/configmap.yaml
kubernetes/sdnc/sdnc-prom/templates/configmap.yaml
kubernetes/sdnc/templates/configmap.yaml
kubernetes/vid/charts/vid-mariadb-galera/Chart.yaml [moved from kubernetes/vid/charts/vid-galera/Chart.yaml with 87% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/NOTES.txt [moved from kubernetes/vid/charts/vid-galera/templates/NOTES.txt with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/configmap.yaml [moved from kubernetes/vid/charts/vid-galera/templates/configmap.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/pv.yaml [moved from kubernetes/vid/charts/vid-galera/templates/pv.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/pvc.yaml [moved from kubernetes/vid/charts/vid-galera/templates/pvc.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/secrets.yaml [moved from kubernetes/vid/charts/vid-galera/templates/secrets.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/service.yaml [moved from kubernetes/vid/charts/vid-galera/templates/service.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/templates/statefulset.yaml [moved from kubernetes/vid/charts/vid-galera/templates/statefulset.yaml with 100% similarity]
kubernetes/vid/charts/vid-mariadb-galera/values.yaml [moved from kubernetes/vid/charts/vid-galera/values.yaml with 99% similarity]
kubernetes/vid/resources/config/db_cmd.sh [moved from TOSCA/Helm/k8s_delete_env.sh with 52% similarity]
kubernetes/vid/resources/config/vid-pre-init.sql [new file with mode: 0644]
kubernetes/vid/templates/check-job-completion-configmap.yaml [deleted file]
kubernetes/vid/templates/cluster-ready-configmap.yaml [deleted file]
kubernetes/vid/templates/configmap.yaml
kubernetes/vid/templates/deployment.yaml
kubernetes/vid/templates/galera-sql-configmap.yaml [deleted file]
kubernetes/vid/templates/vid-galera-config-job.yaml
kubernetes/vid/values.yaml

diff --git a/TOSCA/Helm/k8s_setup_env.sh b/TOSCA/Helm/k8s_setup_env.sh
deleted file mode 100644 (file)
index 1e226f2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START==========================================
-# ===================================================================
-# Copyright (c) 2017 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.
-#============LICENSE_END============================================
-
-printf "%s" "$*"
-printf `pwd`
-printf "%s" "---------------"
-
-kubectl create namespace $1
-kubectl create clusterrolebinding $1-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default
-kubectl --namespace $1 create secret docker-registry $1-docker-registry-key --docker-server=nexus3.onap.org:10001 --docker-username=docker --docker-password=docker --docker-email=@
\ No newline at end of file
diff --git a/TOSCA/Helm/onap-blueprint.yaml b/TOSCA/Helm/onap-blueprint.yaml
deleted file mode 100644 (file)
index c5b699b..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-# ============LICENSE_START==========================================
-# ===================================================================
-# Copyright (c) 2017 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.
-#============LICENSE_END============================================
-
-tosca_definitions_version: cloudify_dsl_1_3
-
-imports:
-  - http://www.getcloudify.org/spec/cloudify/3.4.2/types.yaml
-  - http://www.getcloudify.org/spec/fabric-plugin/1.5/plugin.yaml
-
-inputs:
-  # For agent, toggle to true.
-  install_method:
-    default: none # For fabric use false.
-  ip:
-  user:
-    default: centos
-  namespace:
-    default: onap
-
-node_types:
-  cloudify.nodes.Helm:
-    derived_from: cloudify.nodes.SoftwareComponent
-    properties:
-      cwd:
-        default: /home/centos/oom/kubernetes
-      args:
-        default:
-        - onap
-        - mso
-    interfaces:
-      cloudify.interfaces.lifecycle:
-        # This is for fabric: # Run Anywhere.
-        start:
-          implementation: fabric.fabric_plugin.tasks.run_script
-          inputs:
-            script_path:
-              default: helminstall.sh # Relative to the blueprint file.
-            process:
-              default: &process_vars
-                cwd: { get_property: [ SELF, cwd ] }
-                args: { get_property: [ SELF, args ] }
-            fabric_env:
-              default: &fabric_env
-                user: { get_property: [ k8s_master, agent_config, user ] }
-                host_string: { get_property: [ k8s_master, ip ] }
-                key: { get_property: [ k8s_master, agent_config, key ] }
-        stop:
-          implementation: fabric.fabric_plugin.tasks.run_script
-          inputs:
-            script_path:
-              default: helmdelete.sh
-            process:
-              default: *process_vars
-            fabric_env:
-              default: *fabric_env
-
-node_templates:
-
-  k8s_master:
-     type: cloudify.nodes.Compute
-     properties:
-       ip: { get_input: ip }
-       agent_config:
-         install_method: { get_input: install_method } # False for Fabric.
-         key: { get_secret: agent_key_private }
-         user: { get_input: user }
-
-  k8s_env:
-    type: cloudify.nodes.SoftwareComponent
-    properties:
-    interfaces:
-      cloudify.interfaces.lifecycle:
-         start:
-          implementation: fabric.fabric_plugin.tasks.run_script
-          inputs:
-            script_path: k8s_setup_env.sh
-            process:
-              args:  [{ get_input: namespace }]
-            fabric_env:
-              host_string: { get_input: ip }
-              user: { get_input: user }
-              key: { get_secret: agent_key_private }
-         stop:
-          implementation: fabric.fabric_plugin.tasks.run_script
-          inputs:
-            script_path: k8s_delete_env.sh
-            process:
-              args:  [{ get_input: namespace }]
-            fabric_env:
-              host_string: { get_input: ip }
-              user: { get_input: user }
-              key: { get_secret: agent_key_private }
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_master
-
-  consul:
-     type: cloudify.nodes.Helm
-     properties:
-       args:
-       - { get_input: namespace }
-       - consul
-     relationships:
-       - type: cloudify.relationships.connected_to
-         target: k8s_env
-
-  msb:
-     type: cloudify.nodes.Helm
-     properties:
-       args:
-       - { get_input: namespace }
-       - msb
-     relationships:
-       - type: cloudify.relationships.connected_to
-         target: k8s_env
-
-  so:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - so
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  appc:
-     type: cloudify.nodes.Helm
-     properties:
-       args:
-       - { get_input: namespace }
-       - appc
-     relationships:
-       - type: cloudify.relationships.connected_to
-         target: k8s_env
-
-  dmaap:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - dmaap
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  oof:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - oof
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  sdnc:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - sdnc
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  vid:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - vid
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  robot:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - robot
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  policy:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - policy
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  portal:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - portal
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  aai:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - aai
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  sdc:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - sdc
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  log:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - log
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  cli:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - cli
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  multicloud:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - multicloud
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  clamp:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - clamp
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  vnfsdk:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - vnfsdk
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  uui:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - uui
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  aaf:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - aaf
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  vfc:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - vfc
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  dcaegen2:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - dcaegen2
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  esr:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - esr
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  sniro-emulator:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - sniro-emulator
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
-
-  nbi:
-    type: cloudify.nodes.Helm
-    properties:
-      args:
-      - { get_input: namespace }
-      - nbi
-    relationships:
-      - type: cloudify.relationships.connected_to
-        target: k8s_env
\ No newline at end of file
diff --git a/TOSCA/ONAP_TOSCA/onap_tosca.yaml b/TOSCA/ONAP_TOSCA/onap_tosca.yaml
new file mode 100644 (file)
index 0000000..a48f4bc
--- /dev/null
@@ -0,0 +1,432 @@
+# ============LICENSE_START==========================================
+# ===================================================================
+# Copyright (c) 2018 AT&T
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# 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============================================
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+  - http://www.getcloudify.org/spec/cloudify/4.3.1/types.yaml
+  - plugin:helm?version=3.0.0
+
+inputs:
+  tiller-server-ip:
+    description: the IP address of Kubernetes master
+  tiller-server-port:
+    description: the nodeport of tiller server
+  namespace:
+    default: onap
+  chart-repo-url:
+    default: https://nexus.onap.org/content/sites/oom-helm-staging
+  chart-version :
+    default: 2.0.0
+  stable-repo-url:
+    description: URL for stable repository
+    type: string
+    default: 'https://kubernetes-charts.storage.googleapis.com'
+
+
+
+node_templates:
+
+  onap_env:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: onap
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+      config: '{ "aaf": {"enabled": false}, "aai": {"enabled": false}, "appc": {"enabled": false}, "clamp": {"enabled": false}, "cli": {"enabled": false}, "consul": {"enabled": false}, "dcaegen2": {"enabled": false}, "dmaap": {"enabled": false}, "esr": {"enabled": false}, "log": {"enabled": false}, "sniro-emulator": {"enabled": false}, "msb": {"enabled": false}, "multicloud": {"enabled": false}, "nbi": {"enabled": false}, "oof": {"enabled": false}, "policy": {"enabled": false}, "pomba": {"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} }'
+
+  aaf:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: aaf
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  aai:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: aai
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  appc:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: appc
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  clamp:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: clamp
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  cli:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: cli
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  consul:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: consul
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  contrib:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: contrib
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  dcaegen2:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: dcaegen2
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+
+  dmaap:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: dmaap
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  esr:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: esr
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  log:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: log
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  sniro-emulator:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: sniro-emulator
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  oof:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: oof
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  msb:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: msb
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  multicloud:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: multicloud
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  nbi:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: nbi
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  policy:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: policy
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  pomba:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: pomba
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  portal:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: portal
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  robot:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: robot
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  sdc:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: sdc
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  sdnc:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: sdnc
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  so:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: so
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  uui:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: uui
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  vfc:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: vfc
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  vid:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: vid
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
+
+  vnfsdk:
+    type: onap.nodes.component
+    properties:
+      tiller-server-ip: { get_input: tiller-server-ip }
+      tiller-server-port: { get_input: tiller-server-port }
+      component-name: vnfsdk
+      chart-repo-url: { get_input: chart-repo-url }
+      chart-version: { get_input: chart-version }
+      namespace: { get_input: namespace }
+      stable-repo-url: { get_input: stable-repo-url}
+    relationships:
+      - type: cloudify.relationships.connected_to
+        target: onap_env
\ No newline at end of file
index 9eec841..c4c7271 100644 (file)
Binary files a/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore and b/kubernetes/aai/charts/aai-champ/resources/config/appconfig/auth/tomcat_keystore differ
index 325982b..38fd64c 100644 (file)
@@ -24,11 +24,17 @@ xsi:schemaLocation="
        http://www.springframework.org/schema/util/spring-util.xsd
        ">
 
-    <!-- Event publisher to pass to the Champ library for logging raw graph
-         events (Kafka implementation). -->
-    <bean id="champEventPublisher" class="org.onap.aai.event.client.KafkaEventPublisher" >
-        <constructor-arg name="hosts" value="message-router-kafka.{{.Release.Namespace}}:9092" />
-        <constructor-arg name="topic" value="champRawEvents" />
+    <bean id="champEventPublisher" class="org.onap.aai.event.client.DMaaPEventPublisher" >
+        <constructor-arg name="host" value="message-router.{{.Release.Namespace}}:{{.Values.event.port.dmaap}}" />
+        <constructor-arg name="topic" value="{{.Values.event.publisher.topic}}" />
+        <constructor-arg name="username" value="" />
+        <constructor-arg name="password" value="" />
+        <constructor-arg name="maxBatchSize" value="100" />
+        <constructor-arg name="maxAgeMs" value="250" />
+        <constructor-arg name="delayBetweenBatchesMs" value="50" />
+        <constructor-arg name="transportType" value="HTTPAUTH" />
+        <constructor-arg name="protocol" value="{{.Values.event.protocol}}" />
+        <constructor-arg name="contentType" value="application/json" />
     </bean>
 
     <!-- Graph Implementation Configuration-->
index 0e2bb90..d2f7bca 100644 (file)
@@ -31,23 +31,6 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
     spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - aai-resources
-        - --container-name
-        - message-router-kafka
-        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 }}"
@@ -100,7 +83,7 @@ spec:
           - mountPath: /opt/app/champ-service/bundleconfig/etc/logback.xml
             name: {{ include "common.fullname" . }}-logback-config
             subPath: logback.xml
-          - mountPath: /logs
+          - mountPath: /var/log/onap
             name: {{ include "common.fullname" . }}-logs
           resources:
 {{ toYaml .Values.resources | indent 12 }}
@@ -113,6 +96,19 @@ spec:
 {{ 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
+            subPath: filebeat.yml
+            name: filebeat-conf
+          - mountPath: /var/log/onap
+            name: {{ include "common.fullname" . }}-logs
+          - mountPath: /usr/share/filebeat/data
+            name: aai-filebeat
+
       volumes:
         - name: localtime
           hostPath:
@@ -140,5 +136,10 @@ spec:
             items:
             - key: logback.xml
               path: logback.xml
+        - name: filebeat-conf
+          configMap:
+            name: aai-filebeat
+        - name: aai-filebeat
+          emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index c59a9b3..a6435dd 100644 (file)
@@ -61,3 +61,11 @@ ingress:
   enabled: false
 
 resources: {}
+
+# XML beans configuration
+event:
+  port:
+    dmaap: 3905
+  protocol: https
+  publisher:
+    topic: champRawEvents
index bfa35c2..acfe0a5 100644 (file)
     <property name="searchEndpointDocuments" value = "documents" />
     <property name="searchEntitySearchIndex" value="entity-search-index" />
     <property name="searchTopographySearchIndex" value="topography-search-index" />
-    <property name="searchEntityAutoSuggestIndex" value="entity-autosuggest-index" />
-    <property name="searchAggregationVnfIndex" value="aggregate-vnf-index" />
+    <property name="searchEntityAutoSuggestIndex" value="entityautosuggestindex" />
+    <property name="searchAggregationVnfIndex" value="aggregate_generic-vnf_index" />
     <property name="searchCertName" value="client-cert-onap.p12" />
     <property name="searchKeystorePwd" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10" />
     <property name="searchKeystore" value="tomcat_keystore" />
   </bean>
+  
+  <bean id="consumerBeanEntityEvent" class="org.onap.aai.event.client.DMaaPEventConsumer " >
+    <constructor-arg name="host" value="message-router.{{.Release.Namespace}}:3904" />
+    <constructor-arg name="topic" value="AAI-EVENT" />
+    <constructor-arg name="username" value="" />
+    <constructor-arg name="password" value="" />
+    <constructor-arg name="consumerGroup" value="datarouter" />
+    <constructor-arg name="consumerId" value="datarouter" />
+    <constructor-arg name="timeoutMs" value="1000" />
+    <constructor-arg name="messageLimit" value="100" />
+    <constructor-arg name="transportType" value="HTTPAUTH" />
+  </bean>
 
   <bean id="entityEventPolicy" class="org.onap.aai.datarouter.policy.EntityEventPolicy" init-method="startup" >
     <constructor-arg ref="eepConfig"/>
index d349ee9..14db6d6 100644 (file)
@@ -1,4 +1,4 @@
 <route xmlns="http://camel.apache.org/schema/spring" trace="true">\r
-  <from uri="event-bus:mybus/?eventTopic=AAI-EVENT&amp;groupName=datarouter&amp;groupId=datarouter&amp;url=http://message-router.{{.Release.Namespace}}:3904"/>\r
+  <from uri="event-bus:mybus/?eventTopic=AAI-EVENT&amp;consumer=#consumerBeanEntityEvent" />\r
   <to uri="bean:entityEventPolicy?method=process"/>\r
-</route>\r
+</route>
\ No newline at end of file
index 104cf76..7557247 100644 (file)
@@ -54,7 +54,7 @@ server.ssl.key-store-type=JKS
 
 # JMS bind address host port
 jms.bind.address=tcp://localhost:61649
-dmaap.ribbon.listOfServers=message-router.{{.Release.Namespace}}:3904
+dmaap.ribbon.listOfServers=message-router.{{.Release.Namespace}}:3905
 
 # Schema related attributes for the oxm and edges
 # Any additional schema related attributes should start with prefix schema
diff --git a/kubernetes/aai/charts/aai-modelloader/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/aai-modelloader/resources/config/auth/tomcat_keystore
new file mode 100644 (file)
index 0000000..9eec841
Binary files /dev/null and b/kubernetes/aai/charts/aai-modelloader/resources/config/auth/tomcat_keystore differ
index 746bdb4..246e528 100644 (file)
@@ -42,3 +42,5 @@ ml.babel.BASE_URL=https://aai-babel.{{.Release.Namespace}}:9516
 ml.babel.GENERATE_ARTIFACTS_URL=/services/babel-service/v1/app/generateArtifacts
 ml.babel.KEYSTORE_FILE=babel-client-cert.p12
 ml.babel.KEYSTORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+ml.babel.TRUSTSTORE_FILE=tomcat_keystore
+ml.babel.TRUSTSTORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
index 9c13d48..29a6d23 100644 (file)
@@ -49,7 +49,7 @@ server.ssl.key-store-type=JKS
 
 # JMS bind address host port
 jms.bind.address=tcp://localhost:61647
-dmaap.ribbon.listOfServers=message-router.{{.Release.Namespace}}:3904
+dmaap.ribbon.listOfServers=message-router.{{.Release.Namespace}}:3905
 
 # Schema related attributes for the oxm and edges
 # Any additional schema related attributes should start with prefix schema
diff --git a/kubernetes/aai/charts/aai-sparky-be/resources/config/application-sync.properties b/kubernetes/aai/charts/aai-sparky-be/resources/config/application-sync.properties
new file mode 100644 (file)
index 0000000..4fb10a2
--- /dev/null
@@ -0,0 +1,6 @@
+aggregationSyncEnabled=true
+historicalEntitySyncEnabled=true
+autoSuggestSyncEnabled=true
+vnfAliasSyncEnabled=true
+geoSyncEnabled=true
+viewInspectSyncEnabled=true
\ No newline at end of file
index 6aa64ff..aa93c06 100644 (file)
@@ -22,7 +22,7 @@ spring.mvc.favicon.enabled=false
 # and in the values.yaml change the internalPort to 9517
 #
 
-spring.profiles.active=camel,http,fe-prod,oxm-schema-prod,oxm-default,resources,sync
+spring.profiles.active=camel,http,fe-prod,oxm-schema-prod,oxm-default,resources,sync,portal
 
 searchservice.hostname={{.Values.global.searchData.serviceName}}
 searchservice.port=9509
index 9eec841..025f3c4 100644 (file)
Binary files a/kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore and b/kubernetes/aai/charts/aai-spike/resources/config/auth/tomcat_keystore differ
index 20dfbc5..50be8cb 100644 (file)
@@ -37,6 +37,8 @@
       <constructor-arg name="timeoutMs" value="1000" />
       <constructor-arg name="messageLimit" value="100" />
       <constructor-arg name="transportType" value="HTTPAUTH" />
+      <constructor-arg name="protocol" value="{{.Values.event.protocol}}" />
+      <constructor-arg name="filter"><null /></constructor-arg>
    </bean>
 
     <bean id="eventPublisher" class="org.onap.aai.event.client.DMaaPEventPublisher" >
@@ -48,6 +50,8 @@
         <constructor-arg name="maxAgeMs" value="250" />
         <constructor-arg name="delayBetweenBatchesMs" value="50" />
         <constructor-arg name="transportType" value="HTTPAUTH" />
+        <constructor-arg name="protocol" value="{{.Values.event.protocol}}" />
+        <constructor-arg name="contentType" value="application/json" />
     </bean>
 
    <bean id="spikeService" class="org.onap.aai.spike.service.SpikeService" init-method="startup">
index c8d2043..6429d3f 100644 (file)
@@ -65,7 +65,8 @@ resources: {}
 # XML bean configuration
 event:
   port:
-    dmaap: 3904
+    dmaap: 3905
+  protocol: https
   consumer:
     topic: champRawEvents
   publisher:
index 2ff95aa..1ad208f 100644 (file)
@@ -49,7 +49,7 @@ server.ssl.key-store-type=JKS
 
 # JMS bind address host port
 jms.bind.address=tcp://localhost:61647
-dmaap.ribbon.listOfServers=message-router.{{ include "common.namespace" . }}:3904
+dmaap.ribbon.listOfServers=message-router.{{ include "common.namespace" . }}:3905
 
 # Schema related attributes for the oxm and edges
 # Any additional schema related attributes should start with prefix schema
index 5d92de6..f88e40d 100644 (file)
@@ -21,6 +21,7 @@ input {
                     Accept => "application/json"
                 }
                 add_field => { "topic" => "${event_topic}" }
+                type => "dmaap_event"
             }
             notification_queue => {
                 method => get
@@ -29,6 +30,7 @@ input {
                     Accept => "application/json"
                 }
                 add_field => { "topic" => "${notification_topic}" }
+                type => "dmaap_notification"
             }
             request_queue => {
                 method => get
@@ -37,6 +39,7 @@ input {
                     Accept => "application/json"
                 }
                 add_field => { "topic" => "${request_topic}" }
+                type => "dmaap_request"
             }
         }
         socket_timeout => 30
@@ -47,26 +50,39 @@ input {
 }
 
 filter {
-    # avoid noise if no entry in the list
-    if [message] == "[]" {
-       drop { }
-    }
+       if [type] != "dmaap_log" {
+        # avoid noise if no entry in the list
+        if [message] == "[]" {
+           drop { }
+        }
 
-    # parse json, split  the list into multiple events, and parse each event
-    json {
-         source => "[message]"
-         target => "message"
-    }
-    split {
-          field => "message"
-    }
-    json {
-         source => "message"
+        # parse json, split  the list into multiple events, and parse each event
+        json {
+             source => "[message]"
+             target => "message"
+        }
+        split {
+              field => "message"
+                 add_field => {
+                       "type" => "%{type}"
+                       "topic" => "%{topic}"
+                 }
+        }
+        json {
+             source => "message"
+        }
+        mutate { remove_field => [ "message" ] }
     }
-    mutate { remove_field => [ "message" ] }
+    
     # express timestamps in milliseconds instead of microseconds
     ruby {
-        code => "event.set('closedLoopAlarmStart', Integer(event.get('closedLoopAlarmStart')))"
+            code => "
+                     if event.get('closedLoopAlarmStart').to_s.to_i(10) > 9999999999999
+                       event.set('closedLoopAlarmStart', event.get('closedLoopAlarmStart').to_s.to_i(10) / 1000)
+                     else
+                       event.set('closedLoopAlarmStart', event.get('closedLoopAlarmStart').to_s.to_i(10))
+                     end
+                    "
     }
     date {
         match => [ "closedLoopAlarmStart", UNIX_MS ]
@@ -75,7 +91,13 @@ filter {
 
     if [closedLoopAlarmEnd] {
         ruby {
-            code => "event.set('closedLoopAlarmEnd', Integer(event.get('closedLoopAlarmEnd')))"
+            code => "
+                    if event.get('closedLoopAlarmEnd').to_s.to_i(10) > 9999999999999  
+                      event.set('closedLoopAlarmEnd', event.get('closedLoopAlarmEnd').to_s.to_i(10) / 1000)
+                    else
+                      event.set('closedLoopAlarmEnd', event.get('closedLoopAlarmEnd').to_s.to_i(10))
+                    end
+                    "
         }
         date {
             match => [ "closedLoopAlarmEnd", UNIX_MS ]
index 09e0e7f..94d475b 100644 (file)
@@ -55,7 +55,7 @@ spec:
             - name: OPEN_CLI_MODE
               value: "{{ .Values.config.climode }}"
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
index 6bfd793..5766c81 100644 (file)
@@ -19,7 +19,6 @@ global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
   readinessImage: readiness-check:2.0.0
-
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -27,6 +26,7 @@ global:
 repository: nexus3.onap.org:10001
 image: onap/cli:2.0.2
 pullPolicy: Always
+flavor: small
 
 # application configuration
 config:
similarity index 60%
rename from TOSCA/Helm/helmdelete.sh
rename to kubernetes/common/pgpool/Chart.yaml
index 201471b..d4f7c50 100644 (file)
@@ -1,21 +1,18 @@
-#!/bin/bash
-# ============LICENSE_START==========================================
-# ===================================================================
-# Copyright (c) 2017 AT&T
+# 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
+#       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============================================
-
-helm delete $2 --purge
-
 
+apiVersion: v1
+description: ONAP Postgres Server
+name: pgpool
+version: 2.0.0
diff --git a/kubernetes/common/pgpool/configs/pgpool.conf b/kubernetes/common/pgpool/configs/pgpool.conf
new file mode 100644 (file)
index 0000000..9dd979a
--- /dev/null
@@ -0,0 +1,677 @@
+# ----------------------------
+# pgPool-II configuration file a custom version
+# ----------------------------
+#
+# This file consists of lines of the form:
+#
+#   name = value
+#
+# Whitespace may be used.  Comments are introduced with "#" anywhere on a line.
+# The complete list of parameter names and allowed values can be found in the
+# pgPool-II documentation.
+#
+# This file is read on server startup and when the server receives a SIGHUP
+# signal.  If you edit the file on a running system, you have to SIGHUP the
+# server for the changes to take effect, or use "pgpool reload".  Some
+# parameters, which are marked below, require a server shutdown and restart to
+# take effect.
+#
+
+
+#------------------------------------------------------------------------------
+# CONNECTIONS
+#------------------------------------------------------------------------------
+
+# - pgpool Connection Settings -
+
+listen_addresses = '*'
+                                   # Host name or IP address to listen on:
+                                   # '*' for all, '' for no TCP/IP connections
+                                   # (change requires restart)
+#port = 9999
+port = 5432
+                                   # Port number
+                                   # (change requires restart)
+socket_dir = '/tmp'
+                                   # Unix domain socket path
+                                   # The Debian package defaults to
+                                   # /var/run/postgresql
+                                   # (change requires restart)
+
+
+# - pgpool Communication Manager Connection Settings -
+
+pcp_port = 9898
+                                   # Port number for pcp
+                                   # (change requires restart)
+pcp_socket_dir = '/tmp'
+                                   # Unix domain socket path for pcp
+                                   # The Debian package defaults to
+                                   # /var/run/postgresql
+                                   # (change requires restart)
+
+# - Backend Connection Settings -
+
+backend_hostname0 = '{{.Values.container.primary}}'
+backend_port0 = 5432
+backend_weight0= 1
+backend_flag0= 'DISALLOW_TO_FAILOVER'
+
+backend_hostname1 = '{{.Values.container.replica}}'
+backend_port1 = 5432
+backend_weight1= 1
+backend_flag1= 'DISALLOW_TO_FAILOVER'
+
+#backend_hostname0 = 'master'
+                                   # Host name or IP address to connect to for backend 0
+#backend_port0 = 5432
+                                   # Port number for backend 0
+#backend_weight0 = 1
+                                   # Weight for backend 0 (only in load balancing mode)
+#backend_data_directory0 = '/data'
+                                   # Data directory for backend 0
+#backend_flag0 = 'ALLOW_TO_FAILOVER'
+                                   # Controls various backend behavior
+                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
+#backend_hostname1 = 'standby'
+#backend_port1 = 5432
+#backend_weight1 = 1
+#backend_data_directory1 = '/data1'
+#backend_flag1 = 'ALLOW_TO_FAILOVER'
+
+# - Authentication -
+
+enable_pool_hba = on
+                                   # Use pool_hba.conf for client authentication
+pool_passwd = 'pool_passwd'
+                                   # File name of pool_passwd for md5 authentication.
+                                   # "" disables pool_passwd.
+                                   # (change requires restart)
+authentication_timeout = 60
+                                   # Delay in seconds to complete client authentication
+                                   # 0 means no timeout.
+
+# - SSL Connections -
+
+ssl = off
+                                   # Enable SSL support
+                                   # (change requires restart)
+#ssl_key = './server.key'
+                                   # Path to the SSL private key file
+                                   # (change requires restart)
+#ssl_cert = './server.cert'
+                                   # Path to the SSL public certificate file
+                                   # (change requires restart)
+#ssl_ca_cert = ''
+                                   # Path to a single PEM format file
+                                   # containing CA root certificate(s)
+                                   # (change requires restart)
+#ssl_ca_cert_dir = ''
+                                   # Directory containing CA root certificate(s)
+                                   # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# POOLS
+#------------------------------------------------------------------------------
+
+# - Pool size -
+
+num_init_children = 5
+                                   # Number of pools
+                                   # (change requires restart)
+max_pool = 1
+                                   # Number of connections per pool
+                                   # (change requires restart)
+
+# - Life time -
+
+child_life_time = 300
+                                   # Pool exits after being idle for this many seconds
+child_max_connections = 0
+                                   # Pool exits after receiving that many connections
+                                   # 0 means no exit
+connection_life_time = 0
+                                   # Connection to backend closes after being idle for this many seconds
+                                   # 0 means no close
+client_idle_limit = 0
+                                   # Client is disconnected after being idle for that many seconds
+                                   # (even inside an explicit transactions!)
+                                   # 0 means no disconnection
+
+
+#------------------------------------------------------------------------------
+# LOGS
+#------------------------------------------------------------------------------
+
+# - Where to log -
+
+log_destination = 'stderr'
+                                   # Where to log
+                                   # Valid values are combinations of stderr,
+                                   # and syslog. Default to stderr.
+
+# - What to log -
+
+print_timestamp = on
+                                   # Print timestamp on each line
+                                   # (change requires restart)
+
+log_connections = on
+                                   # Log connections
+log_hostname = on
+                                   # Hostname will be shown in ps status
+                                   # and in logs if connections are logged
+log_statement = on
+                                   # Log all statements
+log_per_node_statement = off
+                                   # Log all statements
+                                   # with node and backend informations
+log_standby_delay = 'if_over_threshold'
+                                   # Log standby delay
+                                   # Valid values are combinations of always,
+                                   # if_over_threshold, none
+
+# - Syslog specific -
+
+syslog_facility = 'LOCAL0'
+                                   # Syslog local facility. Default to LOCAL0
+syslog_ident = 'pgpool'
+                                   # Syslog program identification string
+                                   # Default to 'pgpool'
+
+# - Debug -
+
+debug_level = 1
+                                   # Debug message verbosity level
+                                   # 0 means no message, 1 or more mean verbose
+
+
+#------------------------------------------------------------------------------
+# FILE LOCATIONS
+#------------------------------------------------------------------------------
+
+pid_file_name = '/tmp/pgpool.pid'
+                                   # PID file name
+                                   # (change requires restart)
+logdir = '/tmp'
+                                   # Directory of pgPool status file
+                                   # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# CONNECTION POOLING
+#------------------------------------------------------------------------------
+
+connection_cache = off
+                                   # Activate connection pools
+                                   # (change requires restart)
+
+                                   # Semicolon separated list of queries
+                                   # to be issued at the end of a session
+                                   # The default is for 8.3 and later
+reset_query_list = 'ABORT; DISCARD ALL'
+                                   # The following one is for 8.2 and before
+#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
+
+
+#------------------------------------------------------------------------------
+# REPLICATION MODE
+#------------------------------------------------------------------------------
+
+replication_mode = off
+                                   # Activate replication mode
+                                   # (change requires restart)
+replicate_select = off
+                                   # Replicate SELECT statements
+                                   # when in replication or parallel mode
+                                   # replicate_select is higher priority than
+                                   # load_balance_mode.
+
+insert_lock = off
+                                   # Automatically locks a dummy row or a table
+                                   # with INSERT statements to keep SERIAL data
+                                   # consistency
+                                   # Without SERIAL, no lock will be issued
+lobj_lock_table = ''
+                                   # When rewriting lo_creat command in
+                                   # replication mode, specify table name to
+                                   # lock
+
+# - Degenerate handling -
+
+replication_stop_on_mismatch = off
+                                   # On disagreement with the packet kind
+                                   # sent from backend, degenerate the node
+                                   # which is most likely "minority"
+                                   # If off, just force to exit this session
+
+failover_if_affected_tuples_mismatch = off
+                                   # On disagreement with the number of affected
+                                   # tuples in UPDATE/DELETE queries, then
+                                   # degenerate the node which is most likely
+                                   # "minority".
+                                   # If off, just abort the transaction to
+                                   # keep the consistency
+
+
+#------------------------------------------------------------------------------
+# LOAD BALANCING MODE
+#------------------------------------------------------------------------------
+
+load_balance_mode = off
+                                   # Activate load balancing mode
+                                   # (change requires restart)
+ignore_leading_white_space = on
+                                   # Ignore leading white spaces of each query
+white_function_list = ''
+                                   # Comma separated list of function names
+                                   # that don't write to database
+                                   # Regexp are accepted
+black_function_list = 'currval,lastval,nextval,setval'
+                                   # Comma separated list of function names
+                                   # that write to database
+                                   # Regexp are accepted
+
+
+#------------------------------------------------------------------------------
+# MASTER/SLAVE MODE
+#------------------------------------------------------------------------------
+
+master_slave_mode = on
+                                   # Activate master/slave mode
+                                   # (change requires restart)
+master_slave_sub_mode = 'stream'
+                                   # Master/slave sub mode
+                                   # Valid values are combinations slony or
+                                   # stream. Default is slony.
+                                   # (change requires restart)
+
+# - Streaming -
+
+sr_check_period = 10
+                                   # Streaming replication check period
+                                   # Disabled (0) by default
+sr_check_user = '{{.Values.credentials.pgusername}}'
+                                   # Streaming replication check user
+                                   # This is neccessary even if you disable streaming
+                                   # replication delay check by sr_check_period = 0
+sr_check_password = '{{.Values.credentials.pgpassword}}'
+                                   # Password for streaming replication check user
+delay_threshold = 10000000
+                                   # Threshold before not dispatching query to standby node
+                                   # Unit is in bytes
+                                   # Disabled (0) by default
+
+# - Special commands -
+
+follow_master_command = ''
+                                   # Executes this command after master failover
+                                   # Special values:
+                                   #   %d = node id
+                                   #   %h = host name
+                                   #   %p = port number
+                                   #   %D = database cluster path
+                                   #   %m = new master node id
+                                   #   %H = hostname of the new master node
+                                   #   %M = old master node id
+                                   #   %P = old primary node id
+                                                                  #   %r = new master port number
+                                                                  #   %R = new master database cluster path
+                                   #   %% = '%' character
+
+
+#------------------------------------------------------------------------------
+# PARALLEL MODE
+#------------------------------------------------------------------------------
+
+parallel_mode = off
+                                   # Activates parallel query mode
+                                   # (change requires restart)
+pgpool2_hostname = ''
+                                   # Set pgpool2 hostname
+                                   # (change requires restart)
+
+# - System DB info -
+
+#system_db_hostname  = 'localhost'
+                                   # (change requires restart)
+#system_db_port = 5432
+                                   # (change requires restart)
+#system_db_dbname = 'pgpool'
+                                   # (change requires restart)
+#system_db_schema = 'pgpool_catalog'
+                                   # (change requires restart)
+#system_db_user = 'pgpool'
+                                   # (change requires restart)
+#system_db_password = ''
+                                   # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# HEALTH CHECK
+#------------------------------------------------------------------------------
+
+health_check_period = 20
+                                   # Health check period
+                                   # Disabled (0) by default
+health_check_timeout = 10
+                                   # Health check timeout
+                                   # 0 means no timeout
+health_check_user = '{{.Values.credentials.pguser}}'
+                                   # Health check user
+health_check_password = '{{.Values.credentials.pgpassword}}'
+                                   # Password for health check user
+health_check_max_retries = 3
+connect_timeout = 10000                # Timeout value in milliseconds before giving up to connect to backend.
+
+                                   # Maximum number of times to retry a failed health check before giving up.
+health_check_retry_delay = 1
+                                   # Amount of time to wait (in seconds) between retries.
+
+
+#------------------------------------------------------------------------------
+# FAILOVER AND FAILBACK
+#------------------------------------------------------------------------------
+
+failover_command = ''
+                                   # Executes this command at failover
+                                   # Special values:
+                                   #   %d = node id
+                                   #   %h = host name
+                                   #   %p = port number
+                                   #   %D = database cluster path
+                                   #   %m = new master node id
+                                   #   %H = hostname of the new master node
+                                   #   %M = old master node id
+                                   #   %P = old primary node id
+                                                                  #   %r = new master port number
+                                                                  #   %R = new master database cluster path
+                                   #   %% = '%' character
+failback_command = ''
+                                   # Executes this command at failback.
+                                   # Special values:
+                                   #   %d = node id
+                                   #   %h = host name
+                                   #   %p = port number
+                                   #   %D = database cluster path
+                                   #   %m = new master node id
+                                   #   %H = hostname of the new master node
+                                   #   %M = old master node id
+                                   #   %P = old primary node id
+                                                                  #   %r = new master port number
+                                                                  #   %R = new master database cluster path
+                                   #   %% = '%' character
+
+fail_over_on_backend_error = off
+                                   # Initiates failover when reading/writing to the
+                                   # backend communication socket fails
+                                   # If set to off, pgpool will report an
+                                   # error and disconnect the session.
+
+search_primary_node_timeout = 10
+                                   # Timeout in seconds to search for the
+                                   # primary node when a failover occurs.
+                                   # 0 means no timeout, keep searching
+                                   # for a primary node forever.
+
+#------------------------------------------------------------------------------
+# ONLINE RECOVERY
+#------------------------------------------------------------------------------
+
+recovery_user = '{{.Values.credentials.pguser}}'
+                                   # Online recovery user
+recovery_password = '{{.Values.credentials.pgpassword}}'
+                                   # Online recovery password
+recovery_1st_stage_command = ''
+                                   # Executes a command in first stage
+recovery_2nd_stage_command = ''
+                                   # Executes a command in second stage
+recovery_timeout = 90
+                                   # Timeout in seconds to wait for the
+                                   # recovering node's postmaster to start up
+                                   # 0 means no wait
+client_idle_limit_in_recovery = 0
+                                   # Client is disconnected after being idle
+                                   # for that many seconds in the second stage
+                                   # of online recovery
+                                   # 0 means no disconnection
+                                   # -1 means immediate disconnection
+
+
+#------------------------------------------------------------------------------
+# WATCHDOG
+#------------------------------------------------------------------------------
+
+# - Enabling -
+
+use_watchdog = off
+                                    # Activates watchdog
+                                    # (change requires restart)
+
+# -Connection to up stream servers -
+
+trusted_servers = ''
+                                    # trusted server list which are used
+                                    # to confirm network connection
+                                    # (hostA,hostB,hostC,...)
+                                    # (change requires restart)
+ping_path = '/bin'
+                                    # ping command path
+                                    # (change requires restart)
+
+# - Watchdog communication Settings -
+
+wd_hostname = ''
+                                    # Host name or IP address of this watchdog
+                                    # (change requires restart)
+wd_port = 9000
+                                    # port number for watchdog service
+                                    # (change requires restart)
+wd_authkey = ''
+                                    # Authentication key for watchdog communication
+                                    # (change requires restart)
+
+# - Virtual IP control Setting -
+
+delegate_IP = ''
+                                    # delegate IP address
+                                    # If this is empty, virtual IP never bring up. 
+                                    # (change requires restart)
+ifconfig_path = '/sbin'
+                                    # ifconfig command path
+                                    # (change requires restart)
+if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'
+                                    # startup delegate IP command
+                                    # (change requires restart)
+if_down_cmd = 'ifconfig eth0:0 down'
+                                    # shutdown delegate IP command
+                                    # (change requires restart)
+
+arping_path = '/usr/sbin'           # arping command path
+                                    # (change requires restart)
+
+arping_cmd = 'arping -U $_IP_$ -w 1'
+                                    # arping command
+                                    # (change requires restart)
+
+# - Behaivor on escalation Setting -
+
+clear_memqcache_on_escalation = on
+                                    # Clear all the query cache on shared memory
+                                    # when standby pgpool escalate to active pgpool
+                                    # (= virtual IP holder).
+                                    # This should be off if client connects to pgpool
+                                    # not using virtual IP.
+                                    # (change requires restart)
+wd_escalation_command = ''
+                                    # Executes this command at escalation on new active pgpool.
+                                    # (change requires restart)
+
+# - Lifecheck Setting - 
+
+# -- common --
+
+wd_lifecheck_method = 'heartbeat'
+                                    # Method of watchdog lifecheck ('heartbeat' or 'query')
+                                    # (change requires restart)
+wd_interval = 10
+                                    # lifecheck interval (sec) > 0
+                                    # (change requires restart)
+
+# -- heartbeat mode --
+
+wd_heartbeat_port = 9694
+                                    # Port number for receiving heartbeat signal
+                                    # (change requires restart)
+wd_heartbeat_keepalive = 2
+                                    # Interval time of sending heartbeat signal (sec)
+                                    # (change requires restart)
+wd_heartbeat_deadtime = 30
+                                    # Deadtime interval for heartbeat signal (sec)
+                                    # (change requires restart)
+heartbeat_destination0 = 'host0_ip1'
+                                    # Host name or IP address of destination 0
+                                    # for sending heartbeat signal.
+                                    # (change requires restart)
+heartbeat_destination_port0 = 9694 
+                                    # Port number of destination 0 for sending
+                                    # heartbeat signal. Usually this is the
+                                    # same as wd_heartbeat_port.
+                                    # (change requires restart)
+heartbeat_device0 = ''
+                                    # Name of NIC device (such like 'eth0')
+                                    # used for sending/receiving heartbeat
+                                    # signal to/from destination 0.
+                                    # This works only when this is not empty
+                                    # and pgpool has root privilege.
+                                    # (change requires restart)
+
+#heartbeat_destination1 = 'host0_ip2'
+#heartbeat_destination_port1 = 9694
+#heartbeat_device1 = ''
+
+# -- query mode --
+
+wd_life_point = 3
+                                    # lifecheck retry times
+                                    # (change requires restart)
+wd_lifecheck_query = 'SELECT 1'
+                                    # lifecheck query to pgpool from watchdog
+                                    # (change requires restart)
+wd_lifecheck_dbname = 'template1'
+                                    # Database name connected for lifecheck
+                                    # (change requires restart)
+wd_lifecheck_user = 'nobody'
+                                    # watchdog user monitoring pgpools in lifecheck
+                                    # (change requires restart)
+wd_lifecheck_password = ''
+                                    # Password for watchdog user in lifecheck
+                                    # (change requires restart)
+
+# - Other pgpool Connection Settings -
+
+#other_pgpool_hostname0 = 'host0'
+                                    # Host name or IP address to connect to for other pgpool 0
+                                    # (change requires restart)
+#other_pgpool_port0 = 5432
+                                    # Port number for othet pgpool 0
+                                    # (change requires restart)
+#other_wd_port0 = 9000
+                                    # Port number for othet watchdog 0
+                                    # (change requires restart)
+#other_pgpool_hostname1 = 'host1'
+#other_pgpool_port1 = 5432
+#other_wd_port1 = 9000
+
+
+#------------------------------------------------------------------------------
+# OTHERS
+#------------------------------------------------------------------------------
+relcache_expire = 0
+                                   # Life time of relation cache in seconds.
+                                   # 0 means no cache expiration(the default).
+                                   # The relation cache is used for cache the
+                                   # query result against PostgreSQL system
+                                   # catalog to obtain various information
+                                   # including table structures or if it's a
+                                   # temporary table or not. The cache is
+                                   # maintained in a pgpool child local memory
+                                   # and being kept as long as it survives.
+                                   # If someone modify the table by using
+                                   # ALTER TABLE or some such, the relcache is
+                                   # not consistent anymore.
+                                   # For this purpose, cache_expiration
+                                   # controls the life time of the cache.
+relcache_size = 256
+                                   # Number of relation cache
+                                   # entry. If you see frequently:
+                                                                  # "pool_search_relcache: cache replacement happend"
+                                                                  # in the pgpool log, you might want to increate this number.
+
+check_temp_table = on
+                                   # If on, enable temporary table check in SELECT statements.
+                                   # This initiates queries against system catalog of primary/master
+                                                                  # thus increases load of master.
+                                                                  # If you are absolutely sure that your system never uses temporary tables
+                                                                  # and you want to save access to primary/master, you could turn this off.
+                                                                  # Default is on.
+
+
+#------------------------------------------------------------------------------
+# ON MEMORY QUERY MEMORY CACHE
+#------------------------------------------------------------------------------
+memory_cache_enabled = off
+                                                                  # If on, use the memory cache functionality, off by default
+memqcache_method = 'shmem'
+                                                                  # Cache storage method. either 'shmem'(shared memory) or
+                                                                  # 'memcached'. 'shmem' by default
+                                   # (change requires restart)
+memqcache_memcached_host = 'localhost'
+                                                                  # Memcached host name or IP address. Mandatory if
+                                                                  # memqcache_method = 'memcached'.
+                                                                  # Defaults to localhost.
+                                   # (change requires restart)
+memqcache_memcached_port = 11211
+                                                                  # Memcached port number. Mondatory if memqcache_method = 'memcached'.
+                                                                  # Defaults to 11211.
+                                   # (change requires restart)
+memqcache_total_size = 67108864
+                                                                  # Total memory size in bytes for storing memory cache.
+                                                                  # Mandatory if memqcache_method = 'shmem'.
+                                                                  # Defaults to 64MB.
+                                   # (change requires restart)
+memqcache_max_num_cache = 1000000
+                                                                  # Total number of cache entries. Mandatory
+                                                                  # if memqcache_method = 'shmem'.
+                                                                  # Each cache entry consumes 48 bytes on shared memory.
+                                                                  # Defaults to 1,000,000(45.8MB).
+                                   # (change requires restart)
+memqcache_expire = 0
+                                                                  # Memory cache entry life time specified in seconds.
+                                                                  # 0 means infinite life time. 0 by default.
+                                   # (change requires restart)
+memqcache_auto_cache_invalidation = on
+                                                                  # If on, invalidation of query cache is triggered by corresponding
+                                                                  # DDL/DML/DCL(and memqcache_expire).  If off, it is only triggered
+                                                                  # by memqcache_expire.  on by default.
+                                   # (change requires restart)
+memqcache_maxcache = 409600
+                                                                  # Maximum SELECT result size in bytes.
+                                                                  # Must be smaller than memqcache_cache_block_size. Defaults to 400KB.
+                                   # (change requires restart)
+memqcache_cache_block_size = 1048576
+                                                                  # Cache block size in bytes. Mandatory if memqcache_method = 'shmem'.
+                                                                  # Defaults to 1MB.
+                                   # (change requires restart)
+memqcache_oiddir = '/var/log/pgpool/oiddir'
+                                                                  # Temporary work directory to record table oids
+                                   # (change requires restart)
+white_memqcache_table_list = ''
+                                   # Comma separated list of table names to memcache
+                                   # that don't write to database
+                                   # Regexp are accepted
+black_memqcache_table_list = ''
+                                   # Comma separated list of table names not to memcache
+                                   # that don't write to database
+                                   # Regexp are accepted
diff --git a/kubernetes/common/pgpool/configs/pool_hba.conf b/kubernetes/common/pgpool/configs/pool_hba.conf
new file mode 100644 (file)
index 0000000..d891840
--- /dev/null
@@ -0,0 +1,67 @@
+# pgpool Client Authentication Configuration File a custom version
+# ===============================================
+#
+# The format rule in this file follows the rules in the PostgreSQL
+# Administrator's Guide. Refer to chapter "Client Authentication" for a
+# complete description.  A short synopsis follows.
+#
+# This file controls: which hosts are allowed to connect, how clients
+# are authenticated, which user names they can use, which databases they
+# can access.  Records take one of these forms:
+#
+# local      DATABASE  USER  METHOD  [OPTION]
+# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
+#
+# (The uppercase items must be replaced by actual values.)
+#
+# The first field is the connection type: "local" is a Unix-domain
+# socket, "host" is either a plain or SSL-encrypted TCP/IP socket.
+#
+# DATABASE can be "all", "sameuser", a database name, or a comma-separated
+# list thereof. Note that "samegroup" like in PostgreSQL's pg_hba.conf
+# file is not supported, since pgpool does not know which group a user
+# belongs to. Also note that the database specified here may not exist in
+# the backend PostgreSQL. pgpool will authenticate based on the database's
+# name, not based on whether it exists or not.
+#
+# USER can be "all", a user name, or a comma-separated list thereof.  In
+# both the DATABASE and USER fields you can also write a file name prefixed
+# with "@" to include names from a separate file. Note that a group name
+# prefixed with "+" like in PostgreSQL's pg_hba.conf file is not supported
+# because of the same reason as "samegroup" token. Also note that a user
+# name specified here may not exist in the backend PostgreSQL. pgpool will
+# authenticate based on the user's name, not based on whether he/she exists.
+#
+# CIDR-ADDRESS specifies the set of hosts the record matches.
+# It is made up of an IP address and a CIDR mask that is an integer
+# (between 0 and 32 (IPv4) that specifies the number of significant bits in
+# the mask.  Alternatively, you can write an IP address and netmask in
+# separate columns to specify the set of hosts.
+#
+# METHOD can be "trust", "reject", "md5" or "pam".  Note that "pam" sends passwords
+# in clear text.
+#
+# OPTION is the name of the PAM service. Default service name is "pgpool"
+#
+# Database and user names containing spaces, commas, quotes and other special
+# characters must be quoted. Quoting one of the keywords "all" or "sameuser"
+# makes the name lose its special character, and just match a database or
+# username with that name.
+#
+# This file is read on pgpool startup.  If you edit the file on a running
+# system, you have to restart the pgpool  for the changes to take effect.
+
+# Put your actual configuration here
+# ----------------------------------
+#
+# If you want to allow non-local connections, you need to add more
+# "host" records. In that case you will also need to make pgpool listen
+# on a non-local interface via the listen_addresses configuration parameter.
+#
+
+# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
+
+# "local" is for Unix domain socket connections only
+#local   all         all                               trust
+# IPv4 local connections:
+host    all         all         0.0.0.0/0          md5
diff --git a/kubernetes/common/pgpool/configs/pool_passwd b/kubernetes/common/pgpool/configs/pool_passwd
new file mode 100644 (file)
index 0000000..d8e09a2
--- /dev/null
@@ -0,0 +1 @@
+testuser:md599e8713364988502fa6189781bcf648f
similarity index 57%
rename from kubernetes/vid/templates/dbcmd-configmap.yaml
rename to kubernetes/common/pgpool/requirements.yaml
index aa08801..e597fca 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2018 Amdocs, Bell Canada
+# 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.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-dbcmd-configmap
-  namespace: {{ include "common.namespace" . }}
-data:
- db_cmd.sh : |-
-   #!/bin/sh
-   #mysql -uroot -p${MYSQL_ROOT_PASSWORD} -h${MYSQL_HOST} -P3306 < /db-config/vid-pre-init.sql
-   mysql -uvidadmin -p${MYSQL_PASSWORD} -h${MYSQL_HOST} -P3306 < /db-config/vid-pre-init.sql
-
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
diff --git a/kubernetes/common/pgpool/templates/configmap.yaml b/kubernetes/common/pgpool/templates/configmap.yaml
new file mode 100755 (executable)
index 0000000..cc20b42
--- /dev/null
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ .Release.Name }}-pgpool-configmap
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "configs/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/common/pgpool/templates/deployment.yaml b/kubernetes/common/pgpool/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..f598409
--- /dev/null
@@ -0,0 +1,67 @@
+{{/*
+# 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.
+*/}}
+kind: Deployment
+apiVersion: extensions/v1beta1
+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: 2
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+      - name: pgpool
+        image: "{{.Values.image.repository}}/{{.Values.image.container}}:{{.Values.image.tag}}"
+        env:
+        - name: PG_PRIMARY_SERVICE_NAME
+          value: {{.Values.container.name.primary}}
+        - name: PG_REPLICA_SERVICE_NAME
+          value: {{.Values.container.name.replica}}
+        - name: PG_USERNAME
+          value: {{.Values.credentials.pgusername}}
+        - name: PG_PASSWORD
+          value: {{.Values.credentials.pgpassword}}
+        ports:
+        - containerPort: 5432
+          name: pgpool
+          protocol: TCP
+        readinessProbe:
+          tcpSocket:
+            port: 5432
+          initialDelaySeconds: 20
+          periodSeconds: 10
+        livenessProbe: 
+          tcpSocket: 
+            port: 5432
+        initialDelaySeconds: 15
+        periodSeconds: 20
+        volumeMounts:
+        - name: pgpool-pgconf
+          mountPath: /pgconf/pgpoolconfigdir
+          readOnly: false
+      volumes:
+      - name: pgpool-pgconf
+        configMap:
+          name: {{ .Release.Name }}-pgpool-configmap
diff --git a/kubernetes/common/pgpool/templates/service.yaml b/kubernetes/common/pgpool/templates/service.yaml
new file mode 100644 (file)
index 0000000..0811fda
--- /dev/null
@@ -0,0 +1,14 @@
+kind: "Service"
+apiVersion: "v1"
+metadata:
+  name: "pgpool"
+  labels:
+    name: "pgpool"
+spec: 
+  ports:
+    - protocol: "TCP"
+      port: 5432
+      targetPort: 5432
+  selector:
+    name: "pgpool"
+  type: ClusterIP
similarity index 55%
rename from TOSCA/Helm/helminstall.sh
rename to kubernetes/common/pgpool/values.yaml
index f108825..8e74742 100644 (file)
@@ -1,23 +1,28 @@
-#!/bin/bash
-# ============LICENSE_START==========================================
-# ===================================================================
-# Copyright (c) 2017 AT&T
+# 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
+#       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============================================
 
-printf "%s" "$*"
-printf `pwd`
-printf "%s" "---------------"
-
-helm install local/$2 --name $2 --namespace $1
\ No newline at end of file
+name: pgpool
+container:
+  port: 5432
+  name:
+    primary: pgset-primary
+    replica: pgset-replica
+credentials:
+  pgusername: testuser
+  pgpassword: password
+serviceType: ClusterIP
+image:
+  repository: crunchydata
+  container: crunchy-pgpool
+  tag: centos7-10.4-2.0.0
index a1e330a..a60bbb4 100755 (executable)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 global: # global defaults
-  nodePortPrefix: 302
+  nodePortPrefixExt: 304
   persistence: {}
 
 config:
@@ -112,4 +112,4 @@ readiness:
   initialDelaySeconds: 10
   periodSeconds: 10
 
-resources: {}
\ No newline at end of file
+resources: {}
index 90fca37..3490306 100755 (executable)
@@ -29,7 +29,7 @@ spec:
   ports:
     {{if eq .Values.service.type "NodePort" -}}
     - port: {{ .Values.service.internalPort }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
     {{- else -}}
     - port: {{ .Values.service.externalPort }}
       targetPort: {{ .Values.service.internalPort }}
index 31f2abf..14fedc8 100755 (executable)
@@ -17,7 +17,7 @@
 # Declare variables to be passed into your templates.
 
 global: # global defaults
-  nodePortPrefix: 302
+  nodePortPrefixExt: 304
   persistence: {}
   pullPolicy: Always
 
@@ -79,6 +79,6 @@ service:
   name: netbox-nginx
   portName: netbox-nginx
   internalPort: 8080
-  nodePort: 69
+  nodePort: 20
 
-resources: {}
\ No newline at end of file
+resources: {}
index 39ff3ed..e662567 100755 (executable)
@@ -17,7 +17,7 @@
 # Declare variables to be passed into your templates.
 
 global: # global defaults
-  nodePortPrefix: 302
+  nodePortPrefixExt: 304
   persistence: {}
 
 # application image
index 6665064..2dfb36b 100755 (executable)
@@ -16,7 +16,7 @@
 # Global configuration defaults.
 #################################################################
 global:
-  nodePortPrefix: 302
+  nodePortPrefixExt: 304
   commonConfigPrefix: netbox
   readinessRepository: oomk8s
   readinessImage: readiness-check:2.0.0
index 7575061..30e6572 100644 (file)
@@ -75,7 +75,7 @@ spec:
             - name: ONAP_CLOUDOWNER
               value: {{ .Values.config.cloudOwner }}
             - name: NBI_URL
-              value: "http://nbi.{{ include "common.namespace" . }}:8080/nbi/api/v1"
+              value: "http://nbi.{{ include "common.namespace" . }}:8080/nbi/api/v3"
             - name: SDC_HOST
               value: "http://sdc-be.{{ include "common.namespace" . }}:8080"
             - name: SDC_HEADER_ECOMPINSTANCEID
@@ -94,6 +94,12 @@ spec:
             {{- end }}
             - name: LOGGING_LEVEL_ORG_ONAP_NBI
               value: {{ .Values.config.loglevel }}
+            - name: MSB_ENABLED
+              value: "true"
+            - name: MSB_DISCOVERY_HOST
+              value: "msb-discovery.{{ include "common.namespace" . }}"
+            - name: MSB_DISCOVERY_PORT
+              value: "10081"
           volumeMounts:
             - mountPath: /etc/localtime
               name: localtime
index 405a59c..f37e818 100644 (file)
@@ -28,7 +28,7 @@ subChartsOnly:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/externalapi/nbi:2.0.0
+image: onap/externalapi/nbi:3.0.0-latest
 pullPolicy: Always
 sdc_authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
 aai_authorization: Basic QUFJOkFBSQ==
diff --git a/kubernetes/sdnc/charts/dmaap-listener/resources/config/aai.properties b/kubernetes/sdnc/charts/dmaap-listener/resources/config/aai.properties
new file mode 100644 (file)
index 0000000..66e6267
--- /dev/null
@@ -0,0 +1,35 @@
+TransportType=HTTPAUTH
+Latitude =50.000000
+Longitude =-100.000000
+Version =1.0
+ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events
+Environment =TEST
+Partner = BOT_R
+routeOffer=MR1
+SubContextPath =/
+Protocol =http
+MethodType =GET
+username =admin
+password =admin
+contenttype =application/json
+authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM=
+authDate=2016-02-18T13:57:37-0800
+host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}
+topic=AAI-EVENT
+group=jmsgrp
+id=sdnc2
+timeout=15000
+limit=1000
+filter=
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_REQ_TRACE_ON=true
+AFT_ENVIRONMENT=AFTUAT
+AFT_DME2_EP_CONN_TIMEOUT=15000
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=NO
+DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt
+sdnc.odl.user=admin
+sdnc.odl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+sdnc.odl.url-base=http://sdnc.{{.Release.Namespace}}:{{.Values.config.sdncPort}}/restconf/operations
\ No newline at end of file
index fd8934b..816b1db 100644 (file)
@@ -17,5 +17,10 @@ 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:
 {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
index a649a07..d69d67d 100644 (file)
@@ -73,6 +73,9 @@ spec:
         - mountPath: {{ .Values.config.configDir }}/lcm.properties
           name: properties
           subPath: lcm.properties
+        - mountPath: {{ .Values.config.configDir }}/aai.properties
+          name: properties
+          subPath: aai.properties
         resources:
 {{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
         {{- if .Values.nodeSelector }}
index f57dc78..816b1db 100644 (file)
@@ -17,5 +17,10 @@ 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:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
index f57dc78..816b1db 100644 (file)
@@ -17,5 +17,10 @@ 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:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
index fd8934b..816b1db 100644 (file)
@@ -17,5 +17,10 @@ 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:
 {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
index cf43323..3e88512 100644 (file)
@@ -17,6 +17,11 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-configmap
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
 ---
@@ -25,5 +30,10 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-scripts
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/bin/*").AsConfig . | indent 2 }}
index 6f4ee22..4adf816 100644 (file)
@@ -17,6 +17,11 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-filebeat-configmap
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
 ---
@@ -25,6 +30,11 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-log-configmap
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
 ---
@@ -33,6 +43,11 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-bin
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/bin/*").AsConfig . | indent 2 }}
 ---
@@ -41,6 +56,11 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-properties
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }}
 ---
@@ -49,5 +69,10 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-env
   namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Get "resources/env.yaml") . | indent 2 }}
@@ -13,9 +13,9 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Chart for MariaDB Galera cluster
-name: mariadb-galera
-version: 2.0.0
+description: ONAP VID MariaDB Galera cluster
+name: vid_mariadb_galera
+version: 3.0.0
 keywords:
   - mariadb
   - mysql
@@ -126,7 +126,7 @@ resources:
     memory: 4Gi
 
 # Name for mariadb-galera cluster - should be unique accross all projects or other clusters
-nameOverride: vid-galera
+nameOverride: vid-mariadb-galera
 
 # DNS name for mariadb-galera cluster - should be unique accross all projects other clusters
 #dnsnameOverride: mariadb-galera
similarity index 52%
rename from TOSCA/Helm/k8s_delete_env.sh
rename to kubernetes/vid/resources/config/db_cmd.sh
index c715e22..95b83d4 100644 (file)
@@ -1,24 +1,23 @@
-#!/bin/bash
-# ============LICENSE_START==========================================
-# ===================================================================
-# Copyright (c) 2017 AT&T
+#!/bin/sh
+# Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
-#         http://www.apache.org/licenses/LICENSE-2.0
+#       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============================================
-
-kubectl delete secret $1-docker-registry-key
-kubectl delete clusterrolebinding $1-admin-binding
-kubectl delete namespace $1
-
-
 
+echo "Going to run mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -h${MYSQL_HOST} -P${MYSQL_PORT} ..."
+mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -h${MYSQL_HOST} -P${MYSQL_PORT} < /db-config/vid-pre-init.sql
+if [ $? -ne 0 ];then
+        echo "ERROR: Failed to run ${cmd} vid-pre-init.sql"
+        exit 1
+else
+        echo "INFO: Database initialized successfully"
+fi
diff --git a/kubernetes/vid/resources/config/vid-pre-init.sql b/kubernetes/vid/resources/config/vid-pre-init.sql
new file mode 100644 (file)
index 0000000..2dbbbcc
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+# Copyright © 2018 AT&T
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# 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.
+*/
+
+CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`schema_info` (
+`SCHEMA_ID` VARCHAR(25) NOT NULL,
+`SCHEMA_DESC` VARCHAR(75) NOT NULL,
+`DATASOURCE_TYPE` VARCHAR(100) NULL DEFAULT NULL,
+`CONNECTION_URL` VARCHAR(200) NOT NULL,
+`USER_NAME` VARCHAR(45) NOT NULL,
+`PASSWORD` VARCHAR(45) NULL DEFAULT NULL,
+`DRIVER_CLASS` VARCHAR(100) NOT NULL,
+`MIN_POOL_SIZE` INT(11) NOT NULL,
+`MAX_POOL_SIZE` INT(11) NOT NULL,
+`IDLE_CONNECTION_TEST_PERIOD` INT(11) NOT NULL)
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = utf8;
\ No newline at end of file
diff --git a/kubernetes/vid/templates/check-job-completion-configmap.yaml b/kubernetes/vid/templates/check-job-completion-configmap.yaml
deleted file mode 100644 (file)
index 270615a..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-check-job-completion
-  namespace: {{ include "common.namespace" . }}
-data:
-  vid_check_job_completion.py: |
-    #!/usr/bin/python
-    from __future__ import print_function
-    import time, argparse, logging, sys, os
-    import kubernetes.client
-    from kubernetes import client, config
-    from pprint import pprint
-
-    #extract env variables.
-    namespace = os.environ['NAMESPACE']
-    cert = os.environ['CERT']
-    host = os.environ['KUBERNETES_SERVICE_HOST']
-    token_path = os.environ['TOKEN']
-
-    with open(token_path, 'r') as token_file:
-        token = token_file.read().replace('\n', '')
-
-    client.configuration.api_key['authorization'] = token
-    client.configuration.api_key_prefix['authorization'] = 'Bearer'
-    client.configuration.host = "https://" + str(host)
-    client.configuration.ssl_ca_cert = cert
-
-    api_instance = client.BatchV1Api()
-
-    #setup logging
-    log = logging.getLogger(__name__)
-    handler = logging.StreamHandler(sys.stdout)
-    handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
-    handler.setLevel(logging.INFO)
-    log.addHandler(handler)
-    log.setLevel(logging.INFO)
-
-
-    def is_ready(job_name):
-        log.info( "[INFO] Checking if " + job_name + "  is completed")
-        pretty = True
-        job_status = False
-
-        try:
-            api_response = api_instance.read_namespaced_job_status(job_name, namespace, pretty=pretty)
-        except Exception as e:
-          print("Exception when calling BatchV1Api->read_namespaced_job_status: %s\n" % e)
-
-        pprint(api_response)
-        if api_response.status.succeeded == 1:
-          job_status_type = api_response.status.conditions[0].type
-          if job_status_type == "Complete":
-            job_status = True
-
-        print("[DBG] jobStatus: " + unicode(job_status))
-        return job_status
-
-
-    def main(args):
-        for job_name in args:
-            timeout = time.time() + 60 * 10
-            while True:
-                ready = is_ready(job_name)
-                if ready is True :
-                    break
-                elif time.time() > timeout:
-                    log.warning( "timed out waiting for '" + job_name + "' to be ready")
-                    exit(1)
-                else:
-                    time.sleep(5)
-
-
-    if __name__ == "__main__":
-        parser = argparse.ArgumentParser(description='Process some names.')
-        parser.add_argument('--job-name', action='append', required=True, help='A container name')
-        args = parser.parse_args()
-        arg_dict = vars(args)
-
-        for arg in arg_dict.itervalues():
-            main(arg)
-
-
diff --git a/kubernetes/vid/templates/cluster-ready-configmap.yaml b/kubernetes/vid/templates/cluster-ready-configmap.yaml
deleted file mode 100644 (file)
index 86f8d91..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-cluster-ready-configmap
-  namespace: {{ include "common.namespace" . }}
-data:
- vid_ready.py : |-
-   #!/usr/bin/python
-   from kubernetes import client, config
-   import time, argparse, logging, sys, os
-
-   #extract env variables.
-   namespace = os.environ['NAMESPACE']
-   cert = os.environ['CERT']
-   host = os.environ['KUBERNETES_SERVICE_HOST']
-   token_path = os.environ['TOKEN']
-
-   with open(token_path, 'r') as token_file:
-       token = token_file.read().replace('\n', '')
-
-   client.configuration.host = "https://" + host
-   client.configuration.ssl_ca_cert = cert
-   client.configuration.api_key['authorization'] = token
-   client.configuration.api_key_prefix['authorization'] = 'Bearer'
-
-   #setup logging
-   log = logging.getLogger(__name__)
-   handler = logging.StreamHandler(sys.stdout)
-   handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
-   handler.setLevel(logging.INFO)
-   log.addHandler(handler)
-   log.setLevel(logging.INFO)
-
-
-   def is_ready(container_name):
-       log.info( "Checking if " + container_name + "  is ready")
-       # config.load_kube_config() # for local testing
-       # namespace='onap-sdc' # for local testing
-       v1 = client.CoreV1Api()
-
-       ready = False
-
-       try:
-           response = v1.list_namespaced_pod(namespace=namespace, watch=False)
-
-           for i in response.items:
-               #log.info(i.metadata.name)
-               for s in i.status.container_statuses:
-                   #log.info(s.name)
-                   if i.metadata.name == container_name:
-                       ready = s.ready
-                       if not ready:
-                           log.info( container_name + " is not ready.")
-                       else:
-                           log.info( container_name + " is ready!")
-                   else:
-                       continue
-           return ready
-       except Exception as e:
-           log.error("Exception when calling list_namespaced_pod: %s\n" % e)
-
-
-   def main(args):
-       # args are a list of container names
-       for container_name in args:
-           # 5 min, TODO: make configurable
-           timeout = time.time() + 60 * 10
-           while True:
-               ready = is_ready(container_name)
-               if ready is True:
-                   break
-               elif time.time() > timeout:
-                   log.warning( "timed out waiting for '" + container_name + "' to be ready")
-                   exit(1)
-               else:
-                   time.sleep(5)
-
-
-   if __name__ == "__main__":
-       parser = argparse.ArgumentParser(description='Process some names.')
-       parser.add_argument('--container-name', action='append', required=True, help='A container name')
-       args = parser.parse_args()
-       arg_dict = vars(args)
-
-       for arg in arg_dict.itervalues():
-           main(arg)
-
-
-
index f7dbf07..cae46b4 100644 (file)
@@ -27,3 +27,16 @@ metadata:
   namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+---
+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:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
index 5c98b04..5cd4f38 100644 (file)
@@ -31,16 +31,9 @@ spec:
         release: {{ .Release.Name }}
     spec:
       initContainers:
-#dd775k: This container checks if the job that wait for all db instances to be up and initializes the db had finished.
-#      - command:
-#        - /bin/sh
-#        args:
-#        - "-c"
-#        - "sleep 1000000000m"
       - command:
-        - python
+        - /root/job_complete.py
         args:
-        - /tmp/vid-check-job-completion/vid_check_job_completion.py
         - --job-name
         - vid-config-galera
         env:
@@ -52,9 +45,6 @@ spec:
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
-        volumeMounts:
-        - mountPath: /tmp/vid-check-job-completion
-          name: vid-check-job-completion
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -163,10 +153,6 @@ spec:
         - name: vid-logback
           configMap:
             name: {{ include "common.fullname" . }}-log-configmap
-        - name: vid-check-job-completion
-          configMap:
-            name: {{ include "common.fullname" . }}-check-job-completion
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
 
-
diff --git a/kubernetes/vid/templates/galera-sql-configmap.yaml b/kubernetes/vid/templates/galera-sql-configmap.yaml
deleted file mode 100644 (file)
index 7f05af5..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-galera-sql-configmap
-  namespace: "{{ include "common.namespace" . }}"
-data:
-  vid-pre-init.sql: |-
-   CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`schema_info` (
-   `SCHEMA_ID` VARCHAR(25) NOT NULL,
-   `SCHEMA_DESC` VARCHAR(75) NOT NULL,
-   `DATASOURCE_TYPE` VARCHAR(100) NULL DEFAULT NULL,
-   `CONNECTION_URL` VARCHAR(200) NOT NULL,
-   `USER_NAME` VARCHAR(45) NOT NULL,
-   `PASSWORD` VARCHAR(45) NULL DEFAULT NULL,
-   `DRIVER_CLASS` VARCHAR(100) NOT NULL,
-   `MIN_POOL_SIZE` INT(11) NOT NULL,
-   `MAX_POOL_SIZE` INT(11) NOT NULL,
-   `IDLE_CONNECTION_TEST_PERIOD` INT(11) NOT NULL)
-    ENGINE = InnoDB
-    DEFAULT CHARACTER SET = utf8;
-
index b893dbf..2bcf647 100644 (file)
@@ -28,35 +28,34 @@ spec:
       name: vid-galera-init
     spec:
       initContainers:
-#dd775k:  This container checks that all galera instances are up before initializing it.
+#This container checks that all galera instances are up before initializing it.
       - name: vid-init-galera-readiness
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-#        - /bin/sh
-#        args:
-#        - "-c"
-#        - "sleep 1000000000m"
         command:
-        - python
-        args:
-        - /root/vid_ready.py
+        - /root/ready.py
+{{- $fullname := include "common.fullname" . -}}
+{{- range $i,$t := until (int .Values.vid_mariadb_galera.replicaCount)}}
         - --container-name
-        - {{ include "common.fullname" . }}-mariadb-galera-0
+        - {{ $fullname }}-mariadb-galera-{{$i}}
+{{- end }}
         env:
         - name: NAMESPACE
-          value: {{ include "common.namespace" . }}
-        volumeMounts:
-        - name: init-config
-          mountPath: /root/
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
       containers:
       - name: vid-config-galeradb
         image: {{ .Values.mariadb_image }}
         imagePullPolicy: "{{ .Values.pullPolicy }}"
         volumeMounts:
-        - name: vid-db-config
-          mountPath: /db-config
-        - name: dbcmd-config
-          mountPath: /dbcmd-config
+        - mountPath: /dbcmd-config/db_cmd.sh
+          name: {{ include "common.fullname" . }}-config
+          subPath: db_cmd.sh
+        - mountPath: /db-config/vid-pre-init.sql
+          name: {{ include "common.fullname" . }}-config
+          subPath: vid-pre-init.sql
         command:
         - /bin/sh
         args:
@@ -65,22 +64,20 @@ spec:
         env:
         - name: MYSQL_PASSWORD
           value: "{{ .Values.config.vidmysqlpassword }}"
-#          valueFrom:
-#            secretKeyRef:
-#              name: {{ template "common.fullname" . }}
-#              key: vid-password
         - name: MYSQL_HOST
           value: "{{ .Values.config.vidmysqlhost }}"
+        - name: MYSQL_USER
+          value: "{{ .Values.config.vidmysqluser }}"
+        - name: MYSQL_PORT
+          value: "{{ .Values.config.vidmysqlport }}"
+      restartPolicy: Never
       volumes:
-        - name: vid-db-config
-          configMap:
-            name: {{ include "common.fullname" . }}-galera-sql-configmap
-        - name: dbcmd-config
+        - name: {{ include "common.fullname" . }}-config
           configMap:
-            name: {{ include "common.fullname" . }}-dbcmd-configmap
-        - name: init-config
-          configMap:
-            name: {{ include "common.fullname" . }}-cluster-ready-configmap
-      restartPolicy: Never
-
+            name: {{ include "common.fullname" . }}
+            items:
+              - key: db_cmd.sh
+                path: db_cmd.sh
+              - key: vid-pre-init.sql
+                path: vid-pre-init.sql
 
index 4e5f403..34a265c 100644 (file)
@@ -17,9 +17,8 @@
 # Declare variables to be passed into your templates.
 global:
   nodePortPrefix: 302
-  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
   readinessRepository: oomk8s
-  readinessImage: readiness-check:1.0.0
+  readinessImage: readiness-check:2.0.1
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
@@ -54,8 +53,9 @@ config:
   logstashPort: 5044
 
 # subchart configuration
-mariadb-galera:
-  nameOverride: vid-mariadb-galera
+vid_mariadb_galera:
+#  nameOverride: vid-mariadb-galera
+  replicaCount: 1
 
 # default number of instances
 replicaCount: 1