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.

install.sh 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. set -eux
  3. INSTALL_HOME=/tmp/ovs-nshdpdk
  4. rm -rf $INSTALL_HOME; mkdir -p $INSTALL_HOME
  5. cd $INSTALL_HOME
  6. host=$1
  7. nsh=$2
  8. dpdk=$3
  9. dpdk_socket_mem=$4
  10. if [ $nsh = 'true' ]
  11. then
  12. curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv
  13. dpkg -i openvswitch-datapath-dkms_2.5.90-1.nsh_all.deb
  14. dpkg -i openvswitch-common_2.5.90-1.nsh_amd64.deb
  15. dpkg -i openvswitch-switch_2.5.90-1.nsh_amd64.deb
  16. dpkg -i python-openvswitch_2.5.90-1.nsh_all.deb
  17. if [ $dpdk = 'true' ]
  18. then
  19. dpkg -i libxenstore3.0*.deb
  20. dpkg -i libdpdk0_2.2.0-1_amd64.deb
  21. dpkg -i dpdk_2.2.0-1_amd64.deb
  22. dpkg -i openvswitch-switch-dpdk_2.5.90-1.nsh_amd64.deb
  23. fi
  24. else
  25. curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-dpdk.tar.gz | tar -xzv
  26. dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb
  27. dpkg -i openvswitch-common_2.5.90-1_amd64.deb
  28. dpkg -i openvswitch-switch_2.5.90-1_amd64.deb
  29. dpkg -i python-openvswitch_2.5.90-1_all.deb
  30. if [ $dpdk = 'true' ]
  31. then
  32. dpkg -i libxenstore3.0*.deb
  33. dpkg -i libdpdk0_16.07-1_amd64.deb
  34. dpkg -i dpdk_16.07-1_amd64.deb
  35. dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
  36. dpdk_pages=$(($dpdk_socket_mem / 2))
  37. sed "s/#*\(NR_2M_PAGES=\).*/\1${dpdk_pages}/" /etc/dpdk/dpdk.conf
  38. service dpdk start
  39. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
  40. [ -n $dpdk_socket_mem ] && vs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
  41. service openvswitch-switch restart
  42. fi
  43. fi