2

Every time I deploy to Google's Managed VM service, the console automatically creates a duplicated instance. I am up to 15 instances running in parallel. I even tried using the command:

gcloud preview app deploy "...\app.yaml" --set-default

I tried doing some research and it looks like even deleting these duplicated instances can be a pain. Thoughts on how to stop this duplication?

Community
  • 1
  • 1
Aaron Yan
  • 156
  • 1
  • 5

1 Answers1

5

You can deploy over the same version each time:

gcloud preview app deploy "...\app.yaml" --set-default --version=version-name

This will stop creating VMs.

Zachary Newman
  • 20,014
  • 4
  • 39
  • 37
  • Thanks! I'll give it a shot. Do you know how to delete the instances? I've tried through the console, shell, and the another user's [recommendation](http://stackoverflow.com/questions/28883900/how-to-permanently-delete-google-managed-vms) with no luck. – Aaron Yan Jul 18 '15 at 23:54
  • Hm...I just tried and was able to successfully delete a GCE instance created by deploying a GAE MVM after I deleted the GAE instance associated with it. Have you deleted the instances under "App Engine > Versions" first? I know the way AppEngine MVMs are handled is a little buggy right now. (Sorry for the alphabet soup of acronyms!) – Zachary Newman Jul 20 '15 at 14:52
  • That did it! deleting the versions ("App Engine > Versions") and then the instances ("Compute Engine > VM Instances") stops them from being spun up again! Appreciate the help. Great solutions! – Aaron Yan Jul 20 '15 at 15:16
  • how to delete the version which is set as default version? – Abdul Manaf Jan 20 '16 at 11:13