Remove GENIUS UTIL references in Statistics Module
[netvirt.git] / resources / README
1 DIRECTORY ORGANIZATION
2 ======================
3
4 - commons
5   +-- parent : Contains Parent pom.xml for all the ovsdb modules.
6
7 - features : This folder contains all the Karaf related files.
8
9 - karaf : Builds a working controller distribution based on the controller + ovsdb modules and other
10           dependant modules such as openflowplugin
11
12 - openstack
13   +-- net-virt : Handles the Openstack Neutron ML2 and Network Service calls and performs all the logic required
14                  for Network Virtualization.
15   +-- net-virt-providers : Mostly contains data-path programming functionality via OpenFlow or potentially
16                            other protocols.
17
18 - ovsdb-ui : Contains the DLUX implementation for displaying network virtualization
19
20 - resources : Contains some useful resources such as scripts, testing utilities and tools used for deployment
21               or testing the binaries generated from the OVSDB project.
22
23 - utils : MD-SAL OpenFlow and OVSDB common utilities.
24
25 HOW TO BUILD & RUN
26 ==================
27
28 Pre-requisites : JDK 1.7+, Maven 3+
29
30 1. Building a Karaf Feature and deploying it in an Opendaylight Karaf distribution :
31    1. From the root ovsdb/ directory, execute "mvn clean install"
32
33    2. Unzip the karaf-<VERSION_NUMBER>-SNAPSHOT.zip file created from step 1 in the directory ovsdb/karaf/target/:
34       "unzip karaf-<VERSION_NUMBER>-SNAPSHOT.zip"
35
36    3. Once karaf has started and you see the Opendaylight ascii art in the console, the last step
37       is to start netvirt framework with the following command in the karaf console:
38       "feature:install odl-netvirt-openstack" (without quotation marks).
39
40    Sample output from Karaf console :
41
42   opendaylight-user@root>feature:list -i | grep netvirt
43    odl-netvirt-impl                                                │ 0.7.2            │          │ Started │ odl-netvirt-0.7.2                                               │ OpenDaylight :: NetVirt :: impl
44    odl-netvirt-api                                                 │ 0.7.2            │          │ Started │ odl-netvirt-api                                                 │ OpenDaylight :: NetVirt :: api
45    odl-netvirt-openstack                                           │ 0.7.2            │ x        │ Started │ odl-netvirt-openstack                                           │ OpenDaylight :: NetVirt :: OpenStack
46   opendaylight-user@root>
47
48 2. Building a bundle and deploying it in an Opendaylight Karaf distribution :
49    This method can be used to update and test new code in a bundle. If the bundle of interest is rebuilt as a
50    snapshot with the same version as what it already defined in a feature repo then that new bundle will be used
51    when the feature is loaded in karaf. If karaf is already running with the feature loaded then follow the steps
52    below to load the new bundle:
53
54    1. Find the bundle id of the bundle you are going to rebuild:
55       - bundle:list -s | grep <bundlename>, i.e. bundle:list -s | grep odl-ovsdb-plugin
56
57    2. Instruct karaf to watch the new bundle and reload it if it changes:
58       - bundle:watch <id>
59       - The id is the value returned in 1 above.
60       - You can also watch the bundle URL itself:
61         - bundle:watch mvn:org.opendaylight.ovsdb/plugin/1.0.2-SNAPSHOT
62
63    3. Rebuild bundle.
64       - cd bundle dir, i.e. cd ovsdb/plugin
65       - mvn clean install. This will install the new bundle into the local mvn repo.
66
67    4. karaf will see the changed bundle and reload it.
68
69 Running The Integration Tests
70 =============================
71
72 To run the integration tests locally the following components are required:
73
74  - Docker
75  - Docker Compose
76
77 To install docker, follow the installation guide for your platform:
78    http://docs.docker.com/installation/
79
80 To install Docker Compose:
81    http://docs.docker.com/compose/install/
82
83 To run the integration tests:
84
85     mvn clean install
86     # The first time you need to set everything up
87     docker-compose up -d
88     # Later runs only need the containers to be started
89     docker-compose start
90     # OSX
91     mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=$(boot2docker ip 2>/dev/null) -Dovsdbserver.port=6640
92     # Linux
93     mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=127.0.0.1 -Dovsdbserver.port=6640 -Dovsdb.controller.address=<addr of docker interface> -Dovsdb.userspace.enabled=yes
94     docker-compose stop
95
96 On Linux you'll generally need to run fig as root (sudo fig ...).
97
98 Running the docker image manually:
99     sudo docker run -itd --cap-add NET_ADMIN -p 6640:6640 jhershbe/centos7-ovs:latest
100
101 Skipping unit tests and karaf tests
102 ====================
103
104 mvn clean install -Dmaven.test.skip=true -Dskip.karaf=true