Hi,

Defining inline improves readability since all subscription information are
in same place, no need to go up and down to see all information.

On Mon, Dec 1, 2014 at 10:04 PM, Martin Eppel (meppel) <[email protected]>
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:[email protected]]
> *Sent:* Monday, December 01, 2014 4:20 AM
> *To:* [email protected]
> *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 : [email protected] / [email protected]
>
> 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

Reply via email to