[英]How do I configure a backend in GAE
I seem to be missing something fundamental. 我似乎缺少一些基本知识。 I added a backends.yaml file to the directory where my app lives in my development environment. 我将backends.yaml文件添加到应用程序在开发环境中的目录中。 This file contains the following: 该文件包含以下内容:
backends:
- name: reporting
class: B8
options: dynamic public
I deployed and the admin console says I don't have any backends configured. 我已部署,管理控制台说我没有配置任何后端。 I tried using appcfg.py like this: 我尝试像这样使用appcfg.py:
appcfg.py backends ~/work/google/myappfolder list
and it says: 它说:
No backends configured for app: {my app name}.
The documentation says: 该文件说:
appcfg backends <dir> list
Lists all the backends configured for the app specified in dir/app.yaml.
Is app.yaml
a typo? app.yaml
是错字吗? Or is my problem that I should be putting something into app.yaml? 还是我应该在app.yaml中添加内容的问题? I didn't find any mention of that anywhere else. 我在其他任何地方都没有提到它。
Also, some of the documentation says you have to start all backends manually, but other parts say that "dynamic" backends do not need be started from the command line -- they are started automatically. 另外,一些文档说您必须手动启动所有后端,但是其他部分说“动态”后端不需要从命令行启动,它们会自动启动。 Which is it? 哪有
This was answered by alex in the comments. 亚历克斯在评论中回答了这个问题。 Here are the key take-aways: 以下是关键要点:
appcfg.py backends dir update
to get things going 您必须执行appcfg.py backends dir update
才能使一切正常 Have you actually started the backend up via the command line? 您实际上是否通过命令行启动了后端?
appcfg backends <dir> start <backend>
Sets the backend state to START, allowing it to receive HTTP requests. 将后端状态设置为START,以允许其接收HTTP请求。 Resident backends start immediately. 常驻后端立即启动。 Dynamic backends do not start until the first user request arrives . 在第一个用户请求到达之前,动态后端不会启动 。 Has no effect if the backend was already started. 如果后端已经启动,则无效。
So yes, you do need to do that before it can serve even on dynamic instances as you have. 因此,是的,您确实需要这样做,以便它甚至可以在动态实例上使用。
https://developers.google.com/appengine/docs/python/backends/overview#Commands https://developers.google.com/appengine/docs/python/backends/overview#Commands
Also, did you pass --backends
to enable backends support in dev_appserver.py
? 另外,您是否通过--backends
在dev_appserver.py
启用了后端支持?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.