sap-tutorials / Issues

Creative Commons Attribution 4.0 International
8 stars 5 forks source link

Undeploy Your Multi-Target Application (MTA) #672

Closed dszortyka closed 2 years ago

dszortyka commented 2 years ago

Tutorials: https://developers.sap.com/tutorials/btp-app-undeploy-cap-application.html And also: https://github.com/SAP-samples/multi-cloud-html5-apps-samples/tree/main/standalone-approuter-html5-runtime The application was deployed using the second tutorial, while the undeploy following the first instructions.

With the instructions to undeploy the application, the html5 repo_host and repo_runtime keep in the system. Is there any way to delete everything that was deployed with the mtar ?

$ cf undeploy approuter_html5 ... Detaching service "html5_repo_runtime" from MTA... Detaching service "html5_repo_host" from MTA... Process finished.

But then, a simple cf services shows this:

$ cf services html5_repo_host html5-apps-repo app-host html5_repo_runtime html5-apps-repo app-runtime

Deleting the service keys, etc.

`$ cf service-keys html5_repo_host name html5_deployer-html5_repo_host-credentials

$ cf delete-service-key html5_repo_host html5_deployer-html5_repo_host-credentials

Really delete the service key html5_deployer-html5_repo_host-credentials?> y Deleting key html5_deployer-html5_repo_host-credentials for service instance html5_repo_host as OK

$ cf delete-service html5_repo_host

Really delete the service html5_repo_host?> y Deleting service html5_repo_host in org 123 / space dev as OK

$ cf delete-service html5_repo_runtime

Really delete the service html5_repo_runtime?> y Deleting service html5_repo_runtime in org 123 / space dev as ... OK `

Am I missing any information to fully undeploy the artifacts/apps/services/keys that were just deployed all together?

Thanks, -Daniel

slavipande commented 2 years ago

Hi @dszortyka,

Thanks for your feedback!

The first tutorial you mention has a second tab with a command you can use to fully undeploy the artifacts. Here's a screenshot for context: 2021-10-20_13-05-59

Here's also the command itself: cf undeploy cpapp --delete-service-keys --delete-services, where you should replace cpapp with your app name.

Hope this helps.

We'll also be adjusting the structure of the page a little bit so the information is easier to find in the future.

Thanks and regards, Svetoslav

dszortyka commented 2 years ago

You are right! Somehow I did not see the second tab and everything I needed was there. Thanks for taking time and providing help on this.