简体   繁体   English

在Google App Engine上部署Angular-Fullstack(MEAN)

[英]Deploying Angular-Fullstack (MEAN) on Google App Engine

I've generated a project with Yeoman Angular-Fullstack generator ( https://github.com/angular-fullstack/generator-angular-fullstack ). 我已经使用Yeoman Angular-Fullstack生成器( https://github.com/angular-fullstack/generator-angular-fullstack )生成了一个项目。

I created an app.yaml and tried to deploy the project on GAE with command: 我创建了一个app.yaml,并尝试使用以下命令在GAE上部署该项目:

gcloud app deploy

But I'm getting an error: 但是我遇到一个错误:

ERROR: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).

Any tips on how to debug the gcloud deploy? 有关如何调试gcloud部署的任何提示? I'm running the latest gcloud SDK. 我正在运行最新的gcloud SDK。

-- -

Here's a longer debug trace: 这是更长的调试跟踪:

Updating service [default]...-DEBUG: Operation [apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4] not complete. Waiting 5s.
Updating service [default]...|DEBUG: Operation [apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4] complete. Result: {
    "metadata": {
        "target": "apps/<MY-PROJECT>/services/default/versions/20160804t151734", 
        "method": "google.appengine.v1beta5.Versions.CreateVersion", 
        "user": "<MY-EMAIL>@gmail.com", 
        "insertTime": "2016-08-04T12:16:31.905Z", 
        "endTime": "2016-08-04T12:24:03.526Z", 
        "@type": "type.googleapis.com/google.appengine.v1beta5.OperationMetadataV1Beta5"
    }, 
    "done": true, 
    "name": "apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4", 
    "error": {
        "message": "Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).", 
        "code": 13
    }
}
Updating service [default]...failed.
DEBUG: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).
Traceback (most recent call last):
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 719, in Execute
    result = args.calliope_command.Run(cli=self, args=args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1404, in Run
    resources = command_instance.Run(args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/surface/app/deploy.py", line 57, in Run
    return deploy_util.RunDeploy(self, args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 215, in RunDeploy
    api_client.DeployService(name, version, service, manifest, image)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 89, in DeployService
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 70, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).
ERROR: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).

If your question is just about finding the cause of this error, I would recommend using the Development Server on your localhost to find the error. 如果您的问题仅是查找此错误的原因,我建议您在本地主机上使用Development Server来查找错误。 Without taking a deeper look, I guess the Node part does not fulfil the requirements for GAE or you are trying to deploy to a region where Node Applications are not supported. 如果不深入了解,我想Node部分不能满足GAE的要求,或者您正尝试部署到不支持Node Applications的区域。

GAE does not come with Mongo. GAE不随Mongo一起提供。 You have two options 你有两个选择

  1. Use GAE flex and build your own mongo container and use it 使用GAE flex并构建自己的mongo容器并使用它
  2. Use a Mongo cloud provider like https://mlab.com and they even have a free version to test. 使用https://mlab.com之类的Mongo云提供商,他们甚至可以提供免费版本进行测试。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM