summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/charts/drools/resources
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2019-09-12 14:19:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-12 14:19:02 +0000
commitabebe0ce99f7aeb05827e67afc5c3cdaff45ee3f (patch)
tree93480876527d015e65360b33543aa56279bdd031 /kubernetes/policy/charts/drools/resources
parente5819ddab89fc838fe019166a75254dbbc26d261 (diff)
parent010965911185b9a1ef2008246fabc37f193baf2b (diff)
Merge "refactor drools chart to allow customizations"
Diffstat (limited to 'kubernetes/policy/charts/drools/resources')
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/policy-keystorebin5640 -> 0 bytes
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/policy-management.conf19
-rw-r--r--kubernetes/policy/charts/drools/resources/configmaps/amsterdam.pre.sh21
-rw-r--r--kubernetes/policy/charts/drools/resources/configmaps/base.conf (renamed from kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf)38
-rw-r--r--kubernetes/policy/charts/drools/resources/configmaps/feature-pooling-dmaap.conf (renamed from kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf)4
-rw-r--r--kubernetes/policy/charts/drools/resources/configmaps/status.post.sh (renamed from kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf)14
-rw-r--r--kubernetes/policy/charts/drools/resources/scripts/update-vfw-op-policy.sh107
-rw-r--r--kubernetes/policy/charts/drools/resources/secrets/credentials.conf56
8 files changed, 94 insertions, 165 deletions
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/policy-keystore b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/policy-keystore
deleted file mode 100644
index ab25c3a341..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/policy-management.conf b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/policy-management.conf
deleted file mode 100644
index c2ccefe4e3..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/policy-management.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada, AT&T
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-CONTROLLER_ARTIFACT_ID=policy-management
-CONTROLLER_NAME=policy-management-controller
-CONTROLLER_PORT=9696
-RULES_ARTIFACT=not-used:not-used:1.0.0-SNAPSHOT
-UEB_TOPIC=policyengine-develop
diff --git a/kubernetes/policy/charts/drools/resources/configmaps/amsterdam.pre.sh b/kubernetes/policy/charts/drools/resources/configmaps/amsterdam.pre.sh
new file mode 100644
index 0000000000..5949db4dc4
--- /dev/null
+++ b/kubernetes/policy/charts/drools/resources/configmaps/amsterdam.pre.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+
+docker-entrypoint.sh nexus \ No newline at end of file
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf b/kubernetes/policy/charts/drools/resources/configmaps/base.conf
index e7c6928b0a..ba39b0b5ad 100644
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf
+++ b/kubernetes/policy/charts/drools/resources/configmaps/base.conf
@@ -1,4 +1,5 @@
-# Copyright © 2017-2018 Amdocs, Bell Canada, AT&T
+# Copyright © 2017-2018 Amdocs, Bell Canada.
+# Modifications Copyright (C) 2018-2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,41 +15,33 @@
# JVM options
-JVM_OPTIONS=-server -Xms1024m -Xmx2048m
+JVM_OPTIONS={{.Values.server.jvmOpts}}
# SYSTEM software configuration
POLICY_HOME=/opt/app/policy
POLICY_LOGS=/var/log/onap/policy/pdpd
JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
-KEYSTORE_PASSWD=Pol1cy_0nap
-TRUSTSTORE_PASSWD=Pol1cy_0nap
# Telemetry credentials
TELEMETRY_PORT=9696
TELEMETRY_HOST=0.0.0.0
-TELEMETRY_USER=demo@people.osaaf.org
-TELEMETRY_PASSWORD=demo123456!
# nexus repository
SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots
-SNAPSHOT_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots/
+SNAPSHOT_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.nexus.port}}/nexus/content/repositories/snapshots/
RELEASE_REPOSITORY_ID=policy-nexus-releases
-RELEASE_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/releases/
-REPOSITORY_USERNAME=admin
-REPOSITORY_PASSWORD=admin123
+RELEASE_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.nexus.port}}/nexus/content/repositories/releases/
# Relational (SQL) DB access
SQL_HOST={{.Values.global.mariadb.nameOverride}}
-SQL_USER=policy_user
-SQL_PASSWORD=policy_user
# AAF
-AAF=true
+AAF={{.Values.aaf.enabled}}
AAF_NAMESPACE=org.onap.policy
AAF_HOST=aaf-locate.{{.Release.Namespace}}
@@ -56,8 +49,6 @@ AAF_HOST=aaf-locate.{{.Release.Namespace}}
PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
PDPD_CONFIGURATION_SERVERS=message-router
-PDPD_CONFIGURATION_API_KEY=
-PDPD_CONFIGURATION_API_SECRET=
PDPD_CONFIGURATION_CONSUMER_GROUP=
PDPD_CONFIGURATION_CONSUMER_INSTANCE=
PDPD_CONFIGURATION_PARTITION_KEY=
@@ -65,23 +56,14 @@ PDPD_CONFIGURATION_PARTITION_KEY=
# PAP-PDP configuration channel
POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP
-POLICY_PDP_PAP_API_KEY=
-POLICY_PDP_PAP_API_SECRET=
# PAP
PAP_HOST=policy-pap
-PAP_USERNAME=healthcheck
-PAP_PASSWORD=zb!XztG34
# PDP-X
PDP_HOST=policy-xacml-pdp
-PDP_USERNAME=healthcheck
-PDP_PASSWORD=zb!XztG34
-PDP_CLIENT_USERNAME=python
-PDP_CLIENT_PASSWORD=test
-PDP_ENVIRONMENT=TEST
# DCAE DMaaP
@@ -96,23 +78,15 @@ DMAAP_SERVERS=message-router
# AAI
AAI_URL=https://aai.{{.Release.Namespace}}:8443
-AAI_USERNAME=policy@policy.onap.org
-AAI_PASSWORD=demo123456!
# MSO
SO_URL=http://so.{{.Release.Namespace}}:8080/onap/so/infra
-SO_USERNAME=InfraPortalClient
-SO_PASSWORD=password1$
# VFC
VFC_URL=
-VFC_USERNAME=
-VFC_PASSWORD=
# SDNC
SDNC_URL=http://sdnc.{{.Release.Namespace}}:8282/restconf/operations
-SDNC_USERNAME=admin
-SDNC_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf b/kubernetes/policy/charts/drools/resources/configmaps/feature-pooling-dmaap.conf
index 7b95e79b4d..44d0bf18ce 100644
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/feature-pooling-dmaap.conf
+++ b/kubernetes/policy/charts/drools/resources/configmaps/feature-pooling-dmaap.conf
@@ -1,5 +1,5 @@
-# Copyright 2018 AT&T Intellectual Property. All rights reserved
-# Modifications Copyright © 2018 Amdocs, Bell Canada
+# Copyright 2018-2019 AT&T Intellectual Property. All rights reserved.
+# Modifications 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.
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf b/kubernetes/policy/charts/drools/resources/configmaps/status.post.sh
index 20d8298472..e2d7381689 100644
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf
+++ b/kubernetes/policy/charts/drools/resources/configmaps/status.post.sh
@@ -1,16 +1,20 @@
-# Copyright © 2017-2018 Amdocs, Bell Canada, AT&T
-#
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2019 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
+# 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=========================================================
-HEALTHCHECK_USER=demo@people.osaaf.org
-HEALTHCHECK_PASSWORD=demo123456!
+policy status
diff --git a/kubernetes/policy/charts/drools/resources/scripts/update-vfw-op-policy.sh b/kubernetes/policy/charts/drools/resources/scripts/update-vfw-op-policy.sh
deleted file mode 100644
index ff7a64bdb9..0000000000
--- a/kubernetes/policy/charts/drools/resources/scripts/update-vfw-op-policy.sh
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada, AT&T
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#!/bin/bash
-
-if [ "$#" -ne 4 ]; then
- echo "Usage: $(basename $0) <k8s-host> <policy-pdp-node-port> <policy-drools-node-port> <resource-id>"
- exit 1
-fi
-
-K8S_HOST=$1
-POLICY_PDP_PORT=$2
-POLICY_DROOLS_PORT=$3
-RESOURCE_ID=$4
-
-echo
-echo
-echo "Removing the vFW Policy from PDP.."
-echo
-echo
-
-curl -v -k -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyComponent" : "PDP",
- "policyName": "com.BRMSParamvFirewall",
- "policyType": "BRMS_Param"
-}' https://${K8S_HOST}:${POLICY_PDP_PORT}/pdp/api/deletePolicy
-
-sleep 20
-
-echo
-
-echo
-echo "Updating vFW Operational Policy .."
-echo
-
-curl -v -k -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamvFirewall",
- "policyDescription": "BRMS Param vFirewall policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller": "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+TBD+-+Cannot+be+known+until+instantiation+is+done%0D%0A++++++resourceID%3A+'${RESOURCE_ID}'%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' https://${K8S_HOST}:${POLICY_PDP_PORT}/pdp/api/updatePolicy
-
-sleep 5
-
-echo
-echo
-echo "Pushing the vFW Policy .."
-echo
-echo
-
-curl -v -k --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamvFirewall",
- "policyType": "BRMS_Param"
-}' https://${K8S_HOST}:${POLICY_PDP_PORT}/pdp/api/pushPolicy
-
-sleep 20
-
-echo
-echo
-echo "Restarting PDP-D .."
-echo
-echo
-
-POD=$(kubectl --namespace {{ include "common.namespace" . }} get pods | sed 's/ .*//'| grep drools)
-kubectl --namespace {{ include "common.namespace" . }} exec -it ${POD} -- bash -c "source /opt/app/policy/etc/profile.d/env.sh && policy stop && sleep 5 && policy start"
-
-sleep 20
-
-echo
-echo
-echo "PDP-D amsterdam maven coordinates .."
-echo
-echo
-
-curl -vvv -k --silent --user "demo@people.osaaf.org:demo123456!" -X GET https://${K8S_HOST}:${POLICY_DROOLS_PORT}/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool
-
-
-echo
-echo
-echo "PDP-D control loop updated .."
-echo
-echo
-
-curl -v -k --silent --user "demo@people.osaaf.org:demo123456!" -X GET https://${K8S_HOST}:${POLICY_DROOLS_PORT}/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params | python -m json.tool
diff --git a/kubernetes/policy/charts/drools/resources/secrets/credentials.conf b/kubernetes/policy/charts/drools/resources/secrets/credentials.conf
new file mode 100644
index 0000000000..36d3c3b376
--- /dev/null
+++ b/kubernetes/policy/charts/drools/resources/secrets/credentials.conf
@@ -0,0 +1,56 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+KEYSTORE_PASSWD={{.Values.keystore.password}}
+TRUSTSTORE_PASSWD={{.Values.truststore.password}}
+
+TELEMETRY_USER={{.Values.telemetry.user}}
+TELEMETRY_PASSWORD={{.Values.telemetry.password}}
+
+REPOSITORY_USERNAME={{.Values.nexus.user}}
+REPOSITORY_PASSWORD={{.Values.nexus.password}}
+
+SQL_USER={{.Values.db.user}}
+SQL_PASSWORD={{.Values.db.password}}
+
+PDPD_CONFIGURATION_API_KEY={{.Values.dmaap.brmsgw.key}}
+PDPD_CONFIGURATION_API_SECRET={{.Values.dmaap.brmsgw.secret}}
+
+POLICY_PDP_PAP_API_KEY={{.Values.dmaap.pap.key}}
+POLICY_PDP_PAP_API_SECRET={{.Values.dmaap.pap.secret}}
+
+PAP_USERNAME={{.Values.pap.user}}
+PAP_PASSWORD={{.Values.pap.password}}
+
+PDP_USERNAME={{.Values.pdp.user}}
+PDP_PASSWORD={{.Values.pdp.password}}
+
+AAI_USERNAME={{.Values.aai.user}}
+AAI_PASSWORD={{.Values.aai.password}}
+
+SO_USERNAME={{.Values.so.user}}
+SO_PASSWORD={{.Values.so.password}}
+
+VFC_USERNAME={{.Values.vfc.user}}
+VFC_PASSWORD={{.Values.vfc.password}}
+
+SDNC_USERNAME={{.Values.sdnc.user}}
+SDNC_PASSWORD={{.Values.sdnc.password}}
+
+HEALTHCHECK_USER={{.Values.telemetry.user}}
+HEALTHCHECK_PASSWORD={{.Values.telemetry.password}}