X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Frobot%2Fdemo-k8s.sh;h=23fc555dc5be134667c2d222f7807e42888b920f;hb=ea2eb8d96d06f459526343322ad27007c7fdba8b;hp=2836fca85da93e6917b7abfb0dd97c8edd4f32b2;hpb=6ee3ab73a4a580436d25c5ee76d63a1d720c375f;p=oom.git diff --git a/kubernetes/robot/demo-k8s.sh b/kubernetes/robot/demo-k8s.sh index 2836fca85d..23fc555dc5 100755 --- a/kubernetes/robot/demo-k8s.sh +++ b/kubernetes/robot/demo-k8s.sh @@ -1,42 +1,49 @@ -#!/bin/bash +#!/bin/bash -x # # Execute tags built to support the hands on demo, # function usage { - echo "Usage: demo.sh []" + echo "Usage: demo.sh namespace []" echo " " - echo " demo.sh init" + echo " demo.sh init" echo " - Execute both init_customer + distribute" echo " " - echo " demo.sh init_customer" + echo " demo.sh init_customer" echo " - Create demo customer (Demonstration) and services, etc." echo " " - echo " demo.sh distribute []" + echo " demo.sh distribute []" echo " - Distribute demo models (demoVFW and demoVLB)" echo " " - echo " demo.sh preload " + echo " demo.sh preload " echo " - Preload data for VNF for the " echo " " - echo " demo.sh appc " + echo " demo.sh appc " echo " - provide APPC with vFW module mount point for closed loop" echo " " - echo " demo.sh init_robot" + echo " demo.sh init_robot" echo " - Initialize robot after all ONAP VMs have started" echo " " - echo " demo.sh instantiateVFW" + echo " demo.sh instantiateVFW" echo " - Instantiate vFW module for the a demo customer (DemoCust)" echo " " - echo " demo.sh deleteVNF " + echo " demo.sh deleteVNF " echo " - Delete the module created by instantiateVFW" + echo " " + echo " demo.sh heatbridge " + echo " - Run heatbridge against the stack for the given service instance and service" } # Set the defaults -if [ $# -eq 0 ];then +if [ $# -le 1 ];then usage exit fi + +NAMESPACE=$1 +shift + ## ## if more than 1 tag is supplied, the must be provided with -i or -e ## @@ -113,6 +120,20 @@ do echo "Cache file ${VARFILE} is not found" exit fi + shift + ;; + heatbridge) + TAG="heatbridge" + shift + if [ $# -ne 3 ];then + echo "Usage: demo.sh heatbridge " + 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 ;; *) @@ -123,5 +144,5 @@ 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" -POD=$(kubectl --namespace onap-robot get pods | sed 's/ .*//'| grep robot) -kubectl --namespace onap-robot exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/demo/${TAG} -i ${TAG} --display 89 2> ${TAG}.out +POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) +kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/demo/${TAG} -i ${TAG} --display 89 2> ${TAG}.out