blob: 718d5123bf43b924dcb2e1d25dffb445a8108a1b [file] [log] [blame]
Jim Hahn3486a922021-05-10 15:36:30 -04001#!/bin/bash
2# ============LICENSE_START=======================================================
3# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
arkadiusz.adamski2b1e8d02021-05-24 12:50:40 +01004# Modification Copyright 2021. Nordix Foundation.
Jim Hahn3486a922021-05-10 15:36:30 -04005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# SPDX-License-Identifier: Apache-2.0
19# ============LICENSE_END=========================================================
20source ${SCRIPTS}/get-branch-mariadb.sh
21
22echo "Uninstall docker-py and reinstall docker."
Jim Hahnfe3e91c2021-06-04 13:22:49 -040023python3 -m pip uninstall -y docker-py
24python3 -m pip uninstall -y docker
25python3 -m pip install -U docker
Jim Hahn3486a922021-05-10 15:36:30 -040026
27sudo apt-get -y install libxml2-utils
28bash ${SCRIPTS}/get-models-examples.sh
29
30source ${SCRIPTS}/detmVers.sh
31
32docker-compose -f ${SCRIPTS}/docker-compose-all.yml up -d xacml-pdp
33
34unset http_proxy https_proxy
35
36POLICY_API_IP=`get-instance-ip.sh policy-api`
37MARIADB_IP=`get-instance-ip.sh mariadb`
38POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp`
Jim Hahn3b56db72021-06-14 10:04:00 -040039SIM_IP=`get-instance-ip.sh simulator`
Jim Hahn3486a922021-05-10 15:36:30 -040040POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
41
Jim Hahnfa066162021-07-12 15:07:33 -040042export SIM_IP
43
Jim Hahn3486a922021-05-10 15:36:30 -040044echo PDP IP IS ${POLICY_PDPX_IP}
45echo API IP IS ${POLICY_API_IP}
46echo PAP IP IS ${POLICY_PAP_IP}
47echo MARIADB IP IS ${MARIADB_IP}
48echo SIM_IP IS ${SIM_IP}
49
50# wait for the app to start up
51${SCRIPTS}/wait_for_port.sh ${POLICY_PDPX_IP} 6969
52
53DATA2=${WORKSPACE}/models/models-examples/src/main/resources/policies
54
55ROBOT_VARIABLES=""
56ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCRIPTS}"
57ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}"
58ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}"
59ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
60ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"