- Establish the process-guid for the app :
cf curl /v2/apps/$(cf app <app_name> --guid)| jq -r '.metadata.guid + "-" + .entity.version'
b06b2901-2093-4be4-9f37-f7788d04ce8c-ff93f0e2-285f-4f18-a6fc-806802f3dde9
- Find the hosts where the app instances are running
cf curl v2/apps/$(cf app healthwatch-api --guid)/stats | grep host
"host": "10.193.73.14",
"host": "10.193.73.13",
-
Identify the diego cell you want to ssh to by running
bosh vms | grep <cell_ip>
-
bosh ssh
to the diego cell (grab the cell_id from step 3.) -
Once in the diego cell, as root, run the following command to grab the container_guid/instance_guid :
cfdot actual-lrp-groups-for-guid <process_guid_from_step_1> | jq '.instance | select (.address == "<diego_cell_ip>")' | jq .instance_guid
- Run the following command to get access to the container :
/var/vcap/packages/runc/bin/runc exec -t <instance_guid> /bin/bash