aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2019-04-19 14:13:54 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-19 14:13:54 +0000
commit2d3f0db728f0e4c24e4a5461edea4a4ffa97d97b (patch)
treeddda596c0a7c17d49cbe5e0bb92016af526dd717
parentd5a328362ad6e1ff2160d16d100a0b05960bc4e4 (diff)
parent3f9a0960ae775678d1e1d4b598b593b59146cb0f (diff)
Merge "Finish drools CSIT infra"
-rwxr-xr-xplans/policy/drools-applications/setup.sh58
-rwxr-xr-xplans/policy/drools-applications/teardown.sh (renamed from scripts/policy/mock-hello.sh)19
-rw-r--r--plans/policy/drools-applications/testplan.txt3
-rwxr-xr-xplans/policy/drools-pdp/setup.sh17
-rwxr-xr-xplans/policy/drools-pdp/teardown.sh1
-rwxr-xr-xplans/policy/health/setup.sh21
-rwxr-xr-xplans/policy/health/teardown.sh1
-rw-r--r--plans/policy/health/testplan.txt2
-rw-r--r--scripts/policy/config/drools/base.conf119
-rw-r--r--scripts/policy/config/drools/feature-healthcheck.conf18
-rw-r--r--scripts/policy/docker-compose-drools-apps.yml47
-rw-r--r--scripts/policy/docker-compose-drools.yml55
-rw-r--r--scripts/policy/docker-compose-engine.yml75
-rwxr-xr-xscripts/policy/engine.sh (renamed from scripts/policy/script1.sh)2
-rw-r--r--tests/policy/drools-applications/drools-applications-test.robot17
-rw-r--r--tests/policy/engine/Policy-CSIT.robot (renamed from tests/policy/suite1/Policy-CSIT.robot)0
-rw-r--r--tests/policy/engine/__init__.robot (renamed from tests/policy/suite1/__init__.robot)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE.template (renamed from tests/policy/suite1/configpolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE_R1.template (renamed from tests/policy/suite1/configpolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS.template (renamed from tests/policy/suite1/configpolicy_vDNS.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS_R1.template (renamed from tests/policy/suite1/configpolicy_vDNS_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW.template (renamed from tests/policy/suite1/configpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW_R1.template (renamed from tests/policy/suite1/configpolicy_vFW_R1.template)0
-rw-r--r--tests/policy/engine/createpolicy.template (renamed from tests/policy/suite1/createpolicy.template)0
-rw-r--r--tests/policy/engine/deletepolicy.template (renamed from tests/policy/suite1/deletepolicy.template)0
-rw-r--r--tests/policy/engine/getconfigpolicy.template (renamed from tests/policy/suite1/getconfigpolicy.template)0
-rw-r--r--tests/policy/engine/getoofpolicy.template (renamed from tests/policy/suite1/getoofpolicy.template)0
-rw-r--r--tests/policy/engine/global_properties.robot (renamed from tests/policy/suite1/global_properties.robot)0
-rw-r--r--tests/policy/engine/json_templater.robot (renamed from tests/policy/suite1/json_templater.robot)0
-rw-r--r--tests/policy/engine/listpolicy.template (renamed from tests/policy/suite1/listpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_pushpolicy.template (renamed from tests/policy/suite1/multiple_pushpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_unpushpolicy.template (renamed from tests/policy/suite1/multiple_unpushpolicy.template)0
-rw-r--r--tests/policy/engine/oofpolicy_HPA_R1.template (renamed from tests/policy/suite1/oofpolicy_HPA_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS.template (renamed from tests/policy/suite1/opspolicy_VDNS.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS_R1.template (renamed from tests/policy/suite1/opspolicy_VDNS_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW.template (renamed from tests/policy/suite1/opspolicy_VFW.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW_R1.template (renamed from tests/policy/suite1/opspolicy_VFW_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE.template (renamed from tests/policy/suite1/opspolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE_R1.template (renamed from tests/policy/suite1/opspolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE.template (renamed from tests/policy/suite1/opspolicy_vOLTE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE_R1.template (renamed from tests/policy/suite1/opspolicy_vOLTE_R1.template)0
-rw-r--r--tests/policy/engine/policy_interface.robot (renamed from tests/policy/suite1/policy_interface.robot)0
-rw-r--r--tests/policy/engine/pushpolicy.template (renamed from tests/policy/suite1/pushpolicy.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vFW.template (renamed from tests/policy/suite1/sdncnamingpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vPG.template (renamed from tests/policy/suite1/sdncnamingpolicy_vPG.template)0
45 files changed, 401 insertions, 54 deletions
diff --git a/plans/policy/drools-applications/setup.sh b/plans/policy/drools-applications/setup.sh
new file mode 100755
index 00000000..24422a63
--- /dev/null
+++ b/plans/policy/drools-applications/setup.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# ============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=========================================================
+
+echo "Uninstall docker-py and reinstall docker."
+pip uninstall -y docker-py
+pip uninstall -y docker
+pip install -U docker==2.7.0
+
+docker login -u docker -p docker nexus3.onap.org:10001
+
+# Adding this waiting container to avoid race condition between api and mariadb containers.
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml run --rm start_dependencies
+docker logs mariadb
+docker container ls -a
+
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml up -d
+sleep 1m
+
+docker logs mariadb
+docker logs drools
+docker container ls -a
+
+POLICY_DROOLS_IP=`get-instance-ip.sh drools`
+MARIADB_IP=`get-instance-ip.sh mariadb`
+
+echo DROOLS IP IS ${POLICY_DROOLS_IP}
+echo MARIADB IP IS ${MARIADB_IP}
+
+# Wait for initialization
+for i in {1..10}; do
+ curl -sS ${MARIADB_IP}:3306 && break
+ echo sleep $i
+ sleep $i
+done
+
+for i in {1..10}; do
+ curl -sS ${POLICY_DROOLS_IP}:6969 && break
+ echo sleep $i
+ sleep $i
+done
+
+ROBOT_VARIABLES="-v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}"
diff --git a/scripts/policy/mock-hello.sh b/plans/policy/drools-applications/teardown.sh
index 6092dcba..48ab171d 100755
--- a/scripts/policy/mock-hello.sh
+++ b/plans/policy/drools-applications/teardown.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright 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.
@@ -14,18 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# $1 ip address of the mock server
-
-curl -v -X PUT -d @- http://$1:1080/expectation <<EOF
-{
- "httpRequest": {
- "method": "GET",
- "path": "/hello"
- },
- "httpResponse": {
- "body": "Hello world!",
- "statusCode": 200
- }
-}
-EOF
-
+kill-instance.sh drools
+kill-instance.sh mariadb
diff --git a/plans/policy/drools-applications/testplan.txt b/plans/policy/drools-applications/testplan.txt
new file mode 100644
index 00000000..3878a4e2
--- /dev/null
+++ b/plans/policy/drools-applications/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+policy/drools-applications
diff --git a/plans/policy/drools-pdp/setup.sh b/plans/policy/drools-pdp/setup.sh
index a7ed4408..459805be 100755
--- a/plans/policy/drools-pdp/setup.sh
+++ b/plans/policy/drools-pdp/setup.sh
@@ -17,25 +17,10 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
-docker run --name i-mock -d jamesdbloom/mockserver
-MOCK_IP=`get-instance-ip.sh i-mock`
-echo ${MOCK_IP}
-
-docker inspect i-mock
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS ${MOCK_IP}:1080 && break
- echo sleep $i
- sleep $i
-done
-
-${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP}
-
source ${WORKSPACE}/scripts/policy/drools-pdp-script.sh
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
+ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
export PDP_IP=${PDP_IP}
export POLICY_IP=${POLICY_IP}
export DOCKER_IP=${DOCKER_IP}
diff --git a/plans/policy/drools-pdp/teardown.sh b/plans/policy/drools-pdp/teardown.sh
index f1f0b21c..303ccff1 100755
--- a/plans/policy/drools-pdp/teardown.sh
+++ b/plans/policy/drools-pdp/teardown.sh
@@ -24,7 +24,6 @@ docker rm -v "${name}"
mkdir -p "${WORKSPACE}"/archives
-kill_instance i-mock
kill_instance drools
kill_instance pdp
kill_instance brmsgw
diff --git a/plans/policy/health/setup.sh b/plans/policy/health/setup.sh
index 890df9b4..c99af3fa 100755
--- a/plans/policy/health/setup.sh
+++ b/plans/policy/health/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright 2017, 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.
@@ -17,25 +17,10 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
-docker run --name i-mock -d jamesdbloom/mockserver
-MOCK_IP=`get-instance-ip.sh i-mock`
-echo ${MOCK_IP}
-
-docker inspect i-mock
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS ${MOCK_IP}:1080 && break
- echo sleep $i
- sleep $i
-done
-
-${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP}
-
-source ${WORKSPACE}/scripts/policy/script1.sh
+source ${WORKSPACE}/scripts/policy/engine.sh
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
+ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
export PDP_IP=${PDP_IP}
export POLICY_IP=${POLICY_IP}
export DOCKER_IP=${DOCKER_IP}
diff --git a/plans/policy/health/teardown.sh b/plans/policy/health/teardown.sh
index f1f0b21c..303ccff1 100755
--- a/plans/policy/health/teardown.sh
+++ b/plans/policy/health/teardown.sh
@@ -24,7 +24,6 @@ docker rm -v "${name}"
mkdir -p "${WORKSPACE}"/archives
-kill_instance i-mock
kill_instance drools
kill_instance pdp
kill_instance brmsgw
diff --git a/plans/policy/health/testplan.txt b/plans/policy/health/testplan.txt
index ab8a5b08..6bad34fc 100644
--- a/plans/policy/health/testplan.txt
+++ b/plans/policy/health/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-policy/suite1
+policy/engine
diff --git a/scripts/policy/config/drools/base.conf b/scripts/policy/config/drools/base.conf
new file mode 100644
index 00000000..d3164cb5
--- /dev/null
+++ b/scripts/policy/config/drools/base.conf
@@ -0,0 +1,119 @@
+# ============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.
+# ============LICENSE_END=========================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# 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=
+SNAPSHOT_REPOSITORY_URL=
+RELEASE_REPOSITORY_ID=
+RELEASE_REPOSITORY_URL=
+REPOSITORY_USERNAME=
+REPOSITORY_PASSWORD=
+
+# Relational (SQL) DB access
+
+SQL_HOST=
+SQL_USER=
+SQL_PASSWORD=
+
+# AAF
+
+AAF=false
+AAF_NAMESPACE=org.onap.policy
+AAF_HOST=aaf.api.simpledemo.onap.org
+
+# 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
+PAP_USERNAME=testpap
+PAP_PASSWORD=alpha123
+
+# PDP-X
+
+PDP_HOST=pdp
+PDP_USERNAME=testpdp
+PDP_PASSWORD=alpha123
+PDP_CLIENT_USERNAME=python
+PDP_CLIENT_PASSWORD=test
+PDP_ENVIRONMENT=TEST
+
+# DCAE DMaaP
+
+DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
+DCAE_SERVERS=mr.api.simpledemo.onap.org
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# Open DMaaP
+
+DMAAP_SERVERS=mr.api.simpledemo.onap.org
+
+# AAI
+
+AAI_URL=https://aai.api.simpledemo.onap.org:8443
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD=password1$
+
+# VFC
+
+VFC_URL=
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_URL=
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/scripts/policy/config/drools/feature-healthcheck.conf b/scripts/policy/config/drools/feature-healthcheck.conf
new file mode 100644
index 00000000..c205e9f7
--- /dev/null
+++ b/scripts/policy/config/drools/feature-healthcheck.conf
@@ -0,0 +1,18 @@
+# ============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.
+# ============LICENSE_END=========================================================
+
+HEALTHCHECK_USER=demo@people.osaaf.org
+HEALTHCHECK_PASSWORD=demo123456!
diff --git a/scripts/policy/docker-compose-drools-apps.yml b/scripts/policy/docker-compose-drools-apps.yml
new file mode 100644
index 00000000..a42c2996
--- /dev/null
+++ b/scripts/policy/docker-compose-drools-apps.yml
@@ -0,0 +1,47 @@
+# Copyright 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file:
+ - ${WORKSPACE}/scripts/policy/config/db/db.conf
+ volumes:
+ - ${WORKSPACE}/scripts/policy/config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ drools:
+ image: nexus3.onap.org:10001/onap/policy-pdpd-cl:1.4-SNAPSHOT-latest
+ container_name: drools
+ depends_on:
+ - mariadb
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ${WORKSPACE}/scripts/policy/config/drools:/tmp/policy-install/config
+ environment:
+ - DEBUG=y
+ start_dependencies:
+ image: dadarek/wait-for-dependencies
+ container_name: policy-wait
+ depends_on:
+ - mariadb
+ hostname: policy-wait
+ command: mariadb:3306
+
diff --git a/scripts/policy/docker-compose-drools.yml b/scripts/policy/docker-compose-drools.yml
new file mode 100644
index 00000000..ffee9cdc
--- /dev/null
+++ b/scripts/policy/docker-compose-drools.yml
@@ -0,0 +1,55 @@
+# 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file: config/db/db.conf
+ volumes:
+ - ./config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ nexus:
+ image: sonatype/nexus:2.14.8-01
+ container_name: nexus
+ hostname: nexus
+ pap:
+ image: onap/policy-pe
+ environment:
+ - PRELOAD_POLICIES=${PRELOAD_POLICIES}
+ container_name: pap
+ depends_on:
+ - mariadb
+ hostname: pap
+ expose:
+ - 8443
+ - 9091
+ command: pap
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ drools:
+ image: onap/policy-drools
+ container_name: drools
+ depends_on:
+ - mariadb
+ - nexus
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools:/tmp/policy-install/config
diff --git a/scripts/policy/docker-compose-engine.yml b/scripts/policy/docker-compose-engine.yml
new file mode 100644
index 00000000..e67729e2
--- /dev/null
+++ b/scripts/policy/docker-compose-engine.yml
@@ -0,0 +1,75 @@
+# 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file: config/db/db.conf
+ volumes:
+ - ./config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ nexus:
+ image: sonatype/nexus:2.14.8-01
+ container_name: nexus
+ hostname: nexus
+ pap:
+ image: onap/policy-pe
+ environment:
+ - PRELOAD_POLICIES=${PRELOAD_POLICIES}
+ container_name: pap
+ depends_on:
+ - mariadb
+ hostname: pap
+ expose:
+ - 8443
+ - 9091
+ command: pap
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ pdp:
+ image: onap/policy-pe
+ container_name: pdp
+ depends_on:
+ - pap
+ hostname: pdp
+ expose:
+ - 8081
+ command: pdp
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ brmsgw:
+ image: onap/policy-pe
+ container_name: brmsgw
+ depends_on:
+ - pap
+ hostname: brmsgw
+ command: brmsgw
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ drools:
+ image: onap/policy-drools
+ container_name: drools
+ depends_on:
+ - mariadb
+ - nexus
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools:/tmp/policy-install/config
diff --git a/scripts/policy/script1.sh b/scripts/policy/engine.sh
index c47c4bf8..b806cec5 100755
--- a/scripts/policy/script1.sh
+++ b/scripts/policy/engine.sh
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-echo "This is ${WORKSPACE}/scripts/policy/script1.sh"
+echo "This is ${WORKSPACE}/scripts/policy/engine.sh"
# the directory of the script
diff --git a/tests/policy/drools-applications/drools-applications-test.robot b/tests/policy/drools-applications/drools-applications-test.robot
new file mode 100644
index 00000000..cf4d3cea
--- /dev/null
+++ b/tests/policy/drools-applications/drools-applications-test.robot
@@ -0,0 +1,17 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Test Cases ***
+Alive
+ [Documentation] Runs Policy PDP Alive Check
+ ${auth}= Create List demo@people.osaaf.org demo123456!
+ Log Creating session https://${POLICY_DROOLS_IP}:9696
+ ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pdp/engine headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['alive']} True
diff --git a/tests/policy/suite1/Policy-CSIT.robot b/tests/policy/engine/Policy-CSIT.robot
index 514cc840..514cc840 100644
--- a/tests/policy/suite1/Policy-CSIT.robot
+++ b/tests/policy/engine/Policy-CSIT.robot
diff --git a/tests/policy/suite1/__init__.robot b/tests/policy/engine/__init__.robot
index c7970e6a..c7970e6a 100644
--- a/tests/policy/suite1/__init__.robot
+++ b/tests/policy/engine/__init__.robot
diff --git a/tests/policy/suite1/configpolicy_vCPE.template b/tests/policy/engine/configpolicy_vCPE.template
index e3e3a2d0..e3e3a2d0 100644
--- a/tests/policy/suite1/configpolicy_vCPE.template
+++ b/tests/policy/engine/configpolicy_vCPE.template
diff --git a/tests/policy/suite1/configpolicy_vCPE_R1.template b/tests/policy/engine/configpolicy_vCPE_R1.template
index 77653c3f..77653c3f 100644
--- a/tests/policy/suite1/configpolicy_vCPE_R1.template
+++ b/tests/policy/engine/configpolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/configpolicy_vDNS.template b/tests/policy/engine/configpolicy_vDNS.template
index ab1d2e0d..ab1d2e0d 100644
--- a/tests/policy/suite1/configpolicy_vDNS.template
+++ b/tests/policy/engine/configpolicy_vDNS.template
diff --git a/tests/policy/suite1/configpolicy_vDNS_R1.template b/tests/policy/engine/configpolicy_vDNS_R1.template
index 185a7c72..185a7c72 100644
--- a/tests/policy/suite1/configpolicy_vDNS_R1.template
+++ b/tests/policy/engine/configpolicy_vDNS_R1.template
diff --git a/tests/policy/suite1/configpolicy_vFW.template b/tests/policy/engine/configpolicy_vFW.template
index 39e99e7b..39e99e7b 100644
--- a/tests/policy/suite1/configpolicy_vFW.template
+++ b/tests/policy/engine/configpolicy_vFW.template
diff --git a/tests/policy/suite1/configpolicy_vFW_R1.template b/tests/policy/engine/configpolicy_vFW_R1.template
index 067ed07f..067ed07f 100644
--- a/tests/policy/suite1/configpolicy_vFW_R1.template
+++ b/tests/policy/engine/configpolicy_vFW_R1.template
diff --git a/tests/policy/suite1/createpolicy.template b/tests/policy/engine/createpolicy.template
index 7c693e84..7c693e84 100644
--- a/tests/policy/suite1/createpolicy.template
+++ b/tests/policy/engine/createpolicy.template
diff --git a/tests/policy/suite1/deletepolicy.template b/tests/policy/engine/deletepolicy.template
index 55510102..55510102 100644
--- a/tests/policy/suite1/deletepolicy.template
+++ b/tests/policy/engine/deletepolicy.template
diff --git a/tests/policy/suite1/getconfigpolicy.template b/tests/policy/engine/getconfigpolicy.template
index 611e65d0..611e65d0 100644
--- a/tests/policy/suite1/getconfigpolicy.template
+++ b/tests/policy/engine/getconfigpolicy.template
diff --git a/tests/policy/suite1/getoofpolicy.template b/tests/policy/engine/getoofpolicy.template
index 37fe0471..37fe0471 100644
--- a/tests/policy/suite1/getoofpolicy.template
+++ b/tests/policy/engine/getoofpolicy.template
diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/engine/global_properties.robot
index e0c816ea..e0c816ea 100644
--- a/tests/policy/suite1/global_properties.robot
+++ b/tests/policy/engine/global_properties.robot
diff --git a/tests/policy/suite1/json_templater.robot b/tests/policy/engine/json_templater.robot
index a1cc7e35..a1cc7e35 100644
--- a/tests/policy/suite1/json_templater.robot
+++ b/tests/policy/engine/json_templater.robot
diff --git a/tests/policy/suite1/listpolicy.template b/tests/policy/engine/listpolicy.template
index aef17a23..aef17a23 100644
--- a/tests/policy/suite1/listpolicy.template
+++ b/tests/policy/engine/listpolicy.template
diff --git a/tests/policy/suite1/multiple_pushpolicy.template b/tests/policy/engine/multiple_pushpolicy.template
index 5f20b647..5f20b647 100644
--- a/tests/policy/suite1/multiple_pushpolicy.template
+++ b/tests/policy/engine/multiple_pushpolicy.template
diff --git a/tests/policy/suite1/multiple_unpushpolicy.template b/tests/policy/engine/multiple_unpushpolicy.template
index afee7aeb..afee7aeb 100644
--- a/tests/policy/suite1/multiple_unpushpolicy.template
+++ b/tests/policy/engine/multiple_unpushpolicy.template
diff --git a/tests/policy/suite1/oofpolicy_HPA_R1.template b/tests/policy/engine/oofpolicy_HPA_R1.template
index 3a170b20..3a170b20 100644
--- a/tests/policy/suite1/oofpolicy_HPA_R1.template
+++ b/tests/policy/engine/oofpolicy_HPA_R1.template
diff --git a/tests/policy/suite1/opspolicy_VDNS.template b/tests/policy/engine/opspolicy_VDNS.template
index 801773d5..801773d5 100644
--- a/tests/policy/suite1/opspolicy_VDNS.template
+++ b/tests/policy/engine/opspolicy_VDNS.template
diff --git a/tests/policy/suite1/opspolicy_VDNS_R1.template b/tests/policy/engine/opspolicy_VDNS_R1.template
index 92627cc2..92627cc2 100644
--- a/tests/policy/suite1/opspolicy_VDNS_R1.template
+++ b/tests/policy/engine/opspolicy_VDNS_R1.template
diff --git a/tests/policy/suite1/opspolicy_VFW.template b/tests/policy/engine/opspolicy_VFW.template
index 224f5cf4..224f5cf4 100644
--- a/tests/policy/suite1/opspolicy_VFW.template
+++ b/tests/policy/engine/opspolicy_VFW.template
diff --git a/tests/policy/suite1/opspolicy_VFW_R1.template b/tests/policy/engine/opspolicy_VFW_R1.template
index a93063f7..a93063f7 100644
--- a/tests/policy/suite1/opspolicy_VFW_R1.template
+++ b/tests/policy/engine/opspolicy_VFW_R1.template
diff --git a/tests/policy/suite1/opspolicy_vCPE.template b/tests/policy/engine/opspolicy_vCPE.template
index c17a1bc6..c17a1bc6 100644
--- a/tests/policy/suite1/opspolicy_vCPE.template
+++ b/tests/policy/engine/opspolicy_vCPE.template
diff --git a/tests/policy/suite1/opspolicy_vCPE_R1.template b/tests/policy/engine/opspolicy_vCPE_R1.template
index 36695daa..36695daa 100644
--- a/tests/policy/suite1/opspolicy_vCPE_R1.template
+++ b/tests/policy/engine/opspolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE.template b/tests/policy/engine/opspolicy_vOLTE.template
index e43a3e6f..e43a3e6f 100644
--- a/tests/policy/suite1/opspolicy_vOLTE.template
+++ b/tests/policy/engine/opspolicy_vOLTE.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE_R1.template b/tests/policy/engine/opspolicy_vOLTE_R1.template
index ff5fc42c..ff5fc42c 100644
--- a/tests/policy/suite1/opspolicy_vOLTE_R1.template
+++ b/tests/policy/engine/opspolicy_vOLTE_R1.template
diff --git a/tests/policy/suite1/policy_interface.robot b/tests/policy/engine/policy_interface.robot
index 745f7817..745f7817 100644
--- a/tests/policy/suite1/policy_interface.robot
+++ b/tests/policy/engine/policy_interface.robot
diff --git a/tests/policy/suite1/pushpolicy.template b/tests/policy/engine/pushpolicy.template
index 7e236e3d..7e236e3d 100644
--- a/tests/policy/suite1/pushpolicy.template
+++ b/tests/policy/engine/pushpolicy.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vFW.template b/tests/policy/engine/sdncnamingpolicy_vFW.template
index d9c773d1..d9c773d1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vFW.template
+++ b/tests/policy/engine/sdncnamingpolicy_vFW.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vPG.template b/tests/policy/engine/sdncnamingpolicy_vPG.template
index 9bae20a1..9bae20a1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vPG.template
+++ b/tests/policy/engine/sdncnamingpolicy_vPG.template