Переход на более раннюю версию App Engine, адаптируемый к стандартной среде App Engine - PullRequest
1 голос
/ 04 августа 2020

Мне выставили большие счета за гибкую среду движка приложений, поэтому я решил перейти на стандартную среду движка приложений. Я написал свое приложение в NodeJS, который рекомендуется.

У меня есть файл app.yaml, который выглядит так -

runtime: nodejs
env: flex

Так что я подумал, что просто закомментировав эту строку вернуть мое приложение в стандартную среду из гибкой среды и остановить выставление счетов, но на - приложение gcloud deploy начало выдавать ошибки.

runtime: nodejs
# env: flex

Ошибка -

    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

1 Ответ

1 голос
/ 04 августа 2020

Что стоит попробовать:

  1. Используйте runtime: nodejs12 # (or nodejs10), а не только runtime: nodejs

  2. Удалите строку # env:

  3. Используйте флаги --no-promote --no-stop-previous-version при развертывании. Если это сработает, остановите и / или удалите старые версии.

  4. Убедитесь, что вы вошли в систему: gcloud auth login ...

...