On Tue, Dec 2, 2014 at 9:20 AM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi, > > Defining inline improves readability since all subscription information > are in same place, no need to go up and down to see all information. > > Yes, it easy to understand whole application while looking at glance IMO. > On Mon, Dec 1, 2014 at 10:04 PM, Martin Eppel (meppel) <mep...@cisco.com> > wrote: > >> Hi Manula, >> >> >> >> What is the reason that we change the application format – we used to >> define the cartridge subscription info in a separate section >> ("subscribableInfo": ) instead inline? >> >> >> >> See sample below: >> >> >> >> >> >> "applicationId": "test_app5", >> >> "alias": "myapp5", >> >> "components": { >> >> "groups": [ >> >> ], >> >> "subscribables": [ >> >> { >> >> "type": "cisco-sample-vm", >> >> "alias": "c1xxx" >> >> } >> >> ] >> >> }, >> >> "subscribableInfo": [ >> >> { >> >> "alias": "c1xxx", >> >> "deploymentPolicy": "static-1-Core", >> >> "autoscalingPolicy": "economyPolicy", >> >> "privateRepo": "true", >> >> "repoPassword": "password", >> >> "repoURL": "http://xxx:10080/git/default.git", >> >> "repoUsername": "user" >> >> } >> >> ] >> >> } >> >> >> >> *From:* Manula Chathurika Thantriwatte [mailto:manu...@wso2.com] >> *Sent:* Monday, December 01, 2014 4:20 AM >> *To:* dev@stratos.apache.org >> *Subject:* [Discuss] Groups and Application JSON formats in Stratos 4.1.0 >> >> >> >> Hi All, >> >> >> >> I have started working on $subject. Here I have came up with the more >> readable way of the new groups definition JSON and the application JSON >> format. Both of this support nested group definitions. Below I have listed >> the high level format of the application and group JSON format. >> >> >> >> Application JSON format; >> >> >> >> · applicationId >> >> · alias >> >> · components >> >> · groups >> >> · name >> >> · alias >> >> · min/max >> >> · group scaling enable/disable >> >> · cartridges >> >> · min/max >> >> · subscribable info >> >> · groups >> >> · alias >> >> · min/max >> >> · group scaling enable/disable >> >> · cartridges >> >> · min/max >> >> · subscribable info >> >> · cartridges >> >> · min/max >> >> · subscribable info >> >> · dependencies >> >> · startup order >> >> · termination behavior >> >> · dependent scaling >> >> >> >> Group JSON format; >> >> >> >> · name >> >> · groups >> >> · name >> >> · cartridges >> >> · dependencies >> >> · cartridges >> >> · dependencies >> >> >> >> Below I have listed the sample JSON files as well. >> >> >> >> Application JSON : >> >> >> >> { >> >> "applicationId":"test_app5", >> >> "alias":"myapp5", >> >> "components":{ >> >> "groups":[ >> >> { >> >> "name":"group2", >> >> "alias":"group2alias", >> >> "groupMinInstances":1, >> >> "groupMaxInstances":2, >> >> "isGroupScalingEnabled":"false", >> >> "cartridges":[ >> >> { >> >> "type":"tomcat", >> >> "cartridgeMin":1, >> >> "cartridgeMax":2, >> >> "subscribableInfo":{ >> >> "alias":"alias2", >> >> "autoscalingPolicy":"autoscale_policy_1", >> >> "privateRepo":"true", >> >> "repoPassword":"password", >> >> "repoURL":"http://xxx:10080/git/default.git", >> >> "repoUsername":"user" >> >> } >> >> } >> >> ], >> >> "groups":[ >> >> { >> >> "name":"group1", >> >> "alias":"group1alias", >> >> "groupMinInstances":2, >> >> "groupMaxInstances":5, >> >> "isGroupScalingEnabled":"true", >> >> "cartridges":[ >> >> { >> >> "type":"tomcat1", >> >> "cartridgeMin":1, >> >> "cartridgeMax":2, >> >> "subscribableInfo":{ >> >> "alias":"alias3", >> >> "autoscalingPolicy":"autoscale_policy_1", >> >> "privateRepo":"true", >> >> "repoPassword":"password", >> >> "repoURL":"http://xxx:10080/git/default.git", >> >> "repoUsername":"user" >> >> } >> >> } >> >> ] >> >> } >> >> ] >> >> } >> >> ], >> >> "cartridges":[ >> >> { >> >> "type":"tomcat", >> >> "cartridgeMin":1, >> >> "cartridgeMax":2, >> >> "subscribableInfo":{ >> >> "alias":"alias1", >> >> "autoscalingPolicy":"autoscale_policy_1", >> >> "privateRepo":"true", >> >> "repoPassword":"password", >> >> "repoURL":"http://xxx:10080/git/default.git", >> >> "repoUsername":"user" >> >> } >> >> } >> >> ] >> >> } >> >> } >> >> >> >> Group JSON : >> >> >> >> { >> >> "name":"group2", >> >> "groups":[ >> >> { >> >> "name":"group1", >> >> "cartridges":[ >> >> "tomcat1" >> >> ], >> >> "dependencies":{ >> >> "terminationBehaviour":"terminate-none" >> >> } >> >> } >> >> ], >> >> "cartridges":[ >> >> "tomcat" >> >> ], >> >> "dependencies":{ >> >> "startupOrders":[ >> >> "group1,tomcat" >> >> ], >> >> "terminationBehaviour":"terminate-dependents", >> >> "scalingDependents":[ >> >> "group1,tomcat" >> >> ] >> >> } >> >> } >> >> >> >> Please share your thoughts. >> >> >> >> Thanks ! >> >> >> >> -- >> >> Regards, >> >> Manula Chathurika Thantriwatte >> >> Software Engineer >> >> WSO2 Inc. : http://wso2.com >> >> lean . enterprise . middleware >> >> email : manu...@wso2.com / man...@apache.org >> >> phone : +94 772492511 >> >> blog : http://manulachathurika.blogspot.com/ >> >> >> >> > > > -- > > Udara Liyanage > Software Engineer > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > web: http://udaraliyanage.wordpress.com > phone: +94 71 443 6897 > -- Lakmal Warusawithana Vice President, Apache Stratos Director - Cloud Architecture; WSO2 Inc. Mobile : +94714289692 Blog : http://lakmalsview.blogspot.com/