This post will guide you to download OSGiLiath into Eclipse to start executing evolutionary algorithms or developing new services.
The steps are:
- Set up Subversion in Eclipse
- Download OSGiLiath from repository
- Configure OSGiLiath
- Launch OSGiLiath
- Launch OSGiLiath outside Eclipse (for example, in your cluster).
Step 1: Set up Subversion in Eclipse
- First, install Subversion in your machine (search Google ;).
- From Eclipse, go to Help>Eclipse Marketplace. Search “svn” and select “Subversive” (other plug-ins should work as well).
- Follow the steps to install. Probably you should restart, and select a connector during the process.
Step 2: Download OSGiLiath project from repository
- 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).
- 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.
- 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.
- 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.
- Install ECF for distribution. Follow the steps available in the ECF Web (very similar to step 1.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.
- Restart Eclipse (if you add new plugins to the Eclipse plugins folder, you always have to restart Eclipse).
- 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!).
- 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.
Step 4: Launch OSGiLiath
- In the product configuration, under the “Overview” tab, press “Launch an Eclipse application” (or Debug, if you want).
- A console will appear. Write in the console “startAll” to start the algorithm.
- 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
- In the product configuration of the Step 4.1, under the “Overview” tab, press “Eclipse product export wizard” to create an executable.
- Fill the form as presented and press “Finish“.
- 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!