From a8388222d5d1f11be506e9e79f5e2476c447177e Mon Sep 17 00:00:00 2001 From: Guo Ruijing Date: Thu, 23 Nov 2017 12:58:05 -0500 Subject: build ovsdpdk cni during deployment Change-Id: I1c3d4b44bab0d75fae93f7fabce7bcfdcc3b9f35 Signed-off-by: Guo Ruijing --- src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh (limited to 'src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh') diff --git a/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh b/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh deleted file mode 100644 index 4fc3d17..0000000 --- a/src/vagrant/kubeadm_ovsdpdk/ovsdpdk/start.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -ex - -for i in {1..10} -do - sudo sysctl -w vm.nr_hugepages=2048; sleep 1 -done -sudo modprobe uio_pci_generic -ip=$(ip a s eth2 | grep inet | grep -v inet6 | sed "s/.*inet//" | cut -f2 -d' ') -sudo ip address flush eth2 -sudo /usr/share/dpdk/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth2 -sudo sysctl -w vm.nr_hugepages=1024 -sudo mount -t hugetlbfs -o pagesize=2M none /dev/hugepages -sudo cp /usr/bin/ovs-vsctl /usr/local/bin -memory=$(grep HugePages_Total /proc/meminfo | cut -f2 -d:) -echo "DPDK_OPTS='--dpdk -c 0x1 -n 2 -m $memory'" | sudo tee -a /etc/default/openvswitch-switch -sudo service dpdk restart -sudo service openvswitch-switch restart -sudo pkill ovs-vswitchd -sudo ovs-vswitchd --dpdk -c 0x1 -n 2 -m $memory -- unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach --monitor -sudo ovs-vsctl add-br br-dpdk -- set bridge br-dpdk datapath_type=netdev -sudo ovs-vsctl add-port br-dpdk dpdk0 -- set Interface dpdk0 type=dpdk -sudo ip a a $ip dev br-dpdk -sudo ip link set dev br-dpdk up -while true; do sleep 3600; done -echo sudo docker build -t openretriever/ubuntu1604-ovsdpdk . -echo sudo docker run -ti --privileged --net=host -v /dev:/dev -v /usr/local/bin:/usr/local/bin -v /var/run/openvswitch/:/var/run/openvswitch/ -v /lib/modules/:/lib/modules openretriever/ubuntu1604-ovsdpdk bash -- cgit 1.2.3-korg