EMAIL SUPPORT

dclessons@dclessons.com

LOCATION

US

LAB How to Install APP via APP Engine

LAB How to Install APP via APP Engine

Lab: How to Install APP via APP Engine

Task:

  • In this task we will provision Dclessons Hello World Application. This Application Leverage Python Flask Web Server.
  • Edit the code to save it on new version and run the application
  • Split traffic to get 80% of traffic to new version and 20% of traffic to old version APP.
  • Migrate the traffic to New Version of Application

Solution

Go to Google Cloud Console | Select App Engine | Select Create APPLICATION

Select Region | us-central | Next

In Dashboard | Select Language: Python | Environment: Standard

Now Use Google Cloud Shell | Open it as it comes with SDK already Installed and configured | Open the console and write following commands

gcloud config set project dclessons-proj

Click on Authorize Shell

Now let’s download a sample Python application that Google provides on GitHub:

git clone https://github.com/GoogleCloudPlatform/python-docs-samples

Now Change the directory to browse to application

cd python-docs-samples/appengine/standard_python3/hello_World

Now we can now deploy the applications to APP Engine by using following commands

gcloud app deploy app.yaml – project dclessons-proj

Click on Yes

Now it may take a minute or two to deploy. Once this Application is deployed, you can check the URL that has been assigned by following command

gcloud app browse

Open the URL in Browser and you will get below

Open the code by using below commands

cloudshell edit main.py


Comment

    You are will be the first.

LEAVE A COMMENT

Please login here to comment.