summaryrefslogtreecommitdiffstats
path: root/kubernetes/robot
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/robot')
-rwxr-xr-xkubernetes/robot/demo-k8s.sh47
-rwxr-xr-xkubernetes/robot/ete-k8s.sh13
-rw-r--r--kubernetes/robot/templates/all-services.yaml2
-rw-r--r--kubernetes/robot/templates/robot-deployment.yaml5
-rw-r--r--kubernetes/robot/values.yaml1
5 files changed, 45 insertions, 23 deletions
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 <command> [<parameters>]"
+ echo "Usage: demo.sh namespace <command> [<parameters>]"
echo " "
- echo " demo.sh init"
+ echo " demo.sh <namespace> init"
echo " - Execute both init_customer + distribute"
echo " "
- echo " demo.sh init_customer"
+ echo " demo.sh <namespace> init_customer"
echo " - Create demo customer (Demonstration) and services, etc."
echo " "
- echo " demo.sh distribute [<prefix>]"
+ echo " demo.sh <namespace> distribute [<prefix>]"
echo " - Distribute demo models (demoVFW and demoVLB)"
echo " "
- echo " demo.sh preload <vnf_name> <module_name>"
+ echo " demo.sh <namespace> preload <vnf_name> <module_name>"
echo " - Preload data for VNF for the <module_name>"
echo " "
- echo " demo.sh appc <module_name>"
+ echo " demo.sh <namespace> appc <module_name>"
echo " - provide APPC with vFW module mount point for closed loop"
echo " "
- echo " demo.sh init_robot"
+ echo " demo.sh <namespace> init_robot"
echo " - Initialize robot after all ONAP VMs have started"
echo " "
- echo " demo.sh instantiateVFW"
+ echo " demo.sh <namespace> instantiateVFW"
echo " - Instantiate vFW module for the a demo customer (DemoCust<uuid>)"
echo " "
- echo " demo.sh deleteVNF <module_name from instantiateVFW>"
+ echo " demo.sh <namespace> deleteVNF <module_name from instantiateVFW>"
echo " - Delete the module created by instantiateVFW"
+ echo " "
+ echo " demo.sh <namespace> heatbridge <stack_name> <service_instance_id> <service>"
+ 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 <stack_name> <service_instance_id> <service>"
+ 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
diff --git a/kubernetes/robot/ete-k8s.sh b/kubernetes/robot/ete-k8s.sh
index 2305a584c3..9810ac236e 100755
--- a/kubernetes/robot/ete-k8s.sh
+++ b/kubernetes/robot/ete-k8s.sh
@@ -5,19 +5,18 @@
# 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 ]"
+if [ "$1" == "" ] || [ "$2" == "" ]; then
+ echo "Usage: ete.sh [namespace] [ health | ete | closedloop | instantiate | distribute ]"
exit
fi
-export TAGS="-i $1"
+export NAMESPACE="$1"
+export TAGS="-i $2"
export ETEHOME=/var/opt/OpenECOMP_ETE
export OUTPUT_FOLDER=ETE_$$
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:$$"
-#docker exec openecompete_container ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display 88
-
-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/${OUTPUT_FOLDER} ${TAGS} --display 88
+POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
+kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display 88
diff --git a/kubernetes/robot/templates/all-services.yaml b/kubernetes/robot/templates/all-services.yaml
index 196e7b196a..604982b1e4 100644
--- a/kubernetes/robot/templates/all-services.yaml
+++ b/kubernetes/robot/templates/all-services.yaml
@@ -5,7 +5,7 @@ metadata:
labels:
app: robot
name: robot
- namespace: "{{ .Values.nsPrefix }}-robot"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
ports:
- port: 88
diff --git a/kubernetes/robot/templates/robot-deployment.yaml b/kubernetes/robot/templates/robot-deployment.yaml
index 5130955919..a978ff4f41 100644
--- a/kubernetes/robot/templates/robot-deployment.yaml
+++ b/kubernetes/robot/templates/robot-deployment.yaml
@@ -3,8 +3,9 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: robot
- namespace: "{{ .Values.nsPrefix }}-robot"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.robotReplicas }}
selector:
matchLabels:
app: robot
@@ -60,4 +61,4 @@ spec:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/robot/authorization
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/robot/values.yaml b/kubernetes/robot/values.yaml
index 221b572264..6aadd93647 100644
--- a/kubernetes/robot/values.yaml
+++ b/kubernetes/robot/values.yaml
@@ -1,6 +1,7 @@
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+robotReplicas: 1
image:
testsuite: nexus3.onap.org:10001/openecomp/testsuite:1.1-STAGING-latest