Hi Sandaruwan,

Thanks for sharing the Google document. IMO it needs to include more
detailed information about the project plan (may be not the implementation
details but the approach). What you have currently written is not
sufficient.

At this stage you might not need to spend time on designing the API
methods. The core requirement of this project would be to analyze and
propose a solution for managing the software update process in Stratos. We
might need to design a sequence diagram to describe the entire flow. We may
also need to consider introducing new events in Messaging component to
handle the process. Up to the point where an event is sent to the cartridge
instance to trigger the software update process should be able to handle in
the same way for both Puppet based and Docker based cartridges.
As the first step try to run Stratos with Mock IaaS/Kubernetes, this would
allow you to understand how it works. Then try to analyze the lifecycle of
the cartridge instance (member). Thereafter analyze and see how we can
change the member's lifecycle to support software update process. At this
point draw a diagram to illustrate the eventing model. Hope this would help.

Thanks
Imesh


On Tue, Mar 10, 2015 at 8:10 PM, Rajkumar Rajaratnam <rajkum...@wso2.com>
wrote:

> A small correction, I guess the API should be
>
> *PUT /api/applications/{applicationId}/updateSoftware*
> @Imesh, I am little confused about the HTTP method of this API, because we
> don't actually create or update any RESOURCES in this API.
>
> Thanks.
>
> On Tue, Mar 10, 2015 at 7:54 PM, Rajkumar Rajaratnam <rajkum...@wso2.com>
> wrote:
>
>> Hi Sandaruwan,
>>
>> We see some progress here. Good work :)
>>
>> Are you trying to update the application definition? *PUT
>> /api/applications* means you are updating the application definition.
>>
>> Let me give some brief idea to get you on the track :)
>>
>> According to this project, you don't need update application definition.
>> You need to implement an API to trigger software update process. IMO, the
>> API should be *POST /api/applications/{applicationId}/updateSoftware*.
>> However there might be some changes in the API path. But definitely it
>> should be POST and it should expect application id. So this will be the
>> rest API. You also need to implement a web service operation in the
>> relevant component such as AS, SM or CC (you need to decide this). That
>> operation should send an event to all the cartridge instances running in
>> the application. You might already know that there might be several
>> application instances running for an application and there might be several
>> cartridge instances running within each application instance. So you need
>> to traverse and find all the cartridge instances and send an event to
>> trigger the software update task. You need to basically trigger the puppet
>> agent. This event should be sent from SM and CA should listen to this
>> event. When CA receives this event, it will trigger the puppet agent. I
>> guess that is all what you need to do.
>>
>> Please get some experience by running the product and following the
>> documentation [1]
>>
>> Hope this helps.
>>
>> 1. https://cwiki.apache.org/confluence/display/STRATOS/4.1.0
>>
>> Thanks.
>>
>> On Tue, Mar 10, 2015 at 7:00 PM, Sandaruwan Nanayakkara <
>> sandaru...@gmail.com> wrote:
>>
>>> Hi Imesh,
>>>
>>> I checked out the API and thought of a design.
>>>
>>>         PUT   |  /Applications   |  Update an application
>>>
>>> Is this the way it should be added? Using a PUT request?
>>> I used the master repository. Is it ok?
>>>
>>> Google Doc for the Project
>>> <https://docs.google.com/document/d/1Ep2EwLubQnAv0bQGXE2ynwIDrRFCtMnCZ1E52KtzUH4/edit?usp=sharing>
>>>
>>> Thanks,
>>> Sandaruwan
>>>
>>
>>
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Software Engineer, WSO2
>>
>> Mobile : +94777568639
>> Blog : rajkumarr.com
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>
> Mobile : +94777568639
> Blog : rajkumarr.com
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to