Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Instructions are outdated.  New instructions coming soon!

Create Database:

Whether running from source or binary.  The database needs to be created first. 

Create a mysql database with the name of webui

Under the root directory take the "webui.sql" file and do a :

$ mysql -p -h $DBHOST webui < webui.sql 

Run From Source

Prerequisites :
  • Eclipse 3.6.2
  • Mysql 5.0
Setup Beacon and OpenflowJ

Flowscale is built on Beacon.  Follow the steps here to setup the Beacon controller and openflowj .

Setup Flowscale

1) Download Flowscale from github:

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

2) Import the Flowscale project into your eclipse workspace (edu.iu.incntre.flowscale and 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.

2) Click on the "debug" button.

Run From Binary
  • Download the binary for your platform :

          https://github.com/InCNTRE/FlowScale/downloads

  • Configure flowscale
  1.  cd into the root directory flowscale-controller-binary
  2.  set the beacon, jetty ports
  1.  create the files flowscale.properties and beacon.properties and web_interface.properties:
    E.g. let's set the beacon port as 6634 (default is 6633)

In beacon.properties:

controller.listenPort=6634

In flowscale.properties below is a sample file that configures the jetty listener port, the database hsot , the username and password

flowscaleController.port=3306
flowscaleController.host=localhost
flowscaleController.username=webui-username
flowscaleController.password=[webui-db-password]

In web_interface.properties set the listener port for Jetty:

flowscaleHttpListener.jettyListenerPort=8181
  • Configure Logging

You may want to configure the logging level:

create a file called logback.xml in the root directory.

The below logback.xml file reports ERROR for the beacon controller and INFO logs for Flowscale:

<configuration>


  <appender name="flowscale.log" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/flowscale.log</file>

    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>logs/flowscale.%d.log.zip</fileNamePattern>
      <maxHistory>60</maxHistory>
    </rollingPolicy>

    <encoder>
      <pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="info">

    <appender-ref ref="flowscale.log" />
  </root>
  <logger name="net.beaconcontroller" level="ERROR"/>
  <logger name="edu.iu.incntre.flowscale" level="INFO"/>

</configuration>


In flowscale-controller.ini set the path for logback.xml

Dlogback.configurationFile=logback.xml

Finally: you may want to setup the management console for the OSGI environment (optional)

In flowscale-controller.ini you can do:

-console
7777

Where 7777 is the listening port you can telnet to.

  •  Run the Binary
  • cd into the root directory (flowscale-controller-binary)
     cd flowscale-controller-binary 
    • run the flowscale binary
 ./flowscale-controller & 

Confirm that flowscale is running by running a netstat and verify that the jetty, beacon, and console ports are listening.

Do a telnet to the OSGI console to confirm that the necessary bundles are in a running state.

Deploy WebUI

Deploy the folder flowscale_ui to any server of your choice.

Make sure to edit the variables under 'conf' directory

  • controller.xml - values to connect the webui to the controller
  • database.xml credentials facilitating database connection

 Perl Packages Required:

libhtml-template-perl
Template
JSON 
File::ShareDir
REST::Client
RRDS
libhtml-template-perl

Template

JSON 

File::ShareDir

REST::Client

RRDS

  • No labels