Diego A.
Diego A.

Reputation: 85

Access CF service without running app

Our CF hosted application (java) has crashed because of a database issue. The database service (mariaDB) is still running but I cannot connect to it using my service key and ssh because the app is down. Is there any way to access a service on cloud foundry directly without having a running app?

I cannot get the app running again, because I cannot access the DB, and I cannot access the DB because the app is down. You see the problem. We are using Swisscom's CF.

Upvotes: 3

Views: 470

Answers (2)

Diego A.
Diego A.

Reputation: 85

My findings coincide with @SandroMathys. We created an "empty" proxy-app borrowing from this guide: https://github.com/swisscom/docs-appcloud-service-offerings/blob/master/migrate-mariadb-to-mariadbent.html.md.erb

The gist of it is:

$ git clone https://github.com/swisscom/cf-default-app-staticfile.git
$ cd cf-default-app-staticfile
$ cf push proxy-app --no-route

Afterwards:

  • bind "proxy-app" to your service (e.g. database)
  • create a service key
  • use cf ssh as usual to open up a tunnel and access the service

Upvotes: 2

Sandro Mathys
Sandro Mathys

Reputation: 474

Unfortunately, there's no other way. However, you can bind several apps to the same service instance, so you could temporarily push a small dummy app.

Upvotes: 1

Related Questions