Hi All,

We've managed to spawn an EC2 instance via WSO2 LB, using JClouds API, with
few hacks. Though JClouds jars are OSGi bundles, there were few osgi
related issues we under went.

1. Installing all required JClouds bundles: Installing them was tedious,
since we have to install all the dependency jars into the carbon server
instance. I had to manually find missing dependencies and install them.
Some how after spending quite a bit of time, I was able to successfully
install and start all the jclouds related bundles.

2. JClouds uses Java Service Loader: Java service loader has issues when it
comes to an osgi environment, see [1]. I was able to get rid of those
errors by using Apache Aries- SPI-Fly component, as described in [1].
But this has some issues like, SPI-Fly should start before APIs and
providers get installed. I guess start level should be able to specify in
Manifest.mf ?

============================================================================================================================================================

We've used a configuration file, which contains IaaSes specific stuff.
Note: that this config file, might not be in good shape with respect to
"names" :) Please do critically comment on them! Here it is:

<jcloudConfig>

    <iaasProviders>
        <iaasProvider name="ec2">
            <provider>aws-ec2</provider>
            <identity>ABAB</identity>
            <credential>BBB</credential>
            <scaleUpOrder>1</scaleUpOrder>
            <scaleDownOrder>2</scaleDownOrder>
           <template>us-east-1/DD</template>
            <property name="jclouds.ec2.ami-query" value="CDCDC"/>
            <property name="B" value="b"/>
        </iaasProvider>
    </iaasProviders>

    <images>
        <default>
            <property name="availabilityZone" value="us-east-1c"/>
            <property name="securityGroups" value="manager,cep,mb,default"/>
            <property name="instanceType" value="m1.large"/>
            <property name="minAppInstances" value="1"/>
            <property name="maxAppInstances" value="5"/>
            <property name="queueLengthPerNode" value="50"/>
            <property name="roundsToAverage" value="100"/>
            <property name="instancesPerScaleUp" value="1"/>
            <property name="messageExpiryTime" value="60000"/>
            <property name="keyPair" value="nirmal-key"/>
        </default>
        <image domain="wso2.as.domain">
            <property name="securityGroups" value="default"/>
            <property name="availabilityZone" value="us-east-1c"/>
            <!--property name="payload" value="resources/as.zip"/-->
        </image>
    </images>

</jcloudConfig>


[1] http://aries.apache.org/modules/spi-fly.html


-- 

Thanks & regards,
Nirmal

Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to