0

I understand this might be an easy solution, but I am very new to this so any help would be appreciated.

I have been running through the hello world application for node.js with managed vms on google compute engine, and I have just done this stage

gcloud preview app deploy app.yaml --promote

Which has allowed me to put up the app, and it works.

BUT HOW do I now update that code? If I run that command again it starts up new instances and essentially treats it like a new upload.

jthawme
  • 223
  • 1
  • 10

2 Answers2

0

You can deploy the updated version of your app by running the same command you used to deploy the app the first time, as indicate in this article:

If you update your app, you can deploy the updated version by entering the same command you used to deploy the app the first time. The new deployment creates a new version of your app and promotes it to the default version. The older versions of your app remain, as do their associated VM instances. Be aware that all of these app versions and VM instances are billable resources. For information about deleting or stopping your VM instances, see Cleaning up.

Faizan
  • 1,937
  • 13
  • 18
  • Wow so I guess there is actually no way to just update a build. It must require me to start a new instance and manually stop and delete the old instances to stop them from being billable? – jthawme Jan 08 '16 at 10:38
0

Just in case anyone found this question looking for the same information, I finally seemingly worked out how to do it.

You need to attach the --version flag when you are deploying, instead of using --promote.

You can find the default version in google cloud console, by going menu (burger icon) -> app engine -> versions and you will see in that list one item with (default) by it.

so then when deploying put that version string after --version and it will deploy without needlessly creating new things

jthawme
  • 223
  • 1
  • 10