Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ============LICENSE_START======================================================= |
| 3 | # Copyright 2017-2021 AT&T Intellectual Property. All rights reserved. |
liamfallon | f5a11b0 | 2023-02-10 22:01:43 +0000 | [diff] [blame^] | 4 | # Modifications Copyright 2021-2023 Nordix Foundation. |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 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 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 20 | |
| 21 | echo "Uninstall docker-py and reinstall docker." |
Jim Hahn | fe3e91c | 2021-06-04 13:22:49 -0400 | [diff] [blame] | 22 | python3 -m pip uninstall -y docker-py |
| 23 | python3 -m pip uninstall -y docker |
| 24 | python3 -m pip install -U docker |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 25 | |
| 26 | sudo apt-get -y install libxml2-utils |
| 27 | |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 28 | source "${SCRIPTS}"/get-versions.sh |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 29 | |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 30 | docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 31 | |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 32 | POLICY_DROOLS_IP=$(get-instance-ip.sh drools) |
liamfallon | f5a11b0 | 2023-02-10 22:01:43 +0000 | [diff] [blame^] | 33 | POLICY_DROOLS_PORT=30217 |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 34 | MARIADB_IP=$(get-instance-ip.sh mariadb) |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 35 | |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 36 | echo DROOLS IP IS "${POLICY_DROOLS_IP}" |
| 37 | echo MARIADB IP IS "${MARIADB_IP}" |
Jim Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 38 | |
liamfallon | f5a11b0 | 2023-02-10 22:01:43 +0000 | [diff] [blame^] | 39 | # 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 Hahn | b3a962f | 2021-05-12 11:33:43 -0400 | [diff] [blame] | 41 | |
| 42 | # give enough time for the controllers to come up |
| 43 | sleep 15 |
| 44 | |
adheli.tavares | 7abe36c | 2022-02-02 14:53:10 +0000 | [diff] [blame] | 45 | ROBOT_VARIABLES="" |
liamfallon | f5a11b0 | 2023-02-10 22:01:43 +0000 | [diff] [blame^] | 46 | ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}" |
| 47 | ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_PORT:${POLICY_DROOLS_PORT}" |