diff options
Diffstat (limited to 'kubernetes/policy/charts')
9 files changed, 87 insertions, 17 deletions
diff --git a/kubernetes/policy/charts/brmsgw/values.yaml b/kubernetes/policy/charts/brmsgw/values.yaml index 49e37789df..efc397654a 100644 --- a/kubernetes/policy/charts/brmsgw/values.yaml +++ b/kubernetes/policy/charts/brmsgw/values.yaml @@ -25,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/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 e42e6ce049..ca62f2b01d 100644 --- a/kubernetes/policy/charts/drools/values.yaml +++ b/kubernetes/policy/charts/drools/values.yaml @@ -27,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 @@ -36,10 +36,9 @@ debugEnabled: false # application configuration config: nexusPort: 8081 - aaiServiceClusterIp: 10.43.255.254 # default number of instances -replicaCount: 4 +replicaCount: 2 nodeSelector: {} @@ -51,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/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 9d3fdbd78c..811830ea89 100644 --- a/kubernetes/policy/charts/pdp/values.yaml +++ b/kubernetes/policy/charts/pdp/values.yaml @@ -27,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 |