| 1 | = Installation and Usage = |
| 2 | |
| 3 | As of now this project is extremely rough around the edges. |
| 4 | |
| 5 | === Installation === |
| 6 | |
| 7 | The source code can be fetched using git and built with `ant`: |
| 8 | {{{ |
| 9 | git clone git://github.com/akoshibe/floodlight.git |
| 10 | cd floodlight/ |
| 11 | git checkout -b flowvisor origin/flowvisor |
| 12 | ant; |
| 13 | }}} |
| 14 | |
| 15 | As with the regular Floodlight, `ant eclipse` allows it to work with eclipse and `ant javadoc` will produce javadocs for the code. |
| 16 | |
| 17 | === running in !FlowVisor mode === |
| 18 | |
| 19 | To run: |
| 20 | {{{ |
| 21 | java -jar target/floodlight.jar -cf src/main/resources/flowvisor.properties |
| 22 | }}} |
| 23 | |
| 24 | This brings the controller up in "!FlowVisor mode," with two default slices containing the !LearningSwitch and Forwarding modules. The slice configurations are in config.json, found with the .properties file in [floodlight working directory]/src/main/resources/. |
| 25 | |
| 26 | === running as a regular controller === |
| 27 | |
| 28 | Alternatively, since none of the original code base was modified, this version of Floodlight can be run as a normal v0.85 controller by replacing |
| 29 | {{{ |
| 30 | net.floodlightcontroller.core.FVProxyProvider |
| 31 | }}} |
| 32 | with |
| 33 | {{{ |
| 34 | net.floodlightcontroller.core.FloodlightProvider |
| 35 | }}} |
| 36 | in `src/main/resources/META-INF/services/net.floodlight.core.module.IFloodlightModule` and launching it without the -cf option. |
| 37 | |
| 38 | === creating a custom configuration file === |
| 39 | As of now, !FlowVisor is required to create custom configuration files. This takes four steps: |
| 40 | |
| 41 | 1. configure the desired policies using `dpctl` against a running !FlowVisor |
| 42 | 1. dump the configurations to file using `dpctl dumpConfig <filename>` |
| 43 | 1. edit the configuration file: add each module to be isolated to a slice, with "modules" as the key and the fully qualified name of the module as the value. The value "none" may be used for a slice not associated with any modules. For example, the following isolates the Forwarding module in a slice named "fl-1": |
| 44 | {{{ |
| 45 | ... |
| 46 | |
| 47 | "Slice": [ |
| 48 | ... |
| 49 | { |
| 50 | "config_name": "default", |
| 51 | "flowmap_type": "federated", |
| 52 | "name": "fl-1", |
| 53 | "creator": "fvadmin", |
| 54 | "passwd_crypt": "a3b88aa4453124c025c39938fb89d3cb", |
| 55 | "passwd_salt": "-1847302276", |
| 56 | "controller_hostname": "localhost", |
| 57 | "controller_port": 6634, |
| 58 | "modules": "net.floodlightcontroller.forwarding.Forwarding", |
| 59 | "contact_email": "foo@sampledomain.org", |
| 60 | "drop_policy": "exact", |
| 61 | "lldp_spam": true |
| 62 | }, |
| 63 | ... |
| 64 | }}} |
| 65 | 4. edit flowvisor.properties to point FVProxyProvider to the new configuration file. The path should be relative to the Floodlight working directory: |
| 66 | {{{ |
| 67 | net.floodlightcontroller.core.FVProxyProvider.configfile = /src/main/resources/config.json |
| 68 | }}} |
| 69 | |
| 70 | Unless already there, the modules added to the config file should also be added to flowvisor.properties. |
| 71 | |
| 72 | |