将Django应用程序部署到Google App Engine [英] deploying django application to google app engine

查看:119
本文介绍了将Django应用程序部署到Google App Engine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照Google Cloud Platform Guide中的步骤进行操作,但是仍然出现权限错误.表示呼叫者没有权限.请问我在做什么错. 这是超出命令gcloud config list

I have followed through the steps in google cloud platform guide, but still getting permission error. which says the caller does not have the permission. pls what am I doing wrong. this is the out of command gcloud config list

region = us-central1
zone = us-central1-f
[core]
account = <gmail-account>
disable_usage_reporting = True
project = <project-id>
Your active configuration is: [default]

这是它引发的错误

ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects/<project-id>/regions/europe-west1/operations/error [INTERNAL]: An internal error occurred while processing task /appengine-flex-v1/insert_flex_deployment/flex_create_resources>2020-07-28T15:45:31.962Z49210.jv.11: Deployment Manager operation <project-id>/operation-... errors: [code: "RESOURCE_ERROR"
location: "/deployments/aef-default-..../resources/aef-default-...."
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",
\"ResourceErrorCode\":\"403\",
\"ResourceErrorMessage\":{\"code\":403,
\"message\":\"The caller does not have permission\",
\"status\":\"PERMISSION_DENIED\",
\"statusMessage\":\"Forbidden\",
\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/<project-id>/regions/europe-west1/autoscalers\",
\"httpMethod\":\"POST\"}}"

推荐答案

请检查您的项目配额通常,当您的项目没有足够的IP或VM(App Engine Flex使用Compute Engine VM)并且app.yaml上的扩展策略超出配额时,就会引发此错误.

Please check your project quotas usually this error is raised when your project doesn't have enough IPs or VMs (App engine Flex uses Compute Engine VMs) and the scaling strategy on your app.yaml is exceeding the quotas.

请尝试在您的app.yaml文件中添加以下块之一

Please try to add one of the following blocks in your app.yaml file

用于自动缩放

automatic_scaling:
    min_num_instances: 1
    max_num_instances: 2

用于手动缩放

manual_scaling:
   instances: 2

为避免耗尽这些配额,请删除/停止不需要的App Engine服务版本.

To avoid exhaust these quotas please, delete/stop the App Engine service versions that you don't need.

有关缩放策略的更多信息,请检查此参考指南

For more information about scaling strategies please check this reference guide

例如: 每个VM都有1个IP,您的项目的配额为4.

For example: Every VM takes 1 IP and your project have a quota of 4.

如果您的App Engine服务运行了3个VM(已使用3个IP),则在下一次部署中,您只有1个IP可用,如果app.yaml文件中的min_instancesinstances大于1,则部署将失败.

If your app engine service has 3 VMs running (3 IPs used), in the next deploy you only has 1 IP available, if your min_instances or instances in your app.yaml file is greater than 1, the deploy will fails.

这是因为不可能在您的项目上分配超过4个IP,并且App引擎首先打开新实例,然后关闭旧实例,这是为了避免服务中断

This is because is not possible allocate more than 4 IPs on your project, and App engine first turn on the new instances and after shutdown the old instances, this is to avoid a service interruption

如果您需要增加此资源配额,则必须联系GCP销售代表.

If you need increase this resource quotas it is necessary to contact a GCP sales rep.

这篇关于将Django应用程序部署到Google App Engine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆