Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Instructions are outdated.  New instructions coming soon!

Run From Source

Prerequisites :
  • Eclipse 3.6.2
  • Mysql 5.0 (For this tutorial we're using mysql, but in reality you could use any database)
  • CPAN (optional)

Import Beacon and OpenflowJ

Flowscale's engine is the Beacon controller.   We need to download the source code for both the Beacon controller and OpenflowJ.

...

  • Fire up Eclipse and create a new workstation...* Import the Beacon Project to Eclipse (File -> Import -> General -> Existing Projects into workspace
  • Browse to <beacon-path> select the folder 
  • Click Deselect all and select the following projects
    • Beacon Libraries
    • Beacon Main Target 
    • net.beaconcontroller.core
    • net.beaconcontroller.logging.bridge
    • net.beaconcontroller.logging.config
    • net.beacontroller.packet
  • Import OpenflowJ to Eclipse the same way. This time keep the select all

Import FlowScale

Get FlowSclae from github

...

Resolving Target Definitions
Setup Flowscale

1) Download Flowscale from github:

Code Block
$ git clone git@github.com:InCNTRE/FlowScale.git

...

One you move to the Eclipse workbench, you'll find that most of the bundles containt errors.  We need to resolve those errors by downloading the dependencies.

  • On the left pane Double-Click the FlowScale Target Platform
  • Right click on main.target.example select "refactor" and rename it to main.target
  • Double click on the file. It will appear on the right, in the bottom it will say "Resolving Target Definitions" wait until it finishes.  It is downloading all the necessary libraries.  So, it will take a while the first time.
  • One it is done in the top right, click on "Set as Target Platform"

All errors should be cleared now

Deploy the Database

The database carries all the information that needs to be persistent.

  • Set up the flowscale_db database
  • Access mysql root
  • create a new database
    • Code Block
      
      create database flowscale_db;
      
  • Use the script file <path-to-FlowScale>/database/flowscale_db.sql to create the tables.  For example:
  • Code Block
    
    mysql -u root -D flowscale_db -p < flowscale_db.sql
    

Update Backend Configuration

We need to update all of the configuration values in the bundles to allow FlowScale to run, most of these values should be customized according to your own environment

  • For all FlowScale bundles rename the META-INF/spring/context.xml.example file to context.xml:* edu.iu.incntre.flowscale

...

  • edu.iu.incntre.flowscaleflowupdate
  • edu.iu.incntre.flowscalestatcollector
  • edu.iu.incntre.flowscalehttplistener

...

3) In the "Beacon Main Target" project, open up the main.target file and:

  • click on the Add -> Software Site. 
  • Add the url : http://of-lab2.grnoc.iu.edu/flowscaleupdateDown Temporarilydown temporarily
  • Select "Flowscale Components" and click "Finish".  
  • Wait for "Resolving Target Definition" (bottom right) to complete, then click "Set as target platform."

You should see no errors now.

As another option if of-lab2 is down is to get the Flowscale components by importing the FlowScale/backend and FlowScale/backend/FlowScaleLib/plugins directories
In the "Beacon Main Target" project, open up the main.target file and:

  • click on the Add -> Directory
  • Select the FlowScale/backend dir 
  • Click "Finish".  
  • Wait for "Resolving Target Definition" (bottom right) to complete, then click "Set as target platform."
  • click on the Add -> Directory
  • Select the FlowScale/backend/FlowScaleLib/plugins
  • Click "Finish".  
  • Wait for "Resolving Target Definition" (bottom right) to complete, then click "Set as target platform."

You should see no errors but will see some warnings

4) Set database values in Flowscale content.xml under META-INF/spring for for username, password, and host.

...

Running Flowscale

...

1) Import the project "edu.iu.incntre.flowscaleproduct" into the workspace. Open up flowscale-id.product.

...

  • org.eclipse.equinox.console.telnet* You need to edit some of the context.xml files to reflect your own enviromnent as detailed below. 
Database configuration 
  • For documentation purposes I'll assume the database is under localhost with the listening port being 3306.  The username and password of the database if "flowscale".  The JDBC driver being used is com.mysql.jdbc.Driver.
  • Edit the context.xml of edu.iu.incntre.flowscale
    • set the username property to "flowscale"
    • set the password property to "flowscale"
    • set the connectionString property to "dbc:mysql://127.0.0.1:3306/flowscale_db"
    • set the dbDriverString property to "com.mysql.jdbc.Driver"
  • Edit the context.xml of edu.iu.incntre.flowscalestatcollector
    • set the databaseClass property to com.mysq.jdbc.Driver
    • set the dbUsername property to flowscale
    • set the dbPassword property to flowscale
    • set the databaseDriver property to "dbc:mysql://localhost:3306/flowscale_db"
  • Edit the context.xml of edu.iu.incntre.flowscaleflowupdate
    • set the databaseClass property to com.mysq.jdbc.Driver
    • set the dbUsername property to flowscale
    • set the dbPassword property to flowscale
    • set the databaseDriver property to "dbc:mysql://localhost:3306/flowscale_db"
Switch Configuration

Some of bundles also need information about the switch or switches being used.  FlowScale will need the datapath ID of the switch.  Otherwise, it will ignore it (even if the switch connects to the controllers). For documentation purposes assume we have 2 switches..  The first with datapathId abcdefabcdef and another with datapathId 123456123456.  

Assume we would like to have the traffic output distribution from the switch on ports 5,6,7,8 for the first switch and the second switch with output distribution 15,16,17,18.

  • edit edu.iu.incntre.flowscaleflowupdate
    • set the loadedPorts property to "abcdefabcdef:5,6,7,8-123456123456:15,16,17,18"
  • edit edu.iu.incntre.flowscalestatcollector
    • set the datapathIdString property to "abcdefabcdef,123456123456"

Other Optional Configuration

[coming soon]

It is time to run the FlowScale main engine

Running FlowScale

  • under edu.iu.incntre.flowscaleproduct
    • Under the configuration tab, on the top right click on the validate tab it should say "no problems detected"
    • To run the application in debug mode click on the debug icon and choose "Launch in Eclipse application mode"

That should startup FlowScale you should see the following ports on your machine listening:

  • 6633 : This is the Beacon Controller listening port
  • 8080 : This the http interface for FlowScale accepting REST API requests
  • 7777: This is to access the OSGI console to manage the bundles
  • Try telneting into localhost (port 7777) and type "ss"..  The bundles should appear

Setting up the Web User Interface "flowscale_ui"

Instructions are outdated.  New instructions coming soon!

Run From Binary
  • Download the binary for your platform :

...