Fuel plugin to deploy OVS with NSH and DPDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-ovs-nsh-dpdk.sh 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/bin/bash
  2. set -eux
  3. OVS_COMMIT=7d433ae57ebb90cd68e8fa948a096f619ac4e2d8
  4. URL_OVS=https://github.com/openvswitch/ovs.git
  5. OVS_VER=${OVS_VER:-2.5.90}
  6. BUILD_HOME=$HOME/nsh
  7. BUILD_DEST=${BUILD_DEST:-/deb}
  8. DIR="$(dirname `readlink -f $0`)"
  9. export DEB_BUILD_OPTIONS='parallel=8 nocheck'
  10. sudo apt-get build-dep openvswitch -y
  11. sudo apt-get -y install devscripts dpkg-dev git wget
  12. rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}
  13. cd ${BUILD_HOME}
  14. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc
  15. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0.orig.tar.gz
  16. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.debian.tar.xz
  17. dpkg-source -x dpdk_2.2.0-0ubuntu8.dsc
  18. # copy from debian/control
  19. sudo apt-get install -y debhelper \
  20. dh-python \
  21. dh-systemd \
  22. doxygen \
  23. graphviz \
  24. inkscape \
  25. libcap-dev \
  26. libpcap-dev \
  27. libxen-dev \
  28. libxenstore3.0 \
  29. python \
  30. python-sphinx \
  31. texlive-fonts-recommended \
  32. texlive-latex-extra
  33. cd dpdk-2.2.0; rm -rf debian/patches/;
  34. cat << EOF > debian/changelog
  35. dpdk (2.2.0-1) unstable; urgency=low
  36. * DPDK 2.2.0
  37. -- DPDK team <dev@dpdk.org> $(date --rfc-2822)
  38. EOF
  39. debian/rules build; fakeroot debian/rules binary
  40. cd ${BUILD_HOME}; sudo dpkg -i *.deb
  41. apt-get download libxenstore3.0
  42. cd ${BUILD_HOME}
  43. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz
  44. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc
  45. wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.debian.tar.xz
  46. dpkg-source -x openvswitch-dpdk_2.4.0-0ubuntu1.dsc
  47. # copy from debian/control
  48. sudo apt-get install -y autoconf \
  49. automake \
  50. bzip2 \
  51. debhelper \
  52. dh-autoreconf \
  53. dh-systemd \
  54. graphviz \
  55. libdpdk-dev \
  56. libfuse-dev \
  57. libssl-dev \
  58. libtool \
  59. openssl \
  60. procps \
  61. python-all \
  62. python-qt4 \
  63. python-twisted-conch \
  64. python-zopeinterface \
  65. python-six
  66. git clone https://github.com/openvswitch/ovs.git
  67. cd ovs; git checkout ${OVS_COMMIT}
  68. PATCHES=$(cd ${DIR}/patches; echo *patch)
  69. for patch in ${PATCHES}
  70. do
  71. patch -p1 < ${DIR}/patches/${patch}
  72. done
  73. cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs
  74. rm -rf openvswitch-dpdk-${OVS_VER}*
  75. cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz
  76. cd ../openvswitch-dpdk-${OVS_VER}
  77. sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4
  78. sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4
  79. autoreconf --install
  80. rm -rf debian/patches/ .git;
  81. cat << EOF > debian/changelog
  82. openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low
  83. * Support NSH
  84. -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
  85. EOF
  86. debian/rules build; fakeroot debian/rules binary
  87. cd ${BUILD_HOME}/ovs
  88. cat << EOF > debian/changelog
  89. openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
  90. * Support NSH
  91. -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
  92. EOF
  93. debian/rules build; fakeroot debian/rules binary
  94. cp ${BUILD_HOME}/*.deb ${BUILD_DEST}