Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SUBMITTED BY
AJAY ANEJA
2018ht12620
Introduction
Develop any cloud application using available software services such as Gmail, Docs, or
CRM on GAE Platform. Test your application on GAE platform. Any application supported
by GAE.
Here the Objective behind the assignment is to provide the hand-ons on the Google App
Engine environment.
Google App Engine is a Platform as a Service and Cloud computing platform for developing
and hosting web applications in Google-managed data centers. App Engine is a fully
managed, serverless platform for developing and hosting web applications at scale. It
provides support for various languages and libraries and framework to develop the apps.
Application Overview:
Application Details Name: Simple Calculator
URL: https://assignment-259518.appspot.com/
Application Description:
Simple Calculator is a app used to perform used to perform basic calculations function like addition,
subtraction, multiplication and division.
LANGUAGE: Python 3
Python HTTP SERVER: gunicorn 19.5.0
APPLICATION FRAMEWORK: FLASK
GUNICORN:
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model.
The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light
on server resources, and fairly speedy.
FLASK:
Creating the new project by providing the Project name and then
clicking on create. It will create the new project.
3. Click on the Activate Cloud Shell available at the rightmost corner of the home page
highlighted below.
Home Page
CLOUD SHELL
4. Now click on the launch editor Highlight on the below image.
Cloud SHELL
Editor
5. Click On the file -> new folder button to create new folder on the Editor.
Provide the folder name and click OK button. It will create new folder for the project.
6. After Select/Creating the folder, we can either upload the files already created or the
upload the already created files using upload file.
runtime: ruby
env: flex
entrypoint: bundle exec ruby app.rb
# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/ruby/configuring-your-app-with-app-yaml
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
It defines runtime environment , entrypoint and scaling and resources config of the application.
Entrypoint: The command to start application. The entrypoint starts a process that responds to HTTP
requests on the port defined by the environment variable PORT.
RUNTIME: This setting is required. It is the name of the App Engine language runtime used by this
application.
Env: Select the flexible environment.
https://cloud.google.com/appengine/docs/flexible/ruby/reference/app-yaml
runtime: python
env: flex
entrypoint: gunicorn app:app
runtime_config:
python_version: 3
b) Requirements.txt
Dependencies for Python applications are declared in a standard requirements.txt file. For
example
Flask==0.12.2
Jinja2==2.8
Werkzeug==0.13
# deploy
gunicorn==19.5.0
gevent
9. To describe the application configuration i.e. To show all the data about the current
application, command
10. gcloud app browse - open the current app in a web browser
Application Snapdhot:
ApplicationURL: https://assignment-259518.appspot.com/
This application is used to calculate to perform basic arithmetic calculation online. One can use to
calculate/ perform basic math functions like addition, subtraction, multiplication and division.
Calculator image
Performing basic arithmetic calculation