X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2FREADME;h=9f4b2625e9eec9db59a0fca721fe32515ad7030b;hb=2b5ef836d252f48e087a8d230a6e65cfee536493;hp=93db5e60d013ea6da88be671ed8af9c8d38afbe3;hpb=2096c27ba91978d185e3c48c7156bec01d150a56;p=netvirt.git diff --git a/resources/README b/resources/README index 93db5e60d0..9f4b2625e9 100644 --- a/resources/README +++ b/resources/README @@ -1,6 +1,105 @@ +DIRECTORY ORGANIZATION +====================== -The resources/ directory contains all the associated scripts and configuration files that can be used by -developers and administrators under various use-cases. +- commons + +-- parent : Contains Parent pom.xml for all the ovsdb modules. -It is subdivided into multiple directories addressing each of the deployment scenarios. -Each of these sub-directories contains its own README. +- features : This folder contains all the Karaf related files. + +- karaf : Builds a working controller distribution based on the controller + ovsdb modules and other + dependant modules such as openflowplugin + +- openstack + +-- net-virt : Handles the Openstack Neutron ML2 and Network Service calls and performs all the logic required + for Network Virtualization. + +-- net-virt-providers : Mostly contains data-path programming functionality via OpenFlow or potentially + other protocols. + +-- net-virt-sfc : SFC implementation using the OVSDB project. + +- ovsdb-ui : Contains the DLUX implementation for displaying network virtualization + +- resources : Contains some useful resources such as scripts, testing utilities and tools used for deployment + or testing the binaries generated from the OVSDB project. + +- utils : MD-SAL OpenFlow and OVSDB common utilities. + +HOW TO BUILD & RUN +================== + +Pre-requisites : JDK 1.7+, Maven 3+ + +1. Building a Karaf Feature and deploying it in an Opendaylight Karaf distribution : + 1. From the root ovsdb/ directory, execute "mvn clean install" + + 2. Unzip the karaf--SNAPSHOT.zip file created from step 1 in the directory ovsdb/karaf/target/: + "unzip karaf--SNAPSHOT.zip" + + 3. Once karaf has started and you see the Opendaylight ascii art in the console, the last step + is to start netvirt framework with the following command in the karaf console: + "feature:install odl-netvirt-openstack" (without quotation marks). + + Sample output from Karaf console : + + opendaylight-user@root>feature:list -i | grep netvirt + odl-netvirt-impl │ 0.7.2 │ │ Started │ odl-netvirt-0.7.2 │ OpenDaylight :: NetVirt :: impl + odl-netvirt-api │ 0.7.2 │ │ Started │ odl-netvirt-api │ OpenDaylight :: NetVirt :: api + odl-netvirt-openstack │ 0.7.2 │ x │ Started │ odl-netvirt-openstack │ OpenDaylight :: NetVirt :: OpenStack + opendaylight-user@root> + +2. Building a bundle and deploying it in an Opendaylight Karaf distribution : + This method can be used to update and test new code in a bundle. If the bundle of interest is rebuilt as a + snapshot with the same version as what it already defined in a feature repo then that new bundle will be used + when the feature is loaded in karaf. If karaf is already running with the feature loaded then follow the steps + below to load the new bundle: + + 1. Find the bundle id of the bundle you are going to rebuild: + - bundle:list -s | grep , i.e. bundle:list -s | grep odl-ovsdb-plugin + + 2. Instruct karaf to watch the new bundle and reload it if it changes: + - bundle:watch + - The id is the value returned in 1 above. + - You can also watch the bundle URL itself: + - bundle:watch mvn:org.opendaylight.ovsdb/plugin/1.0.2-SNAPSHOT + + 3. Rebuild bundle. + - cd bundle dir, i.e. cd ovsdb/plugin + - mvn clean install. This will install the new bundle into the local mvn repo. + + 4. karaf will see the changed bundle and reload it. + +Running The Integration Tests +============================= + +To run the integration tests locally the following components are required: + + - Docker + - Docker Compose + +To install docker, follow the installation guide for your platform: + http://docs.docker.com/installation/ + +To install Docker Compose: + http://docs.docker.com/compose/install/ + +To run the integration tests: + + mvn clean install + # The first time you need to set everything up + docker-compose up -d + # Later runs only need the containers to be started + docker-compose start + # OSX + mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=$(boot2docker ip 2>/dev/null) -Dovsdbserver.port=6640 + # Linux + mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=127.0.0.1 -Dovsdbserver.port=6640 -Dovsdb.controller.address= -Dovsdb.userspace.enabled=yes + docker-compose stop + +On Linux you'll generally need to run fig as root (sudo fig ...). + +Running the docker image manually: + sudo docker run -itd --cap-add NET_ADMIN -p 6640:6640 jhershbe/centos7-ovs:latest + +Skipping unit tests and karaf tests +==================== + +mvn clean install -Dmaven.test.skip=true -Dskip.karaf=true