diff options
Diffstat (limited to 'test/ete')
-rw-r--r-- | test/ete/labs/windriver/Integration-Jenkins-openrc.sh (renamed from test/ete/labs/windriver/Integration-Stable-openrc.sh) | 21 | ||||
-rw-r--r-- | test/ete/labs/windriver/Integration-SB-04-openrc.sh | 49 | ||||
-rw-r--r-- | test/ete/labs/windriver/onap-openstack-template.env (renamed from test/ete/labs/windriver/onap.env) | 100 | ||||
-rwxr-xr-x | test/ete/scripts/deploy-onap.sh | 86 | ||||
-rwxr-xr-x | test/ete/scripts/get-floating-ip.sh | 6 | ||||
-rwxr-xr-x | test/ete/scripts/install_openstack_cli.sh | 47 | ||||
-rwxr-xr-x | test/ete/scripts/remote/run-robot.sh | 20 | ||||
-rwxr-xr-x | test/ete/scripts/run-healthcheck.sh | 26 |
8 files changed, 271 insertions, 84 deletions
diff --git a/test/ete/labs/windriver/Integration-Stable-openrc.sh b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh index 1d68adc25..ca2e2c2cf 100644 --- a/test/ete/labs/windriver/Integration-Stable-openrc.sh +++ b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh @@ -15,8 +15,8 @@ export OS_AUTH_URL=http://10.12.25.2:5000/v3 # With the addition of Keystone we have standardized on the term **project** # as the entity that owns the resources. -export OS_PROJECT_ID=3583253e932845a09cd4c8ca2f31d095 -export OS_PROJECT_NAME="Integration-Stable" +export OS_PROJECT_ID="09d8566ea45e43aa974cf447ed591d77" +export OS_PROJECT_NAME="Integration-Jenkins" export OS_USER_DOMAIN_NAME="Default" if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi @@ -26,20 +26,15 @@ unset OS_TENANT_NAME # In addition to the owning entity (tenant), OpenStack stores the entity # performing the action as the **user**. -export OS_USERNAME="gary_wu" - -# Remote Openstack clients will need to set this environment if -# connecting to an HTTPS enabled endpoint -CERT_MSG="Please enter a path for your CA certificate pem file, \ -or press enter if you are not using HTTPS " -read -p "$CERT_MSG" OS_CACERT_INPUT -if [ ! -z "$OS_CACERT_INPUT" ] -then - export OS_CACERT=$(readlink -f $OS_CACERT_INPUT) +if [ -z ${OS_USERNAME_INPUT+x} ]; then + read -sp "Please enter your OpenStack Username for project $OS_PROJECT_NAME: " OS_USERNAME_INPUT fi +export OS_USERNAME=$OS_USERNAME_INPUT # With Keystone you pass the keystone password. -read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT +if [ -z ${OS_PASSWORD_INPUT+x} ]; then + read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT +fi export OS_PASSWORD=$OS_PASSWORD_INPUT # If your configuration has multiple regions, we set that information here. diff --git a/test/ete/labs/windriver/Integration-SB-04-openrc.sh b/test/ete/labs/windriver/Integration-SB-04-openrc.sh new file mode 100644 index 000000000..e7cee93b9 --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-04-openrc.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# To use an OpenStack cloud you need to authenticate against the Identity +# service named keystone, which returns a **Token** and **Service Catalog**. +# The catalog contains the endpoints for all services the user/tenant has +# access to - such as Compute, Image Service, Identity, Object Storage, Block +# Storage, and Networking (code-named nova, glance, keystone, swift, +# cinder, and neutron). +# +# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other +# OpenStack API is version 3. For example, your cloud provider may implement +# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is +# only for the Identity API served through keystone. +export OS_AUTH_URL=http://10.12.25.2:5000/v3 + +# With the addition of Keystone we have standardized on the term **project** +# as the entity that owns the resources. +export OS_PROJECT_ID="d570c718cbc545029f40e50b75eb13df" +export OS_PROJECT_NAME="Integration-SB-04" +export OS_USER_DOMAIN_NAME="Default" +if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi + +# unset v2.0 items in case set +unset OS_TENANT_ID +unset OS_TENANT_NAME + +# In addition to the owning entity (tenant), OpenStack stores the entity +# performing the action as the **user**. +# In addition to the owning entity (tenant), OpenStack stores the entity +# performing the action as the **user**. +if [ -z ${OS_USERNAME_INPUT+x} ]; then + read -sp "Please enter your OpenStack Username for project $OS_PROJECT_NAME: " OS_USERNAME_INPUT +fi +export OS_USERNAME=$OS_USERNAME_INPUT + +# With Keystone you pass the keystone password. +if [ -z ${OS_PASSWORD_INPUT+x} ]; then + read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT +fi +export OS_PASSWORD=$OS_PASSWORD_INPUT + +# If your configuration has multiple regions, we set that information here. +# OS_REGION_NAME is optional and only valid in certain environments. +export OS_REGION_NAME="RegionOne" +# Don't leave a blank variable, unset it if it was empty +if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi + +export OS_INTERFACE=public +export OS_IDENTITY_API_VERSION=3 diff --git a/test/ete/labs/windriver/onap.env b/test/ete/labs/windriver/onap-openstack-template.env index 5eb5d367f..72df4f654 100644 --- a/test/ete/labs/windriver/onap.env +++ b/test/ete/labs/windriver/onap-openstack-template.env @@ -8,12 +8,12 @@ parameters: public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 + public_net_name: external + ubuntu_1404_image: ubuntu-14-04-cloud-amd64 ubuntu_1604_image: ubuntu-16-04-cloud-amd64 - centos_7_image: CentOS-7 - flavor_small: m1.small flavor_medium: m1.medium @@ -24,18 +24,12 @@ parameters: flavor_xxlarge: m1.xxlarge - security_group: default - vm_base_name: onap key_name: onap_key - dcae_key_name: dcae_key - pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh - dcae_pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC94pcIva90rzXumORjMCf16qjVrn5+ykfW6uMcn+DPlifU+ihtqx4Up26v1gVZyCuY8BFmbhm4YGxnRykNfi71kYbWOasUFzY86dtptCuLVMRLsMYWwOA3sHQ5IcUYNbWmChh4LyOIfhy4p2atCmB1UUkQf7Icg8LokCIcdI3IohlNko50t9KOIhBvqC7Bnegnl6zpoYdtYQppdgp5xesdhYRrdIGmT86cH2QbImpcR3tMTty7SLsw5WdTSfUFwfm76s07ivUDfCRMCJoWcxQeh6my7P7BkfDYMVIYRyfWmoIf2iv3UrqahHTcCiL79SRiD0iCt0K2SEgGsVyCX2jf - nexus_repo: https://nexus.onap.org/content/sites/raw nexus_docker_repo: nexus3.onap.org:10001 @@ -48,11 +42,13 @@ parameters: artifacts_version: 1.1.0-SNAPSHOT - openstack_tenant_id: SAMPLE + openstack_tenant_id: ${OS_PROJECT_ID} + + openstack_tenant_name: ${OS_PROJECT_NAME} - openstack_username: SAMPLE + openstack_username: ${OS_USERNAME} - openstack_api_key: SAMPLE + openstack_api_key: ${OS_PASSWORD} openstack_auth_method: password @@ -71,9 +67,10 @@ parameters: # # ###################### - dns_list: 8.8.8.8 + dns_list: ["10.12.25.5", "8.8.8.8"] external_dns: 8.8.8.8 oam_network_cidr: 10.0.0.0/16 + dns_forwarder: 10.12.25.5 ### Private IP addresses ### @@ -98,11 +95,11 @@ parameters: clamp_ip_addr: 10.0.12.1 openo_ip_addr: 10.0.14.1 - dcae_coll_float_ip: 10.12.0.32 - dcae_db_float_ip: 10.12.0.24 - dcae_hdp1_float_ip: 10.12.0.30 - dcae_hdp2_float_ip: 10.12.0.33 - dcae_hdp3_float_ip: 10.12.0.15 +# dcae_coll_float_ip: PUT DCAE COLLECTOR FLOATING IP HERE +# dcae_db_float_ip: PUT DCAE DATABASE FLOATING IP HERE +# dcae_hdp1_float_ip: PUT DCAE HADOOP VM1 FLOATING IP HERE +# dcae_hdp2_float_ip: PUT DCAE HADOOP VM2 FLOATING IP HERE +# dcae_hdp3_float_ip: PUT DCAE HADOOP VM3 FLOATING IP HERE ########################### # # @@ -110,20 +107,57 @@ parameters: # # ########################### - dcae_base_environment: 1-NIC-FLOATING-IPS - - dcae_zone: ZONE - - dcae_state: STATE - - nexus_repo_root: https://nexus.onap.org - - nexus_url_snapshot: https://nexus.onap.org/content/repositories/snapshots - - gitlab_branch: master - - dcae_code_version: 1.1.0 - +# dcae_base_environment: 1-NIC-FLOATING-IPS + +# dcae_zone: ZONE + +# dcae_state: STATE + +# nexus_repo_root: https://nexus.onap.org + +# nexus_url_snapshot: https://nexus.onap.org/content/repositories/snapshots + +# gitlab_branch: master + +# dcae_code_version: 1.1.0 + + dnsaas_config_enabled: true + dnsaas_region: RegionOne + dnsaas_keystone_url: http://10.12.25.5:5000/v3 + dnsaas_tenant_name: ${OS_PROJECT_NAME} + dnsaas_username: ${OS_USERNAME} + dnsaas_password: ${OS_PASSWORD} + dcae_domain: dcaeg2.onap.org + dcae_keystone_url: "http://10.0.14.1/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + dcae_centos_7_image: CentOS-7 + dcae_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh + dcae_private_key: '-----BEGIN RSA PRIVATE KEY-----\n +MIIEpQIBAAKCAQEAylw4KKN/ljqnFBvP+blG5PNfsnM4MAuGPMsE5rkKmzcZWNaE\n +NGMXTFKlJ4YrUl7OUv8kbgFTmB8BoNpgrNtKACDaz/psQSOeOADCG/YrT4wrYKrR\n +NhFqOjJpxRmxweEsd14qBOxeFT7Ie42qbCMMzo260HvjLmtUxkOXeJ3xDkGmoJVy\n +yzxX7nO1m4WyWyukO6x6mX0XDsADF4A6AapcqinoisJ7pnXaNkcjU/JY2Jrwem7s\n ++ypzIp86O6gdLpLVU9ORR/UYNAk1h+Z6K5Rual4D9mrpC9IJNaYfIgLe7mC39ZLa\n +fiySNoGhei9P6pYvRJlQki69bid/EPAgX5YZIQIDAQABAoIBAQClDekkhI9ZqseC\n +qFjPuKaxsizZMg+faJb6WSHLSxzyk1OSWY6F6FklgLeC8HW/fuLNYZyGOYDEsG20\n +lMqL02Wdiy7OutS3oOS5iyzIf9a90HfFJi706el6RIpvINETcaXCS0T8tQrcS1Rd\n +KqTaBRC6HXJGAPbBcvw3pwQSdskatU6a/Kt2a3x6DsqqinQcgEB/SbrDaJCUX9sb\n +F2HVUwdq7aZK1Lk0ozr1FID9mrhjwWuQ6XC+vjG0FqtyXeMpR5iaQ73hex3FXQ8z\n +OjkFbMwuHWSh1DSx70r5yFrrBqwQKnMsBqx4QDRf3fIENUnWviaL+n+gwcXA07af\n +4kaNUFUtAoGBAPuNNRAGhZnyZ9zguns9PM56nmeMUikV5dPN2DTbQb79cpfV+7pC\n +6PeSH/dTKFLz62d6qAM2EsNXQvewf8fipBVBRPsRqKOv+uepd01dHNy62I5B+zRm\n +be9Kbe+EN60qdzvyPM+2hV6CnvGv1dirimS9pu6RrxD2Rmz1ectnJE+rAoGBAM3w\n +UbSEemyZ6EKjck2RfdipzY0MNBnIZ2cUqHh8mmPXjdTLzpXb9vmPbHb01Qwo8MP+\n +gMnTbTBOzyNAaHdIrCO9FHW6C85j3ot5Yzcr+EcBVcua+7KHU0Sgn44JNH8DisJ7\n +Y63UP/1Xb4d1/QvHfxYy3WOvvRdVZ7pPo8JNX95jAoGAIe5CIg8/JizUZa7KeKUh\n +9pgDleQPkQsrHQ6/AyIwFBsLwf9THSS5V+uV9D57SfUs46Bf2U8J6N90YQSlt8iS\n +aWuManFPVgT+yxDIzt6obf2mCEpOIBtQ6N4ZRh2HhQwdWTCrkzkDdGQaHG+jYL6C\n +xGPwiG2ON7OAfGIAM7eN5lECgYEAhoRLWlaOgRGnHKAWsYQvZ67CjTdDcPPuVu6v\n +fMQnNMA/7JeTwV+E205L0wfpgZ/cZKmBBlQMJlnUA3q2wfO+PTnse1mjDJU/cGtB\n +22/lJLxChlQdxGeQhGtGzUhF+hEeOhrO6WSSx7CtMRZoy6Dr6lwfMFZCdVNcBd6v\n +YOOZk3ECgYEAseUKGb6E80XTVVNziyuiVbQCsI0ZJuRfqMZ2IIDQJU9u6AnGAway\n +itqHbkGsmDT+4HUz01+1JKnnw42RdSrHdU/LaOonD+RIGqe2x800QXzqASKLdCXr\n +y7RoiFqJtkdFQykzJemA+xOXvHLgKi/MXFsU90PCD0VJKLj8vwpX78Y=\n +-----END RSA PRIVATE KEY-----' ################################ # # @@ -137,7 +171,7 @@ parameters: mr_branch: master dcae_branch: master policy_branch: master - portal_branch: master + portal_branch: release-1.3.0 robot_branch: master sdc_branch: master sdnc_branch: master @@ -163,7 +197,7 @@ parameters: uui_docker: latest esr_docker: latest dgbuilder_docker: 0.1-STAGING-latest - cli_docker: 1.1-STAGING-latest + cli_docker: v1.1.0 ##################### # # diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh index 3c69e15e8..4802e02ce 100755 --- a/test/ete/scripts/deploy-onap.sh +++ b/test/ete/scripts/deploy-onap.sh @@ -1,53 +1,63 @@ -#!/bin/bash - -if [ -z "$OS_AUTH_URL" ] || [ -z "$OS_USERNAME" ] -then - echo "ERROR: OpenStack environment variables not set. Please source your OpenStack RC script first." - exit 1 -fi - +#!/bin/bash -x if [ -z "$WORKSPACE" ]; then export WORKSPACE=`git rev-parse --show-toplevel` fi +source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh +# Delete all existing stacks +STACKS=$(openstack stack list -c "Stack Name" -f value) -# Assume that if ROBOT_VENV is set, we don't need to reinstall robot -if [ -f ${WORKSPACE}/env.properties ]; then - source ${WORKSPACE}/env.properties -fi - -if [ ! -z "$ONAP_VENV" ] && [ -f "$ONAP_VENV/bin/activate" ]; then - source ${ONAP_VENV}/bin/activate +if [ ! -z "${STACKS}" ]; then + echo "Deleting Stacks ${STACKS}" + openstack stack delete -y $STACKS + for STACK in ${STACKS}; do + until [ "DELETE_IN_PROGRESS" != "$(openstack stack show -c stack_status -f value $STACK)" ]; do + sleep 30 + done + done else - ONAP_VENV=$(mktemp -d --suffix=_onap_venv) - virtualenv ${ONAP_VENV} - source ${ONAP_VENV}/bin/activate - - pip install --upgrade pip - pip install --upgrade python-openstackclient python-heatclient - - echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties + echo "No existing stacks to delete." fi -echo "ONAP_VENV=${ONAP_VENV}" -if [ -z "$ONAP_WORKDIR" ]; then - ONAP_WORKDIR=$(mktemp -d --suffix=_onap_workdir) - echo "ONAP_WORKDIR=${ONAP_WORKDIR}" >> $WORKSPACE/env.properties -fi -echo "ONAP_WORKDIR=${ONAP_WORKDIR}" -if [ ! -d ${ONAP_WORKDIR}/demo ]; then - git clone http://gerrit.onap.org/r/demo ${ONAP_WORKDIR}/demo -else - pushd ${ONAP_WORKDIR}/demo - git pull - popd -fi STACK="ete-$(uuidgen | cut -c-8)" -echo "Stack Name: ${STACK}" -openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap.env $STACK +echo "New Stack Name: ${STACK}" + + +cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-demo.env +envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env > ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env +#diff ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env + +openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK + +while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do + sleep 15 +done + +STATUS=$(openstack stack show -c stack_status -f value $STACK) +echo $STATUS +if [ "CREATE_COMPLETE" != "$STATUS" ]; then + exit 1 +fi + + +# wait until Robot VM initializes +ROBOT_IP=$($WORKSPACE/test/ete/scripts/get-floating-ip.sh onap-robot) +echo "ROBOT_IP=${ROBOT_IP}" + +if [ "" == "${ROBOT_IP}" ]; then + exit 1 +fi + +ssh-keygen -R ${ROBOT_IP} + +SSH_KEY=~/.ssh/onap_key +until ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "docker ps | grep -q openecompete_container" +do + sleep 1m +done diff --git a/test/ete/scripts/get-floating-ip.sh b/test/ete/scripts/get-floating-ip.sh new file mode 100755 index 000000000..55854e73f --- /dev/null +++ b/test/ete/scripts/get-floating-ip.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Get floating IP assigned to a server name + +PORT_ID=$(openstack server show -f json $1 | python -c 'import sys, json; print json.load(sys.stdin)["wrs-if:nics"][0]["nic1"]["port_id"]') +FLOATING_IP=$(openstack floating ip list -f json --port $PORT_ID | python -c 'import sys, json; print json.load(sys.stdin)[0]["Floating IP Address"]') +echo $FLOATING_IP diff --git a/test/ete/scripts/install_openstack_cli.sh b/test/ete/scripts/install_openstack_cli.sh new file mode 100755 index 000000000..a6a0438f9 --- /dev/null +++ b/test/ete/scripts/install_openstack_cli.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [ -z "$OS_AUTH_URL" ] || [ -z "$OS_USERNAME" ] +then + echo "ERROR: OpenStack environment variables not set. Please source your OpenStack RC script first." + exit 1 +fi + + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi + + + +# Assume that if ROBOT_VENV is set, we don't need to reinstall robot +if [ -f ${WORKSPACE}/env.properties ]; then + source ${WORKSPACE}/env.properties +fi + +if [ ! -z "$ONAP_VENV" ] && [ -f "$ONAP_VENV/bin/activate" ]; then + source ${ONAP_VENV}/bin/activate +else + ONAP_VENV=$(mktemp -d --suffix=_onap_venv) + virtualenv ${ONAP_VENV} + source ${ONAP_VENV}/bin/activate + + pip install --upgrade pip + pip install --upgrade python-openstackclient python-heatclient + + echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties +fi +echo "ONAP_VENV=${ONAP_VENV}" + +if [ -z "$ONAP_WORKDIR" ]; then + ONAP_WORKDIR=$(mktemp -d --suffix=_onap_workdir) + echo "ONAP_WORKDIR=${ONAP_WORKDIR}" >> $WORKSPACE/env.properties +fi +echo "ONAP_WORKDIR=${ONAP_WORKDIR}" +if [ ! -d ${ONAP_WORKDIR}/demo ]; then + git clone https://gerrit.onap.org/r/demo ${ONAP_WORKDIR}/demo +else + pushd ${ONAP_WORKDIR}/demo + git pull + popd +fi + diff --git a/test/ete/scripts/remote/run-robot.sh b/test/ete/scripts/remote/run-robot.sh new file mode 100755 index 000000000..162acbe24 --- /dev/null +++ b/test/ete/scripts/remote/run-robot.sh @@ -0,0 +1,20 @@ +#!/bin/bash -x + +cd /opt + +docker ps | grep -q openecompete_container +if [ ! $? -eq 0 ]; then + echo "Robot not initialized" + exit 2 +fi + +if [ ! -d eteshare/logs/demo ]; then + echo $OS_PROJECT_ID > /opt/config/openstack_tenant_id.txt + echo $OS_USERNAME > /opt/config/openstack_username.txt + echo $OS_PASSWORD > /opt/config/openstack_password.txt + /bin/bash /opt/eteshare/config/vm_config2robot.sh + # set robot VM http server password + echo "admin" | /opt/demo.sh init_robot +fi + +/opt/ete.sh health diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh new file mode 100755 index 000000000..2f0f014d3 --- /dev/null +++ b/test/ete/scripts/run-healthcheck.sh @@ -0,0 +1,26 @@ +#!/bin/bash -x + +SSH_KEY=~/.ssh/onap_key + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi + +source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh + +cd $WORKSPACE/test/ete/scripts + +ROBOT_IP=$(./get-floating-ip.sh onap-robot) +echo "ROBOT_IP=${ROBOT_IP}" + +if [ "" == "${ROBOT_IP}" ]; then + exit 1 +fi + +ssh-keygen -R ${ROBOT_IP} + +ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PROJECT_ID=$OS_PROJECT_ID OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD bash -s" < ./remote/run-robot.sh + +LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1") +echo "Browse Robot results at http://${ROBOT_IP}:88/logs/${LOG_DIR}/" +rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/ |