Skip to content

schevalier/vtn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenDaylight Virtual Tenant Network (VTN)

https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):Main

Overview
========
OpenDaylight VTN provides multi-tenant virtual network functions on
OpenDaylight controllers. OpenDaylight VTN consists of two parts:
VTN Coordinator and VTN Manager.

VTN Coordinator orchestrates multiple VTN Managers running in OpenDaylight
Controllers, and provides VTN Applications with VTN API.

VTN Manager is OSGi bundles running in OpenDaylight Controller. Current
VTN Manager supports only OpenFlow switches. It handles PACKET_IN messages,
sends PACKET_OUT messages, manages host information, and installs flow entries
into OpenFlow switches to provide VTN Coordinator with virtual network
functions.

The requirements for installing these two are different.
Therefore, we recommend that you install VTN Manager and VTN Coordinator
in different machines.

VTN Coordinator Installation Guide
==================================
https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):Installation:VTN_Coordinator

== Installing VTN Coordinator from source code ==
=== Prior preparation ===
 1. Arrange a server where RHEL 6.1 or later is installed.

 2. Install necessary packages.
        yum install make glibc-devel gcc gcc-c++ boost-devel openssl-devel \
                    ant perl-ExtUtils-MakeMaker \
                    unixODBC-devel perl-Digest-SHA uuid libxslt libcurl \
                    libcurl-devel git

 3. Install JDK 7, and add the JAVA_HOME environment variable.
    * RHEL 6.1
        Download Oracle JDK 7 from the following page, and install it.
          http://www.oracle.com/technetwork/java/javase/downloads/index.html
        Set JAVA_HOME to the location of the JDK.
          e.g.) export JAVA_HOME=/usr/java/default

    * RHEL 6.4
        Install OpenJDK 7.
          yum install java-1.7.0-openjdk-devel
        Set JAVA_HOME to the location of the JDK.
          e.g.) export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64

 4. Download the following PostgreSQL 9.1 files from
    http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/ and install.
    * postgresql91-libs-9.1.9-1PGDG.rhel6.x86_64.rpm
    * postgresql91-9.1.9-1PGDG.rhel6.x86_64.rpm
    * postgresql91-server-9.1.9-1PGDG.rhel6.x86_64.rpm
    * postgresql91-contrib-9.1.9-1PGDG.rhel6.x86_64.rpm
    * postgresql91-odbc-09.00.0310-1PGDG.rhel6.x86_64.rpm

 5. Install Maven.
    * Download Maven from the following page and install it folloiwng
      the instruction in the page.
      http://maven.apache.org/download.cgi

 6. Install gtest-devel and json-c libraries
        wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
        rpm -Uvh epel-release-6-8.noarch.rpm
        yum install gtest-devel json-c json-c-devel

=== Build ===
 1. Download the code from git.
        git clone ssh://<username>@git.opendaylight.org:29418/vtn.git
          or
        git clone https://git.opendaylight.org/gerrit/p/vtn.git

 2. Build and install VTN Coordinator.
        cd vtn/coordinator
        mvn -f dist/pom.xml package
        sudo make install

== Run VTN Coordinator ==
=== Prior preparation ===
 1. Install Tomcat.
    * Download the following file.
      http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.39/bin/apache-tomcat-7.0.39.tar.gz
    * Extract under /usr/share/java.
        tar zxvf apache-tomcat-7.0.39.tar.gz -C /usr/share/java

 2. Carry out Tomcat settings.
    * Create the following symbolic link.
        ln -s /usr/local/vtn/tomcat/webapps/vtn-webapi \
              /usr/share/java/apache-tomcat-7.0.39/webapps/vtn-webapi

    * Add the following to "common.loader" of
      /usr/share/java/apache-tomcat-7.0.39/conf/catalina.properties.

        /usr/local/vtn/tomcat/lib,/usr/local/vtn/tomcat/lib/*.jar

    * Add the following to "shared.loader" of
      /usr/share/java/apache-tomcat-7.0.39/conf/catalina.properties.

        /usr/local/vtn/tomcat/shared/lib/*.jar

    * Add the following to <Server> of
      /usr/share/java/apache-tomcat-7.0.39/conf/server.xml.

        <Listener className="org.opendaylight.vtn.tomcat.server.StateListener" />

 3. Set up the DB.
        /usr/local/vtn/sbin/db_setup

=== Start ===
 1. Start VTN Coordinator and Tomcat.
        /usr/local/vtn/bin/vtn_start
        /usr/share/java/apache-tomcat-7.0.39/bin/catalina.sh start

 2. Execute the following commands while stopping.
        /usr/share/java/apache-tomcat-7.0.39/bin/catalina.sh stop
        /usr/local/vtn/bin/vtn_stop

=== WebAPI ===
 * VTN Coordinator version information will be displayed if following command
   is executed when VTN has started successfully.
        $ curl -X GET -H 'content-type: application/json' -H 'username: admin' \
               -H 'password: adminpass' -H 'ipaddr:127.0.0.1' \
               http://127.0.0.1:8080/vtn-webapi/api_version.json

VTN Manager Installation Guide
==============================
https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):Installation:VTN_Manager

== Installing VTN Manager from source code ==
=== Prior preparation ===
Prior preparation for installing VTN Manager is the same as OpenDaylight controller.
Please see Controller's Installation Guide.
    https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation

=== Build ===
The procedure that follows assumes that you are installing VTN Manager
on your local Linux machine.

 1. Download the code from the Git repository of VTN Project.
        git clone ssh://<username>@git.opendaylight.org:29418/vtn.git
          or
        git clone https://git.opendaylight.org/gerrit/p/vtn.git

The following instructions assume you put the VTN source code
in directory ${VTN_DIR}.
        ${VTN_DIR}=<Top of VTN source tree>

 2. Build the code of VTN Manager.
        cd ${VTN_DIR}
        mvn -f manager/dist/pom.xml install

== Run the Controller with VTN Manager ==
On Linux/Unix systems, execute run.sh in the installation directory of
OpenDaylight Controller.
The installation directory is usually
${VTN_DIR}/manager/dist/target/distribution.vtn-manager-0.1.0-SNAPSHOT-osgipackage/opendaylight.

        cd ${VTN_DIR}/manager/dist/target/distribution.vtn-manager-0.1.0-SNAPSHOT-osgipackage/opendaylight
        ./run.sh

Please see Controller's Installation Guide for more information.
    https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation

=== REST API ===
VTN Manager provides REST API for virtual network functions.

Please check the VTN Manager's REST API specification page for detailed information.
    https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):VTN_Manager:RestApi

Here is an example of how to create a virtual tenant network.

        curl --user "admin":"admin" -H "Accept: application/json" -H \
        "Content-type: application/json" -X POST \
        http://localhost:8080/controller/nb/v2/vtn/default/vtns/Tenant1 \
        -d '{"description": "My First Virtual Tenant Network"}'

You can check the list of all tenants by executing the following command.

        curl --user "admin":"admin" -H "Accept: application/json" -H \
        "Content-type: application/json" -X GET \
        http://localhost:8080/controller/nb/v2/vtn/default/vtns

About

Mirror of the OpenDaylight vtn gerrit project

Resources

License

Stars

Watchers

Forks

Packages

No packages published