Reputation: 1
Database service is running in specific org and space. Two apps are bound to this DB service.
To apply liquibase change from Jenkins to DB service, we need JDBC connection between Jenkins and bosh instance.
Jenkins is outside PCF
How to retrieve IP address of Database service host?
Upvotes: 0
Views: 1039
Reputation: 15006
How to retrieve IP address of Database service host?
Load the hostname from VCAP_SERVICES
and then resolve it. You can use jq
to read VCAP_SERVICES
and pull out the hostname. You can then use dig <hostname>
or host <hostname>
to resolve the hostname. Then you have the IP.
If you're trying to access a service from outside CF, make sure that you have network and firewall access to said service. Network access is often restricted/blocked outside of the CF environment.
Hope that helps!
Upvotes: 1