1 === Hacking VTN Coordinator
4 . Arrange a server with any one of the supported 64-bit OS environment.
9 * Ubuntu (12.04/12.10/13.04/14.04)
11 * Install necessary packages.
15 yum install make glibc-devel gcc gcc-c++ boost-devel openssl-devel \
16 ant perl-ExtUtils-MakeMaker unixODBC-devel perl-Digest-SHA uuid libxslt libcurl libcurl-devel git
21 apt-get install pkg-config gcc make ant g++ maven git libboost-dev libcurl4-openssl-dev \
22 libjson0-dev libssl-dev openjdk-7-jdk unixodbc-dev xmlstarlet
27 apt-get install pkg-config gcc make ant g++ maven git libboost-dev libcurl4-openssl-dev \
28 libssl-dev openjdk-7-jdk unixodbc-dev
30 NOTE: Install libjson0-dev from packages of ubuntu versions (>12.04)
32 * Install JDK 7, and add the JAVA_HOME environment variable (Only for RHEL/Cent OS/Fedora)
33 * RHEL 6.1/Cent OS 6.1
35 . Download Oracle JDK 7 from the following page, and install it.
36 http://www.oracle.com/technetwork/java/javase/downloads/index.html
38 . Set JAVA_HOME to the location of the JDK.
42 export JAVA_HOME=/usr/java/default
45 * RHEL 6.4,Cent OS 6.4 ,Fedora (17,20)
51 yum install java-1.7.0-openjdk-devel
54 .2. Set JAVA_HOME to the location of the JDK.
57 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
59 * Preperation for Execution
61 * RHEL 6/Fedora/Cent OS 6
64 Download the following PostgreSQL 9.1 files (latest versions) from http://yum.postgresql.org/9.1/redhat/rhel-6.4-x86_64/ (RHEL 6.4) or http://yum.postgresql.org/9.1/redhat/rhel-6.1-x86_64/ (RHEL 6.1)and install.
72 NOTE: The above procedure caters only for RHEL 6, For Fedora and CentOS, Please visit http://yum.postgresql.org and install the corresponding rpm for the particular version of Linux distro
76 . Download and install the Postgres 9.3 by installing the rpm
77 NOTE: For RHEL 7, Please install the below rpm
80 rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
81 yum install postgresql93-libs postgresql93 postgresql93-server postgresql93-contrib postgresql93-odbc
83 NOTE: For Cent OS 7, Please install the below rpm
86 rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
87 yum install postgresql93-libs postgresql93 postgresql93-server postgresql93-contrib postgresql93-odbc
93 apt-get install postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-contrib-9.1 odbc-postgresql
96 * Install Maven. (RHEL/Cent OS/Fedora)
97 . Download Maven from the following page and install it folloiwng the instruction in the page.
98 . http://maven.apache.org/download.cgi
100 . Install gtest-devel, json-c libraries
102 * RHEL/Fedora/Cent OS
106 wget <nowiki>http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm</nowiki>
107 rpm -Uvh epel-release-6-8.noarch.rpm
108 yum install gtest-devel json-c json-c-devel
111 NOTE: For RHEL7 and CentOS7, the json-c is part of the default repo, Please install json-c and json-c-devel from the default repo and gtest-devel alsone from the EPEL repo (http://dl.fedoraproject.org/pub/epel/7/x86_64/)
113 * Ubuntu 13.10/Ubuntu 12.04
116 apt-get install cmake libgtest-dev
117 cp -R /usr/src/gtest gtest-work
128 NOTE: User is not required to be mandatorily root, but the user must own the directory /usr/local/vtn
131 .The directory should appear as below (assuming the user as "vtn"):
135 drwxr-xr-x. 12 vtn vtn 4096 Mar 14 21:53 vtn
138 * Download the code from git.
141 git clone ssh://<username>@git.opendaylight.org:29418/vtn.git
142 git clone https://git.opendaylight.org/gerrit/p/vtn.git
145 * Build and install VTN Coordinator.
149 mvn -f dist/pom.xml install
150 tar -C/ -jxvf dist/target/distribution.vtn-coordinator-6.1.0.0-SNAPSHOT-bin.tar.bz2
153 ==== Run VTN Coordinator
155 ===== Prior preparation
156 ====== To change the port
157 . By Default coordinator will listen on port 8083
158 . To change the listening port modify the TOMCAT_PORT in below file
161 /usr/local/vtn/tomcat/conf/tomcat-env.sh.
167 /usr/local/vtn/sbin/db_setup
170 If any problem in setting up db, Please visit: * https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):Installation:Troubleshooting#After_executing_db_setup.2C_you_have_encountered_the_error_.22Failed_to_setup_database.22.3F
173 .1. Start VTN Coordinator.
177 /usr/local/vtn/bin/vtn_start
180 .2. Execute the following commands while stopping.
183 /usr/local/vtn/bin/vtn_stop
187 * VTN Coordinator version information will be displayed if following command is executed when VTN has started successfully.
190 curl --user admin:adminpass -H 'content-type: application/json' -X GET \
191 'http://127.0.0.1:8083/vtn-webapi/api_version.json'
194 * The expected response message:
197 {"api_version":{"version":"V1.2"}}