summaryrefslogtreecommitdiffstats
path: root/src/cni/ovsdpdk/install_cni.sh
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-11-23 12:58:05 -0500
committerGuo Ruijing <ruijing.guo@intel.com>2017-11-23 16:33:53 -0500
commita8388222d5d1f11be506e9e79f5e2476c447177e (patch)
tree59aebeb523399bd3c3132391ad85c3153b779448 /src/cni/ovsdpdk/install_cni.sh
parentec94abf0ea9154af2f0dbce13e12df775b72bbac (diff)
build ovsdpdk cni during deployment
Change-Id: I1c3d4b44bab0d75fae93f7fabce7bcfdcc3b9f35 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'src/cni/ovsdpdk/install_cni.sh')
-rwxr-xr-xsrc/cni/ovsdpdk/install_cni.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cni/ovsdpdk/install_cni.sh b/src/cni/ovsdpdk/install_cni.sh
new file mode 100755
index 0000000..946d04c
--- /dev/null
+++ b/src/cni/ovsdpdk/install_cni.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -ex
+
+
+export PATH=/usr/local/go/bin:$PATH
+
+DIR="$(dirname `readlink -f $0`)"
+cd $DIR
+apt-get update && apt-get install -y git wget gcc
+wget -qO- https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
+rm -rf plugins
+git clone https://github.com/containernetworking/plugins
+cd plugins
+git checkout 5544d9ced0d6e908fe26e9dbe529c7feb87d21f5
+mkdir plugins/main/ovsdpdk
+cp ../ovsdpdk.go plugins/main/ovsdpdk
+sed -i "s,PLUGINS=.*,PLUGINS=plugins/main/ovsdpdk," build.sh
+./build.sh
+mkdir -p /opt/cni/bin
+cp bin/ovsdpdk /opt/cni/bin
+cp ../setup_ovsdpdk.sh ../teardown_ovsdpdk.sh /opt/cni/bin
+rm -rf plugins