summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuijing Guo <ruijing.guo@intel.com>2015-12-23 01:36:06 +0000
committerRuijing Guo <ruijing.guo@intel.com>2015-12-23 01:45:59 +0000
commitb2243e01336f5c1c64587f7819e65ddaa6b82fa7 (patch)
tree2bfcc6ec5a79fca801aba3a07998e3d8609ec977
parent8e950c32dc85a89b0ac1dfbae4e27de90b66ac45 (diff)
Don't build dpdk/dppd in installed node
Change-Id: I080f16b3b7881abe0c01a0be6dbbd15f2e9d1270 Signed-off-by: Ruijing Guo <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+1: yuling <ling.y.yu@intel.com> Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 23 Dec 2015 01:53:30 +0000 Reviewed-on: https://review.openstack.org/260853 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--ovs-nsh/Dockerfile2
-rwxr-xr-xovs-nsh/build-ovs-nsh-dpdk.sh14
-rwxr-xr-xpre_build_hook5
-rwxr-xr-xrepositories/ubuntu/dpdk/dpdk-install.sh19
-rwxr-xr-xrepositories/ubuntu/dppd/dppd-install.sh13
-rwxr-xr-xrepositories/ubuntu/ovs/ovs-install.sh8
6 files changed, 38 insertions, 23 deletions
diff --git a/ovs-nsh/Dockerfile b/ovs-nsh/Dockerfile
index f4a04c0..ac936ba 100644
--- a/ovs-nsh/Dockerfile
+++ b/ovs-nsh/Dockerfile
@@ -7,6 +7,8 @@ RUN apt-get install -y software-properties-common python-software-properties \
7 fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \ 7 fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
8 ca-certificates sudo apt-utils lsb-release libtool autoconf automake build-essential fakeroot libssl-dev graphviz dh-autoreconf python-qt4 python-twisted-conch python-zopeinterface linux-headers-`uname -r` 8 ca-certificates sudo apt-utils lsb-release libtool autoconf automake build-essential fakeroot libssl-dev graphviz dh-autoreconf python-qt4 python-twisted-conch python-zopeinterface linux-headers-`uname -r`
9 9
10RUN apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
11
10RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo 12RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
11RUN chmod 0440 /etc/sudoers.d/open-sudo 13RUN chmod 0440 /etc/sudoers.d/open-sudo
12 14
diff --git a/ovs-nsh/build-ovs-nsh-dpdk.sh b/ovs-nsh/build-ovs-nsh-dpdk.sh
index 7a772e6..1f9e7cc 100755
--- a/ovs-nsh/build-ovs-nsh-dpdk.sh
+++ b/ovs-nsh/build-ovs-nsh-dpdk.sh
@@ -19,7 +19,9 @@ cd /
19tar -czvf dpdk-${DPDK_VER}.tar.gz dpdk-${DPDK_VER} 19tar -czvf dpdk-${DPDK_VER}.tar.gz dpdk-${DPDK_VER}
20cd dpdk-${DPDK_VER} 20cd dpdk-${DPDK_VER}
21make install T=${RTE_TARGET} 21make install T=${RTE_TARGET}
22find . | grep "\.o$" | xargs rm -rf
22cd / 23cd /
24tar czvf dpdk-${DPDK_VER}.bin.tar.gz dpdk-${DPDK_VER}
23 25
24git clone ${URL_OVS} openvswitch-dpdk 26git clone ${URL_OVS} openvswitch-dpdk
25cd openvswitch-dpdk 27cd openvswitch-dpdk
@@ -34,3 +36,15 @@ export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
34./configure --with-dpdk=$DPDK_BUILD 36./configure --with-dpdk=$DPDK_BUILD
35sed -i "s?set ovs-vswitchd unix?set ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix?" utilities/ovs-ctl.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/dkms.conf.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/rules.modules;sed -i "s?configure --?configure -- --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc?" debian/rules;make dist;tar -xzf openvswitch-2.4.90.tar.gz; 37sed -i "s?set ovs-vswitchd unix?set ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix?" utilities/ovs-ctl.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/dkms.conf.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/rules.modules;sed -i "s?configure --?configure -- --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc?" debian/rules;make dist;tar -xzf openvswitch-2.4.90.tar.gz;
36cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary 38cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
39
40
41cd /
42wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip
43unzip dppd-prox-v021.zip
44export RTE_SDK=/dpdk-${DPDK_VER}
45export RTE_TARGET=x86_64-native-linuxapp-gcc
46cd /dppd-PROX-v021
47export DPPD_DIR=`pwd`; make
48find . | grep "\.o$" | xargs rm -rf
49cd /
50tar czvf dppd-prox-v021.bin.tar.gz dppd-PROX-v021
diff --git a/pre_build_hook b/pre_build_hook
index 526dc28..5804d83 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -26,11 +26,12 @@ function build_pkg {
26 sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/ 26 sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/
27 sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/ovs/ 27 sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/ovs/
28 sudo docker cp $container_id:/openvswitch/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/ 28 sudo docker cp $container_id:/openvswitch/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/
29 sudo docker cp $container_id:/dpdk-2.1.0.tar.gz ${DIR}/repositories/ubuntu/dpdk/ 29
30 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk 30 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk
31 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/dpdk 31 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/dpdk
32 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk 32 sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk
33 wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip -O ${DIR}/repositories/ubuntu/dppd/dppd-prox-v021.zip 33 sudo docker cp $container_id:/dpdk-2.1.0.bin.tar.gz ${DIR}/repositories/ubuntu/dpdk/
34 sudo docker cp $container_id:/dppd-prox-v021.bin.tar.gz ${DIR}/repositories/ubuntu/dppd/
34 ;; 35 ;;
35 *) echo "Not supported system"; exit 1;; 36 *) echo "Not supported system"; exit 1;;
36 esac 37 esac
diff --git a/repositories/ubuntu/dpdk/dpdk-install.sh b/repositories/ubuntu/dpdk/dpdk-install.sh
index 7912372..99b406c 100755
--- a/repositories/ubuntu/dpdk/dpdk-install.sh
+++ b/repositories/ubuntu/dpdk/dpdk-install.sh
@@ -2,22 +2,23 @@
2 2
3NICS=$1 3NICS=$1
4INSTALL_HOME=/usr/share/dpdk/ 4INSTALL_HOME=/usr/share/dpdk/
5sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME 5rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
6cd $INSTALL_HOME 6cd $INSTALL_HOME
7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-2.1.0.tar.gz; 7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-2.1.0.bin.tar.gz
8tar -xvzf dpdk-2.1.0.tar.gz 8tar xzvf dpdk-2.1.0.bin.tar.gz
9cd $INSTALL_HOME/dpdk-2.1.0; make install T=x86_64-native-linuxapp-gcc 9rm -rf dpdk-2.1.0.bin.tar.gz
10wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk 10wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk
11chmod +x /etc/init.d/dpdk 11chmod +x /etc/init.d/dpdk
12wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf 12wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf
13sed "s/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/" -i /etc/default/dpdk.conf 13sed "s/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/" -i /etc/default/dpdk.conf
14sudo service dpdk start 14service dpdk start
15
15INSTALL_HOME=/usr/share/ovs-dpdk/ 16INSTALL_HOME=/usr/share/ovs-dpdk/
16sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME 17rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
17cd $INSTALL_HOME 18cd $INSTALL_HOME
18wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb 19wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb
19sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb 20dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
20wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-common_2.4.90-1_amd64.deb 21wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-common_2.4.90-1_amd64.deb
21sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb 22dpkg -i openvswitch-common_2.4.90-1_amd64.deb
22wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-switch_2.4.90-1_amd64.deb 23wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-switch_2.4.90-1_amd64.deb
23sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb 24dpkg -i openvswitch-switch_2.4.90-1_amd64.deb
diff --git a/repositories/ubuntu/dppd/dppd-install.sh b/repositories/ubuntu/dppd/dppd-install.sh
index 07cde07..93b918e 100755
--- a/repositories/ubuntu/dppd/dppd-install.sh
+++ b/repositories/ubuntu/dppd/dppd-install.sh
@@ -1,12 +1,9 @@
1#!/bin/bash 1#!/bin/bash
2set -eux 2set -eux
3INSTALL_HOME=/usr/share/dppd/ 3INSTALL_HOME=/usr/share/dppd/
4sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME 4rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
5cd $INSTALL_HOME 5cd $INSTALL_HOME
6sudo apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev 6apt-get install -y pkg-config liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-prox-v021.zip; 7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-prox-v021.bin.tar.gz
8unzip dppd-prox-v021.zip 8tar xzvf dppd-prox-v021.bin.tar.gz
9export RTE_SDK=/usr/share/dpdk/dpdk-2.1.0 9rm -rf dppd-prox-v021.bin.tar.gz
10export RTE_TARGET=x86_64-native-linuxapp-gcc
11cd /usr/share/dppd/dppd-PROX-v021
12export DPPD_DIR=`pwd`; make
diff --git a/repositories/ubuntu/ovs/ovs-install.sh b/repositories/ubuntu/ovs/ovs-install.sh
index cb35910..a323817 100755
--- a/repositories/ubuntu/ovs/ovs-install.sh
+++ b/repositories/ubuntu/ovs/ovs-install.sh
@@ -2,11 +2,11 @@
2set -eux 2set -eux
3 3
4INSTALL_HOME=/usr/share/ovs/ 4INSTALL_HOME=/usr/share/ovs/
5sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME 5rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
6cd $INSTALL_HOME 6cd $INSTALL_HOME
7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-datapath-dkms_2.4.90-1_all.deb 7wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-datapath-dkms_2.4.90-1_all.deb
8sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb 8dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
9wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-common_2.4.90-1_amd64.deb 9wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-common_2.4.90-1_amd64.deb
10sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb 10dpkg -i openvswitch-common_2.4.90-1_amd64.deb
11wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-switch_2.4.90-1_amd64.deb 11wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-switch_2.4.90-1_amd64.deb
12sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb 12dpkg -i openvswitch-switch_2.4.90-1_amd64.deb