Browse Source

Don't build dpdk/dppd in installed node

Change-Id: I080f16b3b7881abe0c01a0be6dbbd15f2e9d1270
Signed-off-by: Ruijing Guo <ruijing.guo@intel.com>
Ruijing Guo 3 years ago
parent
commit
b2243e0133

+ 2
- 0
ovs-nsh/Dockerfile View File

@@ -7,6 +7,8 @@ RUN apt-get install -y software-properties-common python-software-properties \
7 7
     fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
8 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
 
10
+RUN apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
11
+
10 12
 RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
11 13
 RUN chmod 0440 /etc/sudoers.d/open-sudo
12 14
 

+ 14
- 0
ovs-nsh/build-ovs-nsh-dpdk.sh View File

@@ -19,7 +19,9 @@ cd /
19 19
 tar -czvf dpdk-${DPDK_VER}.tar.gz dpdk-${DPDK_VER}
20 20
 cd dpdk-${DPDK_VER}
21 21
 make install T=${RTE_TARGET}
22
+find . | grep "\.o$" | xargs rm -rf
22 23
 cd /
24
+tar czvf dpdk-${DPDK_VER}.bin.tar.gz dpdk-${DPDK_VER}
23 25
 
24 26
 git clone ${URL_OVS} openvswitch-dpdk
25 27
 cd openvswitch-dpdk
@@ -34,3 +36,15 @@ export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
34 36
 ./configure --with-dpdk=$DPDK_BUILD
35 37
 sed -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;
36 38
 cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
39
+
40
+
41
+cd /
42
+wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip
43
+unzip dppd-prox-v021.zip
44
+export RTE_SDK=/dpdk-${DPDK_VER}
45
+export RTE_TARGET=x86_64-native-linuxapp-gcc
46
+cd /dppd-PROX-v021
47
+export DPPD_DIR=`pwd`; make
48
+find . | grep "\.o$" | xargs rm -rf
49
+cd /
50
+tar czvf dppd-prox-v021.bin.tar.gz dppd-PROX-v021

+ 3
- 2
pre_build_hook View File

@@ -26,11 +26,12 @@ function build_pkg {
26 26
       sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/
27 27
       sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/ovs/
28 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 30
       sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk
31 31
       sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/dpdk
32 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 36
     *) echo "Not supported system"; exit 1;;
36 37
   esac

+ 10
- 9
repositories/ubuntu/dpdk/dpdk-install.sh View File

@@ -2,22 +2,23 @@
2 2
 
3 3
 NICS=$1
4 4
 INSTALL_HOME=/usr/share/dpdk/
5
-sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
5
+rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
6 6
 cd $INSTALL_HOME
7
-wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-2.1.0.tar.gz;
8
-tar -xvzf dpdk-2.1.0.tar.gz
9
-cd $INSTALL_HOME/dpdk-2.1.0; make install T=x86_64-native-linuxapp-gcc
7
+wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-2.1.0.bin.tar.gz
8
+tar xzvf dpdk-2.1.0.bin.tar.gz
9
+rm -rf dpdk-2.1.0.bin.tar.gz
10 10
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk
11 11
 chmod +x /etc/init.d/dpdk
12 12
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf
13 13
 sed "s/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/" -i /etc/default/dpdk.conf
14
-sudo service dpdk start
14
+service dpdk start
15
+
15 16
 INSTALL_HOME=/usr/share/ovs-dpdk/
16
-sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
17
+rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
17 18
 cd $INSTALL_HOME
18 19
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb
19
-sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
20
+dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
20 21
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-common_2.4.90-1_amd64.deb
21
-sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb
22
+dpkg -i openvswitch-common_2.4.90-1_amd64.deb
22 23
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-switch_2.4.90-1_amd64.deb
23
-sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb
24
+dpkg -i openvswitch-switch_2.4.90-1_amd64.deb

+ 5
- 8
repositories/ubuntu/dppd/dppd-install.sh View File

@@ -1,12 +1,9 @@
1 1
 #!/bin/bash
2 2
 set -eux
3 3
 INSTALL_HOME=/usr/share/dppd/
4
-sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
4
+rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
5 5
 cd $INSTALL_HOME
6
-sudo apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
7
-wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-prox-v021.zip;
8
-unzip dppd-prox-v021.zip
9
-export RTE_SDK=/usr/share/dpdk/dpdk-2.1.0
10
-export RTE_TARGET=x86_64-native-linuxapp-gcc
11
-cd /usr/share/dppd/dppd-PROX-v021
12
-export DPPD_DIR=`pwd`; make
6
+apt-get install -y pkg-config liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
7
+wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-prox-v021.bin.tar.gz
8
+tar xzvf dppd-prox-v021.bin.tar.gz
9
+rm -rf dppd-prox-v021.bin.tar.gz

+ 4
- 4
repositories/ubuntu/ovs/ovs-install.sh View File

@@ -2,11 +2,11 @@
2 2
 set -eux
3 3
 
4 4
 INSTALL_HOME=/usr/share/ovs/
5
-sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
5
+rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
6 6
 cd $INSTALL_HOME
7 7
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-datapath-dkms_2.4.90-1_all.deb
8
-sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
8
+dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
9 9
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-common_2.4.90-1_amd64.deb
10
-sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb
10
+dpkg -i openvswitch-common_2.4.90-1_amd64.deb
11 11
 wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-switch_2.4.90-1_amd64.deb
12
-sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb
12
+dpkg -i openvswitch-switch_2.4.90-1_amd64.deb

Loading…
Cancel
Save