Hi All,

I continued with the 1st option of updating the relative paths for
source,destination in p2.inf of platform features in the new multi-profile
target directory structure.
Based on that I have done below changes to kernel in the scratch area;

1. carbon-p2-plugin [1]
Updated the p2-director launcher arguments to support multiple-profile
installations with a shared p2 area, in MaterialzeProductMojo and
ProfileGenMojo
 -destination : targetPath/${profile}
 -shared : targetPath/p2

targetPath is: $CARBON_HOME/repository/components

2. carbon.server [2]
CarbonLauncher changes: At startup osgi-runtime arguments are passed
according on the running profile
osgi.install.area : repository/components/${profile}
osgi.configuration.area : repository/components/${profile}/configuration
eclipse.p2.data.area : repository/components/p2 (not changed as we are
using a shared p2 area for all profiles)

Main class change : if no profile is given as a startup parameter, carbon
will start with the default profile : WSO2CarbonProfile

3. Product p2-profile-gen [3]
Please see how a new Profile can be installed into the distribution in a
product's p2-profile-gen.
I have changed the carbon product p2-profile-gen [3] module, to install a
new Profile : WSO2SampleProfile that has tryit, soaptracer features
installed in addition to the carbon.runtime and carbon.core features.

Below steps should be performed to install a new Profile in p2-profile-gen;
1. Publish the product configuration file (eg:carbon.product) with the
initial runtime configurations.
(A product configuration is required to materialize the minimal runtime
before installing features)
2. Materialize the new Profile using above .product configuration file
3. Install features to the new profile

Please find the carbon distribution at [4] which has WSO2CarbonProfile,
WSO2SampleProfile pre-installed.
You can start Carbon to load a profile by giving profile argument at
startup (eg: ./wso2server.sh -Dprofile=WSO2SampleProfile)

Feature installation in the multi-profile environment is not yet working as
it only updates the relevant Profile but not the relevant bundles.infofile.
The reason for this is that org.eclipse.equinox.p2.installFolder value gets
hard-coded in the Profile during build time and p2 cannot locate the
bundles.info file in the modified directory structure. Need to fix this.
The related jira  : https://wso2.org/jira/browse/CARBON-14064

Thanks,
Dileepa


[1] https://svn.wso2.org/repos/wso2/scratch/dileepa/carbon-p2-plugin
[2]
https://svn.wso2.org/repos/wso2/scratch/dileepa/kernel/trunk/core/org.wso2.carbon.server
[3]
https://svn.wso2.org/repos/wso2/scratch/dileepa/kernel/trunk/distribution/product/modules/p2-profile-gen/pom.xml
[4]
https://svn.wso2.org/repos/wso2/scratch/dileepa/wso2carbon-4.1.0-SNAPSHOT.zip
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to