forked from opendaylight/vtn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hydrogen_install
183 lines (141 loc) · 7.12 KB
/
hydrogen_install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
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