Re: How to get the IP port list of the garden containers in a cluster?


Amit Kumar Gupta
 

Hi Malmee,

Typically, different cells will win different instances of your 5 tomcat
servers, so you might have 5 different cells each running 1 tomcat server.
This makes your application more fault-tolerant, so that if one of the
cells die, you don't lose all 5 running tomcat servers, you lose maybe just
1.

You may not need to know the IP and port? If you do "cf push my_app -d
some.domain -n some-host" then (assuming you have DNS set up correctly),
Cloud Foundry will automatically load balance traffic to
http://some-host.some.domain across all 5 of your tomcat instances. The
IPs are generally dynamic, as your servers might be moved around the
various Cells over time (e.g. when Cells are rolled for regular
maintenance, your servers are rescheduled elsewhere). Also, when you
update the source for your application, not only will the servers
potentially start on totally different cells, but the internal identifiers
for your application will change, so whatever query you make for getting
your app's IPs and ports would have to change as well. Do you actually
need the IPs and ports?

Best,
Amit

On Sun, Feb 28, 2016 at 4:21 AM, Malmee Weerasinghe <malmee(a)wso2.com> wrote:

Hi,
I am a newbie to Cloud Foundry as well as to PaaS. I have gone through
Cloud Foundry documentation, but could not figure our this.

If we want to deploy 5 tomcat servers in Cloud Foundry with diego
architecture, the request of "Deploy 5 tomcat servers in Cloud Foundry"
will be transmitted from Cloud Controller to the CC bridge, where the
request will get turned to a LRP and be submitted to the BBS. BBS will
submit this task to the Auctioneer and the winning cell through the auction
will handle the task.

The Executer in the cell will create 5 garden containers and a tomcat
server will be run in each container. How to access the IP Port list of
these 5 containers? Are these IP ports saved in BBS or in Consul?

Your response regarding this is highly appreciated.

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.