Getting Started with OSGiLiath (Eclipse)

This post will guide you to download OSGiLiath into Eclipse to start executing evolutionary algorithms or developing new services.

The steps are:

  1. Set up Subversion in Eclipse
  2. Download OSGiLiath from repository
  3. Configure OSGiLiath
  4. Launch OSGiLiath
  5. Launch OSGiLiath outside Eclipse (for example, in your cluster).

Step 1: Set up Subversion in Eclipse

  1. First, install Subversion in your machine (search Google ;).
  2. From Eclipse, go to Help>Eclipse Marketplace. Search “svn” and select “Subversive” (other plug-ins should work as well).
    1svn
  3. Follow the steps to install. Probably you should restart, and select a connector during the process.

Step 2: Download OSGiLiath project from repository

  1. After restarting Eclipse, go to the “Open Perspective” dialog in Eclipse and select “SVN Repository Exploring”. Press “New Repository Location” (it is like a yellow database with a plus).
    openperspective
  2. Fill the form with the Sourceforge repository URL ( http://svn.code.sf.net/p/osgiliath/code/ ) and with your Sourceforge username and password. NOTE: The URL has been updated, now it is the one above, not the shown in the image.
    4svnosgiliath
  3. Select the bundles of OSGiLiath to download (usually all) and select “Check Out” (or “Export”, depending of your version) of the contextual (left click) menu.
    6svnexport
  4. Now, all bundles of OSGiLiath are in your workspace. You can now go back to “Java” perspective from the “Open Perspective Dialog“.

Step 3: Configure OSGiLiath.

  1. Install ECF for distribution. Follow the steps available in the ECF Web (very similar to step 1.2) .
  2. The plug-in “Configuration Admin” (org.eclipse.equinox.cm) is not included by default in Eclipse JUNO and HELIOS. Download it from here (or check new versions here) and put it in your “eclipse/plugins” folder (where you installed Eclipse). Note: if you see problems in future when running OSGiLiath this web includes a lot of bundles that can be added.
  3. Restart Eclipse (if you add new plugins to the Eclipse plugins folder, you always have to restart Eclipse).
  4. Move the file parameters/parameter.properties file of the osgiliath project to a  more accessible folder if you want (or leave there, but remember where it is placed!).
  5. In your project osgiliath there are two product configurations: eclipseJUNO.product or eclipseHELIOS.product. Depending the version you are using, select one of another. Go to “Launching” tab of the product and modify the argument -DparameterFile in “VM Arguments” to the location of the parameter.properties file of the previous step.

launching

Step 4: Launch OSGiLiath

  1. In the product configuration, under the “Overview” tab, press “Launch an Eclipse application” (or Debug, if you want).
    launch
  2. A console will appear. Write in the console “startAll” to start the algorithm.
    startAll
  3. A complete log of the generations will be created in the folder selected in  configuration.log.folder property of the file parameter.properties.

Note: if other algorithms are in the same network, they will be automatically bound among them, so the startAll command will start all to perform a distributed island execution.

Step 5: Launch OSGiLiath outside Eclipse

  1. In the product configuration of the Step 4.1, under the “Overview” tab, press “Eclipse product export wizard” to create an executable.
  2. Fill the form as presented and press “Finish“.export
  3. Go to the created directory (or move the directore to a cluster, for example) and run the osgiliath executable to start the framework. The osgiliath.ini includes the same parameter of the VM Arguments you set in Step 3.4, so change it accordingly the node you are going to execute (parameterFile and osgiliathIP)

That’s all, you now can execute distributed algorithms and create new services!

Advertisements

About fergunet

PhD at Computer Science. I like Doctor Who.
This entry was posted in CUSL7, Development, OSGi, Tutorial and tagged , , . Bookmark the permalink.

One Response to Getting Started with OSGiLiath (Eclipse)

  1. Pingback: Changing repository location | OSGiLiath

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s