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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #!/bin/bash
  2. set -eux
  3. OVS_COMMIT=f4b0e64cffb4777ff03d48621c3eadcf1d8c19f3
  4. OVS_VER=${OVS_VER:-2.6.1}
  5. BUILD_DEST=${BUILD_DEST:-/deb}
  6. BUILD_SRC="$(dirname `readlink -f $0`)"
  7. BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
  8. export DEB_BUILD_OPTIONS='parallel=8 nocheck'
  9. sudo apt-get update
  10. sudo apt-get -y --force-yes install devscripts dpkg-dev git wget dkms
  11. rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
  12. cd ${BUILD_HOME}
  13. wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
  14. xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
  15. cd dpdk-16.07
  16. cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
  17. cat << EOF > debian/changelog
  18. dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
  19. * Rebuild debian package
  20. * update librte-eal2.symbols
  21. -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
  22. EOF
  23. # copy from debian/control
  24. sudo apt-get install -y --force-yes debhelper \
  25. dh-python \
  26. dh-systemd \
  27. doxygen \
  28. graphviz \
  29. inkscape \
  30. libcap-dev \
  31. libpcap-dev \
  32. libxen-dev \
  33. libxenstore3.0 \
  34. python \
  35. python-sphinx \
  36. texlive-fonts-recommended \
  37. texlive-latex-extra
  38. debian/rules build; fakeroot debian/rules binary
  39. cd ${BUILD_HOME}
  40. sudo apt-get install -y --force-yes hwdata
  41. sudo dpkg -i *.deb
  42. mv *.deb ${BUILD_DEST}
  43. # copy from debian/control
  44. sudo apt-get install -y --force-yes autoconf \
  45. automake \
  46. bzip2 \
  47. debhelper \
  48. dh-autoreconf \
  49. dh-systemd \
  50. graphviz \
  51. libdpdk-dev \
  52. libfuse-dev \
  53. libssl-dev \
  54. libtool \
  55. openssl \
  56. procps \
  57. python-all \
  58. python-qt4 \
  59. python-twisted-conch \
  60. python-zopeinterface \
  61. python-six
  62. git clone https://github.com/openvswitch/ovs.git
  63. cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git
  64. PATCHES=$(cd ${BUILD_SRC}/ovs_nsh_patches/v2.6.1/; echo *patch)
  65. for patch in ${PATCHES}
  66. do
  67. patch -p1 < ${BUILD_SRC}/ovs_nsh_patches/v2.6.1/${patch}
  68. done
  69. cd ${BUILD_HOME}; cp -r ovs ovs-dpdk
  70. cd ovs-dpdk
  71. cp -r ${BUILD_SRC}/openvswitch_2.6-dpdk_16.07/debian .
  72. cat << EOF > debian/changelog
  73. openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low
  74. [ Open vSwitch team ]
  75. * support NSH & DPDK 16.07
  76. -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
  77. EOF
  78. debian/rules build; fakeroot debian/rules binary
  79. cd ${BUILD_HOME}/ovs
  80. cat << EOF > debian/changelog
  81. openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
  82. [ Open vSwitch team ]
  83. * support NSH
  84. -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
  85. EOF
  86. debian/rules build; fakeroot debian/rules binary
  87. cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
  88. cd ${BUILD_HOME}/deb
  89. tar czvf ${BUILD_DEST}/ovs-nsh-dpdk.tar.gz .;