blob: 8fc2b9ab0253a8ecb33bd3a7a1888b9e9069e55b [file] [log] [blame]
Jim Hahnb3a962f2021-05-12 11:33:43 -04001#!/bin/bash
2# ============LICENSE_START=======================================================
3# Copyright (C) 2018 Ericsson. All rights reserved.
4#
5# Modifications copyright (c) 2019 Nordix Foundation.
6# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
arkadiusz.adamski2b1e8d02021-05-24 12:50:40 +01007# Modification Copyright 2021. Nordix Foundation.
Jim Hahnb3a962f2021-05-12 11:33:43 -04008# ================================================================================
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20#
21# SPDX-License-Identifier: Apache-2.0
22# ============LICENSE_END=========================================================
23source ${SCRIPTS}/get-branch-mariadb.sh
24
25echo "Uninstall docker-py and reinstall docker."
Jim Hahnfe3e91c2021-06-04 13:22:49 -040026python3 -m pip uninstall -y docker-py
27python3 -m pip uninstall -y docker
28python3 -m pip install -U docker
Jim Hahnb3a962f2021-05-12 11:33:43 -040029
30sudo apt-get -y install libxml2-utils
31
32source ${SCRIPTS}/detmVers.sh
33
34SCRIPT_DIR=${TESTPLANDIR}/config
35
36# Remaking the csar file in case if the file got corrupted
37zip -F ${SCRIPT_DIR}/csar/sample_csar_with_apex_policy.csar --out ${SCRIPT_DIR}/csar/csar_temp.csar
38
39# Remake temp directory
40rm -rf ${SCRIPT_DIR}/temp
41mkdir ${SCRIPT_DIR}/temp
42
43docker-compose -f ${SCRIPTS}/docker-compose-all.yml up -d distribution
44
45unset http_proxy https_proxy
46
47POLICY_API_IP=`get-instance-ip.sh policy-api`
48POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
49MARIADB_IP=`get-instance-ip.sh mariadb`
50APEX_IP=`get-instance-ip.sh policy-apex-pdp`
51DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
52POLICY_DISTRIBUTION_IP=`get-instance-ip.sh policy-distribution`
53
54echo PAP IP IS ${POLICY_PAP_IP}
55echo MARIADB IP IS ${MARIADB_IP}
56echo API IP IS ${POLICY_API_IP}
57echo APEX IP IS ${APEX_IP}
58echo DMAAP_IP IS ${DMAAP_IP}
59echo POLICY_DISTRIBUTION_IP IS ${POLICY_DISTRIBUTION_IP}
60
61# wait for the app to start up
62${SCRIPTS}/wait_for_port.sh ${POLICY_DISTRIBUTION_IP} 6969
63
64ROBOT_VARIABLES=""
65ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}"
66ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPT_DIR:${SCRIPT_DIR}"
67ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_IP:${POLICY_DISTRIBUTION_IP}"