blob: 46871fd81f93af8164adbdad8627dd30cf666370 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export PRH_SERVICE="prh"
pkaras55d36862018-10-17 15:08:34 +02006export SSL_PRH_SERVICE="ssl_prh"
Gary Wu9abb61c2018-09-27 10:38:50 -07007export DMAAP_SIMULATOR="dmaap_simulator"
8export AAI_SIMULATOR="aai_simulator"
Marcin Migdal26125b12019-04-11 16:17:18 +02009export CONSUL="consul"
10export CONSUL_CONFIG="consul-cfg"
11export CBS="consul-cfg"
Gary Wu9abb61c2018-09-27 10:38:50 -070012
Gary Wu13111e92018-09-27 11:31:33 -070013cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/
Gary Wu9abb61c2018-09-27 10:38:50 -070014
15pip uninstall -y docker-py
16pip uninstall -y docker
17pip install -U docker
Marcin Migdalfba99a52019-04-15 14:36:45 +020018
kurczews636b3972019-04-16 12:03:41 +020019set -e
20
21docker login -u docker -p docker https://nexus3.onap.org:10001
Gary Wu9abb61c2018-09-27 10:38:50 -070022docker-compose up -d --build
23
Marcin Migdal26125b12019-04-11 16:17:18 +020024# Extract docker images IPs
Gary Wu9abb61c2018-09-27 10:38:50 -070025PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
pkaras55d36862018-10-17 15:08:34 +020026SSL_PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_PRH_SERVICE})
Gary Wu9abb61c2018-09-27 10:38:50 -070027DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
28AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
Marcin Migdal26125b12019-04-11 16:17:18 +020029CONSUL_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL})
30CONSUL_CONFIG_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL_CONFIG})
31CBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CBS})
Gary Wu9abb61c2018-09-27 10:38:50 -070032
33bypass_ip_adress ${PRH_IP}
pkaras55d36862018-10-17 15:08:34 +020034bypass_ip_adress ${SSL_PRH_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070035bypass_ip_adress ${DMAAP_SIMULATOR_IP}
36bypass_ip_adress ${AAI_SIMULATOR_IP}
Marcin Migdal26125b12019-04-11 16:17:18 +020037bypass_ip_adress ${CONSUL_IP}
38bypass_ip_adress ${CONSUL_CONFIG_IP}
39bypass_ip_adress ${CBS_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070040
41echo PRH_IP=${PRH_IP}
pkaras55d36862018-10-17 15:08:34 +020042echo SSL_PRH_IP=${SSL_PRH_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070043echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
44echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
Marcin Migdal26125b12019-04-11 16:17:18 +020045echo CONSUL_IP=${CONSUL_IP}
46echo CONSUL_CONFIG_IP=${CONSUL_CONFIG_IP}
47echo CBS_IP=${CBS_IP}
Gary Wu9abb61c2018-09-27 10:38:50 -070048
49# Wait for initialization of PRH services
pkarasc7abba82018-10-22 12:22:35 +020050wait_for_service_init localhost:8100/heartbeat
51wait_for_service_init localhost:8200/heartbeat
Gary Wu9abb61c2018-09-27 10:38:50 -070052
53# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
kurczews636b3972019-04-16 12:03:41 +020054ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500"