You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by David Hbase <da...@gmail.com> on 2015/06/29 02:37:42 UTC

[Q] Get info from other Cartridge Group's instance

Setup Stratos for a composition app, etc: Activemq, Wso2ESB

In the ESB, we need the activemq's IP,

In there anyway, we can pass or get this IP via a Macro / Parameter in the
Cartridge definitions?

Thanks
-D

Re: [Q] Get info from other Cartridge Group's instance

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

You could use a Metadata API for this purpose. Stratos has one built in [1]
or you could use something like etcd [2].

Once the relevant instance is started a cartridge agent extension/plugin
[3] can publish its IP Address to the Metadata API. Then the dependent
instance can read it using the same approach.

[1]
https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Metadata+API+Reference
[2] https://github.com/coreos/etcd
[3]
https://github.com/apache/stratos/blob/master/tools/docker-images/cartridge-docker-images/service-images/tomcat-saml-sso/packs/plugins/TomcatWSO2ISMetadataPublisher.py

On Mon, Jun 29, 2015 at 10:56 PM, David Hbase <da...@gmail.com> wrote:

> Thanks Mariangela,
>
> But from my purpose, when I define the ESB cartridge, I do not know the
> ActivaMQ IP ("*10.100.1.13*"),
>
> {
>             "name": "payload_parameter.MB_IP",
>             "value": "*10.100.1.13*"
> }
>
> The ESB MB_IP will be created by our Stratos Application deployment. So
> the "*10.100.1.13*" should be a macro / payload.
>
> -D
>
>
>
> On Mon, Jun 29, 2015 at 1:13 AM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Thanks Mari..!
>>
>> On Mon, Jun 29, 2015 at 1:36 PM, Mariangela Hills <ma...@wso2.com>
>> wrote:
>>
>>> Will do!
>>>
>>> Regards,
>>> Mariangela
>>>
>>>
>>> *Mariangela Hills*
>>> Senior Technical Writer - WSO2, Inc. http://wso2.com
>>> Committer and PMC member - Apache Stratos
>>> email:mariangela@wso2.com | mobile: +94 773 500185
>>>
>>> On Mon, Jun 29, 2015 at 10:33 AM, Reka Thirunavukkarasu <re...@wso2.com>
>>> wrote:
>>>
>>>> Hi David,
>>>>
>>>> Yah..This is possible..You can use properties section in cartridge
>>>> definition to pass any key/value pairs to a cartridge which could be read
>>>> by cartridge agent and exported as system properties. Hence you can use
>>>> them in cartridge extensions.
>>>>
>>>> Sample key value pair would be as below:
>>>>
>>>> {
>>>>             "name": "payload_parameter.MB_IP",
>>>>             "value": "10.100.1.13"
>>>> }
>>>>
>>>> @Mari, Can you add this also to the cartridge resource definition
>>>> section?  It looks like it is missing in the 4.1.0 doc?
>>>>
>>>> Thanks,
>>>> Reka
>>>>
>>>> On Mon, Jun 29, 2015 at 6:07 AM, David Hbase <da...@gmail.com>
>>>> wrote:
>>>>
>>>>> Setup Stratos for a composition app, etc: Activemq, Wso2ESB
>>>>>
>>>>> In the ESB, we need the activemq's IP,
>>>>>
>>>>> In there anyway, we can pass or get this IP via a Macro / Parameter in
>>>>> the Cartridge definitions?
>>>>>
>>>>> Thanks
>>>>> -D
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Reka Thirunavukkarasu
>>>> Senior Software Engineer,
>>>> WSO2, Inc.:http://wso2.com,
>>>> Mobile: +94776442007
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>


-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Q] Get info from other Cartridge Group's instance

Posted by David Hbase <da...@gmail.com>.
Thanks Mariangela,

But from my purpose, when I define the ESB cartridge, I do not know the
ActivaMQ IP ("*10.100.1.13*"),

{
            "name": "payload_parameter.MB_IP",
            "value": "*10.100.1.13*"
}

The ESB MB_IP will be created by our Stratos Application deployment. So the
"*10.100.1.13*" should be a macro / payload.

-D



On Mon, Jun 29, 2015 at 1:13 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Thanks Mari..!
>
> On Mon, Jun 29, 2015 at 1:36 PM, Mariangela Hills <ma...@wso2.com>
> wrote:
>
>> Will do!
>>
>> Regards,
>> Mariangela
>>
>>
>> *Mariangela Hills*
>> Senior Technical Writer - WSO2, Inc. http://wso2.com
>> Committer and PMC member - Apache Stratos
>> email:mariangela@wso2.com | mobile: +94 773 500185
>>
>> On Mon, Jun 29, 2015 at 10:33 AM, Reka Thirunavukkarasu <re...@wso2.com>
>> wrote:
>>
>>> Hi David,
>>>
>>> Yah..This is possible..You can use properties section in cartridge
>>> definition to pass any key/value pairs to a cartridge which could be read
>>> by cartridge agent and exported as system properties. Hence you can use
>>> them in cartridge extensions.
>>>
>>> Sample key value pair would be as below:
>>>
>>> {
>>>             "name": "payload_parameter.MB_IP",
>>>             "value": "10.100.1.13"
>>> }
>>>
>>> @Mari, Can you add this also to the cartridge resource definition
>>> section?  It looks like it is missing in the 4.1.0 doc?
>>>
>>> Thanks,
>>> Reka
>>>
>>> On Mon, Jun 29, 2015 at 6:07 AM, David Hbase <da...@gmail.com>
>>> wrote:
>>>
>>>> Setup Stratos for a composition app, etc: Activemq, Wso2ESB
>>>>
>>>> In the ESB, we need the activemq's IP,
>>>>
>>>> In there anyway, we can pass or get this IP via a Macro / Parameter in
>>>> the Cartridge definitions?
>>>>
>>>> Thanks
>>>> -D
>>>>
>>>>
>>>
>>>
>>> --
>>> Reka Thirunavukkarasu
>>> Senior Software Engineer,
>>> WSO2, Inc.:http://wso2.com,
>>> Mobile: +94776442007
>>>
>>>
>>>
>>
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>

Re: [Q] Get info from other Cartridge Group's instance

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Thanks Mari..!

On Mon, Jun 29, 2015 at 1:36 PM, Mariangela Hills <ma...@wso2.com>
wrote:

> Will do!
>
> Regards,
> Mariangela
>
>
> *Mariangela Hills*
> Senior Technical Writer - WSO2, Inc. http://wso2.com
> Committer and PMC member - Apache Stratos
> email:mariangela@wso2.com | mobile: +94 773 500185
>
> On Mon, Jun 29, 2015 at 10:33 AM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Hi David,
>>
>> Yah..This is possible..You can use properties section in cartridge
>> definition to pass any key/value pairs to a cartridge which could be read
>> by cartridge agent and exported as system properties. Hence you can use
>> them in cartridge extensions.
>>
>> Sample key value pair would be as below:
>>
>> {
>>             "name": "payload_parameter.MB_IP",
>>             "value": "10.100.1.13"
>> }
>>
>> @Mari, Can you add this also to the cartridge resource definition
>> section?  It looks like it is missing in the 4.1.0 doc?
>>
>> Thanks,
>> Reka
>>
>> On Mon, Jun 29, 2015 at 6:07 AM, David Hbase <da...@gmail.com>
>> wrote:
>>
>>> Setup Stratos for a composition app, etc: Activemq, Wso2ESB
>>>
>>> In the ESB, we need the activemq's IP,
>>>
>>> In there anyway, we can pass or get this IP via a Macro / Parameter in
>>> the Cartridge definitions?
>>>
>>> Thanks
>>> -D
>>>
>>>
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: [Q] Get info from other Cartridge Group's instance

Posted by Mariangela Hills <ma...@wso2.com>.
Will do!

Regards,
Mariangela


*Mariangela Hills*
Senior Technical Writer - WSO2, Inc. http://wso2.com
Committer and PMC member - Apache Stratos
email:mariangela@wso2.com | mobile: +94 773 500185

On Mon, Jun 29, 2015 at 10:33 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi David,
>
> Yah..This is possible..You can use properties section in cartridge
> definition to pass any key/value pairs to a cartridge which could be read
> by cartridge agent and exported as system properties. Hence you can use
> them in cartridge extensions.
>
> Sample key value pair would be as below:
>
> {
>             "name": "payload_parameter.MB_IP",
>             "value": "10.100.1.13"
> }
>
> @Mari, Can you add this also to the cartridge resource definition
> section?  It looks like it is missing in the 4.1.0 doc?
>
> Thanks,
> Reka
>
> On Mon, Jun 29, 2015 at 6:07 AM, David Hbase <da...@gmail.com> wrote:
>
>> Setup Stratos for a composition app, etc: Activemq, Wso2ESB
>>
>> In the ESB, we need the activemq's IP,
>>
>> In there anyway, we can pass or get this IP via a Macro / Parameter in
>> the Cartridge definitions?
>>
>> Thanks
>> -D
>>
>>
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>

Re: [Q] Get info from other Cartridge Group's instance

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi David,

Yah..This is possible..You can use properties section in cartridge
definition to pass any key/value pairs to a cartridge which could be read
by cartridge agent and exported as system properties. Hence you can use
them in cartridge extensions.

Sample key value pair would be as below:

{
            "name": "payload_parameter.MB_IP",
            "value": "10.100.1.13"
}

@Mari, Can you add this also to the cartridge resource definition section?
It looks like it is missing in the 4.1.0 doc?

Thanks,
Reka

On Mon, Jun 29, 2015 at 6:07 AM, David Hbase <da...@gmail.com> wrote:

> Setup Stratos for a composition app, etc: Activemq, Wso2ESB
>
> In the ESB, we need the activemq's IP,
>
> In there anyway, we can pass or get this IP via a Macro / Parameter in the
> Cartridge definitions?
>
> Thanks
> -D
>
>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007