Hi all,

As Azeez has already mentioned in another thread, we have come up with a
serious issue in deploying cApps in a MT environment. The root cause for
this issue is the usage of p2 features to install artifacts in the cApp.
Even though each tenant has it's own Axis Configuration, all tenants share
the same OSGi environment. So the installation of features can't be made
tenant specific.

We didn't use p2 for cApp artifact deployment in our initial implementation
of cApp. But later we introduced p2 to automatically install the needed
Carbon components for a particular artifact deployment.

Ex : If we install a cApp with an AAR service into a pure Carbon instance,
it should install the service management features automatically into the
Carbon server.

I think this is the only reason for using p2 features for artifact
installation. Please add if I've missed something here :) ..

As a solution for this problem, I have an idea of making the feature
installation optional in the cApp.

Proposed solution:

cApp doesn't contain a p2-repo and it only has a collection of folders which
includes artifacts to be deployed.

|-- artifacts.xml
|-- endpoint1
|   |-- artifact.xml
|   `-- endpoint1.xml
|-- fooService
|   |-- artifact.xml
|   `-- foo.aar
`-- proxy1
    |-- artifact.xml
    `-- proxy1.xml

But inside the artifact.xml of each and every artifact, we have the list of
dependent Carbon features which should be installed in the system to deploy
this particular artifact (this list of features is automatically added by
eclipse tools at artifact generation). So the artifact.xml will look like
this..

<artifact type="service/axis2" version="1.4.0"
name="org.wso2.samples.CachingTestService" serverRole="wsas1">
    <file>CachingTestService.aar</file>
    <subArtifacts>
        <artifact type="registry/resource">
            <file>reg-config.xml</file>
        </artifact>
    </subArtifacts>

    <requiredFeatures>
        <feature name="org.wso2.carbon.service.mgt" version="3.0.0"/>
        <feature name="org.wso2.carbon.service.mgt.ui" version="3.0.0"/>
        <feature name="org.wso2.carbon.aarservices" version="3.0.0"/>
    </requiredFeatures>
</artifact>

So we provide an option for the user at the deployment time to specify
whether he needs feature installations or not. If the user already have
these features installed in his Carbon instance, he will set the option to
"false". If it is "true", cApp deployer can programetically install these
features in the system. And also in MT environment, this option is always
"false". In that case, when a user deploys a cApp, only the artifacts for
which the needed features are already there, will be deployed.

This solution will allow us to keep the advantage of using p2 features while
allowing the cApp to be deployed in a MT environment.

Note : However, handling third party dependent libraries will still be a
problem in the MT environment. It should be discussed as a separate topic.

WDYT??..

Thanks,
~Isuru
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to