Cloud Computing Assignment 5.1

Deploy a Simple Web Application on PaaS

Using Google App Engine (Hello World App)

Introduction

Platform as a Service (PaaS) provides a cloud environment where developers can build, deploy, and manage applications without managing servers. In this experiment, we deploy a simple “Hello World” web application using Google App Engine.


What is Google App Engine?

Google App Engine (GAE) is a fully managed PaaS platform that allows developers to deploy web applications without worrying about infrastructure, scaling, or server management.


Step 1: Prerequisites

  • Google Account
  • Install Google Cloud SDK
  • Python installed (for this example)
  • Basic knowledge of command prompt

Step 2: Create a Simple Web Application

1️⃣ Create Project Folder

Create a new folder named:

hello-app

2️⃣ Create Python File (main.py)

Create a file named main.py and add the following code:

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello, World!"

if __name__ == "__main__":
    app.run(host="127.0.0.1", port=8080, debug=True)

3️⃣ Create requirements.txt

Create a file named requirements.txt:

Flask==2.2.2

4️⃣ Create app.yaml

Create a file named app.yaml:

runtime: python39
entrypoint: gunicorn -b :$PORT main:app

Step 3: Initialize Google Cloud

Open command prompt and run:

gcloud init
  • Login with Google account
  • Select or create a project

Step 4: Deploy the Application

Inside project folder, run:

gcloud app deploy
  • Confirm region
  • Wait for deployment

Step 5: View the Application

After deployment, run:

gcloud app browse

The browser will open and display:

Hello, World!

How PaaS Helped

  • No server configuration required
  • Automatic scaling
  • Built-in security
  • Easy deployment
  • Managed infrastructure

Advantages of Using Google App Engine

  • Fully managed service
  • Auto scaling
  • Pay-as-you-go pricing
  • Easy integration with other Google Cloud services

Conclusion

Deploying a simple “Hello World” application on Google App Engine demonstrates how PaaS simplifies application deployment. Developers can focus on writing code while the platform handles infrastructure, scaling, and maintenance.


Viva Questions with Answers

1. What is PaaS?

Platform as a Service – a cloud model that provides a platform for developing and deploying applications.

2. Which PaaS platform was used in this example?

Google App Engine.

3. Do we need to manage servers in PaaS?

No.

4. What command is used to deploy the app?

gcloud app deploy

5. What does the sample application display?

Hello, World!

Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top