Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source ${SCRIPTS}/common_functions.sh |
| 4 | |
| 5 | export PRH_SERVICE="prh" |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 6 | export SSL_PRH_SERVICE="ssl_prh" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 7 | export DMAAP_SIMULATOR="dmaap_simulator" |
| 8 | export AAI_SIMULATOR="aai_simulator" |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame] | 9 | export CONSUL="consul" |
| 10 | export CONSUL_CONFIG="consul-cfg" |
| 11 | export CBS="consul-cfg" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 12 | |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 13 | cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/ |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 14 | |
| 15 | pip uninstall -y docker-py |
| 16 | pip uninstall -y docker |
| 17 | pip install -U docker |
Marcin Migdal | fba99a5 | 2019-04-15 14:36:45 +0200 | [diff] [blame] | 18 | docker login -u docker -p docker https://nexus3.onap.org:10001 |
| 19 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 20 | docker-compose up -d --build |
| 21 | |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame] | 22 | # Extract docker images IPs |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 23 | PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE}) |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 24 | SSL_PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_PRH_SERVICE}) |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 25 | DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR}) |
| 26 | AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR}) |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame] | 27 | CONSUL_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL}) |
| 28 | CONSUL_CONFIG_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL_CONFIG}) |
| 29 | CBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CBS}) |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 30 | |
| 31 | bypass_ip_adress ${PRH_IP} |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 32 | bypass_ip_adress ${SSL_PRH_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 33 | bypass_ip_adress ${DMAAP_SIMULATOR_IP} |
| 34 | bypass_ip_adress ${AAI_SIMULATOR_IP} |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame] | 35 | bypass_ip_adress ${CONSUL_IP} |
| 36 | bypass_ip_adress ${CONSUL_CONFIG_IP} |
| 37 | bypass_ip_adress ${CBS_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 38 | |
| 39 | echo PRH_IP=${PRH_IP} |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 40 | echo SSL_PRH_IP=${SSL_PRH_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 41 | echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP} |
| 42 | echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP} |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame] | 43 | echo CONSUL_IP=${CONSUL_IP} |
| 44 | echo CONSUL_CONFIG_IP=${CONSUL_CONFIG_IP} |
| 45 | echo CBS_IP=${CBS_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 46 | |
| 47 | # Wait for initialization of PRH services |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 48 | wait_for_service_init localhost:8100/heartbeat |
| 49 | wait_for_service_init localhost:8200/heartbeat |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 50 | |
| 51 | # #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
Marcin Migdal | fba99a5 | 2019-04-15 14:36:45 +0200 | [diff] [blame] | 52 | ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500" |