You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by chris snow <ch...@gmail.com> on 2014/05/02 19:21:10 UTC

How does stratos provision binary project artifacts to the cartridge?

I've been trying out  the php cartridge that pulls source changes from git.

I'm a little bit confused.  How does stratos work with pre-compiled
binaries, e.g. Java war files? Do these artifacts to be stored in git?

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
Hi Chris,

You could use artifacts-updated extension for that purpose. Basically
the artifacts updated event is published by ADC to instance notifier
topic. This is being subscribed by the cartridge agent and it will
execute artifacts-updated.sh script upon receiving this event. You
should be able to use this extension point to build/re-deploy
artifacts. I haven't used this but it should work.

On Fri, May 2, 2014 at 11:29 PM, Nirmal Fernando <ni...@gmail.com> wrote:
> Possible via extending Cartridge Agent.
>
>
> On Fri, May 2, 2014 at 11:24 PM, chris snow <ch...@gmail.com> wrote:
>>
>> Ah, OK.  Not sure my SCM team will be so easily convinced though :)
>>
>> Can stratos trigger a workflow on the cartridge after the git pull?  For
>> example, if an app server requires the artifact to be deployed in a special
>> way, or if the app server needs restarting after deploying the artifact?
>>
>>
>> On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:
>>>
>>> If it's an application, you can store it in GIT.
>>>
>>>
>>> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>>>>
>>>> I've been trying out  the php cartridge that pulls source changes from
>>>> git.
>>>>
>>>> I'm a little bit confused.  How does stratos work with pre-compiled
>>>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/



-- 
Akila Ravihansa Perera
Software Engineer
WSO2 Inc.
http://wso2.com

Phone: +94 77 64 154 38
Blog: http://ravihansa3000.blogspot.com

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Nirmal Fernando <ni...@gmail.com>.
Possible via extending Cartridge Agent.


On Fri, May 2, 2014 at 11:24 PM, chris snow <ch...@gmail.com> wrote:

> Ah, OK.  Not sure my SCM team will be so easily convinced though :)
>
> Can stratos trigger a workflow on the cartridge after the git pull?  For
> example, if an app server requires the artifact to be deployed in a special
> way, or if the app server needs restarting after deploying the artifact?
>
>
> On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:
>
>> If it's an application, you can store it in GIT.
>>
>>
>> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> I've been trying out  the php cartridge that pulls source changes from
>>> git.
>>>
>>> I'm a little bit confused.  How does stratos work with pre-compiled
>>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Lakmal Warusawithana <la...@wso2.com>.
Yes, any one can extent current extensions, its just bash shell scripts.
Can add what ever logic (call any third party executables)

@Udara I don't think, for that need any code change. If we can provide all
generic extension points thats good enough. Execute all in a folder or
asked them to add them in a sell script, nothing more different to me.


On Sat, May 3, 2014 at 9:35 PM, chris snow <ch...@gmail.com> wrote:

> I can remember seeing the original thread.
>
> IMHO, deployment just by doing a git pull is only going to work for the
> most simple deployment strategies.   I'm not sure that we should expect
> Stratos users to extend java classes for their non-trivial deployment
> scenarios.
>
>
> On 3 May 2014 15:29, "Nirmal Fernando" <ni...@gmail.com> wrote:
>
>> Well, the community agreed in another thread, that Cartridge Agent
>> doesn't need to be that flexible. If you want a change, extend the current
>> Agent and write a new one.
>>
>>
>> On Sat, May 3, 2014 at 2:35 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>>
>>> With the current design of Agent, adding just a shell script file to
>>> extension directory won't execute the added script. Code changes are needed
>>> to execute the script. How about we define a specific directory where every
>>> script file put inside  is executed automatically. Then extension scripts
>>> can be added without any code change.
>>>
>>>
>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>


-- 
Lakmal Warusawithana
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by chris snow <ch...@gmail.com>.
I can remember seeing the original thread.

IMHO, deployment just by doing a git pull is only going to work for the
most simple deployment strategies.   I'm not sure that we should expect
Stratos users to extend java classes for their non-trivial deployment
scenarios.


On 3 May 2014 15:29, "Nirmal Fernando" <ni...@gmail.com> wrote:

> Well, the community agreed in another thread, that Cartridge Agent doesn't
> need to be that flexible. If you want a change, extend the current Agent
> and write a new one.
>
>
> On Sat, May 3, 2014 at 2:35 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>>
>> With the current design of Agent, adding just a shell script file to
>> extension directory won't execute the added script. Code changes are needed
>> to execute the script. How about we define a specific directory where every
>> script file put inside  is executed automatically. Then extension scripts
>> can be added without any code change.
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Nirmal Fernando <ni...@gmail.com>.
Well, the community agreed in another thread, that Cartridge Agent doesn't
need to be that flexible. If you want a change, extend the current Agent
and write a new one.


On Sat, May 3, 2014 at 2:35 PM, Udara Liyanage <ud...@wso2.com> wrote:

>
> With the current design of Agent, adding just a shell script file to
> extension directory won't execute the added script. Code changes are needed
> to execute the script. How about we define a specific directory where every
> script file put inside  is executed automatically. Then extension scripts
> can be added without any code change.
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Udara Liyanage <ud...@wso2.com>.
With the current design of Agent, adding just a shell script file to
extension directory won't execute the added script. Code changes are needed
to execute the script. How about we define a specific directory where every
script file put inside  is executed automatically. Then extension scripts
can be added without any code change.


Touched, not typed. Erroneous words are a feature, not a typo.

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Nirmal Fernando <ni...@gmail.com>.
Also, Cartridge Agent it self can be extended. i.e. you can write your own
Cartridge Agent by extending the existing Cartridge Agent.


On Fri, May 2, 2014 at 11:44 PM, chris snow <ch...@gmail.com> wrote:

> Cool - thanks all!
>
> On Fri, May 2, 2014 at 7:09 PM, Isuru Perera <is...@wso2.com> wrote:
> > The Cartridge Agent has extensions [1]. It will execute some scripts
> based
> > on the events. See "extensions" directory.
> >
> > [1]
> >
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Cartridge+Agent
> >
> >
> > On Fri, May 2, 2014 at 10:54 AM, chris snow <ch...@gmail.com> wrote:
> >>
> >> Ah, OK.  Not sure my SCM team will be so easily convinced though :)
> >>
> >> Can stratos trigger a workflow on the cartridge after the git pull?  For
> >> example, if an app server requires the artifact to be deployed in a
> special
> >> way, or if the app server needs restarting after deploying the artifact?
> >>
> >>
> >> On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:
> >>>
> >>> If it's an application, you can store it in GIT.
> >>>
> >>>
> >>> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com>
> wrote:
> >>>>
> >>>> I've been trying out  the php cartridge that pulls source changes from
> >>>> git.
> >>>>
> >>>> I'm a little bit confused.  How does stratos work with pre-compiled
> >>>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Best Regards,
> >>> Nirmal
> >>>
> >>> Nirmal Fernando.
> >>> PPMC Member & Committer of Apache Stratos,
> >>> Senior Software Engineer, WSO2 Inc.
> >>>
> >>> Blog: http://nirmalfdo.blogspot.com/
> >
> >
> >
> >
> > --
> > Isuru Perera
> > Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> > Lean . Enterprise . Middleware
> >
> > about.me/chrishantha
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by chris snow <ch...@gmail.com>.
Cool - thanks all!

On Fri, May 2, 2014 at 7:09 PM, Isuru Perera <is...@wso2.com> wrote:
> The Cartridge Agent has extensions [1]. It will execute some scripts based
> on the events. See "extensions" directory.
>
> [1]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Cartridge+Agent
>
>
> On Fri, May 2, 2014 at 10:54 AM, chris snow <ch...@gmail.com> wrote:
>>
>> Ah, OK.  Not sure my SCM team will be so easily convinced though :)
>>
>> Can stratos trigger a workflow on the cartridge after the git pull?  For
>> example, if an app server requires the artifact to be deployed in a special
>> way, or if the app server needs restarting after deploying the artifact?
>>
>>
>> On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:
>>>
>>> If it's an application, you can store it in GIT.
>>>
>>>
>>> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>>>>
>>>> I've been trying out  the php cartridge that pulls source changes from
>>>> git.
>>>>
>>>> I'm a little bit confused.  How does stratos work with pre-compiled
>>>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Isuru Perera <is...@wso2.com>.
The Cartridge Agent has extensions [1]. It will execute some scripts based
on the events. See "extensions" directory.

[1]
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Cartridge+Agent


On Fri, May 2, 2014 at 10:54 AM, chris snow <ch...@gmail.com> wrote:

> Ah, OK.  Not sure my SCM team will be so easily convinced though :)
>
> Can stratos trigger a workflow on the cartridge after the git pull?  For
> example, if an app server requires the artifact to be deployed in a special
> way, or if the app server needs restarting after deploying the artifact?
>
>
> On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:
>
>> If it's an application, you can store it in GIT.
>>
>>
>> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> I've been trying out  the php cartridge that pulls source changes from
>>> git.
>>>
>>> I'm a little bit confused.  How does stratos work with pre-compiled
>>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by chris snow <ch...@gmail.com>.
Ah, OK.  Not sure my SCM team will be so easily convinced though :)

Can stratos trigger a workflow on the cartridge after the git pull?  For
example, if an app server requires the artifact to be deployed in a special
way, or if the app server needs restarting after deploying the artifact?


On 2 May 2014 18:31, "Nirmal Fernando" <ni...@gmail.com> wrote:

> If it's an application, you can store it in GIT.
>
>
> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>
>> I've been trying out  the php cartridge that pulls source changes from
>> git.
>>
>> I'm a little bit confused.  How does stratos work with pre-compiled
>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Isuru Perera <is...@wso2.com>.
Hi Chris,

It can be confusing as we usually don't use Git for keeping binary files.
As a PaaS framework, we need a way to distribute artifacts to the
Cartridges and we have chosen to use Git.

Someone would expect to commit only the source to GIT and let the PaaS to
build the binary. However this is not done by Stratos for now. This is one
of the reasons to call Stratos as a PaaS framework.


On Fri, May 2, 2014 at 10:30 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> If it's an application, you can store it in GIT.
>
>
> On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:
>
>> I've been trying out  the php cartridge that pulls source changes from
>> git.
>>
>> I'm a little bit confused.  How does stratos work with pre-compiled
>> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Nirmal Fernando <ni...@gmail.com>.
If it's an application, you can store it in GIT.


On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:

> I've been trying out  the php cartridge that pulls source changes from git.
>
> I'm a little bit confused.  How does stratos work with pre-compiled
> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: How does stratos provision binary project artifacts to the cartridge?

Posted by Imesh Gunaratne <im...@apache.org>.
Yes Chris, we need to maintain all binary and none binary artifacts in a
git repository according to the current design. Cartridge agent would
checkout and deploy them in the sever according to the given path.


On Fri, May 2, 2014 at 10:51 PM, chris snow <ch...@gmail.com> wrote:

> I've been trying out  the php cartridge that pulls source changes from git.
>
> I'm a little bit confused.  How does stratos work with pre-compiled
> binaries, e.g. Java war files? Do these artifacts to be stored in git?
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos