No, you can't use default loadbalancer for that default lb is created per a n/w partition regardless of the cartridge type.
On your requirement, we don't have it currently AFAIR, and it's a future improvement. The setting I sent earlier can be used to spin a LB per a Cartridge aka service. On Tue, Apr 22, 2014 at 8:06 PM, Akila Ravihansa Perera <[email protected]> wrote: > Hi Nirmal, > > If I set service.aware.load.balancer to 'true' then wouldn't it cause > Stratos to use a single load balancing cluster for all mongodb > cartridge subscriptions? > I want to spawn separate load balancers for each mongodb cartridge > subscription. > > I got to know that, this can be done by setting lb type field in load > balancer json. For eg - > > "loadBalancer":{ > "type":"mongolb", > "property":{ > "name":"default.load.balancer", > "value":"true" > } > > > This mongolb type load balancer has to be deployed first with > something like this; > > { > "type": "lb", > "provider": "lb", > "loadBalancer": { }, > > "iaasProvider": [ > { > "type": "openstack", > "imageId": "RegionOne/0b8cf058-03a6-4bf2-95bb-bce891acdc5e", > "maxInstanceLimit": "1", > "property": [ > { > "name": "instanceType", > "value": "RegionOne/11cd27d4-46c8-48dc-bf15-785120012691" > }, > { > "name": "keyPair", > "value": "devstack" > } > ] > } > ] > > "property": [ > { > "name": "load.balancer", > "value": "true" > } > ] > } > > Pl confirm whether this approach is correct. Thanks. > > On Tue, Apr 22, 2014 at 7:31 PM, Nirmal Fernando <[email protected]> > wrote: >> Do you want a mongo-db cartridge specific lb? Then you need to add a >> Cartridge property called "service.aware.load.balancer" and set it to >> true. @Mari Do we have this info in wiki? >> >> On Tue, Apr 22, 2014 at 5:54 PM, Akila Ravihansa Perera >> <[email protected]> wrote: >>> Hi, >>> >>> I'm trying to deploy a cartridge with a custom load balancer. I have created >>> an image of this custom load balancer. But how do I point to this in my >>> cartridge definition? >>> >>> This is what I'm trying to do; >>> >>> 1. I need to subscribe to a "mongodb" cartridge (which I have created) >>> 2. I have created a custom load balancer for mongodb (mongos router + mongod >>> config server + Stratos LB + Stratos Agent) >>> 3. I have taken a snapshot of this and created my "mongolb" - mongodb load >>> balancer >>> 4. Now I need to point to this mongolb in my mongodb cartridge definition. >>> >>> I don't want to make this load balancer the default one. Because this custom >>> load balancer (mongolb) will not work for other cartridges -> php, mysql >>> etc. >>> >>> How do I make this work? >>> >>> Thanks. >>> >>> -- >>> Akila Ravihansa Perera >>> Software Engineer >>> WSO2 Inc. >>> http://wso2.com >>> >>> Phone: +94 77 64 154 38 >>> Blog: http://ravihansa3000.blogspot.com >> >> >> >> -- >> Best Regards, >> Nirmal >> >> Nirmal Fernando. >> PPMC Member & Committer of Apache Stratos, >> Senior Software Engineer, WSO2 Inc. >> >> Blog: http://nirmalfdo.blogspot.com/ > > > > -- > Akila Ravihansa Perera > Software Engineer > WSO2 Inc. > http://wso2.com > > Phone: +94 77 64 154 38 > Blog: http://ravihansa3000.blogspot.com -- Best Regards, Nirmal Nirmal Fernando. PPMC Member & Committer of Apache Stratos, Senior Software Engineer, WSO2 Inc. Blog: http://nirmalfdo.blogspot.com/
