Wednesday, May 30, 2012

How to install features via Feature Manager in Carbon 4.0

Carbon is a modular middleware framework for enterprise applications. It's power yields from it's compose-able architecture using which users can compose their own Carbon Products by installing software components on top of  Carbon. These reusable software units are called 'features'. The process of installing features on a target system is called 'provisioning'.  In Carbon, provisioning is facilitated via the Feature Manager.

Feature Manager


Carbon Feature Manager facilitates the users to easily install features on top of Carbon. It provides the main provisioning actions (install, uninstall, update, revert) using Equinox p2 under the hood. Users can install features from either a remote p2 repository or a local repository. A p2 repository contains the things to be installed (artifacts) and their metadata (InstallableUnits) so a provisioning agent (client) can connect to these p2 repositories and perform provisioning actions.

Basically the functionality of the Feature Manager can be considered as 2 main aspects; 
  • Repository Management (Lets you to add,delete,edit p2 repositories. You can add remote repositories giving a URL and local repositories giving the local-path )  
  • Provisioning Management (Lets you install, uninstall, update features or revert to a previous installation)
You can follow the Carbon documentation on how to use Feature Manager here.

 

What's new in Feature Manager in Carbon 4.0?


Carbon 4.0 (the upcoming release) has several improvements in Feature Manager.  As I said earlier Feature Manager can be used to compose carbon products (eg: Application Server, Data Services Server etc.) by installing the required list of features on top of Carbon. For this you need to know, the list of features required to install to gain the capabilities of a particular WSO2 Product. 

In Carbon 4.0 this is made easy for the users. Now you can install new products on Carbon using 'Feature Categories' from a p2 repository. You don't need to remember the list of features required for a particular product as the p2 repository for Carbon is now published with feature categories to represent each Carbon product. A feature category is basically a logical group of required features for a particular product. For example all the required features to install Application Server is categorised under 'Application Server' category.


The new Feature Manager comes with an option to enable 'Group features by category' when you list down available features from a p2 repository.  If you disable this option you can still see the flat list of features provided from the repository without the category groupings, just as in previous releases (3.2.0, 3.2.1,..). 

You can follow the below steps to install a WSO2 product on Carbon using feature categories.
1. Add a Carbon p2 repository published with feature category metadata. You can find a successful build of Carbon4 p2 repository with feature categories from here. 



2. Go to 'Available Features' tab and select the newly added p2 repository from the list. 
Enable 'Group features by category' option and click 'Find Features'. You can see the available feature categories from the p2 repository.


3. Select a feature category (eg: Application Server) to install and click install. It will automatically select all the required features for the product to be installed. 



4. Accept the license agreement for the features and complete the installation process.
  
5. When the installation is complete, restart the server. You can now see Application Server features available for your use on Carbon. You can see the list of installed features by navigating to Feature Manager > Installed Features tab.




In the next post I will discuss how to create feature categories to group required features for a Carbon product.