blob: c4cbfa602e5b57e33de1a1d6b65d20367b8f16dc [file] [log] [blame]
pdragosh3f9a0962019-04-16 13:19:45 -04001#!/bin/bash
Jim Hahn426ddc12020-04-14 15:19:53 -04002#
3# ===========LICENSE_START====================================================
a.sreekumar20705742020-02-14 12:03:33 +00004# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
Jim Hahn426ddc12020-04-14 15:19:53 -04005# ============================================================================
pdragosh3f9a0962019-04-16 13:19:45 -04006# 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.
Jim Hahn426ddc12020-04-14 15:19:53 -040017# ============LICENSE_END=====================================================
pdragosh3f9a0962019-04-16 13:19:45 -040018#
a.sreekumar20705742020-02-14 12:03:33 +000019
20# OS upgrades
21
Bilal Ad46ab2e2019-06-07 21:25:59 +000022source ${SCRIPTS}/policy/config/policy-csit.conf
pdragosh3f9a0962019-04-16 13:19:45 -040023
Jim Hahn426ddc12020-04-14 15:19:53 -040024SCR2=${WORKSPACE}/scripts/policy/drools-apps
25
pdragosh3f9a0962019-04-16 13:19:45 -040026echo "Uninstall docker-py and reinstall docker."
27pip uninstall -y docker-py
28pip uninstall -y docker
29pip install -U docker==2.7.0
30
Bilal Ad46ab2e2019-06-07 21:25:59 +000031sudo apt-get -y install libxml2-utils
Jim Hahn00532422020-09-17 17:03:34 -040032bash ${SCRIPTS}/policy/get-models-examples.sh
Jim Hahn426ddc12020-04-14 15:19:53 -040033
Jim Hahn00532422020-09-17 17:03:34 -040034source ${SCRIPTS}/policy/detmVers.sh
Jim Hahn426ddc12020-04-14 15:19:53 -040035
Jim Hahn00532422020-09-17 17:03:34 -040036docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d drools-apps
pdragosh3f9a0962019-04-16 13:19:45 -040037
Jim Hahn426ddc12020-04-14 15:19:53 -040038unset http_proxy https_proxy
pdragosh3f9a0962019-04-16 13:19:45 -040039
Jim Hahn00532422020-09-17 17:03:34 -040040DROOLS_IP=`get-instance-ip.sh drools-apps`
Jim Hahnf340ddb2020-04-15 08:43:54 -040041API_IP=`get-instance-ip.sh policy-api`
42PAP_IP=`get-instance-ip.sh policy-pap`
Jim Hahn426ddc12020-04-14 15:19:53 -040043XACML_IP=`get-instance-ip.sh policy-xacml-pdp`
44SIM_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
45export SIM_IP
pdragosh3f9a0962019-04-16 13:19:45 -040046
Jim Hahn426ddc12020-04-14 15:19:53 -040047echo DROOLS IP IS ${DROOLS_IP}
Jim Hahnf340ddb2020-04-15 08:43:54 -040048echo API IP IS ${API_IP}
49echo PAP IP IS ${PAP_IP}
Jim Hahn426ddc12020-04-14 15:19:53 -040050echo XACML IP IS ${XACML_IP}
51echo SIMULATORS IP IS ${SIM_IP}
pdragosh3f9a0962019-04-16 13:19:45 -040052
Jim Hahn00532422020-09-17 17:03:34 -040053# wait for the app to start up
54${SCRIPTS}/policy/wait_for_port.sh ${DROOLS_IP} 6969
55
Jim Hahn426ddc12020-04-14 15:19:53 -040056# give enough time for the controllers to come up
57sleep 15
a.sreekumar20705742020-02-14 12:03:33 +000058
Jim Hahn00532422020-09-17 17:03:34 -040059DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
Jim Hahn426ddc12020-04-14 15:19:53 -040060
61ROBOT_VARIABLES=""
62ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR2:${SCR2}"
Jim Hahnf340ddb2020-04-15 08:43:54 -040063ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
Jim Hahn426ddc12020-04-14 15:19:53 -040064ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_IP:${DROOLS_IP}"
Jim Hahnf340ddb2020-04-15 08:43:54 -040065ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_IP:${API_IP}"
66ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_IP:${PAP_IP}"
Jim Hahn426ddc12020-04-14 15:19:53 -040067ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_IP:${XACML_IP}"
68ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SIM_IP:${SIM_IP}"