Re: How does an application know it's running in DIEGO?


Matt Cholick
 

Your mileage may vary, but if you look at the full processes's environment
there are differences. In our case, we'll see things like the ssh port in
the diego environment but not the DEA, as well as INSTANCE_INDEX. On the
flip side, the deprecated VCAP_APP_PORT is present when we deploy apps to
DEA but not Diego.

-Matt

On Mon, Feb 1, 2016 at 9:05 AM, Dieu Cao <dcao(a)pivotal.io> wrote:

Hi Jack,

There are not any explicit environment variables that we expose that an
app is running on DEAs or on Diego.
My best suggestion here would be to set an environment variable explicitly
and trigger your agent's behavior based on that.

-Dieu

On Mon, Feb 1, 2016 at 8:48 AM, Kris Hicks <khicks(a)pivotal.io> wrote:

You can use the CF CLI with the Diego-Enabler plugin to query whether an
application is running on Diego or not:
https://github.com/cloudfoundry-incubator/Diego-Enabler

e.g. `cf has-diego-enabled App_Name`

On Mon, Feb 1, 2016 at 7:25 AM, Jack Cai <greensight(a)gmail.com> wrote:

Hi,

Is there a way for the application to know whether it's running in DEA
or DIEGO? Looking at [1], there is no environment variable that can tell
this.

Jack

[1]
https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html

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