Hi Reka,

Here, I am replying separately on the subject of the sample groups pointed to. 
There are several things I notice:


·        None of the samples illustrate any of the Group or Deployment policy 
options. Is it really the case that no autoscaling or min/max rules are needed 
at all?

·        All of the examples are fully flattened sets of groups, Where is the 
reusability in that? If the only thing that can be reused is the complete 
nested set, that is a pretty limited thing and I really don’t understand why 
the Cartridge Group is even separate from an Application. [2]

·        What is the groupScalingEnabled flag for? I thought we got rid of that 
a long time ago? [1]

·        AFAICS, none of the examples show a startup ordering involving a 
group. My understanding is that this is supported using “group.xyz” syntax, 
right? [2]

·        AFAICS, none of the examples show a startup ordering as an list of 
lists? [3]

·        ISTR that each group and each cartridge used to require an “alias”. Is 
that no longer needed?

·        Many of the example, e.g. esb-php-group.json show startup ordering 
using names not in the example? Are these really supposed to work?


{
    "name": "esb-php-group",
    "groupScalingEnabled": "true",
    "cartridges": [
        "esb",
        "php"
    ],
    "dependencies": {
        "startupOrders": [
            "cartridge.my-esb,cartridge.my-php"
        ],
        "terminationBehaviour": "terminate-none"
    }
}


Please advise.

Thanks, Shaheed

[1] Group Scaling & Dependent Scaling Behaviours
[2] Summary of Composite Application Definition with Reference to Deployed 
Service Groups discussion
[3] Dcoumentation for Cartridge Group Definition and Application Definition?

From: Reka Thirunavukkarasu [mailto:[email protected]]
Sent: Tuesday, March 17, 2015 7:17 PM
To: dev
Subject: Re: What is a Cartridge Group in Stratos 4.1.0?

Hi Shaheedur,
Cartridge group used to specify what are the cartridges/groups need to be 
grouped together and the behavior among the children of that group. That's how 
we have grouped the cartridge/groups together. The behaviors of a group can be 
startupDependency, termiation Behaviour and scale dependents. When you decide 
that a bunch of cartridges can be grouped together based on their 
functionality, you can define a group and specify these behaviors. This 
behavior will be specified in a cartridge group w.r.t the children of that 
group. Please note that since we have recursive group support, you can define a 
cartridge group inside a cartridge group as well as i mentioned earlier.
Why we have defined separate cartridge  group definition rather than directly 
defining cartridge group inline in the application is that the re-usability. If 
you define a cartridge group definition, then it can be used in multiple 
application. In that case, if you are to have a group in your application, you 
will have to define at-least one cartridge group definition by having these 
behaviors in recursive manner.
Then you can use that cartridge group in your application and provide dynamic 
information such as alias, how many group instances and etc (these i believe 
dynamic information which can be differed from application to application).
You can find sample carriage groups in 
https://github.com/apache/stratos/tree/master/samples/cartridges-groups

Thanks,
Reka

On Tue, Mar 17, 2015 at 11:38 AM, Shaheedur Haque (shahhaqu) 
<[email protected]<mailto:[email protected]>> wrote:
Reposting to main mailer…

From: Shaheedur Haque (shahhaqu)
Sent: Tuesday, March 17, 2015 10:29 AM
To: [email protected]<mailto:[email protected]>
Subject: What is a Cartridge Group in Stratos 4.1.0?

Hi,

I am trying to define the application shown below, but am getting this 
exception:

TID: [0] [STRATOS] [2015-03-17 10:09:21,282] ERROR 
{org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver} -  Cartridge group 
not found: [group-name] blade-0x0
java.lang.RuntimeException: Cartridge group not found: [group-name] blade-0x0
        at 
org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser.parseGroups(DefaultApplicationParser.java:563)
        at 
org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser.buildCompositeAppStructure(DefaultApplicationParser.java:315)
        …

I’d not heard of a cartridge group, so I Iooked in  
https://docs.google.com/document/d/1AYLAAXySvh24JZw0NQixlKg4yX8jqD3Vtc_Pz-zmHaw,
 only to see a (new?) reference to such an object, with no data. I eventually 
found 
https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Sample+Cartridge+Group+Definition.
 However, ignoring the obvious errors/obsolete items, this seems completely 
redundant w.r.t to the Application definition. So what is this object for? How 
do I get rid of the error?

Thanks, Shaheed

P.S. This is the Application, note that “blade-0x0” is in the outermost group, 
and the output is sorted by key:

{
    "application_template_id": "system",
    "components": {
        "cartridges": [],
        "groups": [
            {
                "alias": "blade-0x0",
                "cartridges": [
                    {
                        "cartridgeMax": 10,
                        "cartridgeMin": 1,
                        "subscribableInfo": {
                            "alias": "cartridge1-1x0",
                            "artifactRepository": {
                                "privateRepo": true,
                                "repoPassword": "c-policy-2",
                                "repoUrl": "http://xxx:10080/git/default.git";,
                                "repoUsername": "user"
                            },
                            "autoscalingPolicy": "economyPolicy",
                            "deploymentPolicy": "static-1"
                        },
                        "type": "cartridge1"
                    },
                    {
                        "cartridgeMax": 10,
                        "cartridgeMin": 1,
                        "subscribableInfo": {
                            "alias": "cartridge2-1x0",
                            "artifactRepository": {
                                "privateRepo": true,
                                "repoPassword": "c-policy-2",
                                "repoUrl": "http://xxx:10080/git/default.git";,
                                "repoUsername": "user"
                            },
                            "autoscalingPolicy": "economyPolicy",
                            "deploymentPolicy": "static-1"
                        },
                        "type": "cartridge2"
                    }
                ],
                "groups": [
                    {
                        "alias": "slice-1x0",
                        "cartridges": [
                            {
                                "cartridgeMax": 10,
                                "cartridgeMin": 1,
                                "subscribableInfo": {
                                    "alias": "cartridge-proxy-2x0",
                                    "artifactRepository": {
                                        "privateRepo": true,
                                        "repoPassword": "c-policy-1a",
                                        "repoUrl": 
"http://xxx:10080/git/default.git";,
                                        "repoUsername": "user"
                                    },
                                    "autoscalingPolicy": "economyPolicy",
                                    "deploymentPolicy": "static-1"
                                },
                                "type": "cartridge-proxy"
                            },
                            {
                                "cartridgeMax": 10,
                                "cartridgeMin": 1,
                                "subscribableInfo": {
                                    "alias": "cisco-sample-vm-2x0",
                                    "artifactRepository": {
                                        "privateRepo": true,
                                        "repoPassword": "c-policy-1b",
                                        "repoUrl": 
"http://xxx:10080/git/default.git";,
                                        "repoUsername": "user"
                                    },
                                    "autoscalingPolicy": "economyPolicy",
                                    "deploymentPolicy": "static-1"
                                },
                                "type": "cisco-sample-vm"
                            }
                        ],
                        "groups": [],
                        "max": 1,
                        "min": 1,
                        "name": "slice-1x0"
                    }
                ],
                "max": 2,
                "min": 1,
                "name": "blade-0x0"
            }
        ]
    }
}





--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007<tel:%2B94776442007>

Reply via email to