aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/policy')
-rw-r--r--kubernetes/policy/charts/brmsgw/values.yaml3
-rw-r--r--kubernetes/policy/charts/drools/charts/nexus/values.yaml1
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf4
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh58
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf15
-rw-r--r--kubernetes/policy/charts/drools/templates/statefulset.yaml10
-rw-r--r--kubernetes/policy/charts/drools/values.yaml8
-rw-r--r--kubernetes/policy/charts/mariadb/resources/config/db.sh2
-rw-r--r--kubernetes/policy/charts/mariadb/values.yaml1
-rw-r--r--kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf4
-rw-r--r--kubernetes/policy/charts/pdp/values.yaml3
-rw-r--r--kubernetes/policy/charts/policy-common/values.yaml1
-rw-r--r--kubernetes/policy/resources/config/pe/pap.conf2
-rw-r--r--kubernetes/policy/resources/config/pe/paplp.conf4
-rw-r--r--kubernetes/policy/values.yaml3
15 files changed, 91 insertions, 28 deletions
diff --git a/kubernetes/policy/charts/brmsgw/values.yaml b/kubernetes/policy/charts/brmsgw/values.yaml
index 8329589ed4..efc397654a 100644
--- a/kubernetes/policy/charts/brmsgw/values.yaml
+++ b/kubernetes/policy/charts/brmsgw/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
@@ -26,7 +25,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/policy-pe:1.2.0
+image: onap/policy-pe:1.2.2
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/kubernetes/policy/charts/drools/charts/nexus/values.yaml b/kubernetes/policy/charts/drools/charts/nexus/values.yaml
index 55b231a091..03a03cc198 100644
--- a/kubernetes/policy/charts/drools/charts/nexus/values.yaml
+++ b/kubernetes/policy/charts/drools/charts/nexus/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
ubuntuInitRepository: oomk8s
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf
index 9202b0ada7..1236176514 100644
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf
+++ b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf
@@ -78,13 +78,13 @@ DMAAP_SERVERS=message-router
# AAI
-AAI_URL=https://aai.api.simpledemo.openecomp.org:8443
+AAI_URL=https://aai.{{.Release.Namespace}}:8443
AAI_USERNAME=POLICY
AAI_PASSWORD=POLICY
# MSO
-SO_URL=http://mso:8080/ecomp/mso/infra
+SO_URL=http://so.{{.Release.Namespace}}:8080/ecomp/mso/infra
SO_USERNAME=InfraPortalClient
SO_PASSWORD=password1$
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh
index 65ef7053cd..218cd8aead 100644
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh
+++ b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/bash -xv
# Copyright © 2017-2018 Amdocs, Bell Canada, AT&T
#
@@ -15,4 +15,58 @@
# limitations under the License.
-${POLICY_HOME}/bin/features enable healthcheck
+"${POLICY_HOME}"/bin/features enable healthcheck
+"${POLICY_HOME}"/bin/features enable pooling-dmaap
+"${POLICY_HOME}"/bin/features enable distributed-locking
+
+"${POLICY_HOME}"/bin/db-migrator -s pooling -o upgrade
+
+# make sure the PDPD-CONFIGURATION anonymous topic is created
+# so not to lose any configuration updates
+
+echo
+echo "creating PDPD-CONFIGURATION topic"
+echo
+
+curl --silent --connect-timeout 60 -X POST --header "Content-Type: application/json" -d "{}" http://message-router:3904/events/PDPD-CONFIGURATION
+
+echo
+echo "removing PDPD-CONFIGURATION topic dummy message"
+echo
+
+curl --silent --connect-timeout 60 -X GET http://message-router:3904/events/PDPD-CONFIGURATION/1/1?timeout=15000
+
+# for resiliency/scalability scenarios, check to see
+# if there's an amsterdam artifact already deployed
+# by brmsgw. If so, update the amsterdam controller
+# coordinates. In the future, a more sophisticated
+# solution will be put in place, that will required
+# coordination among policy components.
+
+echo
+echo "checking if there are amsterdam policies already deployed .."
+echo
+
+AMSTERDAM_VERSION=$(curl --silent --connect-timeout 60 -X GET "http://nexus:8081/nexus/service/local/artifact/maven/resolve?r=releases&g=org.onap.policy-engine.drools.amsterdam&a=policy-amsterdam-rules&v=RELEASE" | grep -Po "(?<=<version>).*(?=</version>)")
+
+if [[ -z ${AMSTERDAM_VERSION} ]]; then
+ echo "no amsterdam policies have been found .."
+ exit 0
+fi
+
+echo
+echo "The latest deployed amsterdam artifact in nexus has version ${AMSTERDAM_VERSION}"
+echo
+
+sed -i.INSTALL -e "s/^rules.artifactId=.*/rules.artifactId=policy-amsterdam-rules/g" \
+ -e "s/^rules.groupId=.*/rules.groupId=org.onap.policy-engine.drools.amsterdam/g" \
+ -e "s/^rules.version=.*/rules.version=${AMSTERDAM_VERSION}/g" "${POLICY_HOME}"/config/amsterdam-controller.properties
+
+echo
+echo "amsterdam controller will be started brained with maven coordinates:"
+echo
+
+grep "^rules" "${POLICY_HOME}"/config/amsterdam-controller.properties
+
+echo
+echo
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf
new file mode 100644
index 0000000000..82384075b5
--- /dev/null
+++ b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf
@@ -0,0 +1,15 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+POOLING_TOPIC=POOLING
diff --git a/kubernetes/policy/charts/drools/templates/statefulset.yaml b/kubernetes/policy/charts/drools/templates/statefulset.yaml
index 9041478c8c..71844f108d 100644
--- a/kubernetes/policy/charts/drools/templates/statefulset.yaml
+++ b/kubernetes/policy/charts/drools/templates/statefulset.yaml
@@ -51,10 +51,6 @@ spec:
image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-readiness
- hostAliases:
- - ip: "{{ .Values.config.aaiServiceClusterIp }}"
- hostnames:
- - "aai.api.simpledemo.openecomp.org"
containers:
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -88,6 +84,9 @@ spec:
- mountPath: /tmp/policy-install/config/feature-healthcheck.conf
name: drools-secret
subPath: feature-healthcheck.conf
+ - mountPath: /tmp/policy-install/config/feature-pooling-dmaap.conf
+ name: drools-config
+ subPath: feature-pooling-dmaap.conf
- mountPath: /tmp/policy-install/config/base.conf
name: drools-config
subPath: base.conf
@@ -160,6 +159,9 @@ spec:
- key: base.conf
path: base.conf
mode: 0755
+ - key: feature-pooling-dmaap.conf
+ path: feature-pooling-dmaap.conf
+ mode: 0755
- key: policy-management.conf
path: policy-management.conf
mode: 0755
diff --git a/kubernetes/policy/charts/drools/values.yaml b/kubernetes/policy/charts/drools/values.yaml
index 9abab850f9..ca62f2b01d 100644
--- a/kubernetes/policy/charts/drools/values.yaml
+++ b/kubernetes/policy/charts/drools/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
@@ -28,7 +27,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/policy-drools:1.2.0
+image: onap/policy-drools:1.2.2
pullPolicy: Always
# flag to enable debugging - application support required
@@ -37,10 +36,9 @@ debugEnabled: false
# application configuration
config:
nexusPort: 8081
- aaiServiceClusterIp: 10.43.255.254
# default number of instances
-replicaCount: 4
+replicaCount: 2
nodeSelector: {}
@@ -52,7 +50,7 @@ liveness:
periodSeconds: 10
# necessary to disable liveness probe when setting breakpoints
# in debugger so K8s doesn't restart unresponsive container
- enabled: false
+ enabled: true
readiness:
initialDelaySeconds: 10
diff --git a/kubernetes/policy/charts/mariadb/resources/config/db.sh b/kubernetes/policy/charts/mariadb/resources/config/db.sh
index ead656ef0e..067b3c312f 100644
--- a/kubernetes/policy/charts/mariadb/resources/config/db.sh
+++ b/kubernetes/policy/charts/mariadb/resources/config/db.sh
@@ -14,7 +14,7 @@
#!/bin/bash -xv
-for db in support onap_sdk log
+for db in support onap_sdk log migration operationshistory10 pooling
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}'@'%' ;"
diff --git a/kubernetes/policy/charts/mariadb/values.yaml b/kubernetes/policy/charts/mariadb/values.yaml
index ea79ba6d59..7703234a66 100644
--- a/kubernetes/policy/charts/mariadb/values.yaml
+++ b/kubernetes/policy/charts/mariadb/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
persistence: {}
#################################################################
diff --git a/kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf b/kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf
index f5f4060aad..7f894fd4a9 100644
--- a/kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf
+++ b/kubernetes/policy/charts/pdp/resources/config/pe/pdplp.conf
@@ -18,8 +18,8 @@ LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
SERVER=http://{{ include "common.servicename" . }}:{{.Values.service.externalPort}}/pdp/
-LOGPATH=/opt/app/policy/servers/pdp/logs/pdp-rest.log
-PARSERLOGPATH=IntegrityMonitor.log
+LOGPATH=/var/log/onap/policy/pdpx/pdp-rest.log
+PARSERLOGPATH=/opt/app/policy/servers/pdplp/bin/IntegrityMonitor.log
node_type=logparser
# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
diff --git a/kubernetes/policy/charts/pdp/values.yaml b/kubernetes/policy/charts/pdp/values.yaml
index 9a537139c4..811830ea89 100644
--- a/kubernetes/policy/charts/pdp/values.yaml
+++ b/kubernetes/policy/charts/pdp/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
@@ -28,7 +27,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/policy-pe:1.2.0
+image: onap/policy-pe:1.2.2
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/kubernetes/policy/charts/policy-common/values.yaml b/kubernetes/policy/charts/policy-common/values.yaml
index 268d08bdf7..ea85ea5912 100644
--- a/kubernetes/policy/charts/policy-common/values.yaml
+++ b/kubernetes/policy/charts/policy-common/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
diff --git a/kubernetes/policy/resources/config/pe/pap.conf b/kubernetes/policy/resources/config/pe/pap.conf
index ae9d47c491..8590dcac03 100644
--- a/kubernetes/policy/resources/config/pe/pap.conf
+++ b/kubernetes/policy/resources/config/pe/pap.conf
@@ -39,7 +39,7 @@ REST_ADMIN_REPOSITORY=repository
REST_ADMIN_WORKSPACE=workspace
# PDP related properties
-PAP_PDP_URL=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-0.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/,testpdp,alpha123;http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-1.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/
+PAP_PDP_URL=http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-0.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/,testpdp,alpha123;http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-1.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/,testpdp,alpha123;http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-2.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/,testpdp,alpha123;http://{{ .Release.Name }}-{{ .Values.global.pdp.nameOverride }}-3.{{ .Values.global.pdp.nameOverride }}.{{ include "common.namespace" . }}.svc.cluster.local:{{ .Values.config.pdpPort }}/pdp/
PAP_PDP_HTTP_USER_ID=testpdp
PAP_PDP_HTTP_PASSWORD=alpha123
diff --git a/kubernetes/policy/resources/config/pe/paplp.conf b/kubernetes/policy/resources/config/pe/paplp.conf
index 205497c35d..3d59d818c9 100644
--- a/kubernetes/policy/resources/config/pe/paplp.conf
+++ b/kubernetes/policy/resources/config/pe/paplp.conf
@@ -18,8 +18,8 @@ LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
SERVER=http://{{ include "common.servicename" . }}:{{.Values.service.externalPort2}}/pap/
-LOGPATH=/opt/app/policy/servers/pap/logs/pap-rest.log
-PARSERLOGPATH=IntegrityMonitor.log
+LOGPATH=/var/log/onap/policy/pap/pap-rest.log
+PARSERLOGPATH=/opt/app/policy/servers/paplp/bin/IntegrityMonitor.log
node_type=logparser
# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml
index b708e67bde..42d58472ed 100644
--- a/kubernetes/policy/values.yaml
+++ b/kubernetes/policy/values.yaml
@@ -17,7 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
readinessRepository: oomk8s
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
@@ -41,7 +40,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/policy-pe:1.2.0
+image: onap/policy-pe:1.2.2
pullPolicy: Always
subChartsOnly: