blob: f08126ecc00768f81f028f47abb9c30f7b8f96ae [file] [log] [blame]
Jim Hahnb3a962f2021-05-12 11:33:43 -04001#!/bin/bash
2# ============LICENSE_START=======================================================
3# Copyright 2017-2021 AT&T Intellectual Property. All rights reserved.
liamfallonf5a11b02023-02-10 22:01:43 +00004# Modifications Copyright 2021-2023 Nordix Foundation.
Jim Hahnb3a962f2021-05-12 11:33:43 -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=========================================================
Jim Hahnb3a962f2021-05-12 11:33:43 -040020
21echo "Uninstall docker-py and reinstall docker."
Jim Hahnfe3e91c2021-06-04 13:22:49 -040022python3 -m pip uninstall -y docker-py
23python3 -m pip uninstall -y docker
24python3 -m pip install -U docker
Jim Hahnb3a962f2021-05-12 11:33:43 -040025
26sudo apt-get -y install libxml2-utils
27
adheli.tavares7abe36c2022-02-02 14:53:10 +000028source "${SCRIPTS}"/get-versions.sh
Jim Hahnb3a962f2021-05-12 11:33:43 -040029
adheli.tavares7abe36c2022-02-02 14:53:10 +000030docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools
Jim Hahnb3a962f2021-05-12 11:33:43 -040031
adheli.tavares7abe36c2022-02-02 14:53:10 +000032POLICY_DROOLS_IP=$(get-instance-ip.sh drools)
liamfallonf5a11b02023-02-10 22:01:43 +000033POLICY_DROOLS_PORT=30217
adheli.tavares7abe36c2022-02-02 14:53:10 +000034MARIADB_IP=$(get-instance-ip.sh mariadb)
Jim Hahnb3a962f2021-05-12 11:33:43 -040035
adheli.tavares7abe36c2022-02-02 14:53:10 +000036echo DROOLS IP IS "${POLICY_DROOLS_IP}"
37echo MARIADB IP IS "${MARIADB_IP}"
Jim Hahnb3a962f2021-05-12 11:33:43 -040038
liamfallonf5a11b02023-02-10 22:01:43 +000039# wait for the app to start up - looking for telemetry service on port 30216 forwarded from 9696
40"${SCRIPTS}"/wait_for_rest.sh localhost 30216
Jim Hahnb3a962f2021-05-12 11:33:43 -040041
42# give enough time for the controllers to come up
43sleep 15
44
adheli.tavares7abe36c2022-02-02 14:53:10 +000045ROBOT_VARIABLES=""
liamfallonf5a11b02023-02-10 22:01:43 +000046ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}"
47ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_PORT:${POLICY_DROOLS_PORT}"