Can I read credentials using VMC, When I create a new service in Cloud Foundry?
Asked
Active
Viewed 771 times
3 Answers
1
No, there is no such functionality in vmc (or any other cloudfoundry deploy tool). What you can do is log the contents of the environmental variable in a server startup listener (depending on the technology you are using) and afterwards read the log using the logs or files command

dimcookies
- 1,930
- 7
- 31
- 37
0
If you are using Micro Cloud Foundry, then you can just SSH to the instance. Then you can see the credentials. I found this useful while developing (even when the eventual target is cloudfoundry.com).
For example:
less /var/vcap/data/dea/apps/JASPERREPORTS-SERVER-CE-0-f8799b0219bcd5e34a623c42bb5d23d8/env.log:
VMC_APP_HOST=127.0.0.1
VMC_APP_NAME=JASPERREPORTS-SERVER-CE
...
HOME=/var/vcap/data/dea/apps/JS-CE-0-f8799b0219bcd5e34a623c42bb5d23d8
no_proxy=.jaspersoft.cloudfoundry.me,127.0.0.1/8,localhost
HTTP_PROXY=
VMC_SERVICES=[{"name":"JasperServerDatabase","type":"database","vendor":"mysql","version":"5.1","tier":"free","options":{"name":"d4114c574d54145779f1e5575c306d4c7","hostname":"127.0.0.1","host":"127.0.0.1","port":3306,"user":"uxGQbYtPse5yE","username":"uxGQbYtPse5yE","password":"dOolhjtW7ZA4t"}}]
...

mdahlman
- 9,204
- 4
- 44
- 72
0
I was able to use the "cf tunnel" command to get info about a newly created service.

Bhagwad Jal Park
- 1,093
- 1
- 13
- 22