summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/build.sh3
-rw-r--r--src/cni/ovsdpdk/Dockerfile7
-rw-r--r--src/cni/ovsdpdk/Dockerfile.build6
-rw-r--r--src/cni/ovsdpdk/Dockerfile.cniovsdpdk3
-rw-r--r--src/cni/ovsdpdk/Vagrantfile16
-rw-r--r--src/cni/ovsdpdk/build.sh18
-rw-r--r--[-rwxr-xr-x]src/cni/ovsdpdk/build_cni.sh (renamed from src/cni/ovsdpdk/build_cni_ovsdpdk.sh)12
-rw-r--r--src/cni/ovsdpdk/cni/install_cni.sh (renamed from src/cni/ovsdpdk/install_cni.sh)0
-rwxr-xr-xsrc/cni/ovsdpdk/cni/setup_ovsdpdk.sh (renamed from src/cni/ovsdpdk/setup_ovsdpdk.sh)0
-rwxr-xr-xsrc/cni/ovsdpdk/cni/teardown_ovsdpdk.sh (renamed from src/cni/ovsdpdk/teardown_ovsdpdk.sh)0
10 files changed, 32 insertions, 33 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 1011923..9d07600 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -14,5 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+set -ex
-echo "build"
+bash ../src/cni/ovsdpdk/build.sh
diff --git a/src/cni/ovsdpdk/Dockerfile b/src/cni/ovsdpdk/Dockerfile
deleted file mode 100644
index 2a7208c..0000000
--- a/src/cni/ovsdpdk/Dockerfile
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM ubuntu:16.04
-
-WORKDIR /cni
-ADD setup_ovsdpdk.sh .
-ADD teardown_ovsdpdk.sh .
-ADD ovsdpdk .
-ADD install_cni.sh .
diff --git a/src/cni/ovsdpdk/Dockerfile.build b/src/cni/ovsdpdk/Dockerfile.build
new file mode 100644
index 0000000..ed5731e
--- /dev/null
+++ b/src/cni/ovsdpdk/Dockerfile.build
@@ -0,0 +1,6 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get install -y sudo git wget
+ADD ovsdpdk.patch /
+ADD build_cni.sh /
+RUN bash /build_cni.sh
diff --git a/src/cni/ovsdpdk/Dockerfile.cniovsdpdk b/src/cni/ovsdpdk/Dockerfile.cniovsdpdk
new file mode 100644
index 0000000..2dd4f3c
--- /dev/null
+++ b/src/cni/ovsdpdk/Dockerfile.cniovsdpdk
@@ -0,0 +1,3 @@
+FROM ubuntu:16.04
+
+ADD cni /cni
diff --git a/src/cni/ovsdpdk/Vagrantfile b/src/cni/ovsdpdk/Vagrantfile
deleted file mode 100644
index f170c69..0000000
--- a/src/cni/ovsdpdk/Vagrantfile
+++ /dev/null
@@ -1,16 +0,0 @@
-Vagrant.require_version ">= 1.8.6"
-Vagrant.configure("2") do |config|
-
- config.vm.box = "bento/ubuntu-16.04"
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", 4096]
- vb.customize ["modifyvm", :id, "--cpus", 4]
- vb.customize "post-boot",["controlvm", :id, "setlinkstate1", "on"]
- end
-
- config.vm.define "cni-ovsdpdk" do |config|
- config.vm.hostname = "cni-ovsdpdk"
- config.vm.provision "shell", path: "build_cni_ovsdpdk.sh", privileged: false
- end
-
-end
diff --git a/src/cni/ovsdpdk/build.sh b/src/cni/ovsdpdk/build.sh
new file mode 100644
index 0000000..fad1abc
--- /dev/null
+++ b/src/cni/ovsdpdk/build.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -ex
+
+HOME="$(dirname `readlink -f $0`)"
+PWD="$(pwd)"
+
+cd $HOME
+sudo apt-get install -y docker.io
+sudo docker rmi -f cniovsdpdk.build || true
+sudo docker build -t cniovsdpdk.build . -f Dockerfile.build
+sudo docker run -v $HOME/cni:/build -t cniovsdpdk.build cp /plugins/bin/ovsdpdk /build
+sudo docker build -t openretriever/cnicniovsdpdk . -f Dockerfile.cniovsdpdk
+sudo rm -rf $HOME/cni/ovsdpdk
+echo git clone https://github.com/containernetworking/cni
+echo sudo CNI_PATH=$CNI_PATH ./priv-net-run.sh ifconfig
+echo sudo docker login openretriever/cnicniovsdpdk -u user -p password
+echo sudo docker push openretriever/cnicniovsdpdk
+cd $PWD
diff --git a/src/cni/ovsdpdk/build_cni_ovsdpdk.sh b/src/cni/ovsdpdk/build_cni.sh
index 71318d8..dbb3dd5 100755..100644
--- a/src/cni/ovsdpdk/build_cni_ovsdpdk.sh
+++ b/src/cni/ovsdpdk/build_cni.sh
@@ -1,19 +1,13 @@
#!/bin/bash
-
set -ex
sudo apt-get update
-sudo apt-get install -y docker.io devscripts git
+sudo apt-get install -y docker.io devscripts git jq
wget -qO- https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
echo 'export GOPATH=/go; export PATH=/usr/local/go/bin:$GOPATH/bin:$PATH' >> ~/.bashrc
export GOPATH=/go; export PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
-git clone https://github.com/containernetworking/cni
-echo sudo CNI_PATH=$CNI_PATH ./priv-net-run.sh ifconfig
git clone https://github.com/containernetworking/plugins
cd plugins
git checkout 5544d9ced0d6e908fe26e9dbe529c7feb87d21f5
-patch -p1 < /vagrant/ovsdpdk.patch
-./build.sh
-cd bin
-cp /vagrant/* .
-sudo docker build -t openretriever/cni-ovsdpdk .
+patch -p1 < ../ovsdpdk.patch
+bash ./build.sh
diff --git a/src/cni/ovsdpdk/install_cni.sh b/src/cni/ovsdpdk/cni/install_cni.sh
index 1996700..1996700 100644
--- a/src/cni/ovsdpdk/install_cni.sh
+++ b/src/cni/ovsdpdk/cni/install_cni.sh
diff --git a/src/cni/ovsdpdk/setup_ovsdpdk.sh b/src/cni/ovsdpdk/cni/setup_ovsdpdk.sh
index 6009b7a..6009b7a 100755
--- a/src/cni/ovsdpdk/setup_ovsdpdk.sh
+++ b/src/cni/ovsdpdk/cni/setup_ovsdpdk.sh
diff --git a/src/cni/ovsdpdk/teardown_ovsdpdk.sh b/src/cni/ovsdpdk/cni/teardown_ovsdpdk.sh
index 857738e..857738e 100755
--- a/src/cni/ovsdpdk/teardown_ovsdpdk.sh
+++ b/src/cni/ovsdpdk/cni/teardown_ovsdpdk.sh