You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Manula Chathurika Thantriwatte <ma...@wso2.com> on 2014/12/01 13:19:42 UTC

[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 : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Martin,

On Mon, Dec 1, 2014 at 10:04 PM, Martin Eppel (meppel) <me...@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?
>
 IMHO this format is more readable and clear. AFAIK, we used the previous
format to reduce the complexity of the JSON definition and make it less
nested. This made the parsing logic complex, made the application
definition less intuitive and less readable. In real world, we might rarely
come across situations where we need more than one or two levels of
recursion (nested groups). Therefore, +1 from me for this change.

>
>
> 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:manulac@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 : manulac@wso2.com / manula@apache.org
>
> phone : +94 772492511
>
> blog : http://manulachathurika.blogspot.com/
>
> --
> <http://manulachathurika.blogspot.com/>
> Thanks and Regards,
>
> Isuru H.
> <http://manulachathurika.blogspot.com/>
> +94 716 358 048 <http://manulachathurika.blogspot.com/>*
> <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Nirmal Fernando <ni...@gmail.com>.
Great.. thanks.

On Wed, Dec 3, 2014 at 7:56 AM, Lakmal Warusawithana <la...@wso2.com>
wrote:

>
>
> On Wed, Dec 3, 2014 at 7:50 AM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> deploymentPolicy doesn't require anymore, under subscribableInfo element
>> right?
>>
>>
> Yes correct.
>
>
>
>> On Tue, Dec 2, 2014 at 9:56 AM, Manula Chathurika Thantriwatte <
>> manulac@wso2.com> wrote:
>>
>>> Hi Martin,
>>>
>>> As Udara and Lakmal mentioned, it's easy for the readability. Otherwise
>>> we have to scroll up and down to find out the subscribe info about the
>>> particular cartridge. When the JSON get large it's difficult.
>>>
>>> Thanks !
>>>
>>>
>>> On Tue, Dec 2, 2014 at 9:34 AM, Lakmal Warusawithana <la...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> 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) <
>>>>> meppel@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:manulac@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 : manulac@wso2.com / manula@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/
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Manula Chathurika Thantriwatte
>>> Software Engineer
>>> WSO2 Inc. : http://wso2.com
>>> lean . enterprise . middleware
>>>
>>> email : manulac@wso2.com / manula@apache.org
>>> phone : +94 772492511
>>> blog : http://manulachathurika.blogspot.com/
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Lakmal Warusawithana
> Vice President, Apache Stratos
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog : http://lakmalsview.blogspot.com/
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Lakmal Warusawithana <la...@wso2.com>.
On Wed, Dec 3, 2014 at 7:50 AM, Nirmal Fernando <ni...@gmail.com>
wrote:

> deploymentPolicy doesn't require anymore, under subscribableInfo element
> right?
>
>
Yes correct.



> On Tue, Dec 2, 2014 at 9:56 AM, Manula Chathurika Thantriwatte <
> manulac@wso2.com> wrote:
>
>> Hi Martin,
>>
>> As Udara and Lakmal mentioned, it's easy for the readability. Otherwise
>> we have to scroll up and down to find out the subscribe info about the
>> particular cartridge. When the JSON get large it's difficult.
>>
>> Thanks !
>>
>>
>> On Tue, Dec 2, 2014 at 9:34 AM, Lakmal Warusawithana <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> 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) <
>>>> meppel@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:manulac@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 : manulac@wso2.com / manula@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/
>>>
>>>
>>
>>
>> --
>> Regards,
>> Manula Chathurika Thantriwatte
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>> lean . enterprise . middleware
>>
>> email : manulac@wso2.com / manula@apache.org
>> phone : +94 772492511
>> blog : http://manulachathurika.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Lakmal Warusawithana
Vice President, Apache Stratos
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Nirmal Fernando <ni...@gmail.com>.
deploymentPolicy doesn't require anymore, under subscribableInfo element
right?

On Tue, Dec 2, 2014 at 9:56 AM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi Martin,
>
> As Udara and Lakmal mentioned, it's easy for the readability. Otherwise we
> have to scroll up and down to find out the subscribe info about the
> particular cartridge. When the JSON get large it's difficult.
>
> Thanks !
>
>
> On Tue, Dec 2, 2014 at 9:34 AM, Lakmal Warusawithana <la...@wso2.com>
> wrote:
>
>>
>>
>> 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) <meppel@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:manulac@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 : manulac@wso2.com / manula@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/
>>
>>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Martin,

As Udara and Lakmal mentioned, it's easy for the readability. Otherwise we
have to scroll up and down to find out the subscribe info about the
particular cartridge. When the JSON get large it's difficult.

Thanks !


On Tue, Dec 2, 2014 at 9:34 AM, Lakmal Warusawithana <la...@wso2.com>
wrote:

>
>
> 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) <me...@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:manulac@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 : manulac@wso2.com / manula@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/
>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Lakmal Warusawithana <la...@wso2.com>.
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) <me...@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:manulac@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 : manulac@wso2.com / manula@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/

Re: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by Udara Liyanage <ud...@wso2.com>.
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) <me...@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:manulac@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 : manulac@wso2.com / manula@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

RE: [Discuss] Groups and Application JSON formats in Stratos 4.1.0

Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
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:manulac@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 : manulac@wso2.com<ma...@wso2.com> / manula@apache.org<ma...@apache.org>
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/