diff options
Diffstat (limited to 'test/csit/scripts')
7 files changed, 94 insertions, 18 deletions
diff --git a/test/csit/scripts/common_functions.sh b/test/csit/scripts/common_functions.sh index 69856dab3..4293a526c 100755 --- a/test/csit/scripts/common_functions.sh +++ b/test/csit/scripts/common_functions.sh @@ -233,3 +233,20 @@ function run_simulator_docker () ROBOT_VARIABLES=${ROBOT_VARIABLES}" -v SIMULATOR_IP:${SIMULATOR_IP} -v SCRIPTS:${SCRIPTS}" echo ${ROBOT_VARIABLES} } + +function get_docker_compose_service () +{ + local service=$1 + local compose_file=${2:-docker-compose.yml} + + echo $(docker-compose --file ./${compose_file} ps | grep $service | cut -d " " -f1 ) +} + +function bypass_ip_adress () +{ + local ip_address=$1 + + if [[ $no_proxy && $no_proxy != *$ip_address* ]]; then + export no_proxy=$no_proxy,$ip_address + fi +} diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh index 7ec7345d5..96ac40f18 100755 --- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh +++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh @@ -17,6 +17,7 @@ cat << EOF > $JSON } EOF +echo "Initializing /dmaap endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap @@ -33,20 +34,28 @@ cat << EOF > $JSON } EOF +echo "Initializing /dcaeLocations endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations # INITIALIZE: MR object in 1 site +# since MR is currently deployed via docker-compose, its IP doesn't seem +# to be routable from DBCL. Fortunately, the MR port is mapped from the docker bridge IP address. +# Found this article for how to deterine the docker bridge IP so using it as a workaround. +# https://stackoverflow.com/questions/22944631/how-to-get-the-ip-address-of-the-docker-host-from-inside-a-docker-container +# Used the following snippet found buried in a comment to an answer and then modified for only 1 value. +DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 ) +# Perhaps there is a better way... JSON=/tmp/$$.mrc cat << EOF > $JSON { "dcaeLocationName": "csit-sanfrancisco", - "fqdn": "$3", - "hosts" : [ "$3", "$3", "$3" ], - "protocol" : "https", - "port": "3094" + "fqdn": "$DOCKER_HOST", + "topicProtocol" : "http", + "topicPort": "3904" } EOF +echo "Initializing /mr_clusters endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh index 72c443850..688ce7d45 100755 --- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh +++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh @@ -4,13 +4,13 @@ # sets global var IP with assigned IP address function dmaapbc_launch() { - TAG=onap/dmaap/buscontroller + TAG="nexus3.onap.org:10001/onap/dmaap/buscontroller" CONTAINER_NAME=dmaapbc IP="" cd ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller - TMP_CFG=/tmp/docker-databys-controller.conf + TMP_CFG=/tmp/docker-databus-controller.conf . ./onapCSIT.env > $TMP_CFG docker run -d --name $CONTAINER_NAME -v $TMP_CFG:/opt/app/config/conf $TAG IP=`get-instance-ip.sh ${CONTAINER_NAME}` @@ -22,9 +22,4 @@ function dmaapbc_launch() { sleep $i done - set -x - ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh ${IP} - set +x - - } diff --git a/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh b/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh index 7237a1fbc..24de74099 100644 --- a/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh +++ b/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh @@ -34,18 +34,33 @@ docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO docker pull $NEXUS_DOCKER_REPO/onap/externalapi/nbi:$DOCKER_IMAGE_VERSION # Start nbi, MariaDB and MongoDB containers with docker compose and nbi/docker-compose.yml -docker-compose up -d mariadb mongo && sleep 5 # to ensure that these services are ready for connections +docker-compose up -d mariadb mongo + +# inject a script to ensure that these services are ready for connections +docker-compose run --rm --entrypoint='/bin/sh' nbi -c '\ + attempt=1; \ + while ! nc -z mariadb 3306 || ! nc -z mongo 27017; do \ + if [ $attempt = 30 ]; then \ + echo "Timed out!"; \ + exit 1; \ + fi; \ + echo "waiting for db services (attempt #$attempt)..."; \ + sleep 1; \ + attempt=$(( attempt + 1)); \ + done; \ + echo "all db services are ready for connections!" \ +' + docker-compose up -d nbi NBI_CONTAINER_NAME=$(docker-compose ps 2> /dev/null | tail -n+3 | tr -s ' ' | cut -d' ' -f1 | grep _nbi_) -NBI_IP=$(docker inspect $NBI_CONTAINER_NAME --format='{{ range .NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}') +NBI_IP=$(docker inspect --format='{{ range .NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' ${NBI_CONTAINER_NAME}) echo "IP address for NBI main container ($NBI_CONTAINER_NAME) is set to ${NBI_IP}." # Wait for initialization for i in {1..30}; do - curl -sS ${NBI_IP}:8080 > /dev/null 2>&1 && break + curl -sS ${NBI_IP}:8080 > /dev/null 2>&1 && echo 'nbi initialized' && break echo sleep $i sleep $i done - diff --git a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap index 0f9e7494d..a8e84846c 100644 --- a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -314,7 +314,7 @@ aafns = conductor #table_prefix = sdnc # Base URL for SDN-C. (string value) -server_url = http://localhost:8082/restconf/ +server_url = http://localhost:8083/restconf/ # Basic Authentication Username (string value) username = admin @@ -346,3 +346,33 @@ extensions = sdnc # solver will restart any orphaned solving requests at startup. (boolean value) #concurrent = false + +[multicloud] + +# +# From conductor +# + +# Base URL for Multicloud without a trailing slash. (string value) +server_url = http://msb.onap.org:8082/api/multicloud + +# Timeout for Multicloud Rest Call (string value) +multicloud_rest_timeout = 30 + +# Number of retry for Multicloud Rest Call (string value) +multicloud_retries = 3 + +# The version of Multicloud API. (string value) +server_url_version = v0 + + + +[vim_controller] + +# +# From conductor +# + +# Extensions list to use (list value) +extensions = multicloud + diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh index ac907eea1..ee5479e10 100755 --- a/test/csit/scripts/optf-has/has/has_script.sh +++ b/test/csit/scripts/optf-has/has/has_script.sh @@ -60,7 +60,7 @@ MULTICLOUDSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.I echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}" # change MULTICLOUD reference to the local instance -sed -i -e "s%localhost:8082/%${MULTICLOUDSIM_IP}:8082/%g" /tmp/conductor/properties/conductor.conf +sed -i -e "s%msb.onap.org:8082/%${MULTICLOUDSIM_IP}:8082/%g" /tmp/conductor/properties/conductor.conf #onboard conductor into music curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/test/csit/tests/optf-has/has/data/onboard.json diff --git a/test/csit/scripts/so/chef-config/mso-docker.json b/test/csit/scripts/so/chef-config/mso-docker.json index 13b0d22fc..120db1176 100644 --- a/test/csit/scripts/so/chef-config/mso-docker.json +++ b/test/csit/scripts/so/chef-config/mso-docker.json @@ -171,7 +171,7 @@ "sniroTimeout": "PT30M", "serviceAgnosticSniroHost": "http://sniro.api.simpledemo.openecomp.org:8080", "serviceAgnosticSniroEndpoint": "/sniro/api/v2/placement", - "aaiEndpoint": "https://aai.api.simpledemo.openecomp.org:8443", + "aaiEndpoint": "https://aai.api.simpledemo.onap.org:8443", "aaiAuth": "2630606608347B7124C244AB0FE34F6F", "adaptersNamespace": "http://org.openecomp.mso", "adaptersCompletemsoprocessEndpoint": "http://mso:8080/CompleteMsoProcess", @@ -204,6 +204,16 @@ "sdncTimeoutFirewall": "20", "callbackRetryAttempts": "30", "callbackRetrySleepTime": "1000", + "appcClientTopicRead": "APPC-LCM-READ", + "appcClientTopicWrite": "APPC-LCM-WRITE", + "appcClientTopicSdncRead": "SDNC-LCM-READ", + "appcClientTopicSdncWrite": "SDNC-LCM-WRITE", + "appcClientTopicReadTimeout": "360000", + "appcClientResponseTime": "360000", + "appcClientPoolMembers": "10.0.11.1:3904", + "appcClientKey": "VIlbtVl6YLhNUrtU", + "appcClientSecret": "64AG2hF4pYeG2pq7CT6XwUOT", + "appcClientService": "ueb", "workflowL3ToHigherLayerAddBondingModelName": "WAN Bonding", "workflowL3ToHigherLayerAddBondingModelVersion": "2.0" } |