Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
40ea9172
Commit
40ea9172
authored
11 years ago
by
lantz
Browse files
Options
Downloads
Plain Diff
Merge pull request #283 from ggee/ovs2install
OVS install Ubuntu packages
parents
787f8234
4b7b23cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util/install.sh
+63
-2
63 additions, 2 deletions
util/install.sh
with
63 additions
and
2 deletions
util/install.sh
+
63
−
2
View file @
40ea9172
...
...
@@ -262,6 +262,64 @@ function wireshark {
}
# Install Open vSwitch specific version Ubuntu package
function
ubuntuOvs
{
echo
"Creating and Installing Open vSwitch packages..."
OVS_SRC
=
$BUILD_DIR
/openvswitch
OVS_TARBALL_LOC
=
http://openvswitch.org/releases
if
[
"
$DIST
"
=
"Ubuntu"
]
&&
[
`
expr
$RELEASE
'>='
12.04
`
=
1
]
;
then
rm
-rf
$OVS_SRC
mkdir
-p
$OVS_SRC
cd
$OVS_SRC
if
wget
$OVS_TARBALL_LOC
/openvswitch-
$OVS_RELEASE
.tar.gz 2> /dev/null
;
then
tar
xzf openvswitch-
$OVS_RELEASE
.tar.gz
else
echo
"Failed to find OVS at
$OVS_TARBALL_LOC
/openvswitch-
$OVS_RELEASE
.tar.gz"
cd
$BUILD_DIR
return
fi
# Remove any old packages
$remove
openvswitch-common openvswitch-datapath-dkms openvswitch-controller
\
openvswitch-pki openvswitch-switch
# Get build deps
$install
build-essential fakeroot debhelper autoconf automake libssl-dev
\
pkg-config bzip2 openssl python-all procps python-qt4
\
python-zopeinterface python-twisted-conch dkms
# Build OVS
cd
$BUILD_DIR
/openvswitch/openvswitch-
$OVS_RELEASE
DEB_BUILD_OPTIONS
=
'parallel=2 nocheck'
fakeroot debian/rules binary
cd
..
$pkginst
openvswitch-common_
$OVS_RELEASE
*
.deb openvswitch-datapath-dkms_
$OVS_RELEASE
*
.deb
\
openvswitch-pki_
$OVS_RELEASE
*
.deb openvswitch-switch_
$OVS_RELEASE
*
.deb
if
$pkginst
openvswitch-controller_
$OVS_RELEASE
*
.deb
;
then
echo
"Ignoring error installing openvswitch-controller"
fi
modinfo openvswitch
sudo
ovs-vsctl show
# Switch can run on its own, but
# Mininet should control the controller
# This appears to only be an issue on Ubuntu/Debian
if
sudo
service openvswitch-controller stop
;
then
echo
"Stopped running controller"
fi
if
[
-e
/etc/init.d/openvswitch-controller
]
;
then
sudo
update-rc.d openvswitch-controller disable
fi
else
echo
"Failed to install Open vSwitch. OS must be Ubuntu >= 12.04"
cd
$BUILD_DIR
return
fi
}
# Install Open vSwitch
function
ovs
{
...
...
@@ -594,7 +652,7 @@ function vm_clean {
}
function
usage
{
printf
'\nUsage: %s [-abcdfhikmnprtvwx03]\n\n'
$(
basename
$0
)
>
&2
printf
'\nUsage: %s [-abcdfhikmnprtv
V
wx03]\n\n'
$(
basename
$0
)
>
&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
...
...
@@ -619,6 +677,7 @@ function usage {
printf
--
' -s <dir>: place dependency (S)ource/build trees in <dir>\n'
>
&2
printf
--
' -t: complete o(T)her Mininet VM setup tasks\n'
>
&2
printf
--
' -v: install Open (V)switch\n'
>
&2
printf
--
' -V <version>: install a particular version of Open (V)switch on Ubuntu\n'
>
&2
printf
--
' -w: install OpenFlow (W)ireshark dissector\n'
>
&2
printf
--
' -x: install NO(X) Classic OpenFlow controller\n'
>
&2
printf
--
' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n'
>
&2
...
...
@@ -632,7 +691,7 @@ if [ $# -eq 0 ]
then
all
else
while
getopts
'abcdefhikmnprs:tvwx03'
OPTION
while
getopts
'abcdefhikmnprs:tv
V:
wx03'
OPTION
do
case
$OPTION
in
a
)
all
;;
...
...
@@ -657,6 +716,8 @@ else
echo
"Dependency installation directory:
$BUILD_DIR
"
;;
t
)
vm_other
;;
v
)
ovs
;;
V
)
OVS_RELEASE
=
$OPTARG
;
ubuntuOvs
;;
w
)
wireshark
;;
x
)
case
$OF_VERSION
in
1.0
)
nox
;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment