DEV Community

Cover image for Five-Finger Ways on How To Deploy Application on App Engine - GCP
Samuel Arogbonlo
Samuel Arogbonlo

Posted on • Updated on

Five-Finger Ways on How To Deploy Application on App Engine - GCP

In using the Google Cloud Platform, it is all about deploying applications and migrating products data to the cloud. This article addresses how to deploy a simple Hello World Python application to the cloud. The major steps used in this process is shown below:

  • Create a new project: The project is created by navigating to the top bar after logging in to the platform. If you are a new user, Google has provided $300 for starting offer so as to get used to the tools on the platform.

Alt Text

  • Activate google cloud shell - The cloud shell is where the scripting and operations take place and it can be switched on by selecting the icon at the top of the screen as well. To check the list of projects, use this command gcloud projects list
    to see the project details on the platform.
    Alt Text

  • Enable app engine admin API - Navigate to the menu on Dashboard then select APIs and Services. After that, search “App Engine” and enable. The app engine helps to build apps; it is a serverless solution takes care of the backend compute and gives the URL of the app and you do not care about any much resources. Finally, you should navigate to the project from the cloud shell using the command “ “

Alt TextAlt TextAlt TextAlt Text

  • Create an app engine by using “gcloud app create” then select regions as required and finally, you can check the app engine to check the status of the created application.

Alt TextAlt Text

  • Deploy application: Here we first cloned a GitHub repo https://github.com/GoogleCloudPlatform/python-docs-sample“ then do some authentication then to check the application you use “cat app.yaml” and the response is “runtime:python37” then you could check the main python file through “cat main.py” and the details of the application displays.

Alt TextAlt Text

The last step is to deploy through “gcloud app deploy app.yaml” then a response of Y/N shows up while the user types “Y” then deploying continues. As soon as the process has been done, the application can be viewed via the URL and the deploying could take a minimum of 7 minutes and more depending on the intensity of the application.
Alt TextAlt Text

After the application has been deployed, it could be monitored and maintained but you could delete the application from the app engine homepage so as to save unnecessary cost on the platform.

Top comments (0)