You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Akila Ravihansa Perera <ra...@wso2.com> on 2014/04/30 04:40:33 UTC

Cartridge Agent Jndi Configurator should be removed

Hi,

Cartridge Agent currently uses a JndiConfigurator class to modify the
jndi.properties file to set MB IP and MB port. It uses a
jndi.properties.template file to generate this. But according to
Stratos 4.0 architecture all the properties files should be generated
from the Puppet scripts.

IMO, this templating logic should be removed from the Cartridge
Agent's end and should be done via Puppet scripts. If the community
agrees to that I could work on a patch for this. WDYT?

Thanks.

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

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

Re: Cartridge Agent Jndi Configurator should be removed

Posted by chris snow <ch...@gmail.com>.
+1 for making puppet optional.
On 2 May 2014 07:41, "Akila Ravihansa Perera" <ra...@wso2.com> wrote:

> Hi,
>
> Huge +1 for not making Puppet mandatory. I felt that Stratos 4.0 has done
> that already.
>
> We have already tightly coupled our templates with Puppet. And I'm not
> sure on how to create a central template source. What type of templating
> structure do you think we should use? This should be independent from any
> configuration management framework, IMO.
>
> My suggestion would be to have templates in simple plain text format with
> replacement variable keys. Then have scripts for generating Puppet
> modules/Cheff modules or even stand-alone setup scripts. Shall we proceed
> with that?
>
> Thanks.
> On 2 May 2014 11:14, "Lakmal Warusawithana" <la...@wso2.com> wrote:
>
>> Yes, I agree with Vanson on this. We should not mandate puppet. Later
>> someone may wants to use cheft.
>>
>> +1 for maintain separate templates.
>>
>> @Vanson, if you guys testing with scripting method please send upstream
>> your contributions.
>>
>> thanks
>>
>>
>> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
>>
>>>  I am not sure I agree with requiring the use of puppet to configure
>>> everything as it's not always practical to install puppet into a cartridge
>>> image.  There's also the issue where depending on the VM you are trying to
>>> convert into a cartridge might make use of a different versions of puppet.
>>>
>>> I'd like to see the cartridge agent packaged to be deploy-able as a
>>> standalone entity and then to value add with puppet for those use cases
>>> that support it.
>>>
>>> I would prefer having the templates reside in a central templates
>>> directory,  provide an option during setup to deploy it into the puppet
>>> modules/template directory tree.
>>>
>>> This avoids the issue of having two versions of the template, one for
>>> puppet and one for non puppet deployment cases.
>>>
>>> For those who don't want to use puppet, they can minimally script up
>>> something which transforms the source templates.
>>>
>>> Right now, we've found a few files like the
>>> cartridge-agent/bin/stratos.sh and the
>>> cartridge-agent/conf/template/jndi.properties.template to be incompatible
>>> with the latest code behavior.
>>>
>>> the stratos.sh. is missing recently added APP_PATH property and works
>>> only if you use puppet to overwrite file that is shipped in the zip.
>>>
>>> Similarly, the jndi/properties.template file by default doesn't have
>>> configuration which run's with activemq, even though all the documentation
>>> points to it.  We found in RC1 the JNDI template needs the following
>>> changes otherwise the cartridge agent will fail to connect with apache
>>> stratos.
>>>
>>> Original:
>>>
>>> connectionfactoryName=topicConnectionfactory
>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>>>
>>> java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>>>
>>>
>>>
>>> Actual values required for ActiveMQ:
>>>
>>> connectionfactoryName=TopicConnectionFactory
>>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>>>
>>> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>>
>>>
>>> -Vanson
>>>
>>>
>>>
>>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>>>
>>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>>>
>>>
>>>  Hi,
>>>
>>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>>> jndi.properties file to set MB IP and MB port. It uses a
>>> jndi.properties.template file to generate this. But according to
>>> Stratos 4.0 architecture all the properties files should be generated
>>> from the Puppet scripts.
>>>
>>> IMO, this templating logic should be removed from the Cartridge
>>> Agent's end and should be done via Puppet scripts. If the community
>>> agrees to that I could work on a patch for this. WDYT?
>>>
>>>
>>>  +1
>>>
>>>
>>>  Thanks.
>>>
>>> --
>>> Akila Ravihansa Perera
>>> Software Engineer
>>> WSO2 Inc.http://wso2.com
>>>
>>> Phone: +94 77 64 154 38
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Lakmal Warusawithana
>> Director - Cloud Architecture; WSO2 Inc.
>> Mobile : +94714289692
>> Blog : http://lakmalsview.blogspot.com/
>>
>>

Re: Cartridge Agent Jndi Configurator should be removed

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

Huge +1 for not making Puppet mandatory. I felt that Stratos 4.0 has done
that already.

We have already tightly coupled our templates with Puppet. And I'm not sure
on how to create a central template source. What type of templating
structure do you think we should use? This should be independent from any
configuration management framework, IMO.

My suggestion would be to have templates in simple plain text format with
replacement variable keys. Then have scripts for generating Puppet
modules/Cheff modules or even stand-alone setup scripts. Shall we proceed
with that?

Thanks.
On 2 May 2014 11:14, "Lakmal Warusawithana" <la...@wso2.com> wrote:

> Yes, I agree with Vanson on this. We should not mandate puppet. Later
> someone may wants to use cheft.
>
> +1 for maintain separate templates.
>
> @Vanson, if you guys testing with scripting method please send upstream
> your contributions.
>
> thanks
>
>
> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
>
>>  I am not sure I agree with requiring the use of puppet to configure
>> everything as it's not always practical to install puppet into a cartridge
>> image.  There's also the issue where depending on the VM you are trying to
>> convert into a cartridge might make use of a different versions of puppet.
>>
>> I'd like to see the cartridge agent packaged to be deploy-able as a
>> standalone entity and then to value add with puppet for those use cases
>> that support it.
>>
>> I would prefer having the templates reside in a central templates
>> directory,  provide an option during setup to deploy it into the puppet
>> modules/template directory tree.
>>
>> This avoids the issue of having two versions of the template, one for
>> puppet and one for non puppet deployment cases.
>>
>> For those who don't want to use puppet, they can minimally script up
>> something which transforms the source templates.
>>
>> Right now, we've found a few files like the
>> cartridge-agent/bin/stratos.sh and the
>> cartridge-agent/conf/template/jndi.properties.template to be incompatible
>> with the latest code behavior.
>>
>> the stratos.sh. is missing recently added APP_PATH property and works
>> only if you use puppet to overwrite file that is shipped in the zip.
>>
>> Similarly, the jndi/properties.template file by default doesn't have
>> configuration which run's with activemq, even though all the documentation
>> points to it.  We found in RC1 the JNDI template needs the following
>> changes otherwise the cartridge agent will fail to connect with apache
>> stratos.
>>
>> Original:
>>
>> connectionfactoryName=topicConnectionfactory
>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>>
>> java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>>
>>
>>
>> Actual values required for ActiveMQ:
>>
>> connectionfactoryName=TopicConnectionFactory
>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>>
>> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>
>>
>> -Vanson
>>
>>
>>
>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>>
>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>>
>>
>>  Hi,
>>
>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>> jndi.properties file to set MB IP and MB port. It uses a
>> jndi.properties.template file to generate this. But according to
>> Stratos 4.0 architecture all the properties files should be generated
>> from the Puppet scripts.
>>
>> IMO, this templating logic should be removed from the Cartridge
>> Agent's end and should be done via Puppet scripts. If the community
>> agrees to that I could work on a patch for this. WDYT?
>>
>>
>>  +1
>>
>>
>>  Thanks.
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer
>> WSO2 Inc.http://wso2.com
>>
>> Phone: +94 77 64 154 38
>> Blog: http://ravihansa3000.blogspot.com
>>
>>
>>
>>
>
>
> --
> Lakmal Warusawithana
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog : http://lakmalsview.blogspot.com/
>
>

Re: Cartridge Agent Jndi Configurator should be removed

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

We are still working on 4.0.0-RC release in 4.0.0-incubating branch.
Therefore we might need to wait until we complete it to commit anything to
4.0.0-incubating branch.

Thanks


On Wed, May 7, 2014 at 12:27 AM, Jeffrey Nguyen (jeffrngu) <
jeffrngu@cisco.com> wrote:

> Hi Lakmal,
>
> I checked in the fix for STRATOS-643 into the master branch.  Is it
> possible to double commit this fix into 4.0.0-incubating branch so that it
> will be available in the next 4.0.0-RCx release?
>
> Thanks,
> -Jeffrey
>
> On 5/5/14 10:10 PM, "Jeffrey Nguyen (jeffrngu)" <je...@cisco.com>
> wrote:
>
> >Hi Lakmal,
> >
> >I opened STRATOS-643 to track this issue.  I also attached the diff for
> >the changes on STRATOS-643.  Will push the changes shortly.
> >
> >Thanks,
> >-Jeffrey
> >
> >On 5/2/14 5:47 AM, "Vanson Lim (vlim)" <vl...@cisco.com> wrote:
> >
> >>On 5/2/14, 1:44 AM, Lakmal Warusawithana wrote:
> >>> Yes, I agree with Vanson on this. We should not mandate puppet. Later
> >>> someone may wants to use cheft.
> >>>
> >>> +1 for maintain separate templates.
> >>>
> >>> @Vanson, if you guys testing with scripting method please send upstream
> >>> your contributions.
> >>
> >>Yes, will do,   Working with Jeffrey on this and we'll send our changes
> >>upstream,  for the near term, we'll get the diffs to fix up the
> >>existing jndi.properties.template and stratos.sh so that cartridge agent
> >>works by default without having to change these files.
> >>
> >>-Vanson
> >>>
> >>> thanks
> >>>
> >>>
> >>> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
> >>>
> >>>>   I am not sure I agree with requiring the use of puppet to configure
> >>>> everything as it's not always practical to install puppet into a
> >>>>cartridge
> >>>> image.  There's also the issue where depending on the VM you are
> >>>>trying to
> >>>> convert into a cartridge might make use of a different versions of
> >>>>puppet.
> >>>>
> >>>> I'd like to see the cartridge agent packaged to be deploy-able as a
> >>>> standalone entity and then to value add with puppet for those use
> >>>>cases
> >>>> that support it.
> >>>>
> >>>> I would prefer having the templates reside in a central templates
> >>>> directory,  provide an option during setup to deploy it into the
> >>>>puppet
> >>>> modules/template directory tree.
> >>>>
> >>>> This avoids the issue of having two versions of the template, one for
> >>>> puppet and one for non puppet deployment cases.
> >>>>
> >>>> For those who don't want to use puppet, they can minimally script up
> >>>> something which transforms the source templates.
> >>>>
> >>>> Right now, we've found a few files like the
> >>>>cartridge-agent/bin/stratos.sh
> >>>> and the cartridge-agent/conf/template/jndi.properties.template to be
> >>>> incompatible with the latest code behavior.
> >>>>
> >>>> the stratos.sh. is missing recently added APP_PATH property and works
> >>>>only
> >>>> if you use puppet to overwrite file that is shipped in the zip.
> >>>>
> >>>> Similarly, the jndi/properties.template file by default doesn't have
> >>>> configuration which run's with activemq, even though all the
> >>>>documentation
> >>>> points to it.  We found in RC1 the JNDI template needs the following
> >>>> changes otherwise the cartridge agent will fail to connect with apache
> >>>> stratos.
> >>>>
> >>>> Original:
> >>>>
> >>>> connectionfactoryName=topicConnectionfactory
> >>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
> >>>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
> >>>>
> >>>>
> >>>>java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialCo
> >>>>n
> >>>>textFactory
> >>>>
> >>>>
> >>>>
> >>>> Actual values required for ActiveMQ:
> >>>>
> >>>> connectionfactoryName=TopicConnectionFactory
> >>>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
> >>>>
> >>>>
> >>>>java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialCon
> >>>>t
> >>>>extFactory
> >>>>
> >>>>
> >>>> -Vanson
> >>>>
> >>>>
> >>>>
> >>>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
> >>>>
> >>>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa
> >>>>Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
> >>>>
> >>>>
> >>>>   Hi,
> >>>>
> >>>> Cartridge Agent currently uses a JndiConfigurator class to modify the
> >>>> jndi.properties file to set MB IP and MB port. It uses a
> >>>> jndi.properties.template file to generate this. But according to
> >>>> Stratos 4.0 architecture all the properties files should be generated
> >>>> from the Puppet scripts.
> >>>>
> >>>> IMO, this templating logic should be removed from the Cartridge
> >>>> Agent's end and should be done via Puppet scripts. If the community
> >>>> agrees to that I could work on a patch for this. WDYT?
> >>>>
> >>>>
> >>>>   +1
> >>>>
> >>>>
> >>>>   Thanks.
> >>>>
> >>>> --
> >>>> Akila Ravihansa Perera
> >>>> Software Engineer
> >>>> WSO2 Inc.http://wso2.com
> >>>>
> >>>> Phone: +94 77 64 154 38
> >>>> Blog: http://ravihansa3000.blogspot.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: Cartridge Agent Jndi Configurator should be removed

Posted by "Jeffrey Nguyen (jeffrngu)" <je...@cisco.com>.
Hi Lakmal,

I checked in the fix for STRATOS-643 into the master branch.  Is it
possible to double commit this fix into 4.0.0-incubating branch so that it
will be available in the next 4.0.0-RCx release?

Thanks,
-Jeffrey

On 5/5/14 10:10 PM, "Jeffrey Nguyen (jeffrngu)" <je...@cisco.com> wrote:

>Hi Lakmal,
>
>I opened STRATOS-643 to track this issue.  I also attached the diff for
>the changes on STRATOS-643.  Will push the changes shortly.
>
>Thanks,
>-Jeffrey
>
>On 5/2/14 5:47 AM, "Vanson Lim (vlim)" <vl...@cisco.com> wrote:
>
>>On 5/2/14, 1:44 AM, Lakmal Warusawithana wrote:
>>> Yes, I agree with Vanson on this. We should not mandate puppet. Later
>>> someone may wants to use cheft.
>>>
>>> +1 for maintain separate templates.
>>>
>>> @Vanson, if you guys testing with scripting method please send upstream
>>> your contributions.
>>
>>Yes, will do,   Working with Jeffrey on this and we'll send our changes
>>upstream,  for the near term, we'll get the diffs to fix up the
>>existing jndi.properties.template and stratos.sh so that cartridge agent
>>works by default without having to change these files.
>>
>>-Vanson
>>>
>>> thanks
>>>
>>>
>>> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
>>>
>>>>   I am not sure I agree with requiring the use of puppet to configure
>>>> everything as it's not always practical to install puppet into a
>>>>cartridge
>>>> image.  There's also the issue where depending on the VM you are
>>>>trying to
>>>> convert into a cartridge might make use of a different versions of
>>>>puppet.
>>>>
>>>> I'd like to see the cartridge agent packaged to be deploy-able as a
>>>> standalone entity and then to value add with puppet for those use
>>>>cases
>>>> that support it.
>>>>
>>>> I would prefer having the templates reside in a central templates
>>>> directory,  provide an option during setup to deploy it into the
>>>>puppet
>>>> modules/template directory tree.
>>>>
>>>> This avoids the issue of having two versions of the template, one for
>>>> puppet and one for non puppet deployment cases.
>>>>
>>>> For those who don't want to use puppet, they can minimally script up
>>>> something which transforms the source templates.
>>>>
>>>> Right now, we've found a few files like the
>>>>cartridge-agent/bin/stratos.sh
>>>> and the cartridge-agent/conf/template/jndi.properties.template to be
>>>> incompatible with the latest code behavior.
>>>>
>>>> the stratos.sh. is missing recently added APP_PATH property and works
>>>>only
>>>> if you use puppet to overwrite file that is shipped in the zip.
>>>>
>>>> Similarly, the jndi/properties.template file by default doesn't have
>>>> configuration which run's with activemq, even though all the
>>>>documentation
>>>> points to it.  We found in RC1 the JNDI template needs the following
>>>> changes otherwise the cartridge agent will fail to connect with apache
>>>> stratos.
>>>>
>>>> Original:
>>>>
>>>> connectionfactoryName=topicConnectionfactory
>>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>>>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>>>>
>>>> 
>>>>java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialCo
>>>>n
>>>>textFactory
>>>>
>>>>
>>>>
>>>> Actual values required for ActiveMQ:
>>>>
>>>> connectionfactoryName=TopicConnectionFactory
>>>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>>>>
>>>> 
>>>>java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialCon
>>>>t
>>>>extFactory
>>>>
>>>>
>>>> -Vanson
>>>>
>>>>
>>>>
>>>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>>>>
>>>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa
>>>>Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>>>>
>>>>
>>>>   Hi,
>>>>
>>>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>>>> jndi.properties file to set MB IP and MB port. It uses a
>>>> jndi.properties.template file to generate this. But according to
>>>> Stratos 4.0 architecture all the properties files should be generated
>>>> from the Puppet scripts.
>>>>
>>>> IMO, this templating logic should be removed from the Cartridge
>>>> Agent's end and should be done via Puppet scripts. If the community
>>>> agrees to that I could work on a patch for this. WDYT?
>>>>
>>>>
>>>>   +1
>>>>
>>>>
>>>>   Thanks.
>>>>
>>>> --
>>>> Akila Ravihansa Perera
>>>> Software Engineer
>>>> WSO2 Inc.http://wso2.com
>>>>
>>>> Phone: +94 77 64 154 38
>>>> Blog: http://ravihansa3000.blogspot.com
>>>>
>>>>
>>>>
>>>>
>>>
>>
>


Re: Cartridge Agent Jndi Configurator should be removed

Posted by "Jeffrey Nguyen (jeffrngu)" <je...@cisco.com>.
Hi Lakmal,

I opened STRATOS-643 to track this issue.  I also attached the diff for
the changes on STRATOS-643.  Will push the changes shortly.

Thanks,
-Jeffrey

On 5/2/14 5:47 AM, "Vanson Lim (vlim)" <vl...@cisco.com> wrote:

>On 5/2/14, 1:44 AM, Lakmal Warusawithana wrote:
>> Yes, I agree with Vanson on this. We should not mandate puppet. Later
>> someone may wants to use cheft.
>>
>> +1 for maintain separate templates.
>>
>> @Vanson, if you guys testing with scripting method please send upstream
>> your contributions.
>
>Yes, will do,   Working with Jeffrey on this and we'll send our changes
>upstream,  for the near term, we'll get the diffs to fix up the
>existing jndi.properties.template and stratos.sh so that cartridge agent
>works by default without having to change these files.
>
>-Vanson
>>
>> thanks
>>
>>
>> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
>>
>>>   I am not sure I agree with requiring the use of puppet to configure
>>> everything as it's not always practical to install puppet into a
>>>cartridge
>>> image.  There's also the issue where depending on the VM you are
>>>trying to
>>> convert into a cartridge might make use of a different versions of
>>>puppet.
>>>
>>> I'd like to see the cartridge agent packaged to be deploy-able as a
>>> standalone entity and then to value add with puppet for those use cases
>>> that support it.
>>>
>>> I would prefer having the templates reside in a central templates
>>> directory,  provide an option during setup to deploy it into the puppet
>>> modules/template directory tree.
>>>
>>> This avoids the issue of having two versions of the template, one for
>>> puppet and one for non puppet deployment cases.
>>>
>>> For those who don't want to use puppet, they can minimally script up
>>> something which transforms the source templates.
>>>
>>> Right now, we've found a few files like the
>>>cartridge-agent/bin/stratos.sh
>>> and the cartridge-agent/conf/template/jndi.properties.template to be
>>> incompatible with the latest code behavior.
>>>
>>> the stratos.sh. is missing recently added APP_PATH property and works
>>>only
>>> if you use puppet to overwrite file that is shipped in the zip.
>>>
>>> Similarly, the jndi/properties.template file by default doesn't have
>>> configuration which run's with activemq, even though all the
>>>documentation
>>> points to it.  We found in RC1 the JNDI template needs the following
>>> changes otherwise the cartridge agent will fail to connect with apache
>>> stratos.
>>>
>>> Original:
>>>
>>> connectionfactoryName=topicConnectionfactory
>>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>>>
>>> 
>>>java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialCon
>>>textFactory
>>>
>>>
>>>
>>> Actual values required for ActiveMQ:
>>>
>>> connectionfactoryName=TopicConnectionFactory
>>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>>>
>>> 
>>>java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialCont
>>>extFactory
>>>
>>>
>>> -Vanson
>>>
>>>
>>>
>>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>>>
>>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa
>>>Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>>>
>>>
>>>   Hi,
>>>
>>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>>> jndi.properties file to set MB IP and MB port. It uses a
>>> jndi.properties.template file to generate this. But according to
>>> Stratos 4.0 architecture all the properties files should be generated
>>> from the Puppet scripts.
>>>
>>> IMO, this templating logic should be removed from the Cartridge
>>> Agent's end and should be done via Puppet scripts. If the community
>>> agrees to that I could work on a patch for this. WDYT?
>>>
>>>
>>>   +1
>>>
>>>
>>>   Thanks.
>>>
>>> --
>>> Akila Ravihansa Perera
>>> Software Engineer
>>> WSO2 Inc.http://wso2.com
>>>
>>> Phone: +94 77 64 154 38
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>>
>>>
>>
>


Re: Cartridge Agent Jndi Configurator should be removed

Posted by Vanson Lim <vl...@cisco.com>.
On 5/2/14, 1:44 AM, Lakmal Warusawithana wrote:
> Yes, I agree with Vanson on this. We should not mandate puppet. Later
> someone may wants to use cheft.
>
> +1 for maintain separate templates.
>
> @Vanson, if you guys testing with scripting method please send upstream
> your contributions.

Yes, will do,   Working with Jeffrey on this and we'll send our changes upstream,  for the near term, we'll get the diffs to fix up the 
existing jndi.properties.template and stratos.sh so that cartridge agent works by default without having to change these files.

-Vanson
>
> thanks
>
>
> On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:
>
>>   I am not sure I agree with requiring the use of puppet to configure
>> everything as it's not always practical to install puppet into a cartridge
>> image.  There's also the issue where depending on the VM you are trying to
>> convert into a cartridge might make use of a different versions of puppet.
>>
>> I'd like to see the cartridge agent packaged to be deploy-able as a
>> standalone entity and then to value add with puppet for those use cases
>> that support it.
>>
>> I would prefer having the templates reside in a central templates
>> directory,  provide an option during setup to deploy it into the puppet
>> modules/template directory tree.
>>
>> This avoids the issue of having two versions of the template, one for
>> puppet and one for non puppet deployment cases.
>>
>> For those who don't want to use puppet, they can minimally script up
>> something which transforms the source templates.
>>
>> Right now, we've found a few files like the cartridge-agent/bin/stratos.sh
>> and the cartridge-agent/conf/template/jndi.properties.template to be
>> incompatible with the latest code behavior.
>>
>> the stratos.sh. is missing recently added APP_PATH property and works only
>> if you use puppet to overwrite file that is shipped in the zip.
>>
>> Similarly, the jndi/properties.template file by default doesn't have
>> configuration which run's with activemq, even though all the documentation
>> points to it.  We found in RC1 the JNDI template needs the following
>> changes otherwise the cartridge agent will fail to connect with apache
>> stratos.
>>
>> Original:
>>
>> connectionfactoryName=topicConnectionfactory
>> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
>> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>>
>> java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>>
>>
>>
>> Actual values required for ActiveMQ:
>>
>> connectionfactoryName=TopicConnectionFactory
>> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>>
>> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>
>>
>> -Vanson
>>
>>
>>
>> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>>
>> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>>
>>
>>   Hi,
>>
>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>> jndi.properties file to set MB IP and MB port. It uses a
>> jndi.properties.template file to generate this. But according to
>> Stratos 4.0 architecture all the properties files should be generated
>> from the Puppet scripts.
>>
>> IMO, this templating logic should be removed from the Cartridge
>> Agent's end and should be done via Puppet scripts. If the community
>> agrees to that I could work on a patch for this. WDYT?
>>
>>
>>   +1
>>
>>
>>   Thanks.
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer
>> WSO2 Inc.http://wso2.com
>>
>> Phone: +94 77 64 154 38
>> Blog: http://ravihansa3000.blogspot.com
>>
>>
>>
>>
>


Re: Cartridge Agent Jndi Configurator should be removed

Posted by Lakmal Warusawithana <la...@wso2.com>.
Yes, I agree with Vanson on this. We should not mandate puppet. Later
someone may wants to use cheft.

+1 for maintain separate templates.

@Vanson, if you guys testing with scripting method please send upstream
your contributions.

thanks


On Fri, May 2, 2014 at 7:01 AM, Vanson Lim <vl...@cisco.com> wrote:

>  I am not sure I agree with requiring the use of puppet to configure
> everything as it's not always practical to install puppet into a cartridge
> image.  There's also the issue where depending on the VM you are trying to
> convert into a cartridge might make use of a different versions of puppet.
>
> I'd like to see the cartridge agent packaged to be deploy-able as a
> standalone entity and then to value add with puppet for those use cases
> that support it.
>
> I would prefer having the templates reside in a central templates
> directory,  provide an option during setup to deploy it into the puppet
> modules/template directory tree.
>
> This avoids the issue of having two versions of the template, one for
> puppet and one for non puppet deployment cases.
>
> For those who don't want to use puppet, they can minimally script up
> something which transforms the source templates.
>
> Right now, we've found a few files like the cartridge-agent/bin/stratos.sh
> and the cartridge-agent/conf/template/jndi.properties.template to be
> incompatible with the latest code behavior.
>
> the stratos.sh. is missing recently added APP_PATH property and works only
> if you use puppet to overwrite file that is shipped in the zip.
>
> Similarly, the jndi/properties.template file by default doesn't have
> configuration which run's with activemq, even though all the documentation
> points to it.  We found in RC1 the JNDI template needs the following
> changes otherwise the cartridge agent will fail to connect with apache
> stratos.
>
> Original:
>
> connectionfactoryName=topicConnectionfactory
> connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon
> /carbon?brokerlist='tcp://$mb_ip:$mb_port'
>
> java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>
>
>
> Actual values required for ActiveMQ:
>
> connectionfactoryName=TopicConnectionFactory
> connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
>
> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>
>
> -Vanson
>
>
>
> On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
>
> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera<ra...@wso2.com> <ra...@wso2.com>wrote:
>
>
>  Hi,
>
> Cartridge Agent currently uses a JndiConfigurator class to modify the
> jndi.properties file to set MB IP and MB port. It uses a
> jndi.properties.template file to generate this. But according to
> Stratos 4.0 architecture all the properties files should be generated
> from the Puppet scripts.
>
> IMO, this templating logic should be removed from the Cartridge
> Agent's end and should be done via Puppet scripts. If the community
> agrees to that I could work on a patch for this. WDYT?
>
>
>  +1
>
>
>  Thanks.
>
> --
> Akila Ravihansa Perera
> Software Engineer
> WSO2 Inc.http://wso2.com
>
> Phone: +94 77 64 154 38
> Blog: http://ravihansa3000.blogspot.com
>
>
>
>


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

Re: Cartridge Agent Jndi Configurator should be removed

Posted by Vanson Lim <vl...@cisco.com>.
I am not sure I agree with requiring the use of puppet to configure everything as it's not always practical to install puppet into a 
cartridge image.  There's also the issue where depending on the VM you are trying to convert into a cartridge might make use of a different 
versions of puppet.

I'd like to see the cartridge agent packaged to be deploy-able as a standalone entity and then to value add with puppet for those use cases 
that support it.

I would prefer having the templates reside in a central templates directory,  provide an option during setup to deploy it into the puppet 
modules/template directory tree.

This avoids the issue of having two versions of the template, one for puppet and one for non puppet deployment cases.

For those who don't want to use puppet, they can minimally script up something which transforms the source templates.

Right now, we've found a few files like the cartridge-agent/bin/stratos.sh and the cartridge-agent/conf/template/jndi.properties.template 
to be incompatible with the latest code behavior.

the stratos.sh. is missing recently added APP_PATH property and works only if you use puppet to overwrite file that is shipped in the zip.

Similarly, the jndi/properties.template file by default doesn't have configuration which run's with activemq, even though all the 
documentation points to it.  We found in RC1 the JNDI template needs the following changes otherwise the cartridge agent will fail to 
connect with apache stratos.

Original:

    connectionfactoryName=topicConnectionfactory
    connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://$mb_ip:$mb_port'
    java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory



Actual values required for ActiveMQ:

    connectionfactoryName=TopicConnectionFactory
    connectionfactory.topicConnectionfactory=tcp://$mb_ip:$mb_port
    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory


-Vanson


On 5/1/14, 8:49 AM, Isuru Haththotuwa wrote:
> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera
> <ra...@wso2.com>wrote:
>
>> Hi,
>>
>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>> jndi.properties file to set MB IP and MB port. It uses a
>> jndi.properties.template file to generate this. But according to
>> Stratos 4.0 architecture all the properties files should be generated
>> from the Puppet scripts.
>>
>> IMO, this templating logic should be removed from the Cartridge
>> Agent's end and should be done via Puppet scripts. If the community
>> agrees to that I could work on a patch for this. WDYT?
>>
> +1
>
>> Thanks.
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer
>> WSO2 Inc.
>> http://wso2.com
>>
>> Phone: +94 77 64 154 38
>> Blog: http://ravihansa3000.blogspot.com
>>
>
>


Re: Cartridge Agent Jndi Configurator should be removed

Posted by Isuru Haththotuwa <is...@wso2.com>.
On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera
<ra...@wso2.com>wrote:

> Hi,
>
> Cartridge Agent currently uses a JndiConfigurator class to modify the
> jndi.properties file to set MB IP and MB port. It uses a
> jndi.properties.template file to generate this. But according to
> Stratos 4.0 architecture all the properties files should be generated
> from the Puppet scripts.
>
> IMO, this templating logic should be removed from the Cartridge
> Agent's end and should be done via Puppet scripts. If the community
> agrees to that I could work on a patch for this. WDYT?
>
+1

>
> Thanks.
>
> --
> Akila Ravihansa Perera
> Software Engineer
> WSO2 Inc.
> http://wso2.com
>
> Phone: +94 77 64 154 38
> Blog: http://ravihansa3000.blogspot.com
>



-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Re: Cartridge Agent Jndi Configurator should be removed

Posted by Imesh Gunaratne <im...@apache.org>.
+1
The reason for generating the jndi.properties file was to allow cartridge
agent to be configured using a single file. Yes it's better to follow the
same pattern in all products.


On Wed, Apr 30, 2014 at 8:41 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> +1 Akila, Cartridge Agent also should follow the other products IMO. So,
> let's add a jndi.properties file to agent and then configure it using
> puppet.
>
>
>
> On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera <
> ravihansa@wso2.com> wrote:
>
>> Hi,
>>
>> Cartridge Agent currently uses a JndiConfigurator class to modify the
>> jndi.properties file to set MB IP and MB port. It uses a
>> jndi.properties.template file to generate this. But according to
>> Stratos 4.0 architecture all the properties files should be generated
>> from the Puppet scripts.
>>
>> IMO, this templating logic should be removed from the Cartridge
>> Agent's end and should be done via Puppet scripts. If the community
>> agrees to that I could work on a patch for this. WDYT?
>>
>> Thanks.
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer
>> WSO2 Inc.
>> http://wso2.com
>>
>> Phone: +94 77 64 154 38
>> Blog: http://ravihansa3000.blogspot.com
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos

Re: Cartridge Agent Jndi Configurator should be removed

Posted by Nirmal Fernando <ni...@gmail.com>.
+1 Akila, Cartridge Agent also should follow the other products IMO. So,
let's add a jndi.properties file to agent and then configure it using
puppet.



On Wed, Apr 30, 2014 at 8:10 AM, Akila Ravihansa Perera
<ra...@wso2.com>wrote:

> Hi,
>
> Cartridge Agent currently uses a JndiConfigurator class to modify the
> jndi.properties file to set MB IP and MB port. It uses a
> jndi.properties.template file to generate this. But according to
> Stratos 4.0 architecture all the properties files should be generated
> from the Puppet scripts.
>
> IMO, this templating logic should be removed from the Cartridge
> Agent's end and should be done via Puppet scripts. If the community
> agrees to that I could work on a patch for this. WDYT?
>
> Thanks.
>
> --
> Akila Ravihansa Perera
> Software Engineer
> WSO2 Inc.
> http://wso2.com
>
> Phone: +94 77 64 154 38
> Blog: http://ravihansa3000.blogspot.com
>



-- 
Best Regards,
Nirmal

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

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

Re: Cartridge Agent Jndi Configurator should be removed

Posted by Isuru Perera <is...@wso2.com>.
On Tue, Apr 29, 2014 at 7:40 PM, Akila Ravihansa Perera
<ra...@wso2.com>wrote:

> Hi,
>
> Cartridge Agent currently uses a JndiConfigurator class to modify the
> jndi.properties file to set MB IP and MB port. It uses a
> jndi.properties.template file to generate this. But according to
> Stratos 4.0 architecture all the properties files should be generated
> from the Puppet scripts.
>
> IMO, this templating logic should be removed from the Cartridge
> Agent's end and should be done via Puppet scripts. If the community
> agrees to that I could work on a patch for this. WDYT?
>
Yes! That's not necessary. I noticed this in LB also. Please check that
also.

>
> Thanks.
>
> --
> Akila Ravihansa Perera
> Software Engineer
> WSO2 Inc.
> http://wso2.com
>
> Phone: +94 77 64 154 38
> Blog: http://ravihansa3000.blogspot.com
>



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

about.me/chrishantha

Re: Cartridge Agent Jndi Configurator should be removed

Posted by Udara Liyanage <ud...@wso2.com>.
Can there be users who install the agent inside cartridge at cartridge
creation time instead of using puppet?


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