What?

Your applications run on Diego Cells, which create containers for each of your application instances. One of the features of Diego (the new CF Runtime) versus DEAs (the original Runtime) is that you have the ability to SSH into the containers for debugging purposes.

How?

  1. Run cf ssh dorato begin a secure connection to the SSH server for your app.
  2. Run ls -l to view files and cd SOME-DIRECTORY-PATH to move around the directory tree.
  3. Use the ps aux command to see what processes are running in the app container.
  4. Run env to view environment variables. You’ll see there are additional environment variables that the cf CLI doesn’t print, but that are available to your application. The full list of variables can be viewed here.
  5. Run exit, then SSH back into a specific instance of your app, using the -i SOME-APP-INDEX flag (when you run cf app dora you’ll see the indexes of the instances displayed in turquoise to the left of their information). View the cf CLI SSH flags to see what else is possible.

TRIVIA: did you notice that you’re SSH-ed in as the vcap user? VCAP stands for “VMware’s Cloud Application Platform,” an old name for Cloud Foundry. Catchy, right?

Resources

Docs: Differences Between DEA and Diego Architectures Blog post: Demystifying Cloud Foundry’s Diego Unix/Linux StackExchange: What does aux mean in ps aux?