我可以只更新app.yaml文件而无需上传所有项目 [英] Can I update only app.yaml file without uploading all project

查看:231
本文介绍了我可以只更新app.yaml文件而无需上传所有项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用App Engine Flexible env时是否有更新选定文件的方法?

每当我在app.yaml文件中做一个小改动时,我都会遇到一个问题:为了测试它,我需要部署整个应用程序,需要大约5分钟。

有没有办法只更新配置文件?或者有没有办法在本地测试这些文件。



谢谢!

解决方案

strong> no ,因为flex env docker映像需要更新,无论这些更改有多细小,请参阅



然而,可能要试一试(YMMV)。



App Engine灵活环境
$ b



  • 您始终拥有对Compute Engine VM实例的root访问权限。在灵活环境中对虚拟机实例的SSH访问被
    默认禁用。如果您选择,您可以启用对应用程序VM
    实例的根访问权。


因此,您可以在GAE实例VM上以root身份登录,并尝试手动修改特定的应用程序工件。当然,你需要先找到神器。



甚至虚拟机映像本身甚至不会出现 。但是它应该可以在不更新Docker镜像的情况下更新这些工件,因为它们不是Flex env服务本身的一部分。



其他工件可能是只读的,它可能不能将它们更改为读写。



即使可能,这种手动更改也是不稳定的,它们无法在实例重新加载(这将使用未修改的 docker镜像)时存活,某些更改可能需要 生效。



很多可能,很多风险(手动摆弄应用程序代码会对其功能产生负面影响),由您决定是否尝试是非常值得的。

更新:看起来这实际上是记录和支持的,请参阅


Is there a way to update selected files when using the App Engine Flexible env?

I'm facing an issue whenever I do a small change in the app.yaml file: to test it I would need to deploy the whole application which takes ~5mins.

Is there a way to update only the config file? OR is there a way to test these files locally.

Thanks!

解决方案

The safe/blanket answer would be no as the flex env docker image would need to be updated regardless of how tiny the changes are, see How can I speed up Rails Docker deployments on Google Cloud Platform?

However, there might be something to try (YMMV).

From App Engine Flexible Environment:

  • You always have root access to Compute Engine VM instances. SSH access to VM instances in the flexible environment is disabled by default. If you choose, you can enable root access to your app's VM instances.

So you might be able to login as root on your GAE instance VM and try to manually modify a particular app artifact. Of course, you'd need to locate the artifact first.

Some artifacts might not even be present in the VM image itself (those used exclusively by the GAE infra, queue definitions, for example). But it should be possible to update these artifacts without updating the docker image, since they aren't part of the flex env service itself.

Other artifacts might be read-only and it might not be possible to change them to read-write.

Even if possible, such manual changes would be volatile, they would not survive an instance reload (which would be using the unmodified docker image), which might be required for some changes to take effect.

Lots of "might"s, lots of risks (manual fiddling with the app code could negatively impact its functionality), up to you to determine if a try is really worthy.

Update: it seems this is actually documented and supported, see Accessing Google App Engine Python App code in production

这篇关于我可以只更新app.yaml文件而无需上传所有项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆