On Thu, Mar 31, 2016 at 10:36 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

>
>
> On Thu, Mar 31, 2016 at 9:58 AM, Selvaratnam Uthaiyashankar <
> shan...@wso2.com> wrote:
>
>>
>>
>> On Fri, Mar 25, 2016 at 11:56 AM, Aruna Karunarathna <ar...@wso2.com>
>> wrote:
>>
>>> On Thu, Mar 24, 2016 at 7:28 PM, Isuru Perera <isu...@wso2.com> wrote:
>>>
>>>> So, when deploying multiple products, this "id" should be changed and
>>>> each server must specify a unique id, right? (Otherwise how can we uniquely
>>>> identify a server?)
>>>>
>>>> How can I access this "id" from my component. Is there an API?
>>>>
>>>
>>> Yes you should give a unique id value, if you want to identify the
>>> server uniquely.
>>>
>>
>> How does this work in an autoscaled environment? Autoscalar should update
>> this file with unique value?
>>
>
> We don't have to edit the file here. By default, we will have a place
> holder for this property in the carbon.yml file -  id: ${server.key}.
>
> The value for this can be set either via a system property or an
> environment variable. So when a new instance is spawned, we don't have to
> edit the file but we have to set the relevant value (sys or env property)
> for this.
>
>
>>
In an autoscaled environment we can use the local ip as a unique
identification, in wso2 dockerfiles [1] we have done a similar thing to
make the product execution path unique. This script is executed at the time
of instance ( or container) startup

[1]
https://github.com/wso2/dockerfiles/blob/master/common/scripts/entrypoint.sh#L25


> Do we have documentation about this "id"?
>>
>
> No, we are working on documenting these config files.
>
>
>>
>>
>>
>>
>>> There is no such API,  to get it directly, What you can do is, acquire
>>> the CarbonRuntime OSGi service,
>>> and get the ServerConfiguration which contain this information.
>>>
>>> [1].
>>> https://github.com/wso2/carbon-kernel/blob/master/core/src/main/java/org/wso2/carbon/kernel/CarbonRuntime.java#L40
>>>
>>>>
>>>> On Thu, Mar 24, 2016 at 6:30 PM, Aruna Karunarathna <ar...@wso2.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 24, 2016 at 6:23 PM, Isuru Perera <isu...@wso2.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> $subject?
>>>>>>
>>>>>> What are the reasons for adding it? Can I use that to identify a
>>>>>> carbon server uniquely?
>>>>>>
>>>>>> For example, in Carbon Metrics, I want to use some value to identify
>>>>>> a server (The source of metrics). So, I have used a configuration named
>>>>>> source and I use hostname as the default value. Can we use this "id" for
>>>>>> that?
>>>>>>
>>>>>
>>>>> AFAIK,  you can use that value to uniquely identify a server. That's
>>>>> the idea behind that property.
>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> --
>>>>>> Isuru Perera
>>>>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>>>>> Lean . Enterprise . Middleware
>>>>>>
>>>>>> about.me/chrishantha
>>>>>> Contact: +IsuruPereraWSO2
>>>>>> <https://www.google.com/+IsuruPereraWSO2/about>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Architecture mailing list
>>>>>> Architecture@wso2.org
>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> *Aruna Sujith Karunarathna *
>>>>> WSO2, Inc | lean. enterprise. middleware.
>>>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>>>> Mobile: +94 71 9040362 | Work: +94 112145345
>>>>> Email: ar...@wso2.com | Web: www.wso2.com
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Architecture mailing list
>>>>> Architecture@wso2.org
>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Isuru Perera
>>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>>> Lean . Enterprise . Middleware
>>>>
>>>> about.me/chrishantha
>>>> Contact: +IsuruPereraWSO2
>>>> <https://www.google.com/+IsuruPereraWSO2/about>
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> Architecture@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Aruna Sujith Karunarathna *
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 9040362 | Work: +94 112145345
>>> Email: ar...@wso2.com | Web: www.wso2.com
>>>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> S.Uthaiyashankar
>> VP Engineering
>> WSO2 Inc.
>> http://wso2.com/ - "lean . enterprise . middleware"
>>
>> Phone: +94 714897591
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Sajith Kariyawasam
*Committer and PMC member, Apache Stratos, *
*WSO2 Inc.; http://wso2.com <http://wso2.com>*
*Mobile: 0772269575*
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to