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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. pmd_cpu_mask=${5:-'2'}
  11. ovs="ovs-dpdk.tar.gz"
  12. if [ $nsh = 'true' ]; then
  13. ovs="ovs-nsh-dpdk.tar.gz"
  14. fi
  15. apt-get install -y --allow-unauthenticated dkms
  16. curl http://$host:8080/plugins/fuel-plugin-ovs-1.0/repositories/ubuntu/${ovs} | tar -xzv
  17. dpkg -i openvswitch-datapath-dkms_*.deb
  18. dpkg -i openvswitch-common_*.deb
  19. dpkg -i openvswitch-switch_*.deb
  20. dpkg -i python-openvswitch_*.deb
  21. if [ $dpdk = 'true' ]
  22. then
  23. apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
  24. dpkg -i openvswitch-switch-dpdk_*.deb
  25. fi
  26. if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
  27. then
  28. #Set to 0, dpdk init script mount hugepages but don't change current allocation
  29. sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf
  30. service dpdk start
  31. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
  32. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
  33. ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask="$pmd_cpu_mask"
  34. service openvswitch-switch restart
  35. fi
  36. rm -rf $INSTALL_HOME