The SDN development environment has the following specifications
OS: Ubuntu 20.04
<------------- RYU ------------->
python3: Python 3.8.10
ryu-manager: Version 4.34
pip: pip 20.0.2 from (python 3.8)
<------------- OpenDaylight ------------->
java: openjdk version 8
mvn (Maven): Apache Maven 3.9.5
Default OpenDaylight: Version Oxygen (0.8.4)
<------------- ONOS ------------->
java: openjdk version 11
mvn (Maven): Apache Maven 3.9.5
bazel: Version 3.7.2
Default ONOS: Version 2.7.0
- Install Docker Engine from the official website:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
newgrp docker
echo "To check if docker is installed properly, run the following command"
docker run hello-world
Note: Make sure that you are able to add Docker to sudo group. So as to run Docker commands without sudo.
-
Open VSCode and install the
Docker
Extension for VSCode, this will help you to manage the Docker containers from VSCode. -
Clone the SDN sample repository
git clone https://github.com/shashankp28/SDN-Sample.git
- Go into the repo, build and run the docker container
cd SDN-Sample
echo "This may take a while, please be patient"
docker build --tag 'sdn' .
docker run -d -it --restart always --name SDN -v $(pwd):/home sdn:latest
- Once the container is Run, you should be able to see it in the
Containers
Tab of the Docker Extension for VSCode.
Container Name: SDN
-
Right click on the container and click on
Attach Visual Studio Code
to open a new VSCode window for the container. -
Here you can open the
/home
folder of the container in VSCode which contains sample projects and documentation forRYU
,ODL
andONOS
- Since newer versions of
ODL
do not support dlux (GUI), before starting a project in ODL make sure to change JAVA_HOME path tojdk-8
:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- ONOS requires
bazel
to build the project, which runs on JDK-11. So before starting a project in ONOS make sure to change JAVA_HOME path tojdk-11
:
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
- This repository folder will be linked to your docker container, all that you do in the container will be reflected in the folder and vice-versa.