aboutsummaryrefslogtreecommitdiffstats
path: root/csit/config/drools-pdp
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-09-01 12:05:47 +0100
committerliamfallon <liam.fallon@est.tech>2022-09-05 10:19:02 +0100
commitfaac45b578a29078700b5ea003c69cedc1a17b5f (patch)
treef2a079358441401e50c9933255122796b2134ea6 /csit/config/drools-pdp
parentff82245b200616cf30a6f6cd4d1e5305ae3d90ef (diff)
Convert CSIT tests to use HTTP rather than HTTPS
This commit converts the CSITs from HTTPS to HTTP. It also does some refactoring and didying up on the CSIT environment. Issue-ID: POLICY-4338 Change-Id: Ie19908a8d2a457df3ae5f4e490d5528889f395c8 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'csit/config/drools-pdp')
-rw-r--r--csit/config/drools-pdp/custom/engine-system.properties45
-rwxr-xr-xcsit/config/drools-pdp/custom/noop.pre.sh22
-rw-r--r--csit/config/drools-pdp/env/base.conf140
-rw-r--r--csit/config/drools-pdp/groups.json137
4 files changed, 344 insertions, 0 deletions
diff --git a/csit/config/drools-pdp/custom/engine-system.properties b/csit/config/drools-pdp/custom/engine-system.properties
new file mode 100644
index 00000000..19e03b51
--- /dev/null
+++ b/csit/config/drools-pdp/custom/engine-system.properties
@@ -0,0 +1,45 @@
+#
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Copyright (C) 2021 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=========================================================
+#
+
+# system properties set within the application
+
+java.net.preferIPv4Stack=true
+
+# jmx
+
+com.sun.management.jmxremote.port=9991
+com.sun.management.jmxremote.authenticate=false
+com.sun.management.jmxremote.ssl=false
+
+# certs
+
+javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore}
+javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap}
+
+javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore}
+javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap}
+
+# kie
+
+kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false}
+
+# symmetric key for sensitive configuration data
+
+engine.symm.key=${envd:SYMM_KEY}
diff --git a/csit/config/drools-pdp/custom/noop.pre.sh b/csit/config/drools-pdp/custom/noop.pre.sh
new file mode 100755
index 00000000..63bdc4cf
--- /dev/null
+++ b/csit/config/drools-pdp/custom/noop.pre.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -x
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 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=========================================================
+
+sed -i "s/^dmaap/noop/g" \
+ ${POLICY_HOME}/config/engine.properties \
+ ${POLICY_HOME}/config/feature-lifecycle.properties
+
+chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties
diff --git a/csit/config/drools-pdp/env/base.conf b/csit/config/drools-pdp/env/base.conf
new file mode 100644
index 00000000..4bd7632b
--- /dev/null
+++ b/csit/config/drools-pdp/env/base.conf
@@ -0,0 +1,140 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2021 Bell Canada. 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=========================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+DEBUG=y
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+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://nexus:8081/nexus/content/repositories/snapshots/
+RELEASE_REPOSITORY_ID=policy-nexus-releases
+RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/
+REPOSITORY_USERNAME=admin
+REPOSITORY_PASSWORD=admin123
+REPOSITORY_OFFLINE=false
+
+# Relational (SQL) DB access
+
+SQL_HOST=mariadb
+SQL_USER=policy_user
+SQL_PASSWORD=policy_user
+SQL_PORT=3306
+
+# AAF
+
+AAF=false
+AAF_NAMESPACE=org.onap.policy
+AAF_HOST=aaf.api.simpledemo.onap.org
+
+# HTTP Servers
+
+HTTP_SERVER_HTTPS=false
+PROMETHEUS=true
+
+# PDP-D DMaaP configuration channel
+
+PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+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=
+PAP_USERNAME=
+PAP_PASSWORD=
+
+# PDP-X
+
+PDP_HOST=
+PDP_PORT=
+PDP_CONTEXT_URI=policy/pdpx/v1/
+PDP_USERNAME=
+PDP_PASSWORD=
+PDP_CLIENT_USERNAME=
+PDP_CLIENT_PASSWORD=
+PDP_ENVIRONMENT=
+GUARD_DISABLED=false
+
+# DCAE DMaaP
+
+DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
+DCAE_SERVERS=
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# Open DMaaP
+
+DMAAP_SERVERS=mr.api.simpledemo.onap.org
+DMAAP_HTTPS=false
+
+# AAI
+
+AAI_HOST=aai.api.simpledemo.onap.org
+AAI_PORT=8443
+AAI_CONTEXT_URI=
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_HOST=vm1.mso.simpledemo.onap.org
+SO_PORT=8080
+SO_CONTEXT_URI=onap/so/infra/
+SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD=password1$
+
+# VFC
+
+VFC_HOST=
+VFC_PORT=
+VFC_CONTEXT_URI=api/nslcm/v1/
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_HOST=
+SDNC_PORT=
+SDNC_CONTEXT_URI=restconf/operations/
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/csit/config/drools-pdp/groups.json b/csit/config/drools-pdp/groups.json
new file mode 100644
index 00000000..6ee30e1c
--- /dev/null
+++ b/csit/config/drools-pdp/groups.json
@@ -0,0 +1,137 @@
+{
+ "groups": [
+ {
+ "name": "defaultGroup",
+ "version": "1.0.0",
+ "description": "The default group that registers all supported policy types and pdps.",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "xacml",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.MinMax",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Blacklist",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Filter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.AffinityPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.DistancePolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.HpaPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.OptimizationPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.PciPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.QueryPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.SubscriberPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.Vim_fit",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.VnfPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Xacml",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.Naming",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.match.*",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": [
+ {
+ "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "pdpType": "drools",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Drools",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.drools.Controller",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.drools.Artifact",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": []
+ },
+ {
+ "pdpType": "apex",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Apex",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Apex",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": []
+ }
+ ]
+ }
+ ]
+}