summaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
Diffstat (limited to 'kud')
-rw-r--r--kud/tests/README-composite-vfw.txt24
-rw-r--r--kud/tests/cleanup-composite-vfw.sh21
-rwxr-xr-x[-rw-r--r--]kud/tests/vfw-test-clean-cluster.sh11
-rwxr-xr-xkud/tests/vfw-test.sh6
4 files changed, 40 insertions, 22 deletions
diff --git a/kud/tests/README-composite-vfw.txt b/kud/tests/README-composite-vfw.txt
index d2018c09..3f334a25 100644
--- a/kud/tests/README-composite-vfw.txt
+++ b/kud/tests/README-composite-vfw.txt
@@ -7,7 +7,29 @@ As written, the vfw-test.sh script assumes 3 clusters
The edge cluster in which vFW will be instantiated should be KUD clusters.
-# Preparations
+# Edge cluster preparation
+
+For status monitoring support, the 'monitor' docker image must be built and
+deployed.
+
+In multicloud-k8s repo:
+ cd multicloud-k8s/src/monitor
+ docker build -f build/Dockerfile . -t monitor
+ <tag and push docker image to dockerhub ...>
+
+Deploy monitor program in each cluster (assumes multicloud-k8s repo is present in cloud)
+ # one time setup per cluster - install the CRD
+ cd multicloud-k8s/src/monitor/deploy/crds
+ kubectl apply -f crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml
+
+ # one time setup per cluster
+ # update yaml files with correct image
+ # (cleanup first, if monitor was already installed - see monitor-cleanup.sh)
+ cd multicloud-k8s/src/monitor/deploy
+ monitor-deploy.sh
+
+
+# Preparation of the vFW Composit Application
## Prepare the Composite vFW Application Charts and Profiles
diff --git a/kud/tests/cleanup-composite-vfw.sh b/kud/tests/cleanup-composite-vfw.sh
deleted file mode 100644
index 7f96e8ac..00000000
--- a/kud/tests/cleanup-composite-vfw.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-# To clean up composite vfw demo resources in a cluster
-kubectl -n onap4k8s delete deployment clm
-kubectl -n onap4k8s delete deployment orchestrator
-kubectl -n onap4k8s delete deployment ncm
-kubectl -n onap4k8s delete deployment ovnaction
-kubectl -n onap4k8s delete deployment rsync
-kubectl -n onap4k8s delete service clm
-kubectl -n onap4k8s delete service orchestrator
-kubectl -n onap4k8s delete service ncm
-kubectl -n onap4k8s delete service ovnaction
-kubectl -n onap4k8s delete service rsync
-kubectl -n onap4k8s delete configmap clm
-kubectl -n onap4k8s delete configmap orchestrator
-kubectl -n onap4k8s delete configmap ncm
-kubectl -n onap4k8s delete configmap ovnaction
-kubectl -n onap4k8s delete configmap rsync
-
-# delete the networks
-kubectl delete network protected-private-net
-kubectl delete providernetwork emco-private-net
-kubectl delete providernetwork unprotected-private-net
diff --git a/kud/tests/vfw-test-clean-cluster.sh b/kud/tests/vfw-test-clean-cluster.sh
index 3d386466..153924ca 100644..100755
--- a/kud/tests/vfw-test-clean-cluster.sh
+++ b/kud/tests/vfw-test-clean-cluster.sh
@@ -1,6 +1,17 @@
+#!/bin/bash
+
+# script to delete vfw resources (until terminate is completed)
kubectl delete deploy fw0-packetgen
kubectl delete deploy fw0-firewall
kubectl delete deploy fw0-sink
kubectl delete service packetgen-service
kubectl delete service sink-service
kubectl delete configmap sink-configmap
+
+kubectl delete network protected-private-net
+kubectl delete providernetwork emco-private-net
+kubectl delete providernetwork unprotected-private-net
+
+for i in `kubectl get resourcebundlestate --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'`; do
+ kubectl delete resourcebundlestate $i
+done
diff --git a/kud/tests/vfw-test.sh b/kud/tests/vfw-test.sh
index 2bdddcd7..9c431ef0 100755
--- a/kud/tests/vfw-test.sh
+++ b/kud/tests/vfw-test.sh
@@ -969,6 +969,9 @@ function instantiateVfw {
call_api -d "{ }" "${base_url_orchestrator}/projects/${projectname}/composite-apps/${vfw_compositeapp_name}/${vfw_compositeapp_version}/deployment-intent-groups/${deployment_intent_group_name}/instantiate"
}
+function statusVfw {
+ call_api "${base_url_orchestrator}/projects/${projectname}/composite-apps/${vfw_compositeapp_name}/${vfw_compositeapp_version}/deployment-intent-groups/${deployment_intent_group_name}/status"
+}
function usage {
echo "Usage: $0 create|get|delete|apply|terminate|instantiate"
@@ -986,12 +989,14 @@ function usage {
echo " delete - deletes all resources in ncm, ovnaction, clm resources created for vfw"
echo " apply - applys the network intents - e.g. networks created in ncm"
echo " instantiate - approves and instantiates the composite app via the generic deployment intent"
+ echo " status - get status of deployed resources"
echo " terminate - remove the network inents created by ncm"
echo ""
echo " a reasonable test sequence:"
echo " 1. create"
echo " 2. apply"
echo " 3. instantiate"
+ echo " 4. status"
exit
}
@@ -1050,5 +1055,6 @@ case "$1" in
"apply" ) applyNcmData ;;
"terminate" ) terminateNcmData ;;
"instantiate" ) instantiateVfw ;;
+ "status" ) statusVfw ;;
*) usage ;;
esac