diff options
Diffstat (limited to 'test/csit/plans')
-rw-r--r-- | test/csit/plans/aai/resources/docker-compose.yml | 70 | ||||
-rw-r--r-- | test/csit/plans/aai/resources/setup.sh | 95 | ||||
-rw-r--r-- | test/csit/plans/aai/resources/teardown.sh | 27 | ||||
-rw-r--r-- | test/csit/plans/aai/resources/testplan.txt | 3 | ||||
-rw-r--r-- | test/csit/plans/portal/testsuite/.env | 17 | ||||
m--------- | test/csit/plans/portal/testsuite/portal | 0 | ||||
-rw-r--r-- | test/csit/plans/portal/testsuite/setup.sh | 40 | ||||
-rw-r--r-- | test/csit/plans/portal/testsuite/teardown.sh | 20 | ||||
-rw-r--r-- | test/csit/plans/portal/testsuite/testplan.txt | 3 | ||||
-rw-r--r-- | test/csit/plans/so/sanity-check/setup.sh | 29 | ||||
-rw-r--r-- | test/csit/plans/so/sanity-check/teardown.sh | 6 | ||||
-rwxr-xr-x | test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh | 49 | ||||
-rw-r--r-- | test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh | 23 | ||||
-rwxr-xr-x | test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh | 10 |
14 files changed, 344 insertions, 48 deletions
diff --git a/test/csit/plans/aai/resources/docker-compose.yml b/test/csit/plans/aai/resources/docker-compose.yml new file mode 100644 index 000000000..ab7823630 --- /dev/null +++ b/test/csit/plans/aai/resources/docker-compose.yml @@ -0,0 +1,70 @@ +version: '2' +services: + aai-resources.api.simpledemo.openecomp.org: + image: ${DOCKER_REGISTRY}/openecomp/aai-resources + hostname: aai-resources.api.simpledemo.openecomp.org + environment: + - AAI_CHEF_ENV=simpledemo + - AAI_CHEF_LOC=/var/chef/aai-data/environments + - CHEF_BRANCH=master + - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - AAI_CORE_VERSION=1.1.0-SNAPSHOT + ports: + - 8447:8447 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai-traversal.api.simpledemo.openecomp.org: + image: ${DOCKER_REGISTRY}/openecomp/aai-traversal + hostname: aai-traversal.api.simpledemo.openecomp.org + environment: + - AAI_CHEF_ENV=simpledemo + - AAI_CHEF_LOC=/var/chef/aai-data/environments + - CHEF_BRANCH=master + - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - AAI_CORE_VERSION=1.1.0-SNAPSHOT + ports: + - 8446:8446 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai.api.simpledemo.openecomp.org: + image: ${AAI_HAPROXY_IMAGE} + hostname: aai.api.simpledemo.openecomp.org + ports: + - 8443:8443 + links: + - aai-resources.api.simpledemo.openecomp.org + - aai-traversal.api.simpledemo.openecomp.org + volumes: + - /dev/log:/dev/log + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai.hbase.simpledemo.openecomp.org: + image: ${HBASE_IMAGE} + hostname: aai.hbase.simpledemo.openecomp.org + ports: + - 2181:2181 + - 8080:8080 + - 8085:8085 + - 9090:9090 + - 16000:16000 + - 16010:16010 + - 16201:16201 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" +networks: + default: + driver: bridge + driver_opts: + com.docker.network.driver.mtu: ${MTU} diff --git a/test/csit/plans/aai/resources/setup.sh b/test/csit/plans/aai/resources/setup.sh new file mode 100644 index 000000000..ee2046078 --- /dev/null +++ b/test/csit/plans/aai/resources/setup.sh @@ -0,0 +1,95 @@ +#!/bin/bash +# +# Copyright © 2017 AT&T Intellectual Property. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + +source ${SCRIPTS}/common_functions.sh + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) +DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO + +function wait_for_container() { + + CONTAINER_NAME="$1"; + START_TEXT="$2"; + + TIMEOUT=160 + + # wait for the real startup + AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l) + while [[ ${AMOUNT_STARTUP} -ne 1 ]]; + do + echo "Waiting for '$CONTAINER_NAME' deployment to finish ..." + AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l) + if [ "$TIMEOUT" = "0" ]; + then + echo "ERROR: $CONTAINER_NAME deployment failed." + exit 1 + fi + let TIMEOUT-=1 + sleep 1 + done +} + +DOCKER_COMPOSE_CMD="docker-compose"; +export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1); +export DOCKER_REGISTRY="nexus3.onap.org:10001"; +export HBASE_IMAGE="${HBASE_IMAGE:-harisekhon/hbase}"; + +docker pull ${DOCKER_REGISTRY}/openecomp/aai-resources:${DOCKER_IMAGE_VERSION}; +docker tag ${DOCKER_REGISTRY}/openecomp/aai-resources:${DOCKER_IMAGE_VERSION} ${DOCKER_REGISTRY}/openecomp/aai-resources:latest; + +docker pull ${DOCKER_REGISTRY}/openecomp/aai-traversal:${DOCKER_IMAGE_VERSION}; +docker tag ${DOCKER_REGISTRY}/openecomp/aai-traversal:${DOCKER_IMAGE_VERSION} ${DOCKER_REGISTRY}/openecomp/aai-traversal:latest; + +${DOCKER_COMPOSE_CMD} stop +${DOCKER_COMPOSE_CMD} rm -f -v + +# Start the hbase where the data will be stored +HBASE_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai.hbase.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:8085'; +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:8080'; +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:9095'; + +# Start the resources microservice +RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; + +# Start the traversal microservice +GRAPH_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai-traversal.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | awk '{ print $2; }' | head -1); +wait_for_container ${GRAPH_CONTAINER_NAME} '0.0.0.0:8446'; + +# Start the haproxy to route requests between resources and traversal +HAPROXY_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai.api.simpledemo.openecomp.org 2>&1 |grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); + +echo "A&AI Microservices, resources and traversal, are up and running along with HAProxy"; + +docker exec -it $GRAPH_CONTAINER_NAME "/opt/app/aai-traversal/scripts/install/updateQueryData.sh" && { + echo "Successfully loaded the widget related data into db"; +} || { + echo "Unable to load widget related data into db"; +} + +HAPROXY_IP=$(${SCRIPTS}/get-instance-ip.sh ${HAPROXY_CONTAINER_NAME}); +# Set the host ip for robot from the haproxy +ROBOT_VARIABLES="-v HOST_IP:${HAPROXY_IP}" diff --git a/test/csit/plans/aai/resources/teardown.sh b/test/csit/plans/aai/resources/teardown.sh new file mode 100644 index 000000000..8dd6358d8 --- /dev/null +++ b/test/csit/plans/aai/resources/teardown.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright © 2017 AT&T Intellectual Property. +# Copyright © 2017 Amdocs +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + +DOCKER_COMPOSE_CMD="docker-compose"; +export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1); +export DOCKER_REGISTRY="nexus3.onap.org:10001"; + +$DOCKER_COMPOSE_CMD stop +$DOCKER_COMPOSE_CMD rm -f -v + diff --git a/test/csit/plans/aai/resources/testplan.txt b/test/csit/plans/aai/resources/testplan.txt new file mode 100644 index 000000000..444104f94 --- /dev/null +++ b/test/csit/plans/aai/resources/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +aai/resources/suite1 diff --git a/test/csit/plans/portal/testsuite/.env b/test/csit/plans/portal/testsuite/.env new file mode 100644 index 000000000..fa3076859 --- /dev/null +++ b/test/csit/plans/portal/testsuite/.env @@ -0,0 +1,17 @@ +# Environment settings +# used by docker-compose AND by other shell scripts + +# Host directory with config files +PROJECT_DIR=/PROJECT/OpenSource/UbuntuEP + +# Directory within containers +WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps + +# Following are ALSO used in demo/boot/portal_vm_init.sh +EP_IMG_NAME=portal-apps +DB_IMG_NAME=portal-db +WMS_IMG_NAME=portal-wms +# Tag all images with this +PORTAL_TAG=1.1.0 + +NEXUS_REPO=nexus3.onap.org:10003 diff --git a/test/csit/plans/portal/testsuite/portal b/test/csit/plans/portal/testsuite/portal new file mode 160000 +Subproject e65a5d4a4852cbd0056fb3b881613f0a4dba4ec diff --git a/test/csit/plans/portal/testsuite/setup.sh b/test/csit/plans/portal/testsuite/setup.sh new file mode 100644 index 000000000..a6c1ba483 --- /dev/null +++ b/test/csit/plans/portal/testsuite/setup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Starts docker containers for ONAP Portal in Rackspace. +# Version for Amsterdam/R1 uses docker-compose. + +# be verbose +set -x + +# Establish environment variables +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) + +# Refresh configuration and scripts +cd /opt/portal +git pull +cd deliveries + +# Get image names used below from docker-compose environment file +source .env + +# Copy property files +ETC=/PROJECT/OpenSource/UbuntuEP/etc +mkdir -p $ETC +cp -r properties_rackspace/* $ETC + +# Refresh images +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION + +# Tag them as expected by docker-compose file +docker tag $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG + +# docker-compose is not in /usr/bin +/opt/docker/docker-compose down +/opt/docker/docker-compose up -d diff --git a/test/csit/plans/portal/testsuite/teardown.sh b/test/csit/plans/portal/testsuite/teardown.sh new file mode 100644 index 000000000..4214c8279 --- /dev/null +++ b/test/csit/plans/portal/testsuite/teardown.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Copyright 2017 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh i-mock + + diff --git a/test/csit/plans/portal/testsuite/testplan.txt b/test/csit/plans/portal/testsuite/testplan.txt new file mode 100644 index 000000000..5aba3164c --- /dev/null +++ b/test/csit/plans/portal/testsuite/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +portal/Healthcheck diff --git a/test/csit/plans/so/sanity-check/setup.sh b/test/csit/plans/so/sanity-check/setup.sh index a9c42fb4a..77a33bf65 100644 --- a/test/csit/plans/so/sanity-check/setup.sh +++ b/test/csit/plans/so/sanity-check/setup.sh @@ -17,21 +17,18 @@ # Place the scripts in run order: # Start all process required for executing test case -source ${SCRIPTS}/common_functions.sh +#start so +docker run -d -i -t --name=so -p 8080:8080 nexus3.onap.org:10001/openecomp/mso -#Start gso -run-instance.sh openoint/gso-service-manager gso " -i -t -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${INV_ADDR}:3306" -sleep_msg="Waiting_for_so" -curl_path='http://'${MSB_IP}':80/api/so/v1/services' -wait_curl_driver CURL_COMMAND=$curl_path WAIT_MESSAGE='"$sleep_msg"' REPEAT_NUMBER=25 GREP_STRING="\[" +SO_IP=`get-instance-ip.sh so` +# Wait for initialization +for i in {1..10}; do + curl -sS ${SO_IP}:1080 && break + echo sleep $i + sleep $i +done -#run simulator -docker run -d -i -t --name gso_csit_simulator -e SIMULATOR_JSON=Stubs/testcase/so/main.json -p 18009:18009 -p 18008:18008 openoint/simulate-test-docker -SIMULATOR_IP=`get-instance-ip.sh gso_csit_simulator` -sleep_msg="Waiting_for_simulator" -curl_path='http://'${SIMULATOR_IP}':18009/api/extsys/v1/vims' -wait_curl_driver CURL_COMMAND=$curl_path WAIT_MESSAGE='"$sleep_msg"' REPEAT_NUMBER=16 GREP_STRING="\[" - - -ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v SCRIPTS:${SCRIPTS} -v SIMULATOR_IP:${SIMULATOR_IP}" -robot ${ROBOT_VARIABLES} ${SCRIPTS}/../tests/so/sanity-check/register_simulator_to_msb.robot +#REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' so` +REPO_IP='127.0.0.1' +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v REPO_IP:${REPO_IP}" diff --git a/test/csit/plans/so/sanity-check/teardown.sh b/test/csit/plans/so/sanity-check/teardown.sh index 5cd82b7e2..a924a074f 100644 --- a/test/csit/plans/so/sanity-check/teardown.sh +++ b/test/csit/plans/so/sanity-check/teardown.sh @@ -15,10 +15,4 @@ # limitations under the License. # -#copy the logs files -docker cp so:/service/logs/lifecyclemgr.log ${SCRIPTS}/../../../archives -# kill micro service -kill-instance.sh i-msb kill-instance.sh so - - diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh index d41658612..deb491642 100755 --- a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh +++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh @@ -17,28 +17,45 @@ # Place the scripts in run order: # Start all process required for executing test case -#login to the onap nexus docker repo -docker login -u docker -p docker nexus3.onap.org:10001 - -# Start MSB -docker run -d -p 8500:8500 --name msb_consul nexus3.onap.org:10001/onap/msb/msb_base -CONSUL_IP=`get-instance-ip.sh msb_consul` -echo CONSUL_IP=${CONSUL_IP} -docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery -DISCOVERY_IP=`get-instance-ip.sh msb_discovery` -echo DISCOVERY_IP=${DISCOVERY_IP} -docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway -MSB_IP==`get-instance-ip.sh msb_internal_apigateway` -echo MSB_IP=${MSB_IP} +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# wait for container initalization +echo sleep 30 +sleep 30 # start vfc-vnflcm -docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnflcm +docker run -d --name vfc-vnflcm -v /var/lib/mysql -e MSB_ADDR=${MSB_DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/vnflcm VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm` + +# Wait for initialization for i in {1..10}; do - curl -sS ${VNFLCM_IP}:8801 && break + curl -sS -m 1 ${VNFLCM_IP}:8801 && break echo sleep $i sleep $i done +docker cp vfc-vnflcm:/service/vfc/gvnfm/vnflcm/lcm/logs/runtime_lcm.log ./ +cat runtime_lcm.log + # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v VNFLCM_IP:${VNFLCM_IP}" +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v VNFLCM_IP:${VNFLCM_IP}" diff --git a/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh index 524a4d866..6374b88ba 100644 --- a/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh +++ b/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh @@ -20,19 +20,32 @@ #login to the onap nexus docker repo docker login -u docker -p docker nexus3.onap.org:10001 -# Start MSB -docker run -d -p 8500:8500 --name msb_consul nexus3.onap.org:10001/onap/msb/msb_base +# start msb +docker run -d -p 8500:8500 --name msb_consul consul CONSUL_IP=`get-instance-ip.sh msb_consul` echo CONSUL_IP=${CONSUL_IP} + docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery DISCOVERY_IP=`get-instance-ip.sh msb_discovery` echo DISCOVERY_IP=${DISCOVERY_IP} -docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway + +docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway MSB_IP==`get-instance-ip.sh msb_internal_apigateway` echo MSB_IP=${MSB_IP} +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${CONSUL_IP}:8500 && curl -sS -m 1 ${DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IP}:80 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + # start vfc-catalog -docker run -d --name vfc-catalog -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/catalog +docker run -d --name vfc-catalog -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/catalog CATALOG_IP=`get-instance-ip.sh vfc-catalog` for i in {1..10}; do curl -sS ${CATALOG_IP}:8806 && break @@ -41,4 +54,4 @@ for i in {1..10}; do done # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP}" +ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}" diff --git a/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh index 42a7f901e..cad0f89a9 100755 --- a/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh +++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh @@ -28,7 +28,7 @@ docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` echo DISCOVERY_IP=${MSB_DISCOVERY_IP} -docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` echo MSB_IAG_IP=${MSB_IAG_IP} @@ -39,12 +39,12 @@ for i in {1..10}; do sleep $i done -# wait for container initalization -echo sleep 30 -sleep 30 +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 # start vfc-nslcm -docker run -d --name vfc-nslcm -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/nslcm +docker run -d --name vfc-nslcm -v /var/lib/mysql -e MSB_ADDR=${MSB_DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/nslcm NSLCM_IP=`get-instance-ip.sh vfc-nslcm` # Wait for initialization |