Browse Source

Merge "build ovs with dpdk from mos"

tags/10.0-eol
Jenkins 2 years ago
parent
commit
70176c98b5

+ 16
- 16
deployment_scripts/install.sh View File

@@ -11,7 +11,7 @@ dpdk=$3
11 11
 dpdk_socket_mem=${4:-''}
12 12
 pmd_cpu_mask=${5:-'2'}
13 13
 
14
-apt-get install -y dkms
14
+apt-get install -y --allow-unauthenticated dkms
15 15
 
16 16
 if [ $nsh = 'true' ]
17 17
 then
@@ -22,9 +22,7 @@ then
22 22
     dpkg -i python-openvswitch_2.6.1-1.nsh_all.deb
23 23
     if [ $dpdk = 'true' ]
24 24
     then
25
-        dpkg -i libxenstore3.0*.deb
26
-        dpkg -i libdpdk0_16.07-1_amd64.deb
27
-        dpkg -i dpdk_16.07-1_amd64.deb
25
+        apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
28 26
         dpkg -i openvswitch-switch-dpdk_2.6.1-1.nsh_amd64.deb
29 27
     fi
30 28
 else
@@ -33,21 +31,23 @@ else
33 31
     dpkg -i openvswitch-common_2.6.90-1_amd64.deb
34 32
     dpkg -i openvswitch-switch_2.6.90-1_amd64.deb
35 33
     dpkg -i python-openvswitch_2.6.90-1_all.deb
36
-    if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
34
+    if [ $dpdk = 'true' ]
37 35
     then
38
-        dpkg -i libxenstore3.0*.deb
39
-        dpkg -i libdpdk0_16.07-1_amd64.deb
40
-        dpkg -i dpdk_16.07-1_amd64.deb
36
+        apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
41 37
         dpkg -i openvswitch-switch-dpdk_2.6.90-1_amd64.deb
42 38
 
43
-        #Set to 0, dpdk init script mount hugepages but don't change current allocation
44
-        sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf
45
-        service dpdk start
39
+    fi
40
+fi
41
+
42
+if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
43
+then
44
+    #Set to 0, dpdk init script mount hugepages but don't change current allocation
45
+    sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf
46
+    service dpdk start
46 47
 
47
-        ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
48
-        ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
49
-        ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask="$pmd_cpu_mask"
48
+    ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
49
+    ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
50
+    ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask="$pmd_cpu_mask"
50 51
 
51
-        service openvswitch-switch restart
52
-    fi
52
+    service openvswitch-switch restart
53 53
 fi

+ 16
- 6
ovs_build/build-ovs-dpdk.sh View File

@@ -10,15 +10,23 @@ BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
10 10
 
11 11
 export DEB_BUILD_OPTIONS='parallel=8 nocheck'
12 12
 
13
-sudo apt-get -y install devscripts dpkg-dev git wget
13
+sudo apt-get -y install devscripts dpkg-dev git wget dkms
14 14
 
15
-rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}
15
+rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
16 16
 
17 17
 cd ${BUILD_HOME}
18 18
 wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
19 19
 xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
20 20
 cd dpdk-16.07
21
-cp -r ${BUILD_SRC}/dpdk_16.07/debian .
21
+cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
22
+cat << EOF > debian/changelog
23
+dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
24
+
25
+  * Rebuild debian package
26
+  * update librte-eal2.symbols
27
+
28
+ -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29
+EOF
22 30
 
23 31
 # copy from debian/control
24 32
 sudo apt-get install -y debhelper \
@@ -38,8 +46,9 @@ sudo apt-get install -y debhelper \
38 46
 debian/rules build; fakeroot debian/rules binary
39 47
 
40 48
 cd ${BUILD_HOME}
49
+sudo apt-get install -y hwdata
41 50
 sudo dpkg -i *.deb
42
-apt-get download libxenstore3.0
51
+mv *.deb ${BUILD_DEST}
43 52
 
44 53
 # copy from debian/control
45 54
 sudo apt-get install -y autoconf \
@@ -80,5 +89,6 @@ debian/rules build; fakeroot debian/rules binary
80 89
 cd ${BUILD_HOME}/ovs
81 90
 debian/rules build; fakeroot debian/rules binary
82 91
 
83
-cp -r ${BUILD_HOME}/*.deb ${BUILD_DEST}
84
-rm -rf ${BUILD_HOME}
92
+cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
93
+cd ${BUILD_HOME}/deb
94
+tar czvf ${BUILD_DEST}/ovs-dpdk.tar.gz .;

+ 16
- 6
ovs_build/build-ovs-nsh-dpdk.sh View File

@@ -10,15 +10,23 @@ BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
10 10
 
11 11
 export DEB_BUILD_OPTIONS='parallel=8 nocheck'
12 12
 
13
-sudo apt-get -y install devscripts dpkg-dev git wget
13
+sudo apt-get -y install devscripts dpkg-dev git wget dkms
14 14
 
15
-rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}
15
+rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
16 16
 
17 17
 cd ${BUILD_HOME}
18 18
 wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
19 19
 xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
20 20
 cd dpdk-16.07
21
-cp -r ${BUILD_SRC}/dpdk_16.07/debian .
21
+cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
22
+cat << EOF > debian/changelog
23
+dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
24
+
25
+  * Rebuild debian package
26
+  * update librte-eal2.symbols
27
+
28
+ -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29
+EOF
22 30
 
23 31
 # copy from debian/control
24 32
 sudo apt-get install -y debhelper \
@@ -38,8 +46,9 @@ sudo apt-get install -y debhelper \
38 46
 debian/rules build; fakeroot debian/rules binary
39 47
 
40 48
 cd ${BUILD_HOME}
49
+sudo apt-get install -y hwdata
41 50
 sudo dpkg -i *.deb
42
-apt-get download libxenstore3.0
51
+mv *.deb ${BUILD_DEST}
43 52
 
44 53
 # copy from debian/control
45 54
 sudo apt-get install -y autoconf \
@@ -92,5 +101,6 @@ openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
92 101
 EOF
93 102
 debian/rules build; fakeroot debian/rules binary
94 103
 
95
-cp -r ${BUILD_HOME}/*.deb ${BUILD_DEST}
96
-rm -rf ${BUILD_HOME}
104
+cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
105
+cd ${BUILD_HOME}/deb
106
+tar czvf ${BUILD_DEST}/ovs-nsh-dpdk.tar.gz .;

+ 0
- 1
ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols View File

@@ -62,7 +62,6 @@ librte_eal.so.2 librte-eal2 #MINVER#
62 62
  rte_eal_primary_proc_alive@DPDK_16.04 16.04
63 63
  rte_eal_process_type@DPDK_2.0 16.04
64 64
  rte_eal_remote_launch@DPDK_2.0 16.04
65
- rte_eal_set_socket_permissions@DPDK_2.2 16.04
66 65
  rte_eal_tailq_lookup@DPDK_2.0 16.04
67 66
  rte_eal_tailq_register@DPDK_2.0 16.04
68 67
  rte_eal_vdev_init@DPDK_2.0 16.04

+ 3
- 5
pre_build_hook View File

@@ -16,14 +16,12 @@ function build_pkg {
16 16
       DEB_DIR=${DIR}/deb-ovs-dpdk
17 17
       rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
18 18
       sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-dpdk.sh
19
-      cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .;
20
-      cd ..; rm -rf ${DEB_DIR}
19
+      cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/
21 20
 
22
-      DEB_DIR=${DIR}/deb-ovs-nsh-dpdk
23 21
       rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
24 22
       sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
25
-      cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .;
26
-      cd ..; rm -rf ${DEB_DIR}
23
+      cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/
24
+      rm -rf ${DEB_DIR}
27 25
 
28 26
       ;;
29 27
     *) echo "Not supported system"; exit 1;;

Loading…
Cancel
Save