I used Windows Server 2008 R2 as my base system.
Components added:
- Git for Windows : http://code.google.com/p/msysgit/downloads/list
- Apache Maven: http://maven.apache.org/download.cgi
- Java JDK/JRE: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Install Git for Windows, I selected the option during install to use the windows command shell for git.
Extract Apache Maven from the zip file. Add the path of the extracted files to the system path so you can call maven from anywhere. Makes life a little easier when you get to the directory inside of the clone source.
Install the JDK/JRE and add an environmental variable: JAVA_HOME and the path to the JDK. Things don't go without it.
Once you have the prerequisites done you can pull down the source from git.opendaylight.org
From a command prompt:
git clone http://git.opendaylight.org/gerrit/p/controller.git
Next change directories into: controller\opendaylight\distribution\opendaylight\
Run the following command:mvn clean install
If your path is correct Maven should start going. This is the long part. If you read through Brent's tutorial you can see this step is long and will be a possible trip up. It is possible that something doesn't build right, this is active code being changed by many all the time.
Once built you can change directories to: target\distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage\
As you can see the path is pretty long, but there is a run.bat. Call that file and you can then browse to: http://localhost:8080 , on the machine in which you just built the project.
You can login using username: admin password: admin
And there you have it.
From there it is up to you. I am still working down this journey as are lots of us. Thanks for following along.
Thank you, this was very helpful.
ReplyDeleteWhen I run maven clean install, I got the error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-cli) on project org.openflow.openflowj: There are test failures.
Any help?
Thanks!
I have not built the controller in a few weeks. Since it is a work in process something may have changed. I will try to get a build going to see. Check on the mailing lists: http://www.opendaylight.org/developers/mailing-lists for help as well. These lists are open to all.
DeleteIf you receive a Maven error when building integration tests you can skip building those tests running the following:
ReplyDeletemvn clean install -DskipTests
/* instead of "mvn clean install" *
If the problem persists you can try allocating more memory to the maven build by adding the windows equivalent of this:
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m
/* syntax for setting varies on the OS used by the build machine.*/
If still stuck you can report it to the controller-dev listserv or jump on irc.freenode.net #opendaylight and someone will give you a hand.
Cheers,
-Brent
Very good tutorial
ReplyDeleteAfter logging in, anyone know how I set the Mininet?
I am sure there are instructions, I have access to physical Openflow enabled switches so I have not setup Mininet. Here is a link to one: http://www.cs.princeton.edu/courses/archive/fall10/cos561/assignments/ps2-tut.pdf
DeleteAlso check http://networkstatic.net for some of Brent's posts.
Thank you for your comments.
- Dave
run.bat throws error. Any idea how to fix it?
ReplyDeleteIf you check the note in the blog above about the Java Home path, I found that the old 8.3 style of the path worked best, Something about the spaces inside the path and the amount of quotes.
DeleteSecondly you can ask on the #opendaylight irc channel on freenode.net or check one of the mailing lists and http://www.opendaylight.org/developers/how-participate .
run.bat throws error ... 'org.eclipse.equinox.console_1.0.0.v20120522-1841[6]'could not be resolved.Reason:Missing Constraint:Import-Package:org.apache.felix.service.command;version="0.8.0"
ReplyDeleteEverything worked as mentioned until I ran run.bat, throws an error,
ReplyDelete\Git\bin\controller\opendaylight\distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\\logs\controller.out was unexpected at this
time.
Can you pls help?
What version of ODL are you running? I have not had anytime to work on helium release. It is possible that helium has some different dependencies on windows.
Delete