Wiki

Clone wiki

limeds-framework / Guide_to_Provisioning

LimeDS has built-in support for provisioning Slices and Segments to remote LimeDS instances, based on the resolver and repository format as described in the OSGi specificiation. Our LimeDS annotation processor and Visual editor will produce installable modules that contain meta-data expressing the capabilities and requirements of the modules. This will allow the provisioning process to transitively download and install any LimeDS dependencies the to be installed module relies on.

Of course, a module repository system is required in order to host these modules and their respective meta-data. As mentioned above, we will employ OSGi R5 repositories as specified by the OSGi standard specification. Each LimeDS instance comes with a pre-registered repository that provides LimeDS modules developed by IBCN. In the rest of this article, we'll explain how you can setup and use your own repositories.

Step 1: Generating a repository

To generate a repository for your LimeDS Eclipse workspace (see workspace setup), open a terminal in the main workspace folder and enter the following command:

gradle jar release

This will build all your LimeDS modules and generate a repository in the cnf/release folder. The module binaries are stored in separate sub folders, while the relevant module meta-data is collected in an index.xml file.

Step 2: Adding Slices built using the editor

The gradle command does not automatically generate installable modules for the Slices you created with the editor. To generate a module for a specific Slice, enter the following URL in your browser while the framework is running:

http://[limeds_host]:[limeds_port]/_limeds/slices/[slice_id]/[slice_version]/publish

Refresh the Slices folder in your Eclipse workspace. A new file run/slices/generated/[slide_id]_[slice_version].jar should now be present. Inside Eclipse, drag this file onto the Release repository in the Bndtools Repositories view. A prompt should be displayed similar to the one below, click Finish to add the module to the repository.

repo_1.PNG

Note: We will streamline this part of the process in future releases!

Step 3: Hosting the repository

An interesting aspect of the OSGi R5 repository system is that the resolver logic is executed on the client so the repository is just a set of static files. This implies that to host your repository, it suffices to host the cnf/release folder on a HTTP server (it even works with Dropbox).

Step 4: Registering the repository with LimeDS

Now we need to let our LimeDS instance know that a new repository is available. To do this, we add an entry (the link to the repository index.xml) to the obr.repository.url config property. When running LimeDS in Eclipse, use the run.bndrun to add this config property. When running a standalone version, look for this entry in the felix-cfg/config.properties file.

Step 5: Installing a module from the repository

Now that the repository is registered with the instance, we can use it to install additional modules into our LimeDS environment.

To list all the available modules (and the Segments they provide), browse the following URL: http://[limeds_host]:[limeds_port]/_limeds/installables

To install a specific module, browse the following URL: http://[limeds_host]:[limeds_port]/_limeds/installables/[module_id]/[module_version]/deploy

Not: UI support for this feature will be included in future LimeDS releases!

Updated