简体   繁体   English

将 App Engine flexible 降级到 App Engine 标准环境

[英]Downgrade App engine flexible to app engine standard environment

I have been getting billed heavily on app engine flex environment so I decided to downgrade to app engine standard environment.我在 App Engine Flex 环境上的费用很高,所以我决定降级到 App Engine 标准环境。 I have written my application in NodeJS which is recommended one.我已经用推荐的 NodeJS 编写了我的应用程序。

I have an app.yaml file which looks like this -我有一个 app.yaml 文件,看起来像这样 -

runtime: nodejs
env: flex

So I thought just commenting out this line would bring back my app to standard environment from flex environment and would stop the billing but on - gcloud deploy app started throwing errors.所以我认为只要注释掉这一行就会将我的应用程序从 flex 环境带回标准环境并停止计费但是 - gcloud deploy app开始抛出错误。

runtime: nodejs
# env: flex

Error -错误 -

    starting build "570f00c9-e462-4f2e-8314-ea75df68e590"

FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.myapp.appspot.com/ae/2ee45089-8d39-47ad-85f5-f9489c54badc/manifest.json.
Step #0 - "fetcher": Processing 9 files.
Step #0 - "fetcher": ******************************************************
Step #0 - "fetcher": Status:                      SUCCESS
Step #0 - "fetcher": Started:                     2020-08-03T23:42:00Z
Step #0 - "fetcher": Completed:                   2020-08-03T23:42:00Z
Step #0 - "fetcher": Requested workers:    200
Step #0 - "fetcher": Actual workers:         9
Step #0 - "fetcher": Total files:            9
Step #0 - "fetcher": Total retries:          0
Step #0 - "fetcher": GCS timeouts:           0
Step #0 - "fetcher": MiB downloaded:         0.10 MiB
Step #0 - "fetcher": MiB/s throughput:       0.71 MiB/s
Step #0 - "fetcher": Time for manifest:    213.58 ms
Step #0 - "fetcher": Total time:             0.36 s
Step #0 - "fetcher": ******************************************************
Finished Step #0 - "fetcher"
Starting Step #1 - "prep"
Step #1 - "prep": Already have image (with digest): gcr.io/cloud-builders/gcloud
Finished Step #1 - "prep"
Starting Step #2 - "detector"
Step #2 - "detector": Pulling image: us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": nodejs12_20200711_12_18_2_RC00: Pulling from gae-runtimes/buildpacks/nodejs12/builder
Step #2 - "detector": 5e0f2488a094: Already exists
Step #2 - "detector": 07013743b8c6: Already exists
Step #2 - "detector": 3c2cba919283: Already exists
Step #2 - "detector": 3d34396a5442: Already exists
Step #2 - "detector": 541e48a6a2b5: Already exists
Step #2 - "detector": 34f928489dc6: Already exists
Step #2 - "detector": 64208d02cb2c: Already exists
Step #2 - "detector": 1b7c7906717c: Already exists
Step #2 - "detector": 610bcfea19fe: Already exists
Step #2 - "detector": fbad6c6a4dc9: Already exists
Step #2 - "detector": 9c961dbc83b2: Already exists
Step #2 - "detector": 584a50f27d83: Pulling fs layer
Step #2 - "detector": 229c810fe4b6: Pulling fs layer
Step #2 - "detector": 67f333b251cc: Pulling fs layer
Step #2 - "detector": 67d3732ac306: Pulling fs layer
Step #2 - "detector": fa3555d01e5c: Pulling fs layer
Step #2 - "detector": 7cadee99477d: Pulling fs layer
Step #2 - "detector": 8f7829806b7c: Pulling fs layer
Step #2 - "detector": f6cfa6a7f25d: Pulling fs layer
Step #2 - "detector": c5269ff7ab58: Pulling fs layer
Step #2 - "detector": 52a8b2fcfc34: Pulling fs layer
Step #2 - "detector": b59bca8d4380: Pulling fs layer
Step #2 - "detector": 06f428a8446f: Pulling fs layer
Step #2 - "detector": d77ba4498082: Pulling fs layer
Step #2 - "detector": 2979886df2cc: Pulling fs layer
Step #2 - "detector": afbfc3e27982: Pulling fs layer
Step #2 - "detector": 27046f732e4e: Pulling fs layer
Step #2 - "detector": 7a4302826804: Pulling fs layer
Step #2 - "detector": eb078dded89c: Pulling fs layer
Step #2 - "detector": c661568c601b: Pulling fs layer
Step #2 - "detector": 8b4f47d49eb8: Pulling fs layer
Step #2 - "detector": 4f4fb700ef54: Pulling fs layer
Step #2 - "detector": 67d3732ac306: Waiting
Step #2 - "detector": fa3555d01e5c: Waiting
Step #2 - "detector": 7cadee99477d: Waiting
Step #2 - "detector": 8f7829806b7c: Waiting
Step #2 - "detector": f6cfa6a7f25d: Waiting
Step #2 - "detector": c5269ff7ab58: Waiting
Step #2 - "detector": 52a8b2fcfc34: Waiting
Step #2 - "detector": b59bca8d4380: Waiting
Step #2 - "detector": 06f428a8446f: Waiting
Step #2 - "detector": d77ba4498082: Waiting
Step #2 - "detector": 2979886df2cc: Waiting
Step #2 - "detector": afbfc3e27982: Waiting
Step #2 - "detector": 27046f732e4e: Waiting
Step #2 - "detector": 7a4302826804: Waiting
Step #2 - "detector": eb078dded89c: Waiting
Step #2 - "detector": c661568c601b: Waiting
Step #2 - "detector": 8b4f47d49eb8: Waiting
Step #2 - "detector": 4f4fb700ef54: Waiting
Step #2 - "detector": 584a50f27d83: Verifying Checksum
Step #2 - "detector": 584a50f27d83: Download complete
Step #2 - "detector": 229c810fe4b6: Verifying Checksum
Step #2 - "detector": 229c810fe4b6: Download complete
Step #2 - "detector": fa3555d01e5c: Verifying Checksum
Step #2 - "detector": fa3555d01e5c: Download complete
Step #2 - "detector": 584a50f27d83: Pull complete
Step #2 - "detector": 7cadee99477d: Verifying Checksum
Step #2 - "detector": 7cadee99477d: Download complete
Step #2 - "detector": 229c810fe4b6: Pull complete
Step #2 - "detector": 67d3732ac306: Verifying Checksum
Step #2 - "detector": 67d3732ac306: Download complete
Step #2 - "detector": 67f333b251cc: Verifying Checksum
Step #2 - "detector": 67f333b251cc: Download complete
Step #2 - "detector": 8f7829806b7c: Verifying Checksum
Step #2 - "detector": 8f7829806b7c: Download complete
Step #2 - "detector": c5269ff7ab58: Verifying Checksum
Step #2 - "detector": c5269ff7ab58: Download complete
Step #2 - "detector": f6cfa6a7f25d: Verifying Checksum
Step #2 - "detector": f6cfa6a7f25d: Download complete
Step #2 - "detector": 52a8b2fcfc34: Verifying Checksum
Step #2 - "detector": 52a8b2fcfc34: Download complete
Step #2 - "detector": 06f428a8446f: Verifying Checksum
Step #2 - "detector": 06f428a8446f: Download complete
Step #2 - "detector": b59bca8d4380: Verifying Checksum
Step #2 - "detector": b59bca8d4380: Download complete
Step #2 - "detector": 2979886df2cc: Verifying Checksum
Step #2 - "detector": 2979886df2cc: Download complete
Step #2 - "detector": d77ba4498082: Verifying Checksum
Step #2 - "detector": d77ba4498082: Download complete
Step #2 - "detector": afbfc3e27982: Verifying Checksum
Step #2 - "detector": afbfc3e27982: Download complete
Step #2 - "detector": 27046f732e4e: Verifying Checksum
Step #2 - "detector": 27046f732e4e: Download complete
Step #2 - "detector": eb078dded89c: Verifying Checksum
Step #2 - "detector": eb078dded89c: Download complete
Step #2 - "detector": 7a4302826804: Verifying Checksum
Step #2 - "detector": 7a4302826804: Download complete
Step #2 - "detector": c661568c601b: Verifying Checksum
Step #2 - "detector": c661568c601b: Download complete
Step #2 - "detector": 4f4fb700ef54: Verifying Checksum
Step #2 - "detector": 4f4fb700ef54: Download complete
Step #2 - "detector": 67f333b251cc: Pull complete
Step #2 - "detector": 8b4f47d49eb8: Verifying Checksum
Step #2 - "detector": 8b4f47d49eb8: Download complete
Step #2 - "detector": 67d3732ac306: Pull complete
Step #2 - "detector": fa3555d01e5c: Pull complete
Step #2 - "detector": 7cadee99477d: Pull complete
Step #2 - "detector": 8f7829806b7c: Pull complete
Step #2 - "detector": f6cfa6a7f25d: Pull complete
Step #2 - "detector": c5269ff7ab58: Pull complete
Step #2 - "detector": 52a8b2fcfc34: Pull complete
Step #2 - "detector": b59bca8d4380: Pull complete
Step #2 - "detector": 06f428a8446f: Pull complete
Step #2 - "detector": d77ba4498082: Pull complete
Step #2 - "detector": 2979886df2cc: Pull complete
Step #2 - "detector": afbfc3e27982: Pull complete
Step #2 - "detector": 27046f732e4e: Pull complete
Step #2 - "detector": 7a4302826804: Pull complete
Step #2 - "detector": eb078dded89c: Pull complete
Step #2 - "detector": c661568c601b: Pull complete
Step #2 - "detector": 8b4f47d49eb8: Pull complete
Step #2 - "detector": 4f4fb700ef54: Pull complete
Step #2 - "detector": Digest: sha256:268a9ef00dd901e5f207edd928a7e0ee18c1b62d7868b03211e566eb1c90296c
Step #2 - "detector": Status: Downloaded newer image for us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": ======== Output: google.nodejs.yarn-gcp-build@0.9.0 ========
Step #2 - "detector": yarn.lock not found.
Step #2 - "detector": ======== Output: google.nodejs.yarn@0.9.0 ========
Step #2 - "detector": yarn.lock not found.
Step #2 - "detector": ======== Results ========
Step #2 - "detector": skip: google.nodejs.yarn-gcp-build@0.9.0
Step #2 - "detector": fail: google.nodejs.yarn@0.9.0
Step #2 - "detector": pass: google.nodejs.appengine@0.9.0
Step #2 - "detector": ======== Output: google.nodejs.npm-gcp-build@0.9.0 ========
Step #2 - "detector": gcp-build script not found in package.json.
Step #2 - "detector": ======== Results ========
Step #2 - "detector": skip: google.nodejs.npm-gcp-build@0.9.0
Step #2 - "detector": pass: google.nodejs.npm@0.9.0
Step #2 - "detector": pass: google.nodejs.appengine@0.9.0
Step #2 - "detector": Resolving plan... (try #1)
Step #2 - "detector": 2 of 3 buildpacks participating
Step #2 - "detector": google.nodejs.npm       0.9.0
Step #2 - "detector": google.nodejs.appengine 0.9.0
Finished Step #2 - "detector"
Starting Step #3 - "analyzer"
Step #3 - "analyzer": Already have image (with digest): us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #3 - "analyzer": ERROR: failed to initialize cache: failed to create image cache: accessing cache image "us.gcr.io/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest": connect to repo store 'us.gcr.io/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest': GET https://us.gcr.io/v2/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest: DENIED: Permission denied for "latest" from request "/v2/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest". 
Finished Step #3 - "analyzer"
ERROR
ERROR: build step 3 "us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00" failed: step exited with non-zero status: 1

Things to try:要尝试的事情:

  1. Use runtime: nodejs12 # (or nodejs10) , not just runtime: nodejs使用runtime: nodejs12 # (or nodejs10) ,而不仅仅是runtime: nodejs

  2. Delete the # env: line删除# env:

  3. Use the --no-promote --no-stop-previous-version flags when you deploy.部署时使用--no-promote --no-stop-previous-version标志。 If that works, stop and/or delete the old versions.如果可行,请停止和/或删除旧版本。

  4. Make sure you're logged in: gcloud auth login...确保您已登录: gcloud auth login...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GCP App Engine:将服务从柔性环境迁移到标准环境 - GCP App Engine: Migrate services from the flexible environment to the standard environment Google App Engine 如何从灵活环境转变为标准环境 - How do change from Google App Engine from Flexible Environment to Standard environment Google App Engine 资产管道标准环境 - Google App Engine asset pipeline standard environment 如何在 Google App Engine 柔性环境中设置 jetty 线程池 - how to set the jetty thread pool in Google App Engine flexible environment App Engine 灵活环境 - Dockerfile 安装过时版本的 GDAL - App Engine Flexible Environment - Dockerfile installing outdated version of GDAL App Engine 柔性环境可以连接到永久磁盘吗? - Can App Engine Flexible Environment connect to a persistent disk? 无法在 App Engine 标准环境 (GCP) 中部署预构建映像 - Unable to deploy pre built image in app engine standard environment (GCP) 无法从 App Engine 标准环境连接到 Google 云 SQL - Cannot connect to Google cloud SQL from App Engine Standard Environment 具有 4GB RAM 的 Google Cloud Platform App Engine 标准环境 - Google Cloud Platform App Engine Standard environment with 4GB RAM Google App Engine 标准环境是否与 next/image 兼容? - Is Google App Engine standard environment compatible with next/image?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM