[ 
https://issues.apache.org/jira/browse/STRATOS-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14354959#comment-14354959
 ] 

Rajkumar Rajaratnam commented on STRATOS-1234:
----------------------------------------------

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 <




-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639
Blog : rajkumarr.com


>  Software Update Management Solution for Stratos
> ------------------------------------------------
>
>                 Key: STRATOS-1234
>                 URL: https://issues.apache.org/jira/browse/STRATOS-1234
>             Project: Stratos
>          Issue Type: New Feature
>            Reporter: Imesh Gunaratne
>              Labels: gsoc2015, mentor
>
> Stratos uses Virtual Machines and Containers for hosting platform services on 
> different Infrastructure as a Service (IaaS) solutions. At present Puppet is 
> used for orchestration management on Virtual Machine based systems and 
> manages all required software in Puppet Master. Container based systems 
> creates Docker images for each platform service by including required 
> software in the Docker image itself.
> In Virtual Machine use-case VM instances will communicate with Puppet master 
> and execute the software installation. The same approach can be used for 
> applying software updates. 
> In Docker use-case we do not use Puppet because a new container with required 
> software can be started in few seconds. This is very efficient compared to 
> using Puppet and installing software on demand.
> The requirement of this project is to implement a core Stratos feature to 
> propagate software updates in a live PaaS environment.
> 1. Puppet based solution:
> - Push software updates of a cartridge to Puppet Master (might not need to 
> automate).
> - Invoke the software update process via the Stratos API for a given 
> application.
> - Stratos Manager could send a new event to trigger puppet agent in each 
> instance to apply the updates.
> 2. Docker based solution
> - Create a new docker image (with a new image id) for the cartridge with 
> software updates (might not need to automate).
> - Invoke the software update process via the Stratos API for a given 
> application.
> - Autoscaler can implement a new feature to bring down existing instances and 
> create new instances with the new docker image id.
> Important!
> - In each scenario if updates are backward compatible, software update 
> process should execute in phases, it should not bring down the entire cluster 
> to apply the updates. If so the service will be unavailable for a certain 
> time period. The idea is to apply the updates to set of members at a time.
> - If the updates are not backward compatible, we could make the entire 
> cluster unavailable at once and apply the updates.
> - Member's state needs to be changed to a new state called "Updating" when 
> applying the updates.
> If there is an interest on doing this project please send a mail to imesh at 
> apache dot org by copying Apache Dev mailing list [1]. Please refer Stratos 
> Wiki [2] for more information on Stratos architecture and how it works.
> [1] http://stratos.apache.org/community/mailing-lists.html
> [2] https://cwiki.apache.org/confluence/display/STRATOS



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to