Update detmVers script for snapshots 95/129795/15
authorliamfallon <liam.fallon@est.tech>
Tue, 5 Jul 2022 17:49:34 +0000 (18:49 +0100)
committerliamfallon <liam.fallon@est.tech>
Fri, 15 Jul 2022 11:27:40 +0000 (12:27 +0100)
The current script assumes that snapshot versions are always available.
However the Linux Foundation has now implemented a policy of deleting
snapshots on no-master branches that are older than a certain age. THis
breaks our CSITs.

This updated script copes with this by checking if a snapshot is
avaialable and, if the snapshot is not available, the script falls back
to the released version.

This script will be needed on other branches besides master as well.

CLAMP TOSCA Control Loop was not in Honolulu and the CLAMP CSITs ran
separately in the CLAMP repo. We ported the CSITs over to the
policy/docker repo in Istanbul. Therefore, we need to disable the CLAMP
CSITs in policy/docker in honolulu

Issue-ID: POLICY-4233
Change-Id: I83f0a6816942d5bfaef7c22fc69625f40ae74d23
Signed-off-by: liamfallon <liam.fallon@est.tech>
21 files changed:
csit/apex-pdp/plans/setup.sh
csit/clamp/plans/setup.sh [new file with mode: 0644]
csit/clamp/plans/teardown.sh [new file with mode: 0644]
csit/clamp/plans/testplan.txt [new file with mode: 0644]
csit/clamp/tests/policy-clamp-test.robot [new file with mode: 0644]
csit/config/apex-pdp/OnapPfConfig.json
csit/config/drools-apps/custom/policy-keystore [new file with mode: 0644]
csit/config/drools-apps/custom/policy-truststore [new file with mode: 0644]
csit/config/drools-apps/env/base.conf
csit/config/drools/custom/policy-keystore [new file with mode: 0644]
csit/config/drools/custom/policy-truststore [new file with mode: 0644]
csit/config/ks.jks [new file with mode: 0644]
csit/config/pap/defaultConfig.json
csit/config/policy-truststore [new file with mode: 0644]
csit/config/xacml-pdp/defaultConfig.json
csit/detmVers.sh
csit/distribution/plans/setup.sh
csit/docker-compose-all.yml
csit/drools-applications/plans/setup.sh
csit/wait_for_port.sh
csit/xacml-pdp/plans/setup.sh

index a81e944..7876e90 100644 (file)
@@ -39,7 +39,7 @@ POLICY_API_IP=`get-instance-ip.sh policy-api`
 POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
 MARIADB_IP=`get-instance-ip.sh mariadb`
 APEX_IP=`get-instance-ip.sh policy-apex-pdp`
-DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
+DMAAP_IP=`get-instance-ip.sh simulator`
 
 echo PAP IP IS ${POLICY_PAP_IP}
 echo MARIADB IP IS ${MARIADB_IP}
diff --git a/csit/clamp/plans/setup.sh b/csit/clamp/plans/setup.sh
new file mode 100644 (file)
index 0000000..05fe68d
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2022 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
diff --git a/csit/clamp/plans/teardown.sh b/csit/clamp/plans/teardown.sh
new file mode 100644 (file)
index 0000000..05fe68d
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2022 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
diff --git a/csit/clamp/plans/testplan.txt b/csit/clamp/plans/testplan.txt
new file mode 100644 (file)
index 0000000..3c4f4bc
--- /dev/null
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
+# Place the suites in run order.
+policy-clamp-test.robot
diff --git a/csit/clamp/tests/policy-clamp-test.robot b/csit/clamp/tests/policy-clamp-test.robot
new file mode 100644 (file)
index 0000000..8229187
--- /dev/null
@@ -0,0 +1,3 @@
+*** Test Cases ***
+iDummy CLAMP Honolulu Robot Test
+    Log To Console            CLAMP Robot tests are in the policy/clamp repo in Honolulu
index 59ba604..d6deee3 100644 (file)
     "topicParameterGroup": {
         "topicSources" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps" : true,
             "allowSelfSignedCerts" : true
         }],
         "topicSinks" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps" : true,
             "allowSelfSignedCerts" : true
diff --git a/csit/config/drools-apps/custom/policy-keystore b/csit/config/drools-apps/custom/policy-keystore
new file mode 100644 (file)
index 0000000..76e9392
Binary files /dev/null and b/csit/config/drools-apps/custom/policy-keystore differ
diff --git a/csit/config/drools-apps/custom/policy-truststore b/csit/config/drools-apps/custom/policy-truststore
new file mode 100644 (file)
index 0000000..d9730c4
Binary files /dev/null and b/csit/config/drools-apps/custom/policy-truststore differ
index 673cfaf..5b08d34 100644 (file)
@@ -91,16 +91,16 @@ PDP_ENVIRONMENT=TEST
 # DCAE DMaaP
 
 DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
-DCAE_SERVERS=policy.api.simpledemo.onap.org
+DCAE_SERVERS=simulator
 DCAE_CONSUMER_GROUP=dcae.policy.shared
 
 # Open DMaaP
 
-DMAAP_SERVERS=policy.api.simpledemo.onap.org
+DMAAP_SERVERS=simulator
 
 # AAI
 
-AAI_HOST=policy.api.simpledemo.onap.org
+AAI_HOST=simulator
 AAI_PORT=6666
 AAI_CONTEXT_URI=
 AAI_USERNAME=policy@policy.onap.org
@@ -108,16 +108,16 @@ AAI_PASSWORD=demo123456!
 
 # MSO
 
-SO_HOST=policy.api.simpledemo.onap.org
+SO_HOST=simulator
 SO_PORT=6669
 SO_CONTEXT_URI=
-SO_URL=https://policy.api.simpledemo.onap.org:6669/
+SO_URL=https://simulator:6669/
 SO_USERNAME=InfraPortalClient
 SO_PASSWORD=password1$
 
 # VFC
 
-VFC_HOST=policy.api.simpledemo.onap.org
+VFC_HOST=simulator
 VFC_PORT=6670
 VFC_CONTEXT_URI=
 VFC_USERNAME=
@@ -125,7 +125,7 @@ VFC_PASSWORD=
 
 # SDNC
 
-SDNC_HOST=policy.api.simpledemo.onap.org
+SDNC_HOST=simulator
 SDNC_PORT=6668
 SDNC_CONTEXT_URI=
 SDNC_USERNAME=
diff --git a/csit/config/drools/custom/policy-keystore b/csit/config/drools/custom/policy-keystore
new file mode 100644 (file)
index 0000000..76e9392
Binary files /dev/null and b/csit/config/drools/custom/policy-keystore differ
diff --git a/csit/config/drools/custom/policy-truststore b/csit/config/drools/custom/policy-truststore
new file mode 100644 (file)
index 0000000..d9730c4
Binary files /dev/null and b/csit/config/drools/custom/policy-truststore differ
diff --git a/csit/config/ks.jks b/csit/config/ks.jks
new file mode 100644 (file)
index 0000000..76e9392
Binary files /dev/null and b/csit/config/ks.jks differ
index 1fabd54..0d324df 100644 (file)
     "topicParameterGroup": {
         "topicSources" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps": true,
             "allowSelfSignedCerts" : true
         }],
         "topicSinks" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps": true,
             "allowSelfSignedCerts" : true
         },
         {
             "topic" : "POLICY-NOTIFICATION",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps": true,
             "allowSelfSignedCerts" : true
diff --git a/csit/config/policy-truststore b/csit/config/policy-truststore
new file mode 100644 (file)
index 0000000..d9730c4
Binary files /dev/null and b/csit/config/policy-truststore differ
index f489919..6ff0739 100644 (file)
     "topicParameterGroup": {
         "topicSources" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps" : true,
             "allowSelfSignedCerts" : true
         }],
         "topicSinks" : [{
             "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "policy.api.simpledemo.onap.org" ],
+            "servers" : [ "simulator" ],
             "topicCommInfrastructure" : "dmaap",
             "useHttps" : true,
             "allowSelfSignedCerts" : true
index 1906292..7774199 100644 (file)
@@ -1,5 +1,9 @@
+#! /bin/bash
+
 # ============LICENSE_START====================================================
 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021-2022 Nordix Foundation.
+#  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.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END======================================================
 
-source ${SCRIPTS}/get-branch-mariadb.sh
 
+if [[ -z "$GERRIT_BRANCH" ]]
+then
+    source "${SCRIPTS}"/get-branch.sh
+else
+    echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+fi
+
+export POLICY_MARIADB_VER=10.5.8
 echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
 
-POLICY_MODELS_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION}
-
-POLICY_API_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_API_VERSION=${POLICY_API_VERSION}
-
-POLICY_PAP_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION}
-
-POLICY_XACML_PDP_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION}
-
-POLICY_DROOLS_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/drools-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION}
-
-POLICY_DROOLS_APPS_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION}
-
-POLICY_APEX_PDP_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION}
-
-POLICY_DISTRIBUTION_VERSION=$(
-    curl -q --silent \
-      https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} |
-    xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
-export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest
-echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION}
+export POLICY_POSTGRES_VER=11.1
+echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER}
+
+function getDockerVersion
+{
+    REPO=$1
+    DEFAULT_DOCKER_IMAGE_NAME=$2
+    DEFAULT_DOCKER_IMAGE_VERSION=$3
+
+    REPO_RELEASE_DATA=$(
+        curl -qL --silent \
+            "https://github.com/onap/policy-parent/raw/$GERRIT_BRANCH/integration/src/main/resources/release/pf_release_data.csv" |
+        grep "^policy/$REPO"
+    )
+
+    # shellcheck disable=SC2034
+    read -r repo \
+        latest_released_tag \
+        latest_snapshot_tag \
+        changed_files \
+        docker_images \
+        <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )"
+
+    if [[ -z "$docker_images" ]]
+    then
+        if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]]
+        then
+            echo "repo $REPO does not produce a docker image, execution terminated"
+            exit 1
+        else
+            docker_images="$DEFAULT_DOCKER_IMAGE_NAME"
+        fi
+    fi
+
+    docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}')
+    docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//")
+
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    fi
+
+    docker_image_version="$latest_released_tag"
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    fi
+
+    docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION"
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    else
+        echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\""
+        exit 1
+    fi
+}
+
+getDockerVersion docker
+export POLICY_DOCKER_VERSION="$docker_image_version"
+
+getDockerVersion models "'policy-models-simulator'" 2.6.4
+export POLICY_MODELS_VERSION="$docker_image_version"
+
+getDockerVersion api
+export POLICY_API_VERSION="$docker_image_version"
+
+getDockerVersion pap
+export POLICY_PAP_VERSION="$docker_image_version"
+
+getDockerVersion apex-pdp
+export POLICY_APEX_PDP_VERSION="$docker_image_version"
+
+getDockerVersion drools-pdp
+export POLICY_DROOLS_PDP_VERSION="$docker_image_version"
+
+getDockerVersion xacml-pdp
+export POLICY_XACML_PDP_VERSION="$docker_image_version"
+
+getDockerVersion distribution
+export POLICY_DISTRIBUTION_VERSION="$docker_image_version"
+
+getDockerVersion clamp
+export POLICY_CLAMP_VERSION="$docker_image_version"
+
+getDockerVersion drools-applications
+export POLICY_DROOLS_APPS_VERSION="$docker_image_version"
index 8fc2b9a..df0bdb1 100644 (file)
@@ -48,7 +48,7 @@ POLICY_API_IP=`get-instance-ip.sh policy-api`
 POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
 MARIADB_IP=`get-instance-ip.sh mariadb`
 APEX_IP=`get-instance-ip.sh policy-apex-pdp`
-DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
+DMAAP_IP=`get-instance-ip.sh simulator`
 POLICY_DISTRIBUTION_IP=`get-instance-ip.sh policy-distribution`
 
 echo PAP IP IS ${POLICY_PAP_IP}
index 8a46ab8..afdc364 100644 (file)
@@ -28,12 +28,14 @@ services:
          - ./config/db:/docker-entrypoint-initdb.d:ro
       expose:
        - 3306
-   policy.api.simpledemo.onap.org:
+   simulator:
       image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION}
-      container_name: policy.api.simpledemo.onap.org
-      hostname: policy.api.simpledemo.onap.org
+      container_name: simulator
+      hostname: simulator
       volumes:
        - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro
+       - ./config/ks.jks:/opt/app/policy/simulators/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/simulators/etc/ssl/policy-truststore:ro
       expose:
        - 6666
        - 6668
@@ -50,6 +52,8 @@ services:
        - 6969
       volumes:
        - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
+       - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/api/etc/ssl/policy-truststore:ro
       entrypoint: ./wait_for_port.sh
       command: [
         '-c', './policy-api.sh',
@@ -60,7 +64,7 @@ services:
       container_name: policy-pap
       depends_on:
        - mariadb
-       - policy.api.simpledemo.onap.org
+       - simulator
        - api
       hostname: policy-pap
       expose:
@@ -68,11 +72,13 @@ services:
       volumes:
        - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
        - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
+       - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/pap/etc/ssl/policy-truststore:ro
       entrypoint: ./wait_for_port.sh
       command: [
         '-c', './policy-pap.sh',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905',
+        'simulator', '3905',
         'api', '6969'
         ]
    xacml-pdp:
@@ -80,7 +86,7 @@ services:
       container_name: policy-xacml-pdp
       depends_on:
        - mariadb
-       - policy.api.simpledemo.onap.org
+       - simulator
        - pap
       hostname: policy-xacml-pdp
       expose:
@@ -88,19 +94,21 @@ services:
       volumes:
        - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
        - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
+       - ./config/ks.jks:/opt/app/policy/pdpx/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/pdpx/etc/ssl/policy-truststore:ro
       entrypoint: ./wait_for_port.sh
       command: [
         '-c', './policy-pdpx.sh',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905',
+        'simulator', '3905',
         'pap', '6969'
         ]
    drools:
-      image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_VERSION}
+      image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_PDP_VERSION}
       container_name: drools
       depends_on:
        - mariadb
-       - policy.api.simpledemo.onap.org
+       - simulator
        - pap
       hostname: drools
       expose:
@@ -115,14 +123,14 @@ services:
       command: [
         '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905'
+        'simulator', '3905'
         ]
    drools-apps:
       image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION}
       container_name: drools-apps
       depends_on:
        - mariadb
-       - policy.api.simpledemo.onap.org
+       - simulator
        - pap
        - xacml-pdp
       hostname: drools-apps
@@ -140,19 +148,19 @@ services:
       command: [
         '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905',
+        'simulator', '3905',
         'pap', '6969',
-        'policy.api.simpledemo.onap.org', '6666',
-        'policy.api.simpledemo.onap.org', '6668',
-        'policy.api.simpledemo.onap.org', '6669',
-        'policy.api.simpledemo.onap.org', '6670'
+        'simulator', '6666',
+        'simulator', '6668',
+        'simulator', '6669',
+        'simulator', '6670'
         ]
    apex-pdp:
       image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
       container_name: policy-apex-pdp
       depends_on:
        - mariadb
-       - policy.api.simpledemo.onap.org
+       - simulator
        - pap
       hostname: policy-apex-pdp
       expose:
@@ -160,12 +168,14 @@ services:
        - 23324
       volumes:
        - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/apex-pdp/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/apex-pdp/etc/ssl/policy-truststore:ro
        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
       entrypoint: /opt/app/policy/bin/wait_for_port.sh
       command: [
         '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905',
+        'simulator', '3905',
         'pap', '6969'
         ]
    distribution:
@@ -179,13 +189,15 @@ services:
       hostname: policy-distribution
       volumes:
        - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
+       - ./config/ks.jks:/opt/app/policy/distribution/etc/ssl/policy-keystore:ro
+       - ./config/policy-truststore:/opt/app/policy/distribution/etc/ssl/policy-truststore:ro
        - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro
        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
       entrypoint: /opt/app/policy/bin/wait_for_port.sh
       command: [
         '-c', './policy-dist.sh',
         'mariadb', '3306',
-        'policy.api.simpledemo.onap.org', '3905',
+        'simulator', '3905',
         'pap', '6969',
         'apex-pdp', '6969'
         ]
index 097b31c..438f82b 100755 (executable)
@@ -37,7 +37,7 @@ DROOLS_IP=`get-instance-ip.sh drools-apps`
 API_IP=`get-instance-ip.sh policy-api`
 PAP_IP=`get-instance-ip.sh policy-pap`
 XACML_IP=`get-instance-ip.sh policy-xacml-pdp`
-SIM_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
+SIM_IP=`get-instance-ip.sh simulator`
 export SIM_IP
 
 echo DROOLS IP IS ${DROOLS_IP}
index aec5f22..0eeb1c9 100755 (executable)
@@ -17,7 +17,7 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END======================================================
 
-tmout=120
+tmout=300
 cmd=
 while getopts c:t: opt; do
     case "$opt" in
index 93ce9bf..23ebf6f 100644 (file)
@@ -36,7 +36,7 @@ unset http_proxy https_proxy
 POLICY_API_IP=`get-instance-ip.sh policy-api`
 MARIADB_IP=`get-instance-ip.sh mariadb`
 POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp`
-SIM_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
+SIM_IP=`get-instance-ip.sh simulator`
 POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
 
 echo PDP IP IS ${POLICY_PDPX_IP}