Merge "Fix policy/api charts"
authorMike Elliott <mike.elliott@amdocs.com>
Mon, 15 Apr 2019 14:51:13 +0000 (14:51 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 15 Apr 2019 14:51:13 +0000 (14:51 +0000)
kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw-tweaks.sh
kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf
kubernetes/policy/charts/mariadb/resources/config/db.sh
kubernetes/policy/charts/policy-pap/resources/config/config.json
kubernetes/policy/charts/policy-pap/resources/config/topic.properties [new file with mode: 0644]
kubernetes/policy/charts/policy-pap/templates/configmap.yaml
kubernetes/policy/charts/policy-pap/templates/deployment.yaml

index 5c3a2a1..d7b27a0 100644 (file)
@@ -39,14 +39,3 @@ for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do
                sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}"
        fi
 done
-
-DEPS_JSON_RUNTIME="${POLICY_HOME}/servers/brmsgw/dependency.json"
-DEPS_JSON_INSTALL="${POLICY_HOME}/install/servers/brmsgw/dependency.json"
-
-for DEP in ${DEPS_JSON_RUNTIME} ${DEPS_JSON_INSTALL}; do
-       if [ ! -f "${DEP}" ]; then
-               echo "warning: configuration does not exist: ${DEP}"
-       else
-               sed -i -e "s/\"version\":.*-SNAPSHOT\"/\"version\": \"${version}\"/g" "${DEP}"
-       fi
-done
index b074d48..3952a4c 100644 (file)
@@ -26,7 +26,7 @@ PDP_HTTP_PASSWORD=alpha123
 PDP_PAP_PDP_HTTP_USER_ID=testpap
 PDP_PAP_PDP_HTTP_PASSWORD=alpha123
 
-M2_HOME=/usr/share/maven
+M2_HOME=/usr/share/java/maven-3
 snapshotRepositoryID=policy-nexus-snapshots
 snapshotRepositoryName=Snapshots
 snapshotRepositoryURL=http://{{ .Values.global.nexus.nameOverride }}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots
@@ -64,4 +64,4 @@ BRMS_UEB_API_SECRET=
 
 #Dependency.json file version
 BRMS_DEPENDENCY_VERSION=1.3.1
-
+BRMS_MODELS_DEPENDENCY_VERSION=2.0.0-SNAPSHOT
index 3f94223..a5eb7f5 100644 (file)
@@ -15,7 +15,7 @@
 
 #!/bin/bash -xv
 
-for db in support onap_sdk log migration operationshistory10 pooling
+for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
 do
        mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
        mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
index 8145103..995c951 100644 (file)
         "port":6969,
         "userName":"healthcheck",
         "password":"zb!XztG34"
+    },
+    "pdpParameters": {
+        "updateParameters": {
+            "maxRetryCount": 1,
+            "maxWaitMs": 30000
+        },
+        "stateChangeParameters": {
+            "maxRetryCount": 1,
+            "maxWaitMs": 30000
+        }
+    },
+    "databaseProviderParameters": {
+        "name": "PolicyProviderParameterGroup",
+        "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
+        "databaseDriver": "org.mariadb.jdbc.Driver",
+        "databaseUrl": "jdbc:mariadb://{{.Values.global.mariadb.nameOverride}}:3306/policyadmin",
+        "databaseUser": "policy_user",
+        "databasePassword": "cG9saWN5X3VzZXI=",
+        "persistenceUnit": "PolicyMariaDb"
     }
 }
diff --git a/kubernetes/policy/charts/policy-pap/resources/config/topic.properties b/kubernetes/policy/charts/policy-pap/resources/config/topic.properties
new file mode 100644 (file)
index 0000000..c1124a1
--- /dev/null
@@ -0,0 +1,22 @@
+# ============LICENSE_START=======================================================
+# ONAP PAP
+# ================================================================================
+# Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+dmaap.sink.topics=POLICY-PDP-PAP
+dmaap.sink.topics.POLICY-PDP-PAP.servers=message-router
+dmaap.source.topics=POLICY-PDP-PAP
+dmaap.source.topics.POLICY-PDP-PAP.servers=message-router
index 5618076..19ce6a8 100644 (file)
@@ -22,5 +22,5 @@ metadata:
   name: {{ include "common.fullname" . }}-configmap
   namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
 
index 5bec94b..4945f76 100644 (file)
@@ -16,12 +16,27 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - {{ .Values.global.mariadb.nameOverride }}
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["/opt/app/policy/pap/bin/policy-pap.sh"]
-          args: ["/opt/app/policy/pap/etc/mounted/config.json"]
+          args: ["/opt/app/policy/pap/etc/mounted/config.json", "/opt/app/policy/pap/etc/mounted/topic.properties"]
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger