Maple is a high-level SDN programming language. The original paper claims the basic design of Maple:
Voellmy, A., Wang, J., Yang, Y. R., Ford, B., & Hudak, P. (2013). Maple: Simplifying SDN programming using algorithmic policies. ACM SIGCOMM Computer Communication Review, 43(4), 87-98. [pdf]
Unfortunately, it is a close source project for some reason now. So we maintain this GitHub repository to deliver the binary version of Maple. The latest release is based on OpenDaylight Beryllium-SR3. You can download it from the release page and try it out.
- curl
- Git
- JAVA 1.8+
- Maven 3.3+
If your OS is Ubuntu 16.04, you can use commands as follows.
sudo apt-get install curl git openjdk-8-jdk maven
- Karaf package with Maple runtime Karaf features
- Library to compile applications running on Maple
- Maple application template generator (maven-archetype style)
The easiest way to install Maple is to use our automatic installer by simply copying and pasting the following line into a terminal:
curl https://raw.githubusercontent.com/snlab/Maple-release/master/utils/install.sh -L > install.sh && sh install.sh
If you have a bash-compatible shell, you can run this script:
bash <(curl https://raw.githubusercontent.com/snlab/Maple-release/master/utils/install.sh -L)
It will do the following things:
- Download the zip file of the latest maple release into
/tmp
- Unzip the latest maple release into
$HOME/.maple/
- Download and uncompress maven
settings.xml
and maple library into$HOME/.m2/
And then, you can start the maple controller by using the start script, you will see an output as ODLMapleProvider Session Initiated
in terminal:
bash <(curl https://raw.githubusercontent.com/snlab/Maple-release/master/utils/start_maple.sh -L)
You can generate and compile your first MapleApp as follows, You can change artifactId, appName, classPrefix and copyright, but shouldn't change others.
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.maple \
-DarchetypeArtifactId=maple-archetype \
-DarchetypeVersion=1.0.0-Beryllium-SR3 \
-DgroupId=org.opendaylight.mapleapp \
-DartifactId=MapleApp \
-DappName=MapleApp \
-DclassPrefix=MapleApp \
-Dcopyright=None \
-DinteractiveMode=false
then you can edit MapleApp/impl/src/main/java/org/opendaylight/mapleapp/impl/MapleApp.java
like MapleAppSample.java, and compile the project as follows.
cd MapleApp
mvn clean install -DskipTests
Then in OpenDaylight's shell, load the MapleApp using a command just like kar:install file:///home/.../MapleApp/features/target/mapleapp-features-1.0.0-Beryllium-SR3.kar
. Then start a Mininet's virtual environment. You will find that h1 and h3 can ping each other, but other pairs can't.
sudo mn --topo=tree,depth=2,fanout=2 --mac --controller=remote,ip=127.0.0.1,port=6653
RepoName | URI | branch |
---|---|---|
odlmaple (private) | https://github.com/snlab/odlmaple | odl-summit |
MapleCore (private) | https://github.cm/snlab/MapleCore | master |
MapleApp (private) | https://github.com/snlab/MapleApp | odl-summit |
maple-archetype | https://github.com/snlab/maple-archetype | odl-summit |