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.8KB

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