blob: 166b8d77e89d25c4dd473526f2c0bf19b9716230 [file] [log] [blame]
Taka Choad5722d2021-02-26 11:23:52 -05001#!/bin/bash
2#
3# ===========LICENSE_START====================================================
4# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
5# ============================================================================
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# ============LICENSE_END=====================================================
18#
19source ${SCRIPTS}/get-branch-mariadb.sh
20
21echo "Uninstall docker-py and reinstall docker."
22pip uninstall -y docker-py
23pip uninstall -y docker
24pip install -U docker==2.7.0
25
26sudo apt-get -y install libxml2-utils
27
28bash ${SCRIPTS}/policy/get-models-examples.sh
29source ${SCRIPTS}/policy/detmVers.sh
30
31docker-compose -f ${SCRIPTS}/docker-compose-all.yml up -d drools-apps
32
33unset http_proxy https_proxy
34
35DROOLS_IP=`get-instance-ip.sh drools-apps`
36API_IP=`get-instance-ip.sh policy-api`
37PAP_IP=`get-instance-ip.sh policy-pap`
38XACML_IP=`get-instance-ip.sh policy-xacml-pdp`
39SIM_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
40export SIM_IP
41
42echo DROOLS IP IS ${DROOLS_IP}
43echo API IP IS ${API_IP}
44echo PAP IP IS ${PAP_IP}
45echo XACML IP IS ${XACML_IP}
46echo SIMULATORS IP IS ${SIM_IP}
47
48# wait for the app to start up
Taka Cho4c279712021-03-05 10:29:16 -050049${SCRIPTS}/wait_for_port.sh ${DROOLS_IP} 6969
Taka Choad5722d2021-02-26 11:23:52 -050050
51# give enough time for the controllers to come up
52sleep 15
53
54DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
55
56ROBOT_VARIABLES=""
57ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR2:${SCRIPTS}"
58ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
59ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_IP:${DROOLS_IP}"
60ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_IP:${API_IP}"
61ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_IP:${PAP_IP}"
62ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_IP:${XACML_IP}"
63ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SIM_IP:${SIM_IP}"