I've the existing Google Cloud project that was created by Firebase and use Firestore in this project. Decided to try AppEngine and run Hello World Example in this project.
Now I want to delete this newly deployed AppEngine Service, but there are 2 problems:
1) Hello World Docs suggest to switch off the AppEngine. In this case Firestore is not working
2) Can't delete this service from CLI/UI as this service was deployed as the default one
Issue deleting service: [default]
The default service (module) cannot be deleted.
Is there a way to delete this service from the project and keep Firebase Firestore?
If there's nothing else on your project, you can shut down the project at https://console.cloud.google.com/iam-admin/settings .
As it's displayed in the UI on disabled Stop button:
You only can stop versions that are manually scaled, basic scaled or in flexible environment
The solution is to deploy another default service using flexible env, stop it and then delete the app with Standard env:
1) Change app.yaml:
runtime: nodejs env: flex
2) Run gcloud app deploy
3) Stop new version using UI or CLI
4) Delete old version
2) Can't delete this service from CLI/UI as this service was deployed as the default one
See https://cloud.google.com/nodejs/getting-started/delete-tutorial-resources .
The only way you can delete the default version of your App Engine app is by deleting your project. However, you can stop the default version in the GCP Console. This action shuts down all instances associated with the version. You can restart these instances later if needed. In the App Engine standard environment, you can stop the default version only if your app has manual or basic scaling.
tl;dr: Deploy a hello world app on the flexible environment to replace the default service, and then stop it. No need to delete because the default service cannot be deleted.
I assume that:
Problems that arise:
Workaround:
Deploy a hello world application to the flexible environment. You can do this in Google Cloud Shell.
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples cd nodejs-docs-samples/appengine/hello-world/flexible gcloud app deploy
Under Versions , stop the newly-deployed version and delete the old version.
Confirm that the instance count is 0.
So the service is not deleted; it is just stopped and doesn't charge you for instances. You can continue to use Firestore.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.