【问题标题】:AppEngine Deploy Error (app.yaml)AppEngine 部署错误 (app.yaml)
【发布时间】:2017-06-23 16:37:21
【问题描述】:

我正在尝试将 app.yaml 文件部署到 appengine flexible。

这是我的 app.yaml 文件

runtime: java
env: flex
manual_scaling:
  instances: 1

handlers:
- url: /.*
  script: this field is required, but ignored
  secure: always

runtime_config:  # Optional
  jdk: openjdk8
  server: jetty9

resources:
  cpu: 0.5
  memory_gb: 0.18
  disk_size_gb: 10

我正在尝试使用以下命令部署它:

gcloud app deploy app.yaml --verbosity=debug

这是我得到的错误:

DEBUG: No staging command found for runtime [java] and environment [FLEX].
WARNING: Deployment of App Engine Flexible Environment apps is currently in Beta
Building and pushing image for service [my-service]
DEBUG: Could not call git with args ('config', '--get-regexp', 'remote\\.(.*)\\.url'): [Error 2] The system cannot find the file specified
INFO: Not checking for [Custom] because runtime is [java]
INFO: Not checking for [Go] because runtime is [java]
INFO: Not checking for [Ruby] because runtime is [java]
INFO: Not checking for [Node.js] because runtime is [java]
INFO: Checking for Java.
INFO: Not checking for [Python Compat] because runtime is [java]
INFO: Not checking for [Python] because runtime is [java]
INFO: Not checking for [PHP] because runtime is [java]
DEBUG: (gcloud.app.deploy) Your application does not satisfy all of the requirements for a runtime of type [java].  Please correct the errors and try again.
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 742, in Execute
    resources = args.calliope_command.Run(cli=self, args=args)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 739, in Run
    resources = command_instance.Run(args)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\app\deploy.py", line 59, in Run
    return deploy_util.RunDeploy(args)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 413, in RunDeploy
    all_services)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 241, in Deploy
    new_version, service, source_dir, image, code_bucket_ref)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 176, in _PossiblyBuildAndPush
    code_bucket_ref, self.deploy_options.use_runtime_builders)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 206, in BuildAndPushDockerImage
    gen_files.update(_GetDockerfiles(service, source_dir))
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 139, in _GetDockerfiles
    'again.'.format(info.runtime))
UnsatisfiedRequirementsError: Your application does not satisfy all of the requirements for a runtime of type [java].  Please correct the errors and try again.
ERROR: (gcloud.app.deploy) Your application does not satisfy all of the requirements for a runtime of type [java].  Please correct the errors and try again.

所以它最终没有部署 app.yaml。 但是,如果我运行这个命令:

gcloud 应用部署 cron.yaml

它会工作得很好。

【问题讨论】:

  • 首先,确保您是最新的:gcloud components update

标签: google-app-engine deployment app-engine-flexible


【解决方案1】:

是的,现在这是一个差距:/ 您实际上无法通过gcloud app deploy 将 Java 应用程序部署到 App Engine flexible。您需要使用MavenGradle 插件。

给您添麻烦了!

【讨论】:

  • 是否存在 GitHub 问题或没有跟踪此差距的原因?我想添加一个“+1”或“:(”表情符号。
  • @ChrisSmith,我同意。我花了很多时间弄清楚只有 Maven 或 Gradle 是上传到 AppEngine flex 的唯一方法。 gcloud app deploy 似乎是显而易见的选择。我会在一遍又一遍地阅读文档后说,谷歌很清楚只有 Maven 和 Gradle 有效。让我感到困惑的是 Maven 基本上在进程中运行 gcloud app deploy ......但是在没有 Maven 的情况下运行它会产生不好的结果。
猜你喜欢
  • 2011-08-24
  • 2022-08-21
  • 2018-08-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-08-22
  • 2015-06-25
  • 1970-01-01
相关资源
最近更新 更多