blob: 9dc8de9aeba7d46ce3261f9c9c63b4f66934ae81 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export PRH_SERVICE="prh"
6export DMAAP_SIMULATOR="dmaap_simulator"
7export AAI_SIMULATOR="aai_simulator"
Marcin Migdal26125b12019-04-11 16:17:18 +02008export CONSUL="consul"
9export CONSUL_CONFIG="consul-cfg"
10export CBS="consul-cfg"
Gary Wu9abb61c2018-09-27 10:38:50 -070011
Gary Wu13111e92018-09-27 11:31:33 -070012cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/
Gary Wu9abb61c2018-09-27 10:38:50 -070013
14pip uninstall -y docker-py
15pip uninstall -y docker
16pip install -U docker
Marcin Migdalfba99a52019-04-15 14:36:45 +020017
kurczews636b3972019-04-16 12:03:41 +020018set -e
19
20docker login -u docker -p docker https://nexus3.onap.org:10001
Gary Wu9abb61c2018-09-27 10:38:50 -070021docker-compose up -d --build
22
Marcin Migdal26125b12019-04-11 16:17:18 +020023# Extract docker images IPs
Gary Wu9abb61c2018-09-27 10:38:50 -070024PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
25DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
26AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
Marcin Migdal26125b12019-04-11 16:17:18 +020027CONSUL_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL})
28CONSUL_CONFIG_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL_CONFIG})
29CBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CBS})
Gary Wu9abb61c2018-09-27 10:38:50 -070030
31bypass_ip_adress ${PRH_IP}
32bypass_ip_adress ${DMAAP_SIMULATOR_IP}
33bypass_ip_adress ${AAI_SIMULATOR_IP}
Marcin Migdal26125b12019-04-11 16:17:18 +020034bypass_ip_adress ${CONSUL_IP}
35bypass_ip_adress ${CONSUL_CONFIG_IP}
36bypass_ip_adress ${CBS_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070037
38echo PRH_IP=${PRH_IP}
39echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
40echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
Marcin Migdal26125b12019-04-11 16:17:18 +020041echo CONSUL_IP=${CONSUL_IP}
42echo CONSUL_CONFIG_IP=${CONSUL_CONFIG_IP}
43echo CBS_IP=${CBS_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070044
45# Wait for initialization of PRH services
pkarasc7abba82018-10-22 12:22:35 +020046wait_for_service_init localhost:8100/heartbeat
Gary Wu9abb61c2018-09-27 10:38:50 -070047
48# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
micdzied9c7d8f02019-06-17 14:08:27 +020049ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500 -v PRH_SETUP:${PRH_IP}:8100"