Google app engine python Google应用程序引擎部署

Google app engine python Google应用程序引擎部署,google-app-engine,Google App Engine,我是谷歌应用引擎的新手。我用python创建了一个hello world应用程序,并在本地进行了验证。我尝试使用下面的命令部署 appcfg.py-项目ID更新目录\ 它会打开一个浏览器,让我登录我的谷歌应用程序帐户。一旦我这样做了,浏览器就会显示一个带有本地主机的url。该应用程序再次在本地主机上运行,并且不会部署到google云上。我尝试使用项目ID ie访问url,但它说找不到错误。任何人遇到这种情况,请您帮忙好吗?这种行为可能有几个原因: 您没有正确使用appcfg.py命令 您正在使

我是谷歌应用引擎的新手。我用python创建了一个hello world应用程序,并在本地进行了验证。我尝试使用下面的命令部署

appcfg.py-项目ID更新目录\


它会打开一个浏览器,让我登录我的谷歌应用程序帐户。一旦我这样做了,浏览器就会显示一个带有本地主机的url。该应用程序再次在本地主机上运行,并且不会部署到google云上。我尝试使用项目ID ie访问url,但它说找不到错误。任何人遇到这种情况,请您帮忙好吗?

这种行为可能有几个原因:

  • 您没有正确使用appcfg.py命令
  • 您正在使用的glcoud版本不支持appcfg.py用于GAE部署(该命令正在“滚动到”gcloud工具集中)
要检查已安装的gcloud版本,只需运行
$gcloud


较新的gcloud使用以下语法:
$gcloud preview app deploy ~/my_app/app.yaml
以下是有关

的详细信息此行为可能有两个原因:

  • 您没有正确使用appcfg.py命令
  • 您正在使用的glcoud版本不支持appcfg.py用于GAE部署(该命令正在“滚动到”gcloud工具集中)
要检查已安装的gcloud版本,只需运行
$gcloud


较新的gcloud使用以下语法:
$gcloud preview app deploy~/my_app/app.yaml
以下是有关此部署在windows平台上工作的详细信息 1) google app engine上的本地服务器部署:

cd to C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin
then run command

python dev_appserver.py  C:\000_hello_endpoints(location)

this will deploy your app locally on http://localhost:8080

 Output :
INFO 2017-05-25 13:51:20,782 devappserver2.py:692] Skipping SDK update check.
INFO 2017-05-25 13:51:22,221 api_server.py:272] Starting API server at: http://localhost:21018
INFO 2017-05-25 13:51:22,232 dispatcher.py:205] Starting module "default" running at: localhost:8080
INFO 2017-05-25 13:51:22,232 admin_server.py:116] Starting admin server at: http://localhost:8000

2) Cloud app Deployment on Google app engine:

Run gcloud init command in google cloud sdk shell:
Choose the account you would like to use to perform operations for
this configuration:
 [1] karanchaparwalops@gmail.com
 [2] Log in with a new account
Please enter your numeric choice: 1

You are logged in as: [karanchaparwalops@gmail.com].

Pick cloud project to use:
 [1] machine-nebula-168
 [2] Create a new project
Please enter numeric choice or text value (must exactly match list
item): 1

Your current project has been set to: [machine-nebula-168].

Do you want to configure Google Compute Engine
(cloud.google.com/compute) settings (Y/n)? Y

Which Google Compute Engine zone would you like to use as project
default?
If you do not specify a zone via a command line flag while working
with Compute Engine resources, the default is assumed.
 [1] asia-east1-b
 [2] asia-east1-a
 [3] asia-east1-c
 [4] asia-northeast1-c
 [5] asia-northeast1-a
 [6] asia-northeast1-b
 [7] asia-southeast1-b
 [8] asia-southeast1-a
 [9] europe-west1-d
 [10] europe-west1-c
 [11] europe-west1-b
 [12] us-central1-b
 [13] us-central1-f
 [14] us-central1-a
 [15] us-central1-c
 [16] us-east1-d
 [17] us-east1-c
 [18] us-east1-b
 [19] us-east4-b
 [20] us-east4-c
 [21] us-east4-a
 [22] us-west1-b
 [23] us-west1-a
 [24] Do not set default zone
Please enter numeric choice or text value (must exactly match list
item): 1

Your project default Compute Engine zone has been set to [asia-east1-b].
You can change it by running [gcloud config set compute/zone NAME].

Your project default Compute Engine region has been set to [asia-east1].
You can change it by running [gcloud config set compute/region NAME].

Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use karanchaparwalops@gmail.com by default
* Commands will reference project `machine-nebula-168` by default
* Compute Engine commands will use region `asia-east1` by default
* Compute Engine commands will use zone `asia-east1-b` by default

Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.

Some things to try next:

* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic -h` to learn about advanced features of the SDK like arg files and output formatting

C:\000_Hello_Endpoints>gcloud app deploy
You are creating an app for project [machine-nebula-168].
WARNING: Creating an App Engine application for a project is irreversible and the region
cannot be changed. More information about regions is at
cloud.google.com/appengine/docs/locations.

Please choose the region where you want your App Engine application
located:

 [1] europe-west (supports standard and flexible)
 [2] us-east1 (supports standard and flexible)
 [3] us-central (supports standard and flexible)
 [4] asia-northeast1 (supports standard and flexible)
 [5] us-east4 (supports standard and flexible)
 [6] cancel
Please enter your numeric choice: 4

Creating App Engine application in project [machine-nebula-168] and region [asia-northeast1]....done.
You are about to deploy the following services:
 - machine-nebula-168/default/20170525t134403 (from [C:\000_Hello_Endpoints\app.yaml])
  Deploying to URL: [machine-nebula-168.appspot]

Do you want to continue (Y/n)? Y

Beginning deployment of service [default]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[C:\Users\KaranC\AppData\Roaming\gcloud\logs\2017.05.25\13.43.24.426000.log].
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 4 files to Google Cloud Storage ═╣
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...done.
Deployed service [default] to [machine-nebula-168.appspot]

You can stream logs from the command line by running:
  $ gcloud app logs tail -s default

To view your application in the web browser run:
  $ gcloud app browse

C:\000_Hello_Endpoints>gcloud app browse
Opening [https://machine-nebula-168.appspot.com] in a new tab in your default browser.
我假设您已经为windows安装了python应用程序引擎sdk
感谢您收听..upvote(如果有帮助)

此部署在windows平台上运行 1) google app engine上的本地服务器部署:

cd to C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin
then run command

python dev_appserver.py  C:\000_hello_endpoints(location)

this will deploy your app locally on http://localhost:8080

 Output :
INFO 2017-05-25 13:51:20,782 devappserver2.py:692] Skipping SDK update check.
INFO 2017-05-25 13:51:22,221 api_server.py:272] Starting API server at: http://localhost:21018
INFO 2017-05-25 13:51:22,232 dispatcher.py:205] Starting module "default" running at: localhost:8080
INFO 2017-05-25 13:51:22,232 admin_server.py:116] Starting admin server at: http://localhost:8000

2) Cloud app Deployment on Google app engine:

Run gcloud init command in google cloud sdk shell:
Choose the account you would like to use to perform operations for
this configuration:
 [1] karanchaparwalops@gmail.com
 [2] Log in with a new account
Please enter your numeric choice: 1

You are logged in as: [karanchaparwalops@gmail.com].

Pick cloud project to use:
 [1] machine-nebula-168
 [2] Create a new project
Please enter numeric choice or text value (must exactly match list
item): 1

Your current project has been set to: [machine-nebula-168].

Do you want to configure Google Compute Engine
(cloud.google.com/compute) settings (Y/n)? Y

Which Google Compute Engine zone would you like to use as project
default?
If you do not specify a zone via a command line flag while working
with Compute Engine resources, the default is assumed.
 [1] asia-east1-b
 [2] asia-east1-a
 [3] asia-east1-c
 [4] asia-northeast1-c
 [5] asia-northeast1-a
 [6] asia-northeast1-b
 [7] asia-southeast1-b
 [8] asia-southeast1-a
 [9] europe-west1-d
 [10] europe-west1-c
 [11] europe-west1-b
 [12] us-central1-b
 [13] us-central1-f
 [14] us-central1-a
 [15] us-central1-c
 [16] us-east1-d
 [17] us-east1-c
 [18] us-east1-b
 [19] us-east4-b
 [20] us-east4-c
 [21] us-east4-a
 [22] us-west1-b
 [23] us-west1-a
 [24] Do not set default zone
Please enter numeric choice or text value (must exactly match list
item): 1

Your project default Compute Engine zone has been set to [asia-east1-b].
You can change it by running [gcloud config set compute/zone NAME].

Your project default Compute Engine region has been set to [asia-east1].
You can change it by running [gcloud config set compute/region NAME].

Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use karanchaparwalops@gmail.com by default
* Commands will reference project `machine-nebula-168` by default
* Compute Engine commands will use region `asia-east1` by default
* Compute Engine commands will use zone `asia-east1-b` by default

Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.

Some things to try next:

* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic -h` to learn about advanced features of the SDK like arg files and output formatting

C:\000_Hello_Endpoints>gcloud app deploy
You are creating an app for project [machine-nebula-168].
WARNING: Creating an App Engine application for a project is irreversible and the region
cannot be changed. More information about regions is at
cloud.google.com/appengine/docs/locations.

Please choose the region where you want your App Engine application
located:

 [1] europe-west (supports standard and flexible)
 [2] us-east1 (supports standard and flexible)
 [3] us-central (supports standard and flexible)
 [4] asia-northeast1 (supports standard and flexible)
 [5] us-east4 (supports standard and flexible)
 [6] cancel
Please enter your numeric choice: 4

Creating App Engine application in project [machine-nebula-168] and region [asia-northeast1]....done.
You are about to deploy the following services:
 - machine-nebula-168/default/20170525t134403 (from [C:\000_Hello_Endpoints\app.yaml])
  Deploying to URL: [machine-nebula-168.appspot]

Do you want to continue (Y/n)? Y

Beginning deployment of service [default]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[C:\Users\KaranC\AppData\Roaming\gcloud\logs\2017.05.25\13.43.24.426000.log].
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 4 files to Google Cloud Storage ═╣
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...done.
Deployed service [default] to [machine-nebula-168.appspot]

You can stream logs from the command line by running:
  $ gcloud app logs tail -s default

To view your application in the web browser run:
  $ gcloud app browse

C:\000_Hello_Endpoints>gcloud app browse
Opening [https://machine-nebula-168.appspot.com] in a new tab in your default browser.
我假设您已经为windows安装了python应用程序引擎sdk 谢谢收听..如果有帮助,请向上投票