cloudfoundry/cloud_controller_ng — pull request #298 by resouer (2014-09-23 08:34:49+00:00)
Title: Add public host in cc

Related issue: https://github.com/cloudfoundry/cloud_controller_ng/issues/295

The main idea is that in some network env (like in Docker containers which run across multiple physical servers), there're two different IPs which we can refer as private IP and public IP. The private IP is used for CC to listen & bind, and the public IP is used by other peers to connect to CC. Public IP is fixed, unlike private IP, you need to specify the CC's IP in the config file of peers to let them know.

Then here's the problem: CC generate the private IP by usinig local_ip method and there's no configurable public ip for CC, thus CC register its private IP to router which is unreachable by its peers. It is the same with blobstore URL generator.

So I opened a issue to fix this and we both agree that a PR will make things much clear, here we go.