Five-Finger Ways on How To Deploy Application on App Engine - GCP 
Published: 2020-10-24 02:43:53

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](https://dev-to-uploads.s3.amazonaws.com/i/kjyd3yyn79dujxafyk16.PNG)

- 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](https://dev-to-uploads.s3.amazonaws.com/i/rncrxwgbbo706r2uqc4i.PNG)

- 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 Text](https://dev-to-uploads.s3.amazonaws.com/i/u1rwitan9vcx46lxqm1w.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/aag6ps6dcnn0p4ctxssd.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d6igvawcfbkt7368q7pq.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1u2ff6adkbjzayr748he.PNG)

- 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 Text](https://dev-to-uploads.s3.amazonaws.com/i/lx49qa24hx9ddj76hdps.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tobdl02ep9jq2hdsa2dn.PNG)

- 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 Text](https://dev-to-uploads.s3.amazonaws.com/i/jpzf1xzr15ngnt1zex4h.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lq5sydff9qloq4de61g9.PNG)

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 Text](https://dev-to-uploads.s3.amazonaws.com/i/um3kzql7lqateyyc11o4.PNG)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vv3ggl72bvdn7wa49dy5.PNG)


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.