Hi,

I've opened a PR [1] for the initial implementation which includes the
server start plugins for the PHP and Tomcat docker images.  Please review
and merge. After this, I will add the modifications necessary for the
Puppet modules and the Java Cartridge Agent to move the server start logic
to the CA extensions.

@Imesh,

Since we have a tested intermediate after the stratos/base-image:4.1.0-beta
tag for the base image, shall we update the base image with the latest PCA
pack?

[1] - https://github.com/apache/stratos/pull/257



Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, Mar 4, 2015 at 12:31 AM, Imesh Gunaratne <im...@apache.org> wrote:

> +1 Yes a good point! We will need to start the servers based on the
> artifact repository availability.
>
>
> On Tue, Mar 3, 2015 at 2:50 PM, Chamila De Alwis <chami...@wso2.com>
> wrote:
>
>> Hi,
>>
>> I've implemented a Python extension executor which would execute the bash
>> extensions files. The extension files are renamed to match their relevent
>> event and a plugin called ExtensionExecutor will execute the extension
>> based on the event it was triggered on.
>>
>> Since service start logic is now moved to the CA itself, we will have to
>> introduce a plugin or an extension which starts the server. From the JCA
>> code [1], it seems that this was earlier done as an extension. The
>> startServer extension is run before the instance activated event is
>> published from the agent.
>>
>> IMO, this is not a proper way to start a service, since at this point
>> (for the repository based cartridges) the artifacts have not been cloned
>> yet (or if they are cloned, it is a timing chance and not consistent).
>> Furthermore, since each service would have to write the extension  for its
>> start logic, it can be implemented as a plugin and not an extension. This
>> plugin can be mapped to the ArtifactUpdatedEvent for repository based
>> cartridges and for InstanceStartedEvent for non repository based cartridges.
>>
>> Similarly for the Java Cartridge Agent, the ArtifactUpdatedEvent
>> extension, and the InstanceStartedEvent extension should execute the server
>> start logic.
>>
>> WDYT? Please add if I've missed anything.
>>
>> [1] -
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java#L120-L127
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Reply via email to