summaryrefslogtreecommitdiffstats
path: root/src/vagrant/kubeadm_virtlet/examples
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-11-16 12:23:16 -0500
committerGuo Ruijing <ruijing.guo@intel.com>2017-11-20 18:43:47 -0500
commit57c01199d342c5051fef2bb94f463f21749089bb (patch)
treec2e6c28b3bd1fed53b92038bf1286e82f4661606 /src/vagrant/kubeadm_virtlet/examples
parentb2da960212571fc3e287eedcdc4c8c92fed9bf83 (diff)
add examples for container4nfv
1. add example for kubeadm with weave 2. add example for kubeadm with multus 3. add example for kubeadm with ovsdpdk 4. add example for kubeadm with virtlet Change-Id: I138e71e45f0aba8389dca0e1a826f4662572af29 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'src/vagrant/kubeadm_virtlet/examples')
-rwxr-xr-xsrc/vagrant/kubeadm_virtlet/examples/virtlet.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/vagrant/kubeadm_virtlet/examples/virtlet.sh b/src/vagrant/kubeadm_virtlet/examples/virtlet.sh
index 68d738d..70bb606 100755
--- a/src/vagrant/kubeadm_virtlet/examples/virtlet.sh
+++ b/src/vagrant/kubeadm_virtlet/examples/virtlet.sh
@@ -1,9 +1,21 @@
#!/bin/bash
+set -ex
+
kubectl label node worker1 extraRuntime=virtlet
kubectl label node worker2 extraRuntime=virtlet
-kubectl label node worker3 extraRuntime=virtlet
kubectl create configmap -n kube-system virtlet-config --from-literal=download_protocol=http --from-literal=image_regexp_translation=1 --from-literal=disable_kvm=y
-kubectl create configmap -n kube-system virtlet-image-translations --from-file images.yaml
-kubectl create -f virtlet-ds.yaml
-kubectl create -f cirros-vm.yaml
+kubectl create configmap -n kube-system virtlet-image-translations --from-file /vagrant/examples/images.yaml
+kubectl create -f /vagrant/examples/virtlet-ds.yaml
+
+kubectl delete pod --all
+kubectl create -f /vagrant/examples/cirros-vm.yaml
+r="0"
+while [ $r -ne "1" ]
+do
+ r=$(kubectl get pods | grep Running | wc -l)
+ sleep 20
+done
+sleep 60
+kubectl get pods -o json | grep podIP | cut -f4 -d'"' | xargs ping -c 4
+echo 'login by user:cirros & password:gocubsgo'