Browse Source

Implement: Fuel install OVS with NSH/DPDK

Update docker build

Change-Id: I4fa8384947534f8b2bd27e3efde3a364d224578e
Closes-Bug:#1507877
Signed-off-by: lingyu1 <ling.y.yu@intel.com>
lingyu1 3 years ago
parent
commit
7ca2f9cf52

+ 33
- 25
deployment_scripts/puppet/manifests/ovs-install-compute.pp View File

@@ -1,39 +1,47 @@
1 1
 $fuel_settings = parseyaml(file('/etc/compute.yaml'))
2 2
 if $operatingsystem == 'Ubuntu' {
3 3
         if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
4
-		exec { "wget dpdk package":
5
-		        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install.tar.gz",
6
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
-		}
8
-		exec { "unzip dpdk package":
9
-		        command => "tar -xvzf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.tar.gz",
10
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
-		}
12
-		exec { "install dpdk package":
13
-		        command => "/etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-install.sh",
14
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
15
-		}
4
+                exec { "wget dpdk":
5
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
6
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
+                }
8
+                exec { "install dpdk":
9
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
10
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
+                }
16 12
                 package { 'openvswitch-datapath-dkms':
17
-                        ensure => "2.4.90-1",
13
+                        ensure => "2.4.91-1",
18 14
                 }
19 15
                 package { 'openvswitch-common':
20
-                        ensure => "2.4.90-1",
16
+                        ensure => "2.4.91-1",
21 17
                 }
22 18
                 package { 'openvswitch-switch':
23
-                        ensure => "2.4.90-1",
19
+                        ensure => "2.4.91-1",
24 20
                         require => Package['openvswitch-common','openvswitch-datapath-dkms'],
25 21
                 }
26
-	} else {
27
-                package { 'openvswitch-datapath-dkms':
28
-                        ensure => "2.4.90-1",
22
+        } else {
23
+                exec { "install openvswitch-datapath-dkms package":
24
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
25
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
29 26
                 }
30
-                package { 'openvswitch-common':
31
-                        ensure => "2.4.90-1",
27
+                exec { "install openvswitch-common package":
28
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
29
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
32 30
                 }
33
-                package { 'openvswitch-switch':
34
-                        ensure => "2.4.90-1",
35
-                        require => Package['openvswitch-common','openvswitch-datapath-dkms'],
31
+                exec { "install openvswitch-switch package":
32
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
33
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
34
+                }
35
+        }
36
+        if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
37
+                exec { "wget dppd":
38
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
39
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
40
+                }
41
+                exec { "install dppd":
42
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
43
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
36 44
                 }
37
-	}
45
+        }
38 46
 } elsif $operatingsystem == 'CentOS' {
39
-}
47
+}

+ 32
- 24
deployment_scripts/puppet/manifests/ovs-install-controller.pp View File

@@ -1,39 +1,47 @@
1 1
 $fuel_settings = parseyaml(file('/etc/controller.yaml'))
2 2
 if $operatingsystem == 'Ubuntu' {
3 3
         if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
4
-		exec { "wget dpdk package":
5
-		        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install.tar.gz",
6
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
-		}
8
-		exec { "unzip dpdk package":
9
-		        command => "tar -xvzf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.tar.gz",
10
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
-		}
12
-		exec { "install dpdk package":
13
-		        command => "/etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-install.sh",
14
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
15
-		}
4
+                exec { "wget dpdk":
5
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
6
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
+                }
8
+                exec { "install dpdk":
9
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
10
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
+                }
16 12
                 package { 'openvswitch-datapath-dkms':
17
-                        ensure => "2.4.90-1",
13
+                        ensure => "2.4.91-1",
18 14
                 }
19 15
                 package { 'openvswitch-common':
20
-                        ensure => "2.4.90-1",
16
+                        ensure => "2.4.91-1",
21 17
                 }
22 18
                 package { 'openvswitch-switch':
23
-                        ensure => "2.4.90-1",
19
+                        ensure => "2.4.91-1",
24 20
                         require => Package['openvswitch-common','openvswitch-datapath-dkms'],
25 21
                 }
26
-	} else {
27
-                package { 'openvswitch-datapath-dkms':
28
-                        ensure => "2.4.90-1",
22
+        } else {
23
+                exec { "install openvswitch-datapath-dkms package":
24
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
25
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
29 26
                 }
30
-                package { 'openvswitch-common':
31
-                        ensure => "2.4.90-1",
27
+                exec { "install openvswitch-common package":
28
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
29
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
32 30
                 }
33
-                package { 'openvswitch-switch':
34
-                        ensure => "2.4.90-1",
35
-                        require => Package['openvswitch-common','openvswitch-datapath-dkms'],
31
+                exec { "install openvswitch-switch package":
32
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
33
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
34
+                }
35
+        }
36
+        if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
37
+                exec { "wget dppd":
38
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
39
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
40
+                }
41
+                exec { "install dppd":
42
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
43
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
36 44
                 }
37
-	}
45
+        }
38 46
 } elsif $operatingsystem == 'CentOS' {
39 47
 }

+ 32
- 24
deployment_scripts/puppet/manifests/ovs-install-primary-controller.pp View File

@@ -1,39 +1,47 @@
1 1
 $fuel_settings = parseyaml(file('/etc/primary-controller.yaml'))
2 2
 if $operatingsystem == 'Ubuntu' {
3 3
         if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
4
-		exec { "wget dpdk package":
5
-		        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install.tar.gz",
6
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
-		}
8
-		exec { "unzip dpdk package":
9
-		        command => "tar -xvzf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.tar.gz",
10
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
-		}
12
-		exec { "install dpdk package":
13
-		        command => "/etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-install.sh",
14
-		        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
15
-		}
4
+                exec { "wget dpdk":
5
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
6
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
7
+                }
8
+                exec { "install dpdk":
9
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
10
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
11
+                }
16 12
                 package { 'openvswitch-datapath-dkms':
17
-                        ensure => "2.4.90-1",
13
+                        ensure => "2.4.91-1",
18 14
                 }
19 15
                 package { 'openvswitch-common':
20
-                        ensure => "2.4.90-1",
16
+                        ensure => "2.4.91-1",
21 17
                 }
22 18
                 package { 'openvswitch-switch':
23
-                        ensure => "2.4.90-1",
19
+                        ensure => "2.4.91-1",
24 20
                         require => Package['openvswitch-common','openvswitch-datapath-dkms'],
25 21
                 }
26
-	} else {
27
-                package { 'openvswitch-datapath-dkms':
28
-                        ensure => "2.4.90-1",
22
+        } else {
23
+                exec { "install openvswitch-datapath-dkms package":
24
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
25
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
29 26
                 }
30
-                package { 'openvswitch-common':
31
-                        ensure => "2.4.90-1",
27
+                exec { "install openvswitch-common package":
28
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
29
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
32 30
                 }
33
-                package { 'openvswitch-switch':
34
-                        ensure => "2.4.90-1",
35
-                        require => Package['openvswitch-common','openvswitch-datapath-dkms'],
31
+                exec { "install openvswitch-switch package":
32
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
33
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
34
+                }
35
+        }
36
+        if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
37
+                exec { "wget dppd":
38
+                        command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
39
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
40
+                }
41
+                exec { "install dppd":
42
+                        command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
43
+                        path   => "/usr/bin:/usr/sbin:/bin:/sbin",
36 44
                 }
37
-	}
45
+        }
38 46
 } elsif $operatingsystem == 'CentOS' {
39 47
 }

+ 5
- 0
environment_config.yaml View File

@@ -4,3 +4,8 @@ attributes:
4 4
       weight: 20
5 5
       value: false
6 6
       label: "Use dpdk"
7
+    use_dppd:
8
+      type: "checkbox"
9
+      weight: 20
10
+      value: false
11
+      label: "Use dppd"

+ 7
- 7
ovs-nsh/Dockerfile View File

@@ -5,17 +5,17 @@ RUN apt-get update
5 5
 RUN apt-get install -y software-properties-common python-software-properties \
6 6
     make python-setuptools python-all dpkg-dev debhelper \
7 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
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 10
 RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
11 11
 RUN chmod 0440 /etc/sudoers.d/open-sudo
12 12
 
13 13
 ADD ./patches /patches
14 14
 
15
-ADD ./download-ovs-nsh.sh /root/download-ovs-nsh.sh
16
-RUN chmod +x /root/download-ovs-nsh.sh
17
-RUN /root/download-ovs-nsh.sh
15
+ADD ./build-ovs-nsh.sh /build-ovs-nsh.sh
16
+RUN chmod +x /build-ovs-nsh.sh
17
+RUN /build-ovs-nsh.sh
18 18
 
19
-ADD ./build-ovs-nsh.sh /root/build-ovs-nsh.sh
20
-RUN chmod +x /root/build-ovs-nsh.sh
21
-RUN /root/build-ovs-nsh.sh
19
+ADD ./build-ovs-nsh-dpdk.sh /build-ovs-nsh-dpdk.sh
20
+RUN chmod +x /build-ovs-nsh-dpdk.sh
21
+RUN /build-ovs-nsh-dpdk.sh

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

@@ -0,0 +1,36 @@
1
+#!/bin/bash
2
+
3
+DPDK_VER=2.1.0
4
+
5
+OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
6
+RTE_TARGET=x86_64-native-linuxapp-gcc
7
+PATCHES="060679 060680 060681 060682 060683 060684 060685"
8
+URL_OVS=https://github.com/openvswitch/ovs.git
9
+URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz
10
+
11
+wget ${URL_DPDK}
12
+tar -xzvf dpdk-${DPDK_VER}.tar.gz
13
+cd dpdk-${DPDK_VER}
14
+sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=n/CONFIG_RTE_LIBRTE_VHOST=y/' \
15
+       -e 's/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/' \
16
+       -e 's/CONFIG_RTE_PKTMBUF_HEADROOM=128/CONFIG_RTE_PKTMBUF_HEADROOM=256/' \
17
+       config/common_linuxapp
18
+cd /
19
+tar -czvf dpdk-${DPDK_VER}.tar.gz dpdk-${DPDK_VER}
20
+cd dpdk-${DPDK_VER}
21
+make install T=${RTE_TARGET}
22
+cd /
23
+
24
+git clone ${URL_OVS} openvswitch-dpdk
25
+cd openvswitch-dpdk
26
+git checkout ${OVS_COMMIT} -b development
27
+for patch in ${PATCHES}
28
+do
29
+        patch -p1 < /patches/${patch}.patch
30
+done
31
+export RTE_SDK=/dpdk-${DPDK_VER}
32
+export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
33
+./boot.sh
34
+./configure --with-dpdk=$DPDK_BUILD
35
+sed -i "s/2.4.90-1/2.4.91-1/" debian/changelog;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
+cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary

+ 14
- 2
ovs-nsh/build-ovs-nsh.sh View File

@@ -1,4 +1,16 @@
1 1
 #!/bin/bash
2 2
 
3
-cd /openvswitch;./boot.sh;./configure;make dist;tar -xzf openvswitch-2.4.90.tar.gz
4
-cd /openvswitch/openvswitch-2.4.90;dpkg-checkbuilddeps;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
3
+OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
4
+PATCHES="060679 060680 060681 060682 060683 060684 060685"
5
+URL_OVS=https://github.com/openvswitch/ovs.git
6
+
7
+git clone ${URL_OVS} openvswitch
8
+cd openvswitch
9
+git checkout ${OVS_COMMIT} -b development
10
+for patch in ${PATCHES}
11
+do
12
+        patch -p1 < /patches/${patch}.patch
13
+done
14
+
15
+./boot.sh;./configure;make dist;tar -xzf openvswitch-2.4.90.tar.gz
16
+cd openvswitch-2.4.90;dpkg-checkbuilddeps;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary

+ 0
- 77
ovs-nsh/download-ovs-nsh.sh View File

@@ -1,77 +0,0 @@
1
-#!/bin/bash
2
-
3
-# Author: Johnson Li <johnson.li@intel.com>
4
-# Change Log:
5
-#     10-28-2015: Initial version
6
-#
7
-# This script helps to setup the NSH test environment.
8
-# Since the NSH patches are not merged into OVS's mainline,
9
-# users cannot test the feature easily.
10
-# In order to get OVS installed for tests, this script helps
11
-# to get patch files from the mail archivements and apply
12
-# the patches to a special commit of OVS.
13
-#
14
-# This script is for free use, feel free to modify the script
15
-# for your own use. Any questions about the installation script,
16
-# please send an email to the author.
17
-
18
-
19
-######################## Global Variables #####################
20
-WORK_DIR=`pwd`
21
-PATCHES="060679 060680 060681 060682 060683 060684 060685"
22
-URL_OVS=https://github.com/openvswitch/ovs.git
23
-OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
24
-
25
-######################## Functions  ############################
26
-
27
-################################################################
28
-# Function Name: get_ovs_codes_from_github()
29
-# Desription: Clone sources for OVS from github.
30
-################################################################
31
-function get_ovs_codes_from_github()
32
-{
33
-    git clone ${URL_OVS} openvswitch 2>&1 | tee -a ${WORK_DIR}/install.log
34
-    return $?
35
-}
36
-
37
-################################################################
38
-# Function Name: apply_patches_to_ovs()
39
-# Desription: Apply patches to a specific commit of OVS.
40
-################################################################
41
-function apply_patches_to_ovs()
42
-{
43
-    if [ ! -d openvswitch ] ;then
44
-        echo "No source found for Openvswitch, exit!"  | tee -a ${WORK_DIR}/install.log
45
-        return -1
46
-    fi
47
-
48
-    if [ ! -d patches ] ;then
49
-        echo "No source found for Openvswitch, exit!" | tee -a ${WORK_DIR}/install.log
50
-        return -1
51
-    fi
52
-
53
-    cd openvswitch
54
-    git checkout ${OVS_COMMIT} -b development 2>&1 | tee -a ${WORK_DIR}/install.log
55
-    for patch in ${PATCHES}
56
-    do
57
-        patch -p1 < ${WORK_DIR}/patches/${patch}.patch 2>&1 | tee -a ${WORK_DIR}/install.log
58
-    done
59
-
60
-    cd ${WORK_DIR}
61
-    return 0
62
-}
63
-
64
-###################        MAIN        ############################
65
-get_ovs_codes_from_github
66
-if [ $? -ne 0 ] ;then
67
-    echo "Error occured when cloning OVS, exit." | tee -a ${WORK_DIR}/install.log
68
-    exit 1
69
-fi
70
-
71
-apply_patches_to_ovs
72
-if [ $? -ne 0 ] ;then
73
-    echo "Error occured when applying patches, exit." | tee -a ${WORK_DIR}/install.log
74
-    exit 1
75
-fi
76
-
77
-exit 0

+ 11
- 0
ovs_package/ubuntu/dependencies.txt View File

@@ -0,0 +1,11 @@
1
+http://archive.ubuntu.com/ubuntu/pool/main/r/readline6/libreadline6-dev_6.3-4ubuntu2_amd64.deb
2
+http://archive.ubuntu.com/ubuntu/pool/main/r/readline6/libreadline-dev_6.3-4ubuntu2_amd64.deb
3
+http://archive.ubuntu.com/ubuntu/pool/main/l/lua5.2/liblua5.2-dev_5.2.3-1_amd64.deb
4
+http://archive.ubuntu.com/ubuntu/pool/main/libp/libpcap/libpcap0.8-dev_1.5.3-2_amd64.deb
5
+http://archive.ubuntu.com/ubuntu/pool/main/libp/libpcap/libpcap-dev_1.5.3-2_all.deb
6
+http://archive.ubuntu.com/ubuntu/pool/main/libb/libbsd/libbsd-dev_0.6.0-2ubuntu1_amd64.deb
7
+http://archive.ubuntu.com/ubuntu/pool/main/libe/libedit/libedit-dev_3.1-20130712-2_amd64.deb
8
+http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo-dev_5.9+20140118-1ubuntu1_amd64.deb
9
+http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libncurses5-dev_5.9+20140118-1ubuntu1_amd64.deb
10
+http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libncursesw5-dev_5.9+20140118-1ubuntu1_amd64.deb
11
+http://archive.ubuntu.com/ubuntu/pool/main/p/pkg-config/pkg-config_0.26-1ubuntu4_amd64.deb

+ 18
- 3
pre_build_hook View File

@@ -1,22 +1,37 @@
1 1
 #!/bin/bash
2 2
 
3
-# Add here any the actions which are required before plugin build
4
-# like packages building, packages downloading from mirrors and so on.
5
-# The script should return 0 if there were no errors.
6 3
 set -eux
7 4
 
8 5
 BUILD_FOR=${BUILD_FOR:-ubuntu}
9 6
 DIR="$(dirname `readlink -f $0`)"
10 7
 
8
+INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
9
+
10
+function download_dependencies {
11
+  if [ "$INCLUDE_DEPENDENCIES" = true ]
12
+  then
13
+    wget --content-disposition -N -i  "${DIR}/ovs_package/${1}/dependencies.txt"
14
+  fi
15
+}
16
+
11 17
 function build_pkg {
12 18
   case $1 in
13 19
     ubuntu)
20
+      pushd "${DIR}/repositories/${1}/"
21
+      download_dependencies ${1}
22
+      popd
14 23
       cd ${DIR}/ovs-nsh
15 24
       sudo docker build -t ovs-nsh .
16 25
       container_id=`sudo docker run -d ovs-nsh`
17 26
       sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/
18 27
       sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/
19 28
       sudo docker cp $container_id:/openvswitch/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/
29
+      sudo docker cp $container_id:/dpdk-2.1.0.tar.gz ${DIR}/repositories/ubuntu/dpdk-install/
30
+      sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.91-1_amd64.deb ${DIR}/repositories/ubuntu/
31
+      sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.91-1_all.deb ${DIR}/repositories/ubuntu/
32
+      sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-switch_2.4.91-1_amd64.deb ${DIR}/repositories/ubuntu/
33
+      wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip
34
+      mv dppd-prox-v021.zip ${DIR}/repositories/ubuntu/dppd-install/
20 35
       ;;
21 36
     *) echo "Not supported system"; exit 1;;
22 37
   esac

+ 0
- 0
repositories/ubuntu/.gitkeep View File


+ 7
- 0
repositories/ubuntu/dpdk-install/dpdk-install.sh View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+set -eux
4
+rm -rf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/
5
+mkdir /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/
6
+cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/;wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-2.1.0.tar.gz;tar -xvzf dpdk-2.1.0.tar.gz
7
+cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-2.1.0; make install T=x86_64-native-linuxapp-gcc

+ 12
- 0
repositories/ubuntu/dppd-install/dppd-install.sh View File

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

Loading…
Cancel
Save