Hi Lasindu, I think your question is about using LB properties (IP, port, hostname) inside the cartridge instance. We can pass those parameters in the cartridge definition as payload parameters as a simple solution. We can also publish those information in meta-data service as well. Publishing to meta-data service will be more flexible since we can easily update those values without having to redeploy cartridges etc.
Regarding Kubernetes scenario, we need to have an external LB which would forward requests to all the upstream minion instances. Then use that external LB within all pods (services can be differentiated through different hsotnames) This is just my suggestion. Perhaps there is a better way. Thanks. On Sun, Aug 16, 2015 at 8:05 AM, Lasindu Charith <lasi...@wso2.com> wrote: > Hi devs, > > Suppose I configured an external LB such as Nginx, HAproxy etc. Now I need > to use it in my Stratos application. > > Previously in 4.0.0 there was a LB property in Cartridge definition[1 > <https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Cartridge+Definition>], > but seems like it's not there anymore in 4.1.0[2 > <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition>] > or in [3 > <https://github.com/apache/stratos/blob/master/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java> > ]. > > "loadBalancer":{ > "type":"lb", > "property":{ > "name":"default.load.balancer", > "value":"true" > } > } > > Some product configurations needs LB ip/port and in UI too we should show > the LB IP along with the proxy port as the Access URL. Is there a way to do > this? > > In addition, if we are using kubernetes, one of the minion IPs can be(are) > used as a load-balancer. In that case, how do we decide which IP to use? > (say we have 3 minions and service can be accessed using any of the 3 > minion IPs : kubernetes service port) > > > [1] > https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Cartridge+Definition > [2] > https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition > [3] > https://github.com/apache/stratos/blob/master/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java > > Thanks, > -- > *Lasindu Charith* > Software Engineer, WSO2 Inc. > Committer & PMC Member, Apache Stratos > Mobile: +94714427192 | Web: blog.lasindu.com > -- Akila Ravihansa Perera WSO2 Inc.; http://wso2.com/ Blog: http://ravihansa3000.blogspot.com