Add Kubernetes VPP Vhostuser Deployment Scenario on arm64 platform 67/61567/1
authortrevortao <trevor.tao@arm.com>
Thu, 30 Aug 2018 02:54:01 +0000 (10:54 +0800)
committertrevortao <trevor.tao@arm.com>
Thu, 30 Aug 2018 02:54:01 +0000 (10:54 +0800)
Add the deployment of Kubernetes VPP Vhostuser scenario with the
help of Compass installer on arm64 platform, which would enable
the containers and VPP vswitch communication with virtio-vhostuser
interface.

Change-Id: I84531dd3730f94a7910f2f5615a193420fdad73f
Signed-off-by: trevortao <trevor.tao@arm.com>
src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh [new file with mode: 0755]
src/arm/kubernetes_vpp_vhostuser/k8s-build.sh [new file with mode: 0755]
src/arm/kubernetes_vpp_vhostuser/k8s-deploy.sh [new file with mode: 0755]
src/arm/kubernetes_vpp_vhostuser/setup.sh [new file with mode: 0755]

diff --git a/src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh b/src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh
new file mode 100755 (executable)
index 0000000..941b917
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash -e
+
+cd ../cni-deploy
+
+DEPLOY_SCENARIO="k8-vpp-nofeature-noha"
+
+export ANSIBLE_HOST_KEY_CHECKING=False
+
+virtualenv .venv
+source .venv/bin/activate
+pip install ansible==2.6.1
+
+#deploy flannel, multus
+ansible-playbook -i inventory/inventory.cfg deploy.yml --tags flannel,multus
+#deploy vhost-vpp
+ansible-playbook -i inventory/inventory.cfg deploy.yml --tags vhost-vpp
diff --git a/src/arm/kubernetes_vpp_vhostuser/k8s-build.sh b/src/arm/kubernetes_vpp_vhostuser/k8s-build.sh
new file mode 100755 (executable)
index 0000000..fa7aa53
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -e
+
+
+sudo apt-get install -y docker.io libvirt-bin virt-manager qemu qemu-efi
+
+WORKSPACE=`pwd`
+if [ ! -d "$WORKSPACE/compass4nfv" ]; then
+        git clone https://gerrit.opnfv.org/gerrit/compass4nfv
+fi
+
+#rm -rf compass4nfv
+#git clone https://gerrit.opnfv.org/gerrit/compass4nfv
+
+cd compass4nfv
+
+COMPASS_WORK_DIR=$WORKSPACE/../compass-work
+mkdir -p $COMPASS_WORK_DIR
+ln -s $COMPASS_WORK_DIR work
+
+sudo docker rm -f `docker ps | grep compass | cut -f1 -d' '` || true
+
+curl -s http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
+
+./build.sh
diff --git a/src/arm/kubernetes_vpp_vhostuser/k8s-deploy.sh b/src/arm/kubernetes_vpp_vhostuser/k8s-deploy.sh
new file mode 100755 (executable)
index 0000000..21082b3
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+cd compass4nfv
+
+
+export ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*'
+export OS_VERSION="centos7"
+export KUBERNETES_VERSION="v1.9.1"
+
+
+#For virtual environment:
+export DHA="deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml"
+export NETWORK="deploy/conf/vm_environment/network.yml"
+export VIRT_NUMBER=2 VIRT_CPUS=8 VIRT_MEM=8192 VIRT_DISK=50G
+
+./deploy.sh
diff --git a/src/arm/kubernetes_vpp_vhostuser/setup.sh b/src/arm/kubernetes_vpp_vhostuser/setup.sh
new file mode 100755 (executable)
index 0000000..ae30803
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+echo "Now build:"
+./k8s-build.sh
+
+sleep 2
+echo "Now deploy VMs:"
+./k8s-deploy.sh
+
+sleep 2
+echo "Now deploy vpp_vhostuser:"
+./deploy-cni.sh