sharath | b0c1f13 | 2019-04-09 19:52:09 +0530 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | #get current host IP addres |
Bartek Grzybowski | 5f7b64b | 2020-03-23 12:57:08 +0100 | [diff] [blame^] | 4 | HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') |
sharath.reddy | 580e2bb | 2019-12-05 14:31:52 +0800 | [diff] [blame] | 5 | CONTAINER_NAME=rcc |
sharath | b0c1f13 | 2019-04-09 19:52:09 +0530 | [diff] [blame] | 6 | RCC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:latest |
| 7 | echo RCC_IMAGE=${RCC_IMAGE} |
| 8 | |
sharath.reddy | 580e2bb | 2019-12-05 14:31:52 +0800 | [diff] [blame] | 9 | #get JAVA version |
| 10 | echo java -version |
| 11 | java -version |
sharath | b0c1f13 | 2019-04-09 19:52:09 +0530 | [diff] [blame] | 12 | |
sharath.reddy | 580e2bb | 2019-12-05 14:31:52 +0800 | [diff] [blame] | 13 | # Start DCAE Restconf Collector |
| 14 | docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name ${CONTAINER_NAME} -e DMAAPHOST=${HOST_IP} ${RCC_IMAGE} |
| 15 | |
| 16 | RCC_IP=`get-instance-ip.sh ${CONTAINER_NAME}` |
sharath | b0c1f13 | 2019-04-09 19:52:09 +0530 | [diff] [blame] | 17 | export RCC_IP=${RCC_IP} |
| 18 | export HOST_IP=${HOST_IP} |
| 19 | |
| 20 | export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-restconf/testcases/resources" |
| 21 | |
| 22 | pip install jsonschema uuid |
| 23 | # Wait container ready |
| 24 | sleep 5 |
| 25 | |
sharath.reddy | 580e2bb | 2019-12-05 14:31:52 +0800 | [diff] [blame] | 26 | #get the docker log |
| 27 | echo DOCKER LOG ${CONTAINER_NAME} |
| 28 | docker logs ${CONTAINER_NAME} |