This page walks through how to quickly deploy an App Engine app from an existing template, using Cloud Shell.
Before you begin
- 登录您的 Google Cloud 帐号。如果您是 Google Cloud 新手，请创建一个帐号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金，用于运行、测试和部署工作负载。
在 Google Cloud Console 的项目选择器页面上，选择或创建一个 Google Cloud 项目。
确保您的 Cloud 项目已启用结算功能。 了解如何确认您的项目是否已启用结算功能。
Deploying an application
Click the Activate Cloud Shell button at the top of the Console window:
This launches Cloud Shell session in a frame at the bottom of the Console.
Clone a sample app and start the development server:
Clone a sample app and run it locally in the Cloud Shell session using the App Engine development server.
git clone https://github.com/GoogleCloudPlatform/appengine-guestbook-python \ && cd appengine-guestbook-python \ && dev_appserver.py ./app.yaml
Connect to the development server:
Click the Web Preview button and choose 'Preview on port 8080'.
Cloud Shell opens the preview URL on its proxy service in a new browser window.
Open the code editor:
Open the code editor using its button from the Cloud Shell menu to edit your cloned app.
Change the text in index.html:
Double click the file within the code editor to open it for edit and change the text in index.html from An anonymous person wrote: to A mysterious stranger said:
You'll see your change detected in Cloud Shell's output; refresh your previewed app to see the new changes reflected in real time!
Stop the Development Server:
When you are done previewing the App Engine app, type Ctrl + C in your Cloud Shell session to stop the development server.
Initialize your App Engine app: Create an App Engine app tied to your project, if you haven't already, and choose its region:
gcloud app create --project=[YOUR_PROJECT_NAME]
Deploy the app to App Engine:
gcloud app deploy ./index.yaml ./app.yaml
Your application should be live!
Open the application in your web browser. The URL is
It may take a few minutes for deployment to complete. If the application is not fully deployed, you will see an error message in the web browser. Refresh the browser to see the deployed application.
Remember to clean up after to avoid unnecessary billing:
If you'd like to disable the app you just deployed, go to App Engine on Console and select Settings > Application Settings > Disable Application.