summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vagrant/README.md (renamed from src/vagrant/k8s_kubeadm/README.md)0
-rwxr-xr-xsrc/vagrant/k8s_kubeadm/examples/yardstick.sh4
-rw-r--r--src/vagrant/kubeadm_basic/Vagrantfile (renamed from src/vagrant/k8s_kubeadm/Vagrantfile)0
-rwxr-xr-xsrc/vagrant/kubeadm_basic/examples/nginx-app.sh (renamed from src/vagrant/k8s_kubeadm/examples/nginx-app.sh)0
-rw-r--r--src/vagrant/kubeadm_basic/examples/nginx-app.yaml (renamed from src/vagrant/k8s_kubeadm/examples/nginx-app.yaml)0
-rw-r--r--src/vagrant/kubeadm_basic/host_setup.sh (renamed from src/vagrant/k8s_kubeadm/host_setup.sh)0
-rw-r--r--src/vagrant/kubeadm_basic/master_setup.sh (renamed from src/vagrant/k8s_kubeadm/master_setup.sh)4
-rw-r--r--src/vagrant/kubeadm_basic/worker_setup.sh (renamed from src/vagrant/k8s_kubeadm/worker_setup.sh)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/Vagrantfile34
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/examples/virtio-user.yaml (renamed from src/vagrant/k8s_kubeadm/examples/virtio-user.yaml)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/host_setup.sh19
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/master_setup.sh10
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/ovsdpdk/Dockerfile (renamed from src/vagrant/k8s_kubeadm/ovsdpdk/Dockerfile)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/ovsdpdk/install.sh (renamed from src/vagrant/k8s_kubeadm/ovsdpdk/install.sh)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/ovsdpdk/kube_ovsdpdk.yml (renamed from src/vagrant/k8s_kubeadm/ovsdpdk/kube_ovsdpdk.yml)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh (renamed from src/vagrant/k8s_kubeadm/ovsdpdk/start.sh)0
-rw-r--r--src/vagrant/kubeadm_ovsdpdk/worker_setup.sh4
17 files changed, 68 insertions, 7 deletions
diff --git a/src/vagrant/k8s_kubeadm/README.md b/src/vagrant/README.md
index ed5f6c6..ed5f6c6 100644
--- a/src/vagrant/k8s_kubeadm/README.md
+++ b/src/vagrant/README.md
diff --git a/src/vagrant/k8s_kubeadm/examples/yardstick.sh b/src/vagrant/k8s_kubeadm/examples/yardstick.sh
deleted file mode 100755
index bc1eecf..0000000
--- a/src/vagrant/k8s_kubeadm/examples/yardstick.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-sudo docker run -tid -v /etc/kubernetes/admin.conf:/etc/yardstick/admin.conf --name yardstick opnfv/yardstick:latest
-sudo docker exec -ti yardstick yardstick task start yardstick/samples/ping_k8s.yaml
diff --git a/src/vagrant/k8s_kubeadm/Vagrantfile b/src/vagrant/kubeadm_basic/Vagrantfile
index f1e7aac..f1e7aac 100644
--- a/src/vagrant/k8s_kubeadm/Vagrantfile
+++ b/src/vagrant/kubeadm_basic/Vagrantfile
diff --git a/src/vagrant/k8s_kubeadm/examples/nginx-app.sh b/src/vagrant/kubeadm_basic/examples/nginx-app.sh
index bfd0613..bfd0613 100755
--- a/src/vagrant/k8s_kubeadm/examples/nginx-app.sh
+++ b/src/vagrant/kubeadm_basic/examples/nginx-app.sh
diff --git a/src/vagrant/k8s_kubeadm/examples/nginx-app.yaml b/src/vagrant/kubeadm_basic/examples/nginx-app.yaml
index f80881a..f80881a 100644
--- a/src/vagrant/k8s_kubeadm/examples/nginx-app.yaml
+++ b/src/vagrant/kubeadm_basic/examples/nginx-app.yaml
diff --git a/src/vagrant/k8s_kubeadm/host_setup.sh b/src/vagrant/kubeadm_basic/host_setup.sh
index 990df7f..990df7f 100644
--- a/src/vagrant/k8s_kubeadm/host_setup.sh
+++ b/src/vagrant/kubeadm_basic/host_setup.sh
diff --git a/src/vagrant/k8s_kubeadm/master_setup.sh b/src/vagrant/kubeadm_basic/master_setup.sh
index 2e56bee..34c5923 100644
--- a/src/vagrant/k8s_kubeadm/master_setup.sh
+++ b/src/vagrant/kubeadm_basic/master_setup.sh
@@ -6,8 +6,6 @@ sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf
echo "export KUBECONFIG=$HOME/admin.conf" >> $HOME/.bash_profile
-#kubectl apply -f http://git.io/weave-kube-1.6
+kubectl apply -f http://git.io/weave-kube-1.6
#kubectl apply -f http://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
#kubectl apply -f http://docs.projectcalico.org/v2.1/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml
-kubectl apply -f /vagrant/ovsdpdk/kube_ovsdpdk.yml
-kubectl apply -f /src/cni/ovsdpdk/kube_cniovsdpdk.yml
diff --git a/src/vagrant/k8s_kubeadm/worker_setup.sh b/src/vagrant/kubeadm_basic/worker_setup.sh
index b68d800..b68d800 100644
--- a/src/vagrant/k8s_kubeadm/worker_setup.sh
+++ b/src/vagrant/kubeadm_basic/worker_setup.sh
diff --git a/src/vagrant/kubeadm_ovsdpdk/Vagrantfile b/src/vagrant/kubeadm_ovsdpdk/Vagrantfile
new file mode 100644
index 0000000..f1e7aac
--- /dev/null
+++ b/src/vagrant/kubeadm_ovsdpdk/Vagrantfile
@@ -0,0 +1,34 @@
+$num_workers=3
+
+Vagrant.require_version ">= 1.8.6"
+Vagrant.configure("2") do |config|
+
+ config.vm.box = "bento/ubuntu-16.04"
+ config.vm.synced_folder "../..", "/src"
+ config.vm.provision "shell", path: "host_setup.sh", privileged: false
+ config.vm.provider :virtualbox do |vb|
+ vb.customize ["modifyvm", :id, "--memory", 4096]
+ vb.customize ["modifyvm", :id, "--cpus", 4]
+ vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
+ vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"]
+ vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"]
+ vb.customize "post-boot",["controlvm", :id, "setlinkstate1", "on"]
+ end
+
+ config.vm.define "master" do |config|
+ config.vm.hostname = "master"
+ config.vm.provision "shell", path: "master_setup.sh", privileged: false
+ config.vm.network :private_network, ip: "192.168.1.10"
+ config.vm.network :private_network, ip: "10.244.0.10"
+ end
+
+ (1 .. $num_workers).each do |i|
+ config.vm.define vm_name = "worker%d" % [i] do |config|
+ config.vm.hostname = vm_name
+ config.vm.provision "shell", path: "worker_setup.sh", privileged: false
+ config.vm.network :private_network, ip: "192.168.1.#{i+20}"
+ config.vm.network :private_network, ip: "10.244.0.#{i+20}"
+ end
+ end
+
+end
diff --git a/src/vagrant/k8s_kubeadm/examples/virtio-user.yaml b/src/vagrant/kubeadm_ovsdpdk/examples/virtio-user.yaml
index 9ab1e06..9ab1e06 100644
--- a/src/vagrant/k8s_kubeadm/examples/virtio-user.yaml
+++ b/src/vagrant/kubeadm_ovsdpdk/examples/virtio-user.yaml
diff --git a/src/vagrant/kubeadm_ovsdpdk/host_setup.sh b/src/vagrant/kubeadm_ovsdpdk/host_setup.sh
new file mode 100644
index 0000000..990df7f
--- /dev/null
+++ b/src/vagrant/kubeadm_ovsdpdk/host_setup.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -ex
+
+cat << EOF | sudo tee /etc/hosts
+127.0.0.1 localhost
+192.168.1.10 master
+192.168.1.21 worker1
+192.168.1.22 worker2
+192.168.1.23 worker3
+EOF
+
+curl -s http://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
+cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
+deb http://apt.kubernetes.io/ kubernetes-xenial main
+EOF
+sudo apt-get update
+sudo apt-get install -y docker.io
+sudo apt-get install -y --allow-downgrades kubelet=1.7.0-00 kubeadm=1.7.0-00 kubectl=1.7.0-00 kubernetes-cni=0.5.1-00
diff --git a/src/vagrant/kubeadm_ovsdpdk/master_setup.sh b/src/vagrant/kubeadm_ovsdpdk/master_setup.sh
new file mode 100644
index 0000000..f5bb6fc
--- /dev/null
+++ b/src/vagrant/kubeadm_ovsdpdk/master_setup.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sudo kubeadm init --apiserver-advertise-address 192.168.1.10 --service-cidr=192.168.1.0/24 --pod-network-cidr=10.244.0.0/16 --token 8c5adc.1cec8dbf339093f0
+sudo cp /etc/kubernetes/admin.conf $HOME/
+sudo chown $(id -u):$(id -g) $HOME/admin.conf
+export KUBECONFIG=$HOME/admin.conf
+echo "export KUBECONFIG=$HOME/admin.conf" >> $HOME/.bash_profile
+
+kubectl apply -f /vagrant/ovsdpdk/kube_ovsdpdk.yml
+kubectl apply -f /src/cni/ovsdpdk/kube_cniovsdpdk.yml
diff --git a/src/vagrant/k8s_kubeadm/ovsdpdk/Dockerfile b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/Dockerfile
index a63df8f..a63df8f 100644
--- a/src/vagrant/k8s_kubeadm/ovsdpdk/Dockerfile
+++ b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/Dockerfile
diff --git a/src/vagrant/k8s_kubeadm/ovsdpdk/install.sh b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/install.sh
index f565025..f565025 100644
--- a/src/vagrant/k8s_kubeadm/ovsdpdk/install.sh
+++ b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/install.sh
diff --git a/src/vagrant/k8s_kubeadm/ovsdpdk/kube_ovsdpdk.yml b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/kube_ovsdpdk.yml
index ed04ccd..ed04ccd 100644
--- a/src/vagrant/k8s_kubeadm/ovsdpdk/kube_ovsdpdk.yml
+++ b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/kube_ovsdpdk.yml
diff --git a/src/vagrant/k8s_kubeadm/ovsdpdk/start.sh b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh
index fed7985..fed7985 100644
--- a/src/vagrant/k8s_kubeadm/ovsdpdk/start.sh
+++ b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh
diff --git a/src/vagrant/kubeadm_ovsdpdk/worker_setup.sh b/src/vagrant/kubeadm_ovsdpdk/worker_setup.sh
new file mode 100644
index 0000000..b68d800
--- /dev/null
+++ b/src/vagrant/kubeadm_ovsdpdk/worker_setup.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+set -ex
+sudo kubeadm join --token 8c5adc.1cec8dbf339093f0 192.168.1.10:6443 || true