可以安全删除 asia.artifacts.../containers/images 中的 appengine 文件吗?
Can appengine files in asia.artifacts.../containers/images be safely deleted?
存储桶 asia.artifacts.../containers/images
下的 google 云存储中的 appengine 文件是否可以安全删除而不会造成任何问题。仅仅几年后就已经有 160Gb 了。文档没有明确说明它们的用途,或者为什么将它们保留在那里:
# gsutil du -sh gs://asia.artifacts.<project>.appspot.com
158.04 GiB gs://asia.artifacts.<project>.appspot.com
我只想知道我是否可以删除它们,或者我是否需要继续支付存储费用space。
原本我以为这些文件可能对应于“Google云平台”“Container Registry”“Images”“app-engine-tmp”上可以看到的内容。但是,即使您删除了 Container Registry Web 界面下的几乎所有内容,这个 containers/images
文件夹中仍然有数千个非常旧的文件。
如果我不得不猜测这堆可能是垃圾文件的不断增长的原因。我怀疑如果通过网络界面删除版本,则不会删除基础文件。对吗?
更新:我确实在部署时出现的云构建日志中找到了这条线索。我测试了删除测试项目中的工件桶。该项目仍然有效,并且构建仍然有效。日志中出现一条看似无害的错误消息。也许删除这个 artefacts 文件夹真的很安全。但是,最好在删除之前弄清楚这些古老的(显然未使用过的)人工制品桶文件的用途。
2021/01/15 11:27:40 Copying from asia.gcr.io/<project>/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest to asia.gcr.io/sis-au/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:f650fd29-3e4e-4448-a388-c19b1d1b8e04
2021/01/15 11:27:42 failed to copy image: GET https://storage.googleapis.com/asia.artifacts.<project>.appspot.com/containers/images/sha256:ca16b83ba5519122d24ee7d343f1f717f8b90c3152d539800dafa05b7fcc20e9?access_token=REDACTED: unsupported status code 404; body: <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: asia.artifacts.<project>.appspot.com/containers/images/sha256:ca16b83ba5519122d24ee7d343f1f717f8b90c3152d539800dafa05b7fcc20e9</Details></Error>
Unable to tag previous cache image. This is expected for new or infrequent deployments.
删除那些应该是安全的。根据Google docs:
Each time you deploy a new version, a container image is created using the Cloud Build service. That container image then runs in the App Engine standard environment.
Built container images are stored in the app-engine folder in Container Registry. You can download these images to keep or run elsewhere. Once deployment is complete, App Engine no longer needs the container images. Note that they are not automatically deleted, so to avoid reaching your storage quota, you can safely delete any images you don't need.
还有一个建议,如果您不想手动删除图像以防它们再次开始堆积,您可以 set up Lifecycle Management 在您的“工件”存储桶上添加一个规则来删除旧的文件(例如,30 天)。
这个与您的问题类似,他们有很好的答案。感觉收费就来看看吧!
重要更新:此答案仅适用于标准环境。工件桶用作 Flex 应用程序图像的后备存储。它在启动和自动缩放 VM 时使用,因此在考虑删除它们时要小心。
存储桶 asia.artifacts.../containers/images
下的 google 云存储中的 appengine 文件是否可以安全删除而不会造成任何问题。仅仅几年后就已经有 160Gb 了。文档没有明确说明它们的用途,或者为什么将它们保留在那里:
# gsutil du -sh gs://asia.artifacts.<project>.appspot.com
158.04 GiB gs://asia.artifacts.<project>.appspot.com
我只想知道我是否可以删除它们,或者我是否需要继续支付存储费用space。
原本我以为这些文件可能对应于“Google云平台”“Container Registry”“Images”“app-engine-tmp”上可以看到的内容。但是,即使您删除了 Container Registry Web 界面下的几乎所有内容,这个 containers/images
文件夹中仍然有数千个非常旧的文件。
如果我不得不猜测这堆可能是垃圾文件的不断增长的原因。我怀疑如果通过网络界面删除版本,则不会删除基础文件。对吗?
更新:我确实在部署时出现的云构建日志中找到了这条线索。我测试了删除测试项目中的工件桶。该项目仍然有效,并且构建仍然有效。日志中出现一条看似无害的错误消息。也许删除这个 artefacts 文件夹真的很安全。但是,最好在删除之前弄清楚这些古老的(显然未使用过的)人工制品桶文件的用途。
2021/01/15 11:27:40 Copying from asia.gcr.io/<project>/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest to asia.gcr.io/sis-au/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:f650fd29-3e4e-4448-a388-c19b1d1b8e04
2021/01/15 11:27:42 failed to copy image: GET https://storage.googleapis.com/asia.artifacts.<project>.appspot.com/containers/images/sha256:ca16b83ba5519122d24ee7d343f1f717f8b90c3152d539800dafa05b7fcc20e9?access_token=REDACTED: unsupported status code 404; body: <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: asia.artifacts.<project>.appspot.com/containers/images/sha256:ca16b83ba5519122d24ee7d343f1f717f8b90c3152d539800dafa05b7fcc20e9</Details></Error>
Unable to tag previous cache image. This is expected for new or infrequent deployments.
删除那些应该是安全的。根据Google docs:
Each time you deploy a new version, a container image is created using the Cloud Build service. That container image then runs in the App Engine standard environment. Built container images are stored in the app-engine folder in Container Registry. You can download these images to keep or run elsewhere. Once deployment is complete, App Engine no longer needs the container images. Note that they are not automatically deleted, so to avoid reaching your storage quota, you can safely delete any images you don't need.
还有一个建议,如果您不想手动删除图像以防它们再次开始堆积,您可以 set up Lifecycle Management 在您的“工件”存储桶上添加一个规则来删除旧的文件(例如,30 天)。
这个
重要更新:此答案仅适用于标准环境。工件桶用作 Flex 应用程序图像的后备存储。它在启动和自动缩放 VM 时使用,因此在考虑删除它们时要小心。