diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-07-30 14:12:49 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-07-30 14:49:13 -0700 |
commit | 80237668597de035fd9788ea95786bb0bda68a02 (patch) | |
tree | 715bd1931e43c238e4bb356929718fcd0ffe63c4 /boot | |
parent | 75b2c58811687602c1dab5cf2a69b2e94599bcee (diff) |
Remove demo, testuite/properties repos in robot VM
No longer clone demo and testsuite/properties repos
in robot VM. Instead, use demo repo content within
testsuite container, and pass properties directly
from heat template boot/ directory.
Change-Id: I9e472f9b6cea47dc2faebd091d95be9e89aff667
Issue-ID: INT-605
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/assembly.xml | 4 | ||||
-rwxr-xr-x | boot/robot/demo.sh | 154 | ||||
-rwxr-xr-x | boot/robot/ete.sh | 23 | ||||
-rw-r--r-- | boot/robot/integration_preload_parameters.py | 344 | ||||
-rw-r--r-- | boot/robot/integration_robot_properties.py | 111 | ||||
-rwxr-xr-x | boot/robot/vm_config2robot.sh | 24 | ||||
-rw-r--r-- | boot/robot_install.sh | 33 | ||||
-rw-r--r-- | boot/robot_vm_init.sh | 37 |
8 files changed, 673 insertions, 57 deletions
diff --git a/boot/assembly.xml b/boot/assembly.xml index 006337ce..5b7217bd 100644 --- a/boot/assembly.xml +++ b/boot/assembly.xml @@ -10,12 +10,12 @@ <fileSet> <directory>${basedir}</directory> <includes> - <include>*</include> + <include>**</include> </includes> <excludes> <exclude>assembly.xml</exclude> <exclude>pom.xml</exclude> - <exclude>target</exclude> + <exclude>target/</exclude> <exclude>.*</exclude> </excludes> </fileSet> diff --git a/boot/robot/demo.sh b/boot/robot/demo.sh new file mode 100755 index 00000000..a5a8e40e --- /dev/null +++ b/boot/robot/demo.sh @@ -0,0 +1,154 @@ +#!/bin/bash + +# +# Execute tags built to support the hands on demo, +# +function usage +{ + echo "Usage: demo.sh <command> [<parameters>]" + echo " " + echo " demo.sh init" + echo " - Execute both init_customer + distribute" + echo " " + echo " demo.sh init_customer" + echo " - Create demo customer (Demonstration) and services, etc." + echo " " + echo " demo.sh distribute [<prefix>]" + echo " - Distribute demo models (demoVFW and demoVLB)" + echo " " + echo " demo.sh preload <vnf_name> <module_name>" + echo " - Preload data for VNF for the <module_name>" + echo " " + echo " demo.sh appc <module_name>" + echo " - provide APPC with vFW module mount point for closed loop" + echo " " + echo " demo.sh init_robot [ <etc_hosts_prefix> ]" + echo " - Initialize robot after all ONAP VMs have started" + echo " " + echo " demo.sh instantiateVFW | instantiateVFWCL" + echo " - Instantiate vFW or vFWCL module for the a demo customer (DemoCust<uuid>)" + echo " " + echo " demo.sh deleteVNF <module_name from instantiateVFW>" + echo " - Delete the module created by instantiateVFW" + echo " " + echo " demo.sh heatbridge <stack_name> <service_instance_id> <service> <ipv4-oam-address>" + echo " - Run heatbridge against the stack for the given service instance and service" +} + +# Set the defaults +if [ $# -eq 0 ];then + usage + exit +fi +## +## if more than 1 tag is supplied, the must be provided with -i or -e +## +while [ $# -gt 0 ] +do + key="$1" + + case $key in + init_robot) + TAG="UpdateWebPage" + read -s -p "WEB Site Password for user 'test': " WEB_PASSWORD + if [ "$WEB_PASSWORD" = "" ]; then + echo "" + echo "WEB Password is required for user 'test'" + exit + fi + VARIABLES="$VARIABLES -v WEB_PASSWORD:$WEB_PASSWORD" + shift + if [ $# -eq 1 ];then + VARIABLES="$VARIABLES -v HOSTS_PREFIX:$1" + fi + shift + ;; + init) + TAG="InitDemo" + shift + ;; + init_customer) + TAG="InitCustomer" + shift + ;; + distribute) + TAG="InitDistribution" + shift + if [ $# -eq 1 ];then + VARIABLES="$VARIABLES -v DEMO_PREFIX:$1" + fi + shift + ;; + preload) + TAG="PreloadDemo" + shift + if [ $# -ne 2 ];then + echo "Usage: demo.sh preload <vnf_name> <module_name>" + exit + fi + VARIABLES="$VARIABLES -v VNF_NAME:$1" + shift + VARIABLES="$VARIABLES -v MODULE_NAME:$1" + shift + ;; + appc) + TAG="APPCMountPointDemo" + shift + if [ $# -ne 1 ];then + echo "Usage: demo.sh appc <module_name>" + exit + fi + VARIABLES="$VARIABLES -v MODULE_NAME:$1" + shift + ;; + instantiateVFW) + TAG="instantiateVFW" + VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$" + shift + ;; + instantiateVFWCL) + TAG="instantiateVFWCL" + VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$" + shift + ;; + deleteVNF) + TAG="deleteVNF" + shift + if [ $# -ne 1 ];then + echo "Usage: demo.sh deleteVNF <module_name from instantiateVFW>" + exit + fi + VARFILE=$1.py + if [ -e /opt/eteshare/${VARFILE} ]; then + VARIABLES="$VARIABLES -V /share/${VARFILE}" + else + echo "Cache file ${VARFILE} is not found" + exit + fi + shift + ;; + heatbridge) + TAG="heatbridge" + shift + if [ $# -ne 4 ];then + echo "Usage: demo.sh heatbridge <stack_name> <service_instance_id> <service> <ipv4-oam-address>" + exit + fi + VARIABLES="$VARIABLES -v HB_STACK:$1" + shift + VARIABLES="$VARIABLES -v HB_SERVICE_INSTANCE_ID:$1" + shift + VARIABLES="$VARIABLES -v HB_SERVICE:$1" + shift + VARIABLES="$VARIABLES -v HB_IPV4_OAM_ADDRESS:$1" + shift + ;; + *) + usage + exit + esac +done + +ETEHOME=/var/opt/OpenECOMP_ETE +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py" +docker exec openecompete_container ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/demo/${TAG} -i ${TAG} --display 89 2> ${TAG}.out diff --git a/boot/robot/ete.sh b/boot/robot/ete.sh new file mode 100755 index 00000000..c029dc2b --- /dev/null +++ b/boot/robot/ete.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# +# Run the testsuite for the passed tag. Valid tags are ete, health, closedloop, instantiate +# Please clean up logs when you are done... +# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide +# +if [ "$1" == "" ];then + echo "Usage: ete.sh [ health | ete | closedloop | instantiate | distribute ]" + exit +fi + +mkdir -p /opt/eteshare/logs + +export TAGS="-i $1" +export ETEHOME=/var/opt/OpenECOMP_ETE +export GLOBAL_BUILD_NUMBER=$(ls -1q /opt/eteshare/logs/ | wc -l) +export OUTPUT_FOLDER=ETE_$(printf %04d $GLOBAL_BUILD_NUMBER)_$1 + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py" +VARIABLES="-v GLOBAL_BUILD_NUMBER:$GLOBAL_BUILD_NUMBER" + +docker exec openecompete_container ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --exclude oom --display 88 diff --git a/boot/robot/integration_preload_parameters.py b/boot/robot/integration_preload_parameters.py new file mode 100644 index 00000000..5d3e3c86 --- /dev/null +++ b/boot/robot/integration_preload_parameters.py @@ -0,0 +1,344 @@ +GLOBAL_PRELOAD_PARAMETERS = { + # heat template parameter values common to all heat template continaing these parameters + "defaults" : { + 'key_name' : 'vfw_key${uuid}', + "pub_key" : "${GLOBAL_INJECTED_VNF_PUB_KEY}", + "repo_url_blob" : "https://nexus.onap.org/content/repositories/raw", + "repo_url_artifacts" : "https://nexus.onap.org/content/groups/staging", + "demo_artifacts_version" : "${GLOBAL_INJECTED_ARTIFACTS_VERSION}", + "onap_private_net_id" : "${GLOBAL_INJECTED_NETWORK}", + "onap_private_subnet_id" : "${GLOBAL_INJECTED_NETWORK}", + "onap_private_net_cidr" : "10.0.0.0/8", + "dcae_collector_ip" : "${GLOBAL_INJECTED_DCAE_COLLECTOR_IP}", + "dcae_collector_port" : "8080", + "public_net_id" : "${GLOBAL_INJECTED_PUBLIC_NET_ID}", + "cloud_env" : "${GLOBAL_INJECTED_CLOUD_ENV}", + "install_script_version" : "${GLOBAL_INJECTED_SCRIPT_VERSION}", + }, + +# ## + # heat template parameter values for heat template instances created during Vnf-Orchestration test cases + # ## + "Vnf-Orchestration" : { + "vfw_preload.template": { + "unprotected_private_net_id" : "vofwl01_unprotected${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_id" : "vofwl01_protected${hostid}", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vfw_private_ip_1" : "192.168.20.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.1", + "vpg_private_ip_0" : "192.168.10.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.2", + "vsn_private_ip_0" : "192.168.20.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.3", + 'vfw_name_0':'vofwl01fwl${hostid}', + 'vpg_name_0':'vofwl01pgn${hostid}', + "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + 'vsn_name_0':'vofwl01snk${hostid}' + }, + "vfwsnk_preload.template": { + "unprotected_private_net_id" : "vofwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "vofwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_id" : "vofwlsnk_protected${hostid}", + "protected_private_subnet_id" : "vofwlsnk_protected_sub${hostid}", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vfw_private_ip_1" : "192.168.20.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.101", + "vpg_private_ip_0" : "192.168.10.200", + "vsn_private_ip_0" : "192.168.20.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.102", + 'vfw_name_0':'vofwl01fwl${hostid}', + 'vsn_name_0':'vofwl01snk${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + }, + "vpkg_preload.template": { + "unprotected_private_net_id" : "vofwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "vofwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vpg_private_ip_0" : "192.168.10.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.103", + "vsn_private_ip_0" : "192.168.20.250", + 'vpg_name_0':'vofwl01pgn${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + }, + "vlb_preload.template" : { + "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}", + "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "vlb_private_net_id" : "volb01_private${hostid}", + "pktgen_private_net_id" : "volb01_pktgen${hostid}", + "vlb_private_net_cidr" : "192.168.30.0/24", + "vlb_private_ip_0" : "192.168.30.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.4", + "vdns_private_ip_0" : "192.168.30.110", + "vdns_private_ip_1" : "10.0.${ecompnet}.5", + 'vlb_name_0':'vovlblb${hostid}', + 'vdns_name_0':'vovlbdns${hostid}', + "pktgen_private_net_cidr" : "192.168.9.0/24", + "vpg_private_ip_1" : "10.0.${ecompnet}.7", + "pg_int" : "192.168.9.109", + "vpg_private_ip_0" : "192.168.9.110", + "vlb_private_ip_2" : "192.168.9.111", + "vip" : "192.168.9.112", + "gre_ipaddr" : "192.168.30.112", + "vpg_name_0" : "vovlbpgn${hostid}", + "vnf_id" : "vLoadBalancer_${hostid}", + "vf_module_id" : "vLoadBalancer" + + }, + "dnsscaling_preload.template" : { + "vlb_private_net_id" : "volb01_private${hostid}", + "vlb_private_ip_0" : "192.168.30.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.4", + "vdns_private_ip_0" : "192.168.30.222", + "vdns_private_ip_1" : "10.0.${ecompnet}.6", + 'scaling_vdns_name_0':'vovlbscaling${hostid}', + "vlb_private_net_cidr" : "192.168.10.0/24" + }, + "vims_preload.template" : { + "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "repo_url" : "http://repo.cw-ngv.com/stable", + "zone" : "me.cw-ngv.com", + "dn_range_start" : "2425550000", + "dn_range_length" : "10000", + "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw==" + + }, + "vvg_preload.template" : { + } + }, +# heat template parameter values for heat template instances created during Closed-Loop test cases + "Closed-Loop" : { + "vfw_preload.template": { + "unprotected_private_net_id" : "clfwl01_unprotected${hostid}", + "unprotected_private_net_cidr" : "192.168.110.0/24", + "protected_private_net_id" : "clfwl01_protected${hostid}", + "protected_private_net_cidr" : "192.168.120.0/24", + "vfw_private_ip_0" : "192.168.110.100", + "vfw_private_ip_1" : "192.168.120.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.11", + "vpg_private_ip_0" : "192.168.110.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.12", + "vsn_private_ip_0" : "192.168.120.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.13", + 'vfw_name_0':'clfwl01fwl${hostid}', + 'vpg_name_0':'clfwl01pgn${hostid}', + "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + 'vsn_name_0':'clfwl01snk${hostid}' + }, + "vfwsnk_preload.template": { + "unprotected_private_net_id" : "clfwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "clfwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_id" : "clfwlsnk_protected${hostid}", + "protected_private_subnet_id" : "clfwlsnk_protected_sub${hostid}", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vfw_private_ip_1" : "192.168.20.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.111", + "vpg_private_ip_0" : "192.168.10.200", + "vsn_private_ip_0" : "192.168.20.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.112", + 'vfw_name_0':'clfwl01fwl${hostid}', + 'vsn_name_0':'clfwl01snk${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + }, + "vpkg_preload.template": { + "unprotected_private_net_id" : "clfwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "clfwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vpg_private_ip_0" : "192.168.10.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.113", + "vsn_private_ip_0" : "192.168.20.250", + 'vpg_name_0':'clfwl01pgn${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + }, + "vlb_preload.template" : { + "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}", + "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "vlb_private_net_id" : "cllb01_private${hostid}", + "pktgen_private_net_id" : "cllb01_pktgen${hostid}", + "vlb_private_net_cidr" : "192.168.30.0/24", + "vlb_private_ip_0" : "192.168.30.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.14", + "vdns_private_ip_0" : "192.168.30.110", + "vdns_private_ip_1" : "10.0.${ecompnet}.15", + 'vlb_name_0':'clvlblb${hostid}', + 'vdns_name_0':'clvlbdns${hostid}', + "pktgen_private_net_cidr" : "192.168.9.0/24", + "vpg_private_ip_1" : "10.0.${ecompnet}.17", + "pg_int" : "192.168.9.109", + "vpg_private_ip_0" : "192.168.9.110", + "vlb_private_ip_2" : "192.168.9.111", + "vip" : "192.168.9.112", + "gre_ipaddr" : "192.168.30.112", + "vpg_name_0" : "clvlbpgn${hostid}", + "vnf_id" : "vLoadBalancer_${hostid}", + "vf_module_id" : "vLoadBalancer" + }, + "dnsscaling_preload.template" : { + "vlb_private_net_id" : "cllb01_private${hostid}", + "vlb_private_ip_0" : "192.168.130.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.14", + "vdns_private_ip_0" : "192.168.130.222", + "vdns_private_ip_1" : "10.0.${ecompnet}.16", + 'scaling_vdns_name_0':'clvlbscaling${hostid}', + "vlb_private_net_cidr" : "192.168.10.0/24" + }, + "vims_preload.template" : { + "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "repo_url" : "http://repo.cw-ngv.com/stable", + "zone" : "me.cw-ngv.com", + "dn_range_start" : "2425550000", + "dn_range_length" : "10000", + "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw==" + }, + "vvg_preload.template" : { + } + }, + # heat template parameter values for heat template instances created for hands on demo test case + "Demo" : { + "vfw_preload.template": { + "unprotected_private_net_id" : "demofwl_unprotected", + "unprotected_private_net_cidr" : "192.168.110.0/24", + "protected_private_net_id" : "demofwl_protected", + "protected_private_net_cidr" : "192.168.120.0/24", + "vfw_private_ip_0" : "192.168.110.100", + "vfw_private_ip_1" : "192.168.120.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.11", + "vpg_private_ip_0" : "192.168.110.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.12", + "vsn_private_ip_0" : "192.168.120.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.13", + 'vfw_name_0':'demofwl01fwl', + 'vpg_name_0':'demofwl01pgn', + "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + 'vsn_name_0':'demofwl01snk' + }, + "vfwsnk_preload.template": { + "unprotected_private_net_id" : "demofwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "demofwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_id" : "demofwlsnk_protected${hostid}", + "protected_private_subnet_id" : "vofwlsnk_protected_sub${hostid}", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vfw_private_ip_1" : "192.168.20.100", + "vfw_private_ip_2" : "10.0.${ecompnet}.121", + "vpg_private_ip_0" : "192.168.10.200", + "vsn_private_ip_0" : "192.168.20.250", + "vsn_private_ip_1" : "10.0.${ecompnet}.122", + 'vfw_name_0':'demofwl01fwl${hostid}', + 'vsn_name_0':'demofwl01snk${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + }, + "vpkg_preload.template": { + "unprotected_private_net_id" : "demofwlsnk_unprotected${hostid}", + "unprotected_private_subnet_id" : "demofwlsnk_unprotected_sub${hostid}", + "unprotected_private_net_cidr" : "192.168.10.0/24", + "protected_private_net_cidr" : "192.168.20.0/24", + "vfw_private_ip_0" : "192.168.10.100", + "vpg_private_ip_0" : "192.168.10.200", + "vpg_private_ip_1" : "10.0.${ecompnet}.123", + "vsn_private_ip_0" : "192.168.20.250", + 'vpg_name_0':'demofwl01pgn${hostid}', + "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}" + }, + "vlb_preload.template" : { + "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}", + "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "vlb_private_net_id" : "demolb_private${hostid}", + "pktgen_private_net_id" : "demolb_pktgen${hostid}", + "vlb_private_net_cidr" : "192.168.30.0/24", + "vlb_private_ip_0" : "192.168.30.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.24", + "vdns_private_ip_0" : "192.168.30.110", + "vdns_private_ip_1" : "10.0.${ecompnet}.25", + 'vlb_name_0':'demovlblb${hostid}', + 'vdns_name_0':'demovlbdns${hostid}', + "pktgen_private_net_cidr" : "192.168.9.0/24", + "vpg_private_ip_1" : "10.0.${ecompnet}.27", + "pg_int" : "192.168.9.109", + "vpg_private_ip_0" : "192.168.9.110", + "vlb_private_ip_2" : "192.168.9.111", + "vip" : "192.168.9.112", + "gre_ipaddr" : "192.168.30.112", + "vpg_name_0" : "clvlbpgn${hostid}", + "vnf_id" : "vLoadBalancer_${hostid}", + "vf_module_id" : "vLoadBalancer" + }, + "dnsscaling_preload.template" : { + "vlb_private_net_id" : "demolb_private${hostid}", + "vlb_private_ip_0" : "192.168.130.100", + "vlb_private_ip_1" : "10.0.${ecompnet}.24", + "vdns_private_ip_0" : "192.168.130.222", + "vdns_private_ip_1" : "10.0.${ecompnet}.26", + 'scaling_vdns_name_0':'demovlbscaling${hostid}', + "vlb_private_net_cidr" : "192.168.10.0/24" + }, + "vims_preload.template" : { + "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}", + "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}", + "repo_url" : "http://repo.cw-ngv.com/stable", + "zone" : "me.cw-ngv.com", + "dn_range_start" : "2425550000", + "dn_range_length" : "10000", + "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw==" + }, + "vvg_preload.template" : { + } + } +} diff --git a/boot/robot/integration_robot_properties.py b/boot/robot/integration_robot_properties.py new file mode 100644 index 00000000..f7a9905c --- /dev/null +++ b/boot/robot/integration_robot_properties.py @@ -0,0 +1,111 @@ +# aaf info - everything is from the private oam network (also called onap private network) +GLOBAL_AAF_SERVER = "https://aaf.api.simpledemo.onap.org:8100" +GLOBAL_AAF_USERNAME = "demo@people.osaaf.org" +GLOBAL_AAF_PASSWORD = "demo123456!" +# aai info - everything is from the private oam network (also called onap private network) +GLOBAL_AAI_SERVER_PROTOCOL = "https" +GLOBAL_AAI_SERVER_PORT = "8443" +GLOBAL_AAI_USERNAME = "AAI" +GLOBAL_AAI_PASSWORD = "AAI" +# appc info - everything is from the private oam network (also called onap private network) +GLOBAL_APPC_SERVER_PROTOCOL = "http" +GLOBAL_APPC_SERVER_PORT = "8282" +GLOBAL_APPC_SERVER = "http://10.0.2.1:" +GLOBAL_APPC_USERNAME = "admin" +GLOBAL_APPC_PASSWORD = "admin" +# sdc info - everything is from the private oam network (also called onap private network) +GLOBAL_ASDC_SERVER_PROTOCOL = "http" +GLOBAL_ASDC_FE_PORT = "8181" +GLOBAL_ASDC_BE_PORT = "8080" +GLOBAL_ASDC_BE_ONBOARD_PORT = "8081" +GLOBAL_ASDC_BE_USERNAME = "beep" +GLOBAL_ASDC_BE_PASSWORD = "boop" +# clamp info - everything is from the private oam network (also called onap private network) +GLOBAL_CLAMP_SERVER_PROTOCOL = "http" +GLOBAL_CLAMP_SERVER_PORT = "8080" +# nbi info - everything is from the private oam network (also called onap private network) +GLOBAL_NBI_SERVER_PROTOCOL = "http" +GLOBAL_NBI_SERVER_PORT = "8080" +# cli info - everything is from the private oam network (also called onap private network) +GLOBAL_CLI_SERVER_PROTOCOL = "http" +GLOBAL_CLI_SERVER_PORT = "8080" +# dcae info - everything is from the private oam network (also called onap private network) +GLOBAL_DCAE_SERVER_PROTOCOL = "http" +GLOBAL_DCAE_HEALTH_SERVER_PORT = "8000" +GLOBAL_DCAE_USERNAME = "console" +GLOBAL_DCAE_PASSWORD = "ZjJkYjllMjljMTI2M2Iz" +# DROOL server port and credentials +GLOBAL_DROOLS_SERVER_PORT = "9696" +GLOBAL_DROOLS_USERNAME = "@1b3rt" +GLOBAL_DROOLS_PASSWORD = "31nst31n" +# log server config - No log server is run in HEAT +GLOBAL_LOG_SERVER_PROTOCOL = "http" +GLOBAL_LOG_ELASTICSEARCH_PORT = "9200" +GLOBAL_LOG_LOGSTASH_PORT = "9600" +GLOBAL_LOG_KIBANA_PORT = "5601" +# microservice bus info - everything is from the private oam network (also called ecomp private network) +GLOBAL_MSB_SERVER_PROTOCOL = "http" +GLOBAL_MSB_SERVER_PORT = "80" +# message router info - everything is from the private oam network (also called onap private network) +GLOBAL_MR_SERVER_PROTOCOL = "http" +GLOBAL_MR_SERVER_PORT = "3904" +# mso info - everything is from the private oam network (also called onap private network) +GLOBAL_MSO_SERVER_PROTOCOL = "http" +GLOBAL_MSO_SERVER_PORT = "8080" +GLOBAL_MSO_USERNAME = "InfraPortalClient" +GLOBAL_MSO_PASSWORD = "password1$" +# music info - everything is from the private oam network (also called onap private network) +GLOBAL_MUSIC_SERVER_PROTOCOL = "http" +GLOBAL_MUSIC_SERVER_PORT = "8080" +# oof global info - everything is from the private oam network (also called onap private network) +GLOBAL_OOF_SERVER_PROTOCOL = "http" +# oof-homing info - everything is from the private oam network (also called onap private network) +GLOBAL_OOF_HOMING_SERVER_PORT = "8091" +# oof-sniro info - everything is from the private oam network (also called onap private network) +GLOBAL_OOF_SNIRO_SERVER_PORT = "8698" +# openstack info - info to select right info in environment +# packet generate vnf info - everything is from the private oam network (also called onap private network) +GLOBAL_PACKET_GENERATOR_PORT = "8183" +GLOBAL_PACKET_GENERATOR_USERNAME = "admin" +GLOBAL_PACKET_GENERATOR_PASSWORD = "admin" +GLOBAL_PGN_PORT = "2831" +# policy info - everything is from the private oam network (also called onap private network) +GLOBAL_POLICY_SERVER_PROTOCOL = "http" +GLOBAL_POLICY_SERVER_PORT = "8081" +GLOBAL_POLICY_HEALTHCHECK_PORT = "6969" +GLOBAL_POLICY_AUTH = "dGVzdHBkcDphbHBoYTEyMw==" +GLOBAL_POLICY_CLIENTAUTH = "cHl0aG9uOnRlc3Q=" +GLOBAL_POLICY_USERNAME = "healthcheck" +GLOBAL_POLICY_PASSWORD = "zb!XztG34" +# portal info - everything is from the private oam network (also called onap private network) +GLOBAL_PORTAL_SERVER_PROTOCOL = "http" +GLOBAL_PORTAL_SERVER_PORT = "8989" +GLOBAL_PORTAL_USERNAME = "demo" +GLOBAL_PORTAL_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse" +# secret management service info +GLOBAL_SMS_SERVER_PROTOCOL = "https" +GLOBAL_SMS_SERVER_NAME = "aaf-sms.api.simpledemo.onap.org" +GLOBAL_SMS_SERVER_PORT = "10443" +# sdngc info - everything is from the private oam network (also called onap private network) +GLOBAL_SDNGC_SERVER_PROTOCOL = "http" +GLOBAL_SDNGC_REST_PORT = "8282" +GLOBAL_SDNGC_ADMIN_PORT = "8843" +GLOBAL_SDNGC_USERNAME = "admin" +GLOBAL_SDNGC_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" +# vid info - everything is from the private oam network (also called onap private network) +GLOBAL_VID_SERVER_PROTOCOL = "http" +GLOBAL_VID_SERVER_PORT = "8080" +GLOBAL_VID_USERNAME = "demo" +GLOBAL_VID_PASSWORD = "Kp8bJ4SXszM0WX" +GLOBAL_VID_HEALTH_USERNAME = "Default" +GLOBAL_VID_HEALTH_PASSWORD = "AppPassword!1" +# vnfsdk info - everything is from the private oam network (also called onap private network) +GLOBAL_VNFSDK_SERVER_PROTOCOL = "http" +GLOBAL_VNFSDK_SERVER_PORT = "8702" +#global selenium info +GLOBAL_PROXY_WARNING_TITLE="" +GLOBAL_PROXY_WARNING_CONTINUE_XPATH="" +# dns info +GLOBAL_DNS_TRAFFIC_DURATION = "600" +# location where heat templates are loaded from +GLOBAL_HEAT_TEMPLATES_FOLDER = "/var/opt/OpenECOMP_ETE/demo/heat" diff --git a/boot/robot/vm_config2robot.sh b/boot/robot/vm_config2robot.sh new file mode 100755 index 00000000..c50fa5f4 --- /dev/null +++ b/boot/robot/vm_config2robot.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# +# Make vm1_robot config available to robot +# +CONFIG=/opt/config +PROPERTIES=/opt/eteshare/config/vm_properties.py +GLOBAL_VM_PROPERTIES="# File generated from /opt/config\n#\n" +HASH="GLOBAL_INJECTED_PROPERTIES={" +COMMA="" +for f in `ls $CONFIG/*.txt`; +do + VALUE=`cat $f` + NAME=${f%.*} + NAME=${NAME##*/} + NAME=${NAME^^} + GLOBAL_VM_PROPERTIES=$"${GLOBAL_VM_PROPERTIES}GLOBAL_INJECTED_$NAME = \"$VALUE\"\n" + HASH=$"${HASH}${COMMA}\n\"GLOBAL_INJECTED_$NAME\" : \"$VALUE\"" + COMMA="," +done +HASH="${HASH}}\n" +GLOBAL_VM_PROPERTIES="${GLOBAL_VM_PROPERTIES}\n${HASH}" +GLOBAL_VM_PROPERTIES=${GLOBAL_VM_PROPERTIES} +echo -e $GLOBAL_VM_PROPERTIES > $PROPERTIES diff --git a/boot/robot_install.sh b/boot/robot_install.sh index d3807f82..b19faac9 100644 --- a/boot/robot_install.sh +++ b/boot/robot_install.sh @@ -58,32 +58,35 @@ then ifup eth1 fi -# Download dependencies -echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list -echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make # Download scripts from Nexus unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot_vm_init.sh > /opt/robot_vm_init.sh unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot_serv.sh > /opt/robot_serv.sh unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh -chmod +x /opt/imagetest.sh -chmod +x /opt/robot_vm_init.sh -chmod +x /opt/robot_serv.sh + +mkdir -p /opt/eteshare/config +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/integration_preload_parameters.py > /opt/eteshare/config/integration_preload_parameters.py +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/integration_robot_properties.py > /opt/eteshare/config/integration_robot_properties.py +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/vm_config2robot.sh > /opt/eteshare/config/vm_config2robot.sh +chmod +x /opt/eteshare/config/vm_config2robot.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/ete.sh > /opt/ete.sh +chmod +x /opt/ete.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/demo.sh > /opt/demo.sh +chmod +x /opt/demo.sh + +mkdir -p /opt/eteshare/logs + mv /opt/robot_serv.sh /etc/init.d update-rc.d robot_serv.sh defaults -# Download and install docker-engine and docker-compose +# Download and install docker-engine echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list apt-get update apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual apt-get install -y --allow-unauthenticated docker-engine -mkdir /opt/docker -curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose -chmod +x /opt/docker/docker-compose - # Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP DNS_FLAG="" if [ -s /opt/config/dns_ip_addr.txt ] @@ -109,12 +112,6 @@ service docker restart echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head resolvconf -u -# Clone Gerrit repository -mkdir -p /opt/eteshare/logs -mkdir -p /opt/eteshare/config -cd /opt -git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO testsuite/properties -git clone -b $GERRIT_BRANCH --single-branch $HEAT_CODE_REPO demo # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes if [[ $CLOUD_ENV != "rackspace" ]] diff --git a/boot/robot_vm_init.sh b/boot/robot_vm_init.sh index e306e91f..65eec434 100644 --- a/boot/robot_vm_init.sh +++ b/boot/robot_vm_init.sh @@ -5,43 +5,6 @@ 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) SNIRO_DOCKER_IMAGE_VERSION=$(cat /opt/config/sniro_docker_version.txt) -CLOUD_ENV=$(cat /opt/config/cloud_env.txt) - -# -# Deploy latest robot configuration -# -cd /opt/testsuite/properties -git pull -cp integration_* /opt/eteshare/config -cp vm_config2robot.sh /opt/eteshare/config -cp ete.sh /opt -cp demo.sh /opt - -# -# Deploy latest heat templates -# -cd /opt/demo -git pull -cp -rf heat /opt/eteshare - -#if [[ $CLOUD_ENV != "rackspace" ]] -#then -# sed -i "s/10.0.1.1/"$(cat /opt/config/aai1_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.2.1/"$(cat /opt/config/appc_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.4.1/"$(cat /opt/config/dcae_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.5.1/"$(cat /opt/config/so_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.11.1/"$(cat /opt/config/mr_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.6.1/"$(cat /opt/config/policy_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.9.1/"$(cat /opt/config/portal_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.3.1/"$(cat /opt/config/sdc_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.7.1/"$(cat /opt/config/sdnc_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.8.1/"$(cat /opt/config/vid_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/10.0.12.1/"$(cat /opt/config/clamp_ip_addr.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -# sed -i "s/https:\/\/identity.api.rackspacecloud.com/"$(cat /opt/config/keystone.txt)"/g" /opt/eteshare/config/integration_robot_properties.py -#fi - -chmod +x /opt/ete.sh -chmod +x /opt/demo.sh /bin/bash /opt/eteshare/config/vm_config2robot.sh |