diff options
author | trevortao <trevor.tao@arm.com> | 2018-08-30 10:54:01 +0800 |
---|---|---|
committer | trevortao <trevor.tao@arm.com> | 2018-08-30 10:54:01 +0800 |
commit | cdbfc1d717712f330aa1412d6c59085f98b8ac5e (patch) | |
tree | 4aea5a552cc562767557c7df1e15699fc5153a99 | |
parent | 3f74777a46de1ba29ad207ba9f1145a2cd6dd617 (diff) |
Add Kubernetes VPP Vhostuser Deployment Scenario on arm64 platform
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>
-rwxr-xr-x | src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh | 16 | ||||
-rwxr-xr-x | src/arm/kubernetes_vpp_vhostuser/k8s-build.sh | 25 | ||||
-rwxr-xr-x | src/arm/kubernetes_vpp_vhostuser/k8s-deploy.sh | 17 | ||||
-rwxr-xr-x | src/arm/kubernetes_vpp_vhostuser/setup.sh | 11 |
4 files changed, 69 insertions, 0 deletions
diff --git a/src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh b/src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh new file mode 100755 index 0000000..941b917 --- /dev/null +++ b/src/arm/kubernetes_vpp_vhostuser/deploy-cni.sh @@ -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 index 0000000..fa7aa53 --- /dev/null +++ b/src/arm/kubernetes_vpp_vhostuser/k8s-build.sh @@ -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 index 0000000..21082b3 --- /dev/null +++ b/src/arm/kubernetes_vpp_vhostuser/k8s-deploy.sh @@ -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 index 0000000..ae30803 --- /dev/null +++ b/src/arm/kubernetes_vpp_vhostuser/setup.sh @@ -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 |