stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Udara Liyanage <ud...@wso2.com>
Subject Re: [Grouping] Metadata service metaInfoAlias property
Date Mon, 06 Oct 2014 05:00:32 GMT
Hi,

In addition to that we have to specify in cartridge json which metadata it
expose . For instance MySQL cartridge should mention that it exposes host,
username,password so someone looking at MySQL cartridge know what details
it exposes to metadata service.

exportingProperties{
    [
        "HOST", "USER_NAME", "PASSWORD"
    ]
}

These properties should be sent into the instance as userdata.

On Sun, Oct 5, 2014 at 8:13 PM, Udara Liyanage <udara@wso2.com> wrote:

> Hi,
>
> Thanks Isuru for the suggestion.
>
> On Sun, Oct 5, 2014 at 1:41 PM, Gayan Gunarathne <gayang@wso2.com> wrote:
>
>> +1
>> Yeah I think it should be a json array.
>> IMO we can use mygroup1.mygroup1mysql1 sort of a naming for identify the
>> dendencies as it improves the readability of the alias.WDYT?
>>
>> Thanks,
>> Gayan
>>
>> On Friday, October 3, 2014, Isuru Haththotuwa <isuruh@apache.org> wrote:
>>
>>> +1 for the general idea, can we come up with the better name for
>>> 'metaInfoAlias'? Just my opinion, it seems misleading to me. How about
>>> 'dependencyAliases' ? And note that it should actually be an array, since
>>> there can be a one-to-many relationship.
>>>
>>> On Fri, Oct 3, 2014 at 3:32 PM, Udara Liyanage <udara@wso2.com> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> According to the new metadata services usage, some instances send its
>>>> details to the metadata service so interested parties can retrive the
>>>> details from the metadata service. Party which gets the details should know
>>>> from which details it needs to retrive. For instance, PHP should get
>>>> details published by MySQL. So there should be a mechanism PHP instances
>>>> should know from which details it needed. Earlier plan was to CC or AS
>>>> publish dependent details to the metadata service. PHP depends on MySQL.
SO
>>>> within PHP instance, it can get its dependencies from the metadata service
>>>> and then get the relavent details.
>>>> However it is simple AS or CC does not publish dependency or any other
>>>> details to the metadata service, only service instances publish ang query
>>>> data from the metadata service. AS an example, MySQL publish its
>>>> details(host,ip, password) to metadata service with its alias and PHP
>>>> retrive the details using the alias. Then the issue is how PHP instances
>>>> know which details to retrive. There may be multiple MySQL cartridges in
an
>>>> application.
>>>> This can be done by specifying the alias from which it needs to get
>>>> data from. Consider the application definition mentioned below.  There
>>>> MySQL has the alias mygroup1mysql. In subscribale info of the PHP, I have
>>>> introduced another variable(metaInfoAlias) to specify from where to get the
>>>> details. Even in cases where there are multiple MySQL cartridges are
>>>> mentioned in the application definition hirachy, PHP instance know from
>>>> where to get its metadata.
>>>>
>>>> Ex:
>>>> "metaInfoAlias":"mygroup1mysql"
>>>>
>>>>
>>>> {
>>>>   "applicationId": "test_app_1",
>>>>   "alias": "mytestapp1",
>>>>   "components": {
>>>>     "groups": [
>>>>       {
>>>>         "name": "group2",
>>>>         "alias": "mygroup2",
>>>>         "deploymentPolicy": "dep_policy_group2",
>>>>         "autoscalingPolicy": "autoscale_policy_group2",
>>>>         "subscribables": [
>>>>           {
>>>>             "type": "php",
>>>>             "alias": "mygroup2php",
>>>>
>>>>           }
>>>>         ],
>>>>         "subGroups": [
>>>>           {
>>>>             "name": "group1",
>>>>             "alias": "mygroup1",
>>>>           }
>>>>         ],
>>>>       },
>>>>       {
>>>>         "name": "group1",
>>>>         "alias": "mygroup1",
>>>>         "deploymentPolicy": "dep_policy_group1",
>>>>         "autoscalingPolicy": "autoscale_policy_group1",
>>>>         "subscribables": [
>>>>           {
>>>>             "type": "mysql",
>>>>             "alias": "mygroup1mysql",
>>>>           },
>>>>         ],
>>>>
>>>>       },
>>>>     ]
>>>>   },
>>>>   "subscribableInfo": [
>>>>     {
>>>>       "alias": "mygroup1mysql",
>>>>       "deploymentPolicy": "dep_policy_mysql",
>>>>       "autoscalingPolicy": "autoscale_policy_mysql"
>>>>     },
>>>>     {
>>>>       "alias": "mygroup2php",
>>>>       *"metaInfoAlias":"mygroup1mysql"*
>>>>       "deploymentPolicy": "dep_policy_php",
>>>>       "autoscalingPolicy": "autoscale_policy_php",
>>>>       "repoURL": "www.mygit.com/php.git",
>>>>       "privateRepo": "true",
>>>>       "repoUsername": "admin",
>>>>       "repoPassword": "xxxx"
>>>>     }
>>>>   ]
>>>> }
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>> --
>> Best Regards,
>>
>> Gayan Gunarathne
>> Technical Lead
>> WSO2 Inc. (http://wso2.com)
>> email  : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Mime
View raw message