Install OpenDaylight Controller
This document provides information on installing and configuring OpenDaylight (ODL) Controller to work with OnApp Software-defined networking. The provided procedure was tested and verified with OpenDaylight 0.14.0 Silicon version.
Please note that the stable version for OnApp is OpenDaylight 0.14.0.
Prerequisites
Minimum System Requirements | Recommended System Requirements | OS Requirements |
---|---|---|
CPU: 2 Cores RAM: 2 GB Storage: 16 GB | CPU: 8 Cores RAM: 8 GB Storage: 64 GB | CentOS 7.x Java Virtual Machine 11 |
Install OpenDaylight Silicon
To install OpenDaylight Silicon, follow the next procedure:
Switch to the root home directory and download an archive with ODL:
# wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/opendaylight/0.14.0/opendaylight-0.14.0.zip
Unpack the archive by running the following command:
# unzip opendaylight-0.14.0.zip
Install JVM by running the following command:
# yum install java-11
Set JAVA_HOME by running the next command:
# export JAVA_HOME=/usr/lib/jvm/jre-11
Start controller and install the required tools with the following command:
# cd /root/opendaylight-0.14.0 # ./bin/karaf
After the ODL console is opened, perform the refresh of repositories with the next command:
opendaylight-user@root> feature:repo-refresh
Install feature needed by OpenDaylight:
opendaylight-user@root> feature:install odl-ovsdb-library odl-restconf-all odl-ovsdb-southbound-api odl-ovsdb-southbound-impl odl-ovsdb-southbound-impl-rest
After the features are installed, log out from the karaf:
opendaylight-user@root>logout
Ensure that ODL listens to OnApp on 8181 and 6640 ports:
root@OpenDaylight-Silicon:~# netstat -lnp | grep java tcp 0 0 127.0.0.1:2550 0.0.0.0:* LISTEN 2054/java tcp 0 0 127.0.0.1:44440 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:8185 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:44444 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:8101 0.0.0.0:* LISTEN 2054/java tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:36908 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:6640 0.0.0.0:* LISTEN 2054/java tcp 0 0 0.0.0.0:8181 0.0.0.0:* LISTEN 2054/java
Create a Service to Be Run at Startup
To create a service to be run at startup, use the following command:
# ln -s /root/opendaylight-0.14.0 /etc/sdn # touch /etc/systemd/system/opendaylight.service # vi /etc/systemd/system/opendaylight.service [Unit] Description=OpenDayLight Controller After=network.target [Service] Environment=LOG4J_FORMAT_MSG_NO_LOOKUPS=true Type=forking User=root ExecStart=/etc/sdn/bin/start Restart=on-abort [Install] WantedBy=multi-user.target # systemctl daemon-reload # systemctl enable opendaylight # systemctl start opendaylight
Don’t forget to set correct credentials and port (8181) at https://onapp--cp--ip/settings/sdn/managers/1/edit
Password Change
The password for the admin account can be changed according to this example:
Create a file with a password as a parameter:
# cat user.json { "name":"admin", "description":"admin account", "enabled":"1", "email":"", "password":"newpass" }
Run API call by the command:
# curl -u admin:admin -X PUT -H "Content-Type: application/json" --data-binary @./user.json http://localhost:8181/auth/v1/users/admin@sdn {"userid":"admin@sdn","name":"admin","description":"admin account","enabled":1,"email":"","password":"**********","salt":"**********","domainid":"sdn"}
Tweaks
To prevent intensive logging, you need to decrease log level.
It can be done in config /etc/sdn/etc/org.ops4j.pax.logging.cfg
, by changing the value log4j2.rootLogger.level
from INFO
to ERROR
.
# grep log4j2.rootLogger.level /etc/sdn/etc/org.ops4j.pax.logging.cfg log4j2.rootLogger.level = INFO
ovsdb-rpc-task-timeout
and json-rpc-decoder-max-frame-length
parameters can be changed in /etc/sdn/etc/org.opendaylight.ovsdb.library.cfg
Default values are as follows:
# grep -E 'ovsdb-rpc-task-timeout|json-rpc-decoder-max-frame-length' /etc/sdn/etc/org.opendaylight.ovsdb.library.cfg json-rpc-decoder-max-frame-length = 100000 ovsdb-rpc-task-timeout = 1000