Hi Shaeed, On Wed, Mar 18, 2015 at 4:18 PM, Imesh Gunaratne <[email protected]> wrote:
> Hi Shaheed, > > Yes currently it is not possible to define a cartridge group inline in an > application definition. We first need to define the cartridge group in > global level and then refer it in the application. > > We could introduce a new feature to support this in a later release. > > Thanks > > On Wed, Mar 18, 2015 at 3:51 PM, Shaheedur Haque (shahhaqu) < > [email protected]> wrote: > >> OK, thanks for the explanation. In fact, this mirrors exactly my >> original proposal which was to have separate nestable group objects, so I >> like it. >> >> >> >> However, I have now written the code to create a pre-flattened >> Application; are you saying that is NOT supported? So what **exactly** >> can or must an Application contain? >> > Assume that you are asking about defining the group inline. AFAIK, this is not supported yet. Its an improvement that we can add in future. > >> >> *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]> wrote: >> >> Reposting to main mailer… >> >> >> >> *From:* Shaheedur Haque (shahhaqu) >> *Sent:* Tuesday, March 17, 2015 10:29 AM >> *To:* [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 >> >> >> > > > > -- > Imesh Gunaratne > > Technical Lead, WSO2 > Committer & PMC Member, Apache Stratos > > -- > Thanks and Regards, > > Isuru H. > +94 716 358 048* <http://wso2.com/>* > > > * <http://wso2.com/>* > > >
