You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2015/01/27 07:58:18 UTC

[Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Hi Devs,

Currently Mock IaaS resides in the Cloud Controller. However to verify
cloud bursting scenarios and Stratos product clustering features we need to
be able to run Mock IaaS as a separate product. To support this we could
expose Mock IaaS as a REST service and create a server profile. By doing
that we could start Mock IaaS as a separate product and configure cloud
controller to talk to it via the Mock Iaas API.

I did almost all the changes required for this functionality and found a
problem in accessing Mock IaaS OSGi service from the Mock IaaS API web app.
It seems like Mock IaasS API web app creates a separate class loader and it
does not re-use the classes loaded by OSGi runtime. Will update the status
of this soon.

https://issues.apache.org/jira/browse/STRATOS-1143

Thanks


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Imesh Gunaratne <im...@apache.org>.
Thanks Mari, please find Mock IaaS API methods below:

POST
/mock-iaas/api/instances

[request-body]
{"applicationId":"app_1","serviceName":"tomcat","clusterId":"mytomcat.tomcat.domain","memberId":"mytomcat.tomcat.domain5ed02460-8027-465d-86ca-dcbf9ec121ec","clusterInstanceId":"app_1-1","networkPartitionId":"openstack_R1","partitionId":"P1"}

GET
/mock-iaas/api/instances

[response-body]
[{"defaultPrivateIp":"10.0.0.1","defaultPublicIp":"20.0.0.1","instanceId":"6d5eb090-4e02-472b-86f8-73690f31eebf"}]

GET
/mock-iaas/api/instances/{instanceId}

[response-body]
[{"defaultPrivateIp":"10.0.0.1","defaultPublicIp":"20.0.0.1","instanceId":"6d5eb090-4e02-472b-86f8-73690f31eebf"}]

POST
/mock-iaas/api/instances/{instanceId}/allocateIpAddress

DELETE
/mock-iaas/api/instances/{instanceId}

Thanks

On Wed, Jan 28, 2015 at 6:08 AM, Mariangela Hills <ma...@wso2.com>
wrote:

> Great work, Imesh!
>
> I will add this information into the wiki!
>
> Regards,
> Mariangela
>
>
>
>
> *--*
> Mariangela Hills
> Senior Technical Writer
>
> *WSO2, Inc.*lean.enterprise.middleware.
> w: http://wso2.com
> <http://wso2.com/events/>
>
> On Wed, Jan 28, 2015 at 12:28 AM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> Thanks guys, please note that I have slightly change the Mock IaaS API
>> context to following:
>>
>> https://localhost:9443/mock-iaas <https://localhost:9443/mock-iaas-api>/api
>>
>>
>> On Tue, Jan 27, 2015 at 11:47 PM, Vishanth Balasubramaniam <
>> vishanthb@wso2.com> wrote:
>>
>>> +1 Great Imesh.
>>>
>>> Glad to see the issue had been overcome.
>>>
>>> On Tue, Jan 27, 2015 at 7:36 PM, Gayan Gunarathne <ga...@wso2.com>
>>> wrote:
>>>
>>>> +1
>>>>
>>>> Great stuff Imesh!
>>>>
>>>> Thanks,
>>>> Gayan
>>>>
>>>> On Tue, Jan 27, 2015 at 7:13 PM, Dakshika Jayathilaka <
>>>> dakshika@wso2.com> wrote:
>>>>
>>>>> Hi Imesh,
>>>>>
>>>>> Great work.. I think we need to add this into documentation.
>>>>>
>>>>> Adding Mari to this..
>>>>>
>>>>> Regards,
>>>>>
>>>>> *Dakshika Jayathilaka*
>>>>> Software Engineer
>>>>> WSO2, Inc.
>>>>> lean.enterprise.middleware
>>>>> 0771100911
>>>>>
>>>>> On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Please find the Mock IaaS API endpoint configuration in
>>>>>> cloud-controller.xml file:
>>>>>>
>>>>>> <iaasProvider type="mock" name="Mock">
>>>>>>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>>>>>>     <provider>mock</provider>
>>>>>>     ...
>>>>>>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
>>>>>> </iaasProvider>
>>>>>>
>>>>>> Now stratos distribution can start with mock-iaas server profile as follows:
>>>>>>
>>>>>> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>>>>>>
>>>>>> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Devs,
>>>>>>>
>>>>>>> I have now fixed the above issue and pushed the modification to
>>>>>>> master branch.
>>>>>>>
>>>>>>> The problem was with the way we package CXF runtime into the
>>>>>>> distribution. We had written maven logic to get all the dependencies of the
>>>>>>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>>>>>>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>>>>>>> components have been loaded by the Web App class loader. I removed this
>>>>>>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>>>>>>
>>>>>>> As a part of this effort I have also refined features, the way we
>>>>>>> have structured them and feature names.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Devs,
>>>>>>>>
>>>>>>>> Currently Mock IaaS resides in the Cloud Controller. However to
>>>>>>>> verify cloud bursting scenarios and Stratos product clustering features we
>>>>>>>> need to be able to run Mock IaaS as a separate product. To support this we
>>>>>>>> could expose Mock IaaS as a REST service and create a server profile. By
>>>>>>>> doing that we could start Mock IaaS as a separate product and configure
>>>>>>>> cloud controller to talk to it via the Mock Iaas API.
>>>>>>>>
>>>>>>>> I did almost all the changes required for this functionality and
>>>>>>>> found a problem in accessing Mock IaaS OSGi service from the Mock IaaS API
>>>>>>>> web app. It seems like Mock IaasS API web app creates a separate class
>>>>>>>> loader and it does not re-use the classes loaded by OSGi runtime. Will
>>>>>>>> update the status of this soon.
>>>>>>>>
>>>>>>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Imesh Gunaratne
>>>>>>>>
>>>>>>>> Technical Lead, WSO2
>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Imesh Gunaratne
>>>>>>>
>>>>>>> Technical Lead, WSO2
>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Gayan Gunarathne
>>>> Technical Lead
>>>> WSO2 Inc. (http://wso2.com)
>>>> email  : gayang@wso2.com  | mobile : +94 766819985
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> *Vishanth Balasubramaniam*
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94771737718*
>>> about me: *http://about.me/vishanth <http://about.me/vishanth>*
>>>
>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Mariangela Hills <ma...@wso2.com>.
Great work, Imesh!

I will add this information into the wiki!

Regards,
Mariangela




*--*
Mariangela Hills
Senior Technical Writer

*WSO2, Inc.*lean.enterprise.middleware.
w: http://wso2.com
<http://wso2.com/events/>

On Wed, Jan 28, 2015 at 12:28 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Thanks guys, please note that I have slightly change the Mock IaaS API
> context to following:
>
> https://localhost:9443/mock-iaas <https://localhost:9443/mock-iaas-api>/api
>
>
> On Tue, Jan 27, 2015 at 11:47 PM, Vishanth Balasubramaniam <
> vishanthb@wso2.com> wrote:
>
>> +1 Great Imesh.
>>
>> Glad to see the issue had been overcome.
>>
>> On Tue, Jan 27, 2015 at 7:36 PM, Gayan Gunarathne <ga...@wso2.com>
>> wrote:
>>
>>> +1
>>>
>>> Great stuff Imesh!
>>>
>>> Thanks,
>>> Gayan
>>>
>>> On Tue, Jan 27, 2015 at 7:13 PM, Dakshika Jayathilaka <dakshika@wso2.com
>>> > wrote:
>>>
>>>> Hi Imesh,
>>>>
>>>> Great work.. I think we need to add this into documentation.
>>>>
>>>> Adding Mari to this..
>>>>
>>>> Regards,
>>>>
>>>> *Dakshika Jayathilaka*
>>>> Software Engineer
>>>> WSO2, Inc.
>>>> lean.enterprise.middleware
>>>> 0771100911
>>>>
>>>> On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Please find the Mock IaaS API endpoint configuration in
>>>>> cloud-controller.xml file:
>>>>>
>>>>> <iaasProvider type="mock" name="Mock">
>>>>>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>>>>>     <provider>mock</provider>
>>>>>     ...
>>>>>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
>>>>> </iaasProvider>
>>>>>
>>>>> Now stratos distribution can start with mock-iaas server profile as follows:
>>>>>
>>>>> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>>>>>
>>>>> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> I have now fixed the above issue and pushed the modification to
>>>>>> master branch.
>>>>>>
>>>>>> The problem was with the way we package CXF runtime into the
>>>>>> distribution. We had written maven logic to get all the dependencies of the
>>>>>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>>>>>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>>>>>> components have been loaded by the Web App class loader. I removed this
>>>>>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>>>>>
>>>>>> As a part of this effort I have also refined features, the way we
>>>>>> have structured them and feature names.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Devs,
>>>>>>>
>>>>>>> Currently Mock IaaS resides in the Cloud Controller. However to
>>>>>>> verify cloud bursting scenarios and Stratos product clustering features we
>>>>>>> need to be able to run Mock IaaS as a separate product. To support this we
>>>>>>> could expose Mock IaaS as a REST service and create a server profile. By
>>>>>>> doing that we could start Mock IaaS as a separate product and configure
>>>>>>> cloud controller to talk to it via the Mock Iaas API.
>>>>>>>
>>>>>>> I did almost all the changes required for this functionality and
>>>>>>> found a problem in accessing Mock IaaS OSGi service from the Mock IaaS API
>>>>>>> web app. It seems like Mock IaasS API web app creates a separate class
>>>>>>> loader and it does not re-use the classes loaded by OSGi runtime. Will
>>>>>>> update the status of this soon.
>>>>>>>
>>>>>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Imesh Gunaratne
>>>>>>>
>>>>>>> Technical Lead, WSO2
>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Gayan Gunarathne
>>> Technical Lead
>>> WSO2 Inc. (http://wso2.com)
>>> email  : gayang@wso2.com  | mobile : +94 766819985
>>>
>>>
>>
>>
>>
>> --
>> *Vishanth Balasubramaniam*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94771737718*
>> about me: *http://about.me/vishanth <http://about.me/vishanth>*
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Imesh Gunaratne <im...@apache.org>.
Thanks guys, please note that I have slightly change the Mock IaaS API
context to following:

https://localhost:9443/mock-iaas <https://localhost:9443/mock-iaas-api>/api


On Tue, Jan 27, 2015 at 11:47 PM, Vishanth Balasubramaniam <
vishanthb@wso2.com> wrote:

> +1 Great Imesh.
>
> Glad to see the issue had been overcome.
>
> On Tue, Jan 27, 2015 at 7:36 PM, Gayan Gunarathne <ga...@wso2.com> wrote:
>
>> +1
>>
>> Great stuff Imesh!
>>
>> Thanks,
>> Gayan
>>
>> On Tue, Jan 27, 2015 at 7:13 PM, Dakshika Jayathilaka <da...@wso2.com>
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> Great work.. I think we need to add this into documentation.
>>>
>>> Adding Mari to this..
>>>
>>> Regards,
>>>
>>> *Dakshika Jayathilaka*
>>> Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>> 0771100911
>>>
>>> On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Please find the Mock IaaS API endpoint configuration in
>>>> cloud-controller.xml file:
>>>>
>>>> <iaasProvider type="mock" name="Mock">
>>>>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>>>>     <provider>mock</provider>
>>>>     ...
>>>>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
>>>> </iaasProvider>
>>>>
>>>> Now stratos distribution can start with mock-iaas server profile as follows:
>>>>
>>>> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>>>>
>>>> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Devs,
>>>>>
>>>>> I have now fixed the above issue and pushed the modification to master
>>>>> branch.
>>>>>
>>>>> The problem was with the way we package CXF runtime into the
>>>>> distribution. We had written maven logic to get all the dependencies of the
>>>>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>>>>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>>>>> components have been loaded by the Web App class loader. I removed this
>>>>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>>>>
>>>>> As a part of this effort I have also refined features, the way we have
>>>>> structured them and feature names.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> Currently Mock IaaS resides in the Cloud Controller. However to
>>>>>> verify cloud bursting scenarios and Stratos product clustering features we
>>>>>> need to be able to run Mock IaaS as a separate product. To support this we
>>>>>> could expose Mock IaaS as a REST service and create a server profile. By
>>>>>> doing that we could start Mock IaaS as a separate product and configure
>>>>>> cloud controller to talk to it via the Mock Iaas API.
>>>>>>
>>>>>> I did almost all the changes required for this functionality and
>>>>>> found a problem in accessing Mock IaaS OSGi service from the Mock IaaS API
>>>>>> web app. It seems like Mock IaasS API web app creates a separate class
>>>>>> loader and it does not re-use the classes loaded by OSGi runtime. Will
>>>>>> update the status of this soon.
>>>>>>
>>>>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead
>> WSO2 Inc. (http://wso2.com)
>> email  : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>
>
>
> --
> *Vishanth Balasubramaniam*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94771737718*
> about me: *http://about.me/vishanth <http://about.me/vishanth>*
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Vishanth Balasubramaniam <vi...@wso2.com>.
+1 Great Imesh.

Glad to see the issue had been overcome.

On Tue, Jan 27, 2015 at 7:36 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> +1
>
> Great stuff Imesh!
>
> Thanks,
> Gayan
>
> On Tue, Jan 27, 2015 at 7:13 PM, Dakshika Jayathilaka <da...@wso2.com>
> wrote:
>
>> Hi Imesh,
>>
>> Great work.. I think we need to add this into documentation.
>>
>> Adding Mari to this..
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Please find the Mock IaaS API endpoint configuration in
>>> cloud-controller.xml file:
>>>
>>> <iaasProvider type="mock" name="Mock">
>>>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>>>     <provider>mock</provider>
>>>     ...
>>>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
>>> </iaasProvider>
>>>
>>> Now stratos distribution can start with mock-iaas server profile as follows:
>>>
>>> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>>>
>>> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>>>
>>> Thanks
>>>
>>>
>>> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> I have now fixed the above issue and pushed the modification to master
>>>> branch.
>>>>
>>>> The problem was with the way we package CXF runtime into the
>>>> distribution. We had written maven logic to get all the dependencies of the
>>>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>>>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>>>> components have been loaded by the Web App class loader. I removed this
>>>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>>>
>>>> As a part of this effort I have also refined features, the way we have
>>>> structured them and feature names.
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Devs,
>>>>>
>>>>> Currently Mock IaaS resides in the Cloud Controller. However to verify
>>>>> cloud bursting scenarios and Stratos product clustering features we need to
>>>>> be able to run Mock IaaS as a separate product. To support this we could
>>>>> expose Mock IaaS as a REST service and create a server profile. By doing
>>>>> that we could start Mock IaaS as a separate product and configure cloud
>>>>> controller to talk to it via the Mock Iaas API.
>>>>>
>>>>> I did almost all the changes required for this functionality and found
>>>>> a problem in accessing Mock IaaS OSGi service from the Mock IaaS API web
>>>>> app. It seems like Mock IaasS API web app creates a separate class loader
>>>>> and it does not re-use the classes loaded by OSGi runtime. Will update the
>>>>> status of this soon.
>>>>>
>>>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead
> WSO2 Inc. (http://wso2.com)
> email  : gayang@wso2.com  | mobile : +94 766819985
>
>



-- 
*Vishanth Balasubramaniam*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94771737718*
about me: *http://about.me/vishanth <http://about.me/vishanth>*

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Gayan Gunarathne <ga...@wso2.com>.
+1

Great stuff Imesh!

Thanks,
Gayan

On Tue, Jan 27, 2015 at 7:13 PM, Dakshika Jayathilaka <da...@wso2.com>
wrote:

> Hi Imesh,
>
> Great work.. I think we need to add this into documentation.
>
> Adding Mari to this..
>
> Regards,
>
> *Dakshika Jayathilaka*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Please find the Mock IaaS API endpoint configuration in
>> cloud-controller.xml file:
>>
>> <iaasProvider type="mock" name="Mock">
>>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>>     <provider>mock</provider>
>>     ...
>>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
>> </iaasProvider>
>>
>> Now stratos distribution can start with mock-iaas server profile as follows:
>>
>> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>>
>> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>>
>> Thanks
>>
>>
>> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I have now fixed the above issue and pushed the modification to master
>>> branch.
>>>
>>> The problem was with the way we package CXF runtime into the
>>> distribution. We had written maven logic to get all the dependencies of the
>>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>>> components have been loaded by the Web App class loader. I removed this
>>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>>
>>> As a part of this effort I have also refined features, the way we have
>>> structured them and feature names.
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> Currently Mock IaaS resides in the Cloud Controller. However to verify
>>>> cloud bursting scenarios and Stratos product clustering features we need to
>>>> be able to run Mock IaaS as a separate product. To support this we could
>>>> expose Mock IaaS as a REST service and create a server profile. By doing
>>>> that we could start Mock IaaS as a separate product and configure cloud
>>>> controller to talk to it via the Mock Iaas API.
>>>>
>>>> I did almost all the changes required for this functionality and found
>>>> a problem in accessing Mock IaaS OSGi service from the Mock IaaS API web
>>>> app. It seems like Mock IaasS API web app creates a separate class loader
>>>> and it does not re-use the classes loaded by OSGi runtime. Will update the
>>>> status of this soon.
>>>>
>>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>>
>>>> Thanks
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>


-- 

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email  : gayang@wso2.com  | mobile : +94 766819985

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Dakshika Jayathilaka <da...@wso2.com>.
Hi Imesh,

Great work.. I think we need to add this into documentation.

Adding Mari to this..

Regards,

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Tue, Jan 27, 2015 at 7:04 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Please find the Mock IaaS API endpoint configuration in
> cloud-controller.xml file:
>
> <iaasProvider type="mock" name="Mock">
>     <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
>     <provider>mock</provider>
>     ...
>     <property name="api.endpoint" value="https://localhost:9443/mock-iaas-api" />
> </iaasProvider>
>
> Now stratos distribution can start with mock-iaas server profile as follows:
>
> sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas
>
> This effort will help us to test cloud bursting scenarios and stratos product clustering features with Mock IaaS.
>
> Thanks
>
>
> On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Devs,
>>
>> I have now fixed the above issue and pushed the modification to master
>> branch.
>>
>> The problem was with the way we package CXF runtime into the
>> distribution. We had written maven logic to get all the dependencies of the
>> REST API/Web App feature and copy them into the CXF runtime folder. It has
>> packaged Stratos dependencies to the CXF runtime and as a result Stratos
>> components have been loaded by the Web App class loader. I removed this
>> logic since CXF runtime is already packaged by the Carbon CXF feature.
>>
>> As a part of this effort I have also refined features, the way we have
>> structured them and feature names.
>>
>> Thanks
>>
>>
>>
>>
>> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> Currently Mock IaaS resides in the Cloud Controller. However to verify
>>> cloud bursting scenarios and Stratos product clustering features we need to
>>> be able to run Mock IaaS as a separate product. To support this we could
>>> expose Mock IaaS as a REST service and create a server profile. By doing
>>> that we could start Mock IaaS as a separate product and configure cloud
>>> controller to talk to it via the Mock Iaas API.
>>>
>>> I did almost all the changes required for this functionality and found a
>>> problem in accessing Mock IaaS OSGi service from the Mock IaaS API web app.
>>> It seems like Mock IaasS API web app creates a separate class loader and it
>>> does not re-use the classes loaded by OSGi runtime. Will update the status
>>> of this soon.
>>>
>>> https://issues.apache.org/jira/browse/STRATOS-1143
>>>
>>> Thanks
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Imesh Gunaratne <im...@apache.org>.
Please find the Mock IaaS API endpoint configuration in
cloud-controller.xml file:

<iaasProvider type="mock" name="Mock">
    <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
    <provider>mock</provider>
    ...
    <property name="api.endpoint"
value="https://localhost:9443/mock-iaas-api" />
</iaasProvider>

Now stratos distribution can start with mock-iaas server profile as follows:

sh <stratos-home>/bin/stratos.sh -Dprofile=mock-iaas

This effort will help us to test cloud bursting scenarios and stratos
product clustering features with Mock IaaS.

Thanks


On Tue, Jan 27, 2015 at 6:55 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> I have now fixed the above issue and pushed the modification to master
> branch.
>
> The problem was with the way we package CXF runtime into the distribution.
> We had written maven logic to get all the dependencies of the REST API/Web
> App feature and copy them into the CXF runtime folder. It has packaged
> Stratos dependencies to the CXF runtime and as a result Stratos components
> have been loaded by the Web App class loader. I removed this logic since
> CXF runtime is already packaged by the Carbon CXF feature.
>
> As a part of this effort I have also refined features, the way we have
> structured them and feature names.
>
> Thanks
>
>
>
>
> On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> Hi Devs,
>>
>> Currently Mock IaaS resides in the Cloud Controller. However to verify
>> cloud bursting scenarios and Stratos product clustering features we need to
>> be able to run Mock IaaS as a separate product. To support this we could
>> expose Mock IaaS as a REST service and create a server profile. By doing
>> that we could start Mock IaaS as a separate product and configure cloud
>> controller to talk to it via the Mock Iaas API.
>>
>> I did almost all the changes required for this functionality and found a
>> problem in accessing Mock IaaS OSGi service from the Mock IaaS API web app.
>> It seems like Mock IaasS API web app creates a separate class loader and it
>> does not re-use the classes loaded by OSGi runtime. Will update the status
>> of this soon.
>>
>> https://issues.apache.org/jira/browse/STRATOS-1143
>>
>> Thanks
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] Expose Mock IaaS as a Service and Create a Server Profile

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Devs,

I have now fixed the above issue and pushed the modification to master
branch.

The problem was with the way we package CXF runtime into the distribution.
We had written maven logic to get all the dependencies of the REST API/Web
App feature and copy them into the CXF runtime folder. It has packaged
Stratos dependencies to the CXF runtime and as a result Stratos components
have been loaded by the Web App class loader. I removed this logic since
CXF runtime is already packaged by the Carbon CXF feature.

As a part of this effort I have also refined features, the way we have
structured them and feature names.

Thanks




On Tue, Jan 27, 2015 at 12:28 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> Currently Mock IaaS resides in the Cloud Controller. However to verify
> cloud bursting scenarios and Stratos product clustering features we need to
> be able to run Mock IaaS as a separate product. To support this we could
> expose Mock IaaS as a REST service and create a server profile. By doing
> that we could start Mock IaaS as a separate product and configure cloud
> controller to talk to it via the Mock Iaas API.
>
> I did almost all the changes required for this functionality and found a
> problem in accessing Mock IaaS OSGi service from the Mock IaaS API web app.
> It seems like Mock IaasS API web app creates a separate class loader and it
> does not re-use the classes loaded by OSGi runtime. Will update the status
> of this soon.
>
> https://issues.apache.org/jira/browse/STRATOS-1143
>
> Thanks
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos