2

I want to deploy a change in my app.yaml file to google app engine. Is there a simple way to do this without redeploying the whole app? Is there a way of changing the app.yaml file on the google cloud directly? Or just deploying one file from my Windows directory?

My app is working fine in the virtual environment but I'm having some issues on the google cloud platform. The whole deploying process takes quite a while so I'm looking for a faster way to make a change and test it.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
dbill
  • 21
  • 5
  • 1
    Possible duplicate of [Copy specific project files to Google App Engine](https://stackoverflow.com/questions/45655134/copy-specific-project-files-to-google-app-engine) – Dan Cornilescu Dec 06 '17 at 16:53
  • Also potentially relevant: https://stackoverflow.com/questions/40552820/can-i-update-only-app-yaml-file-without-uploading-all-project/40553354#40553354 – Dan Cornilescu Dec 06 '17 at 16:57
  • There is a similar question: [Can I update only app.yaml file without uploading all project](https://stackoverflow.com/questions/40552820/can-i-update-only-app-yaml-file-without-uploading-all-project) You can read this. – Roy Yin Dec 08 '17 at 20:05

2 Answers2

0

You can use appcfg.py update app.yaml from AppEngine Python SDK:

https://cloud.google.com/appengine/docs/standard/python/tools/appcfg-arguments#update

Use the files argument to upload one or more YAML files that define modules. No other types of YAML files can appear in the command line. Only the specified modules will be updated.

Alexander Trakhimenok
  • 6,019
  • 2
  • 27
  • 52
  • But isn't that how the service/app is (re)deployed? – Dan Cornilescu Dec 06 '17 at 17:31
  • Thanks for the information. However, I'm using the App Engine flexible environment and appcfg.py seems to be for the standard environment. I tried using the equivalent for the flexible environment (gcloud app deploy app.yaml) but it still did a full deploy. – dbill Dec 07 '17 at 16:42
0

You can try using gcloud app deploy inside the directory where your application is located in order to upload the file you need.

Specifying no files with the command deploys only the app.yaml file of a given service.

This command will only upload to the cloud the files where there are changes, so if you have only modified the app.yaml file, it should not take too much time for the upload. However, as that is the configuration file of your application, it might need to be re-deployed completely, as the changes made in that file might affect the behaviour of the whole app. That is the reason why it might be taking longer than expected.

On the other side, you may want to know that if you are using App Engine Flexible environment, the deployment will always be slower than in a Standard environment, as resources have to be deployed before launching the application itself.

dsesto
  • 7,864
  • 2
  • 33
  • 50
  • Thanks for your comments. There doesn't seem to be any short cuts here. The 'gcloud app deploy' is what I was using all along and it takes about 10 minutes.Even with only a app.yaml change it still takes about the about the same amount of time for a deploy. – dbill Dec 07 '17 at 16:46