Merge changes I89f90cf4,I248403b7
[netvirt.git] / README
1 DIRECTORY ORGANIZATION
2 ======================
3
4 - commons
5   +-- parent : Contains Parent pom.xml for all the ovsdb modules.
6   +-- integrationtest : Contains the parent pom.xml for all the integrationtest needs.
7
8 - distribution : Builds a working controller distribution based on the controller + ovsdb modules and other
9                  dependant modules such as openflowplugin
10   +-- opendaylight : older, OSGi-based distribution
11   +-- opendaylight-karaf : karaf-based distribution
12
13 - features : This folder contains all the Karaf related files.
14
15 - integrationtest : Contains all the PAX-Exam based integrationTests that covers IT for all the modules.
16
17 - library : Contains Schema-independent library that is a reference implementation for RFC 7047.
18             This module doesn't depend on any of the Opendaylight components.
19             This library module can also be used independently in a non-OSGi environment.
20
21 - northbound : Provides AD-SAL style Northbound REST APIs.
22                Supports the legacy v2 APIs to provide backward compatibility for Hydrogen Release
23                Also supports the newer v3 APIs to provide schema-independent access to the OVSDB protocol.
24
25 - of-extension : Adds OpenFlow Nicera extensions.
26
27 - openstack
28   +-- net-virt : Handles the Openstack Neutron ML2 and Network Service calls and performs all the logic required
29                  for Network Virtualization.
30   +-- net-virt-providers : Mostly contains data-path programming functionality via OpenFlow or potentially
31                            other protocols.
32
33 - ovs-sfc : SFC implementation using the OVSDB project. Currently it is just a shell.
34
35 - plugin : Contains Opendaylight Southbound Plugin APIs and provides a simpler API interface on top of library layer.
36            Ideally, this module should also be schema independent. But due to legacy reasons this layer contains some
37            deprecated functionality that assumes openvswitch schema.
38
39 - plugin-mdsal-adapter : Adds an MD-SAL Adapter for the OVSDB Plugin. The adapter updates the MD-SAL with nodes
40                          as they are added and removed from the inventory. The Yang model provides a reference
41                          between OVSDB nodes and the OpenFlow nodes (bridges) that they manage.
42
43 - plugin-shell : Contains a Karaf shell framework for OVSDB plugin and printCache command-line.
44
45 - resources : Contains some useful resources such as scripts, testing utilities and tools used for deployment
46               or testing the binaries generated from the OVSDB project.
47
48 - schemas :
49   +-- openvswitch : Schema wrapper that represents http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf
50   +-- hardwarevtep: Schema wrapper that represents http://openvswitch.org/docs/vtep.5.pdf
51
52 - utils : MD-SAL OpenFlow and OVSDB common utilities.
53
54 HOW TO BUILD & RUN
55 ==================
56
57 Pre-requisites : JDK 1.7+, Maven 3+
58
59 1. Building an OVSDB based Opendaylight Virtualization edition :
60    1. This is the legacy way to build and distribute Opendaylight archives. And this method was
61       followed in Hydrogen and possibly in Helium release as well.
62
63    2. From the root folder(that hosts this README), execute "mvn clean install"
64       That should build a full distribution archive and distribution directory that will contain
65       Opendaylight Controller + OVSDB bundles + Openflow Plugins under
66       distribution/opendaylight/target/distribution.ovsdb-X.X.X-osgipackage
67
68    3. Upon successful completion of a build, the Controller with OVSDB can be executed by :
69       cd distribution/opendaylight/target/distribution.ovsdb-X.X.X-osgipackage/opendaylight/
70       ./run.sh -virt ovsdb
71
72 2. Building a Karaf Feature and deploying it in an Opendaylight Karaf distribution :
73    1. This is a new method for Opendaylight distribution wherein there is no defined editions such
74       as Base, Virtualization or SP editions. The end-customer can choose to deploy the required feature
75       based on his/her deployment needs.
76
77    2. From the root ovsdb/ directory, execute "mvn clean install"
78
79    3. Next unzip the distribution-karaf-<VERSION_NUMBER>-SNAPSHOT.zip file created from step #2 in
80       the directory ovsdb/distribution/opendaylight-karaf/target like so:
81       "unzip distribution-karaf-<VERSION_NUMBER>-SNAPSHOT.zip"
82
83    4. Once karaf has started and you see the Opendaylight ascii art in the console, the last step
84       is to start the OVSDB plugin framework with the following command in the karaf console:
85       "feature:install odl-ovsdb-openstack" (without quotation marks).
86
87    Sample output from Karaf console :
88
89    opendaylight-user@root>feature:list | grep -i ovsdb
90    odl-ovsdb-all                    | 1.0.0-SNAPSHOT      |           | ovsdb-1.0.0-SNAPSHOT                  | OpenDaylight :: OVSDB :: all
91    odl-ovsdb-library                | 1.0.0-SNAPSHOT      | x         | ovsdb-1.0.0-SNAPSHOT                  | OVSDB :: Library
92    odl-ovsdb-schema-openvswitch     | 1.0.0-SNAPSHOT      | x         | ovsdb-1.0.0-SNAPSHOT                  | OVSDB :: Schema :: Open_vSwitch
93    odl-ovsdb-schema-hardwarevtep    | 1.0.0-SNAPSHOT      | x         | ovsdb-1.0.0-SNAPSHOT                  | OVSDB :: Schema :: hardware_vtep
94    odl-ovsdb-plugin                 | 1.0.0-SNAPSHOT      | x         | ovsdb-1.0.0-SNAPSHOT                  | OpenDaylight :: OVSDB :: Plugin
95    odl-ovsdb-northbound             | 0.6.0-SNAPSHOT      |           | ovsdb-1.0.0-SNAPSHOT                  | OpenDaylight :: OVSDB :: Northbound
96    odl-ovsdb-openstack              | 1.0.0-SNAPSHOT      | x         | ovsdb-1.0.0-SNAPSHOT                  | OpenDaylight :: OVSDB :: OpenStack Network Virtual
97    odl-ovsdb-ovssfc                 | 0.0.1-SNAPSHOT      |           | ovsdb-0.0.1-SNAPSHOT                  | OpenDaylight :: OVSDB :: OVS Service Function Chai
98    odl-openflow-nxm-extensions      | 0.0.3-SNAPSHOT      | x         | ovsdb-0.0.3-SNAPSHOT                  | OpenDaylight :: Openflow :: Nicira Extensions
99
100
101 3. Building a Karaf Feature and deploying it in an Opendaylight Karaf distribution :
102 *** This method is deprecated and an update will be added in the future.
103    1. This is a new method for Opendaylight distribution wherein there is no defined editions such
104       as Base, Virtualization or SP editions. Rather each of the projects will generate features in
105       form of .kar files. The end-customer can choose to deploy the required feature based on his/her
106       deployment needs.
107
108    2. From the features/ directory, execute "mvn clean install"
109       This will generate a kar file such as "features/target/ovsdb-features-1.2.0-SNAPSHOT.kar"
110
111    3. Download (or build from controller project) the Karaf distribution :
112       http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/distribution.opendaylight-karaf/
113       Sample zip file :
114       http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/distribution.opendaylight-karaf/1.4.2-SNAPSHOT/distribution.opendaylight-karaf-1.4.2-20140718.075612-407.zip
115
116    4. unzip the downloaded (or built) distribution and copy the ovsdb-features-x.x.x.kar file (from step 2) into
117       the unzipped distribution.opendaylight-karaf-X.X.X/deploy/ directory.
118
119    5. run Karaf from within the distribution.opendaylight-karaf-X.X.X/ directory using "bin/karaf"
120
121    Sample output from Karaf console :
122
123    opendaylight-user@root>kar:list
124    KAR Name
125    -----------------------------
126    ovsdb-features-1.2.0-SNAPSHOT
127
128    opendaylight-user@root>feature:list | grep ovsdb
129    odl-ovsdb-all | 1.2.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OpenDaylight :: OVSDB :: all
130    odl-ovsdb-library | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Library
131    odl-ovsdb-schema-openvswitch | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Schema :: Open_vSwitch
132    odl-ovsdb-schema-hardwarevtep | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Schema :: hardware_vtep
133    odl-ovsdb-plugin | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OpenDaylight :: OVSDB :: Plugin
134
135    opendaylight-user@root>bundle:list | grep OVSDB
136    186 | Active | 80 | 1.0.0.SNAPSHOT | OVSDB Library
137    199 | Active | 80 | 1.0.0.SNAPSHOT | OVSDB Open_vSwitch Schema
138    200 | Active | 80 | 1.0.0.SNAPSHOT | OVSDB hardware_vtep Schema
139    201 | Active | 80 | 1.0.0.SNAPSHOT | OpenDaylight OVSDB Plugin
140
141 Running The Integration Tests
142 =============================
143
144 To run the integration tests locally the following components are required:
145
146  - Docker
147  - Fig
148
149 To install docker, follow the installation guide for your platform:
150    http://docs.docker.com/installation/
151
152 To install fig:
153    http://www.fig.sh/install.html
154
155 To run the integration tests:
156
157     mvn clean install
158     fig start
159     # OSX
160     mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=$(boot2docker ip 2>/dev/null) -Dovsdbserver.port=6640
161     # Linux
162     mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=127.0.0.1 -Dovsdbserver.port=6640
163     fig stop
164
165 Skipping unit tests and karaf tests
166 ====================
167
168 mvn clean install -Dmaven.test.skip=true -Dskip.karaf=true