Add examples with kubevirt
* Add helpers to install kubevirt and its dependencies
* Add examples how to use kubevirt
Related-Prod: PRODX-3456
Change-Id: I3ade65df5f8ddff39f35605104851833d74690a1
diff --git a/kubevirt/examples/03-boot-vm-volumes/run.sh b/kubevirt/examples/03-boot-vm-volumes/run.sh
new file mode 100755
index 0000000..783cba8
--- /dev/null
+++ b/kubevirt/examples/03-boot-vm-volumes/run.sh
@@ -0,0 +1,28 @@
+EXAMPLES_DIR=$(cd $(dirname "$0")/.. && pwd)
+WORKDIR=$(cd $(dirname "$0") && pwd)
+source ${EXAMPLES_DIR}/lib.sh
+
+command=$1
+
+function run {
+ echo "Creating PVC"
+ kubectl apply -f pvc.yaml
+
+ echo "Creating VM"
+ kubectl apply -f cirros.yaml
+
+ echo "Starting VM"
+ virtctl start cirros-volumes
+
+ echo "Waiting VM is Running."
+ wait_vm_state cirros-volumes Running
+}
+
+function cleanup {
+ kubectl delete -f cirros.yaml
+ kubectl delete -f pvc.yaml
+}
+
+pushd $WORKDIR
+$command
+popd