Getting the Internal IPs of the Applicatiom Container Before the Application State become RUNNING


Isuru Haththotuwa <isurulucky@...>
 

Hi all,

I'm working on a clustering mechanism for a specific java server that are
running on CF. The requirement is, before this server is started, it needs
a list of IPs + ports of the other instances that should cluster together.
I had a look at the CF API, specially at the /v2/apps/:guid/instances API
[1] endpoint. But it only return the IPs and ports of applications which
are in the RUNNING state. Is there a way to get the IPs of an Application
regardless of the state its in?

Also, as per the docs, CF_INSTANCE_IP is the external IP of the host in
which the container is running. Similarly, is there a way to get the
internal IP (and maybe the internal port as well) of a container, from the
container itself?

[1].
https://apidocs.cloudfoundry.org/237/apps/get_the_instance_information_for_a_started_app.html

[2].
http://docs.run.pivotal.io/devguide/deploy-apps/environment-variable.html#CF-INSTANCE-IP

--
Thanks and Regards,
Isuru

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