install.sh: add support for IVS

This commit is contained in:
Rich Lane
2013-06-28 15:01:58 -07:00
parent 91261b2757
commit 8ee4aa6de4
+20 -2
View File
@@ -77,6 +77,9 @@ OVS_TAG=v$OVS_RELEASE
OVS_BUILD=$OVS_SRC/build-$KERNEL_NAME OVS_BUILD=$OVS_SRC/build-$KERNEL_NAME
OVS_KMODS=($OVS_BUILD/datapath/linux/{openvswitch_mod.ko,brcompat_mod.ko}) OVS_KMODS=($OVS_BUILD/datapath/linux/{openvswitch_mod.ko,brcompat_mod.ko})
IVS_TAG=v0.3
IVS_SRC=~/ivs
function kernel { function kernel {
echo "Install Mininet-compatible kernel if necessary" echo "Install Mininet-compatible kernel if necessary"
sudo apt-get update sudo apt-get update
@@ -348,6 +351,18 @@ function remove_ovs {
echo "Done removing OVS" echo "Done removing OVS"
} }
function ivs {
# Install dependencies
$install git pkg-config gcc make libnl-3-dev libnl-route-3-dev libnl-genl-3-dev
# Install IVS from source
cd ~/
git clone git://github.com/floodlight/ivs $IVS_SRC -b $IVS_TAG --recursive
cd $IVS_SRC
make
sudo make install
}
# Install NOX with tutorial files # Install NOX with tutorial files
function nox { function nox {
echo "Installing NOX w/tutorial files..." echo "Installing NOX w/tutorial files..."
@@ -551,6 +566,7 @@ function all {
pox pox
oftest oftest
cbench cbench
ivs
echo "Enjoy Mininet!" echo "Enjoy Mininet!"
} }
@@ -588,7 +604,7 @@ function vm_clean {
} }
function usage { function usage {
printf '\nUsage: %s [-abcdfhkmnprtvwx03]\n\n' $(basename $0) >&2 printf '\nUsage: %s [-abcdfhikmnprtvwx03]\n\n' $(basename $0) >&2
printf 'This install script attempts to install useful packages\n' >&2 printf 'This install script attempts to install useful packages\n' >&2
printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2 printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
@@ -603,6 +619,7 @@ function usage {
printf -- ' -d: (D)elete some sensitive files from a VM image\n' >&2 printf -- ' -d: (D)elete some sensitive files from a VM image\n' >&2
printf -- ' -f: install open(F)low\n' >&2 printf -- ' -f: install open(F)low\n' >&2
printf -- ' -h: print this (H)elp message\n' >&2 printf -- ' -h: print this (H)elp message\n' >&2
printf -- ' -i: install Indigo (V)irtual Switch\n' >&2
printf -- ' -k: install new (K)ernel\n' >&2 printf -- ' -k: install new (K)ernel\n' >&2
printf -- ' -m: install Open vSwitch kernel (M)odule from source dir\n' >&2 printf -- ' -m: install Open vSwitch kernel (M)odule from source dir\n' >&2
printf -- ' -n: install mini(N)et dependencies + core files\n' >&2 printf -- ' -n: install mini(N)et dependencies + core files\n' >&2
@@ -623,7 +640,7 @@ if [ $# -eq 0 ]
then then
all all
else else
while getopts 'abcdfhkmnprtvwx03' OPTION while getopts 'abcdfhikmnprtvwx03' OPTION
do do
case $OPTION in case $OPTION in
a) all;; a) all;;
@@ -636,6 +653,7 @@ else
*) echo "Invalid OpenFlow version $OF_VERSION";; *) echo "Invalid OpenFlow version $OF_VERSION";;
esac;; esac;;
h) usage;; h) usage;;
i) ivs;;
k) kernel;; k) kernel;;
m) modprobe;; m) modprobe;;
n) mn_deps;; n) mn_deps;;