0% found this document useful (0 votes)
39 views10 pages

Practical Assignment 2 Cloud Computing

The document outlines the installation and configuration process for Google App Engine, a scalable platform for developing web applications. It details hardware and software requirements, features of App Engine, and step-by-step instructions for setting up the Google Cloud SDK and deploying a sample 'Hello World' app in Python. The document emphasizes the advantages of using Google App Engine, including security, scalability, and cost savings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views10 pages

Practical Assignment 2 Cloud Computing

The document outlines the installation and configuration process for Google App Engine, a scalable platform for developing web applications. It details hardware and software requirements, features of App Engine, and step-by-step instructions for setting up the Google Cloud SDK and deploying a sample 'Hello World' app in Python. The document emphasizes the advantages of using Google App Engine, including security, scalability, and cost savings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Practical Assignment 2 Cloud Computing

Title: Installation and configure Google App Engine.


Objectives:
●​ To learn basic of Google App Engine.
●​ To install and configure Google App Engine.
Hardware Requirements :
●​ Pentium IV with latest configuration
Software Requirements :
●​ Ubuntu 20.04, Web application i.e. Google App Engine
Theory:
A scalable runtime environment, Google App Engine is mostly used to run Web applications. These
dynamic scales as demand change over time because of Google’s vast computing infrastructure.
Because it offers a secure execution environment in addition to a number of services, App Engine
makes it easier to develop scalable and high-performance Web apps. Google’s applications will scale up
and down in response to shifting demand. Croon tasks, communications, scalable data stores, work
queues, and in-memory caching are some of these services.
The App Engine SDK facilitates the testing and professionalization of applications by emulating the
production runtime environment and allowing developers to design and test applications on their own
PCs. When an application is finished being produced, developers can quickly migrate it to App Engine,
put in place quotas to control the cost that is generated, and make the programmer available to
everyone. Python, Java, and Go are among the languages that are currently supported.
The development and hosting platform Google App Engine, which powers anything from web
programming for huge enterprises to mobile apps, uses the same infrastructure as Google’s large-scale
internet services. It is a fully managed PaaS (platform as a service) cloud computing platform that uses
in-built services to run your apps. You can start creating almost immediately after receiving the
software development kit (SDK). You may immediately access the Google app developer’s manual
once you’ve chosen the language you wish to use to build your app.
After creating a Cloud account, you may Start Building your App
●​ Using the Go template/HTML package
●​ Python-based webapp2 with Jinja2
●​ PHP and Cloud SQL
●​ using Java’s Maven

Features of App Engine


Runtimes and Languages

To create an application for an app engine, you can use Go, Java, PHP, or Python. You can develop and
test an app locally using the SDK’s deployment toolkit. Each language’s SDK and nun time are unique.
Your program is run in a:
●​ Java Run Time Environment version 7
●​ Python Run Time environment version 2.7
●​ PHP runtime’s PHP 5.4 environment
●​ Go runtime 1.2 environment

Generally Usable Features

These are protected by the service-level agreement and depreciation policy of the app engine. The
implementation of such a feature is often stable, and any changes made to it are backward-compatible.
These include communications, process management, computing, data storage, retrieval, and search, as
well as app configuration and management. Features like the HRD migration tool, Google Cloud SQL,
logs, datastore, dedicated Memcached, blob store, Memcached, and search are included in the
categories of data storage, retrieval, and search.

Features in Preview

In a later iteration of the app engine, these functions will undoubtedly be made broadly accessible.
However, because they are in the preview, their implementation may change in ways that are
backward-incompatible. Sockets, MapReduce, and the Google Cloud Storage Client Library are a few
of them.

Experimental Features

These might or might not be made broadly accessible in the next app engine updates. They might be
changed in ways that are irreconcilable with the past. The “trusted tester” features, however, are only
accessible to a limited user base and require registration in order to utilize them. The experimental
features include Prospective Search, Page Speed, OpenID, Restore/Backup/Datastore Admin, Task
Queue Tagging, MapReduce, and Task Queue REST API. App metrics analytics, datastore
admin/backup/restore, task queue tagging, MapReduce, task queue REST API, OAuth, prospective
search, OpenID, and Page Speed are some of the experimental features.

Third-Party Services

As Google provides documentation and helper libraries to expand the capabilities of the app engine
platform, your app can perform tasks that are not built into the core product you are familiar with as
app engine. To do this, Google collaborates with other organizations. Along with the helper libraries,
the partners frequently provide exclusive deals to app engine users.
Advantages of Google App Engine

The Google App Engine has a lot of benefits that can help you advance your app ideas. This comprises:
1.​ Infrastructure for Security: The Internet infrastructure that Google uses is arguably the safest

in the entire world. Since the application data and code are hosted on extremely secure servers, there
has rarely been any kind of illegal access to date.
2.​ Faster Time to Market: For every organization, getting a product or service to market quickly

is crucial. When it comes to quickly releasing the product, encouraging the development and
maintenance of an app is essential. A firm can grow swiftly with Google Cloud App Engine’s
assistance.
3.​ Quick to Start: You don’t need to spend a lot of time prototyping or deploying the app to users

because there is no hardware or product to buy and maintain.


4.​ Easy to Use: The tools that you need to create, test, launch, and update the applications are

included in Google App Engine (GAE).


5.​ Rich set of APIs & Services: A number of built-in APIs and services in Google App Engine

enable developers to create strong, feature-rich apps.


6.​ Scalability: This is one of the deciding variables for the success of any software. When using

the Google app engine to construct apps, you may access technologies like GFS, Big Table, and others
that Google uses to build its own apps.
7.​ Performance and Reliability: Among international brands, Google ranks among the top ones.

Therefore, you must bear that in mind while talking about performance and reliability.
8.​ Cost Savings: To administer your servers, you don’t need to employ engineers or even do it

yourself. The money you save might be put toward developing other areas of your company.
9.​ Platform Independence: Since the app engine platform only has a few dependencies, you can

easily relocate all of your data to another environment.

STEPS TO INSTALL & CONFIGURE :


Before begin
1. Create a Google Cloud Platform project, if you don't have one already.
2. Make sure that Python 2.7 is installed on your system: python -V
Note: As of Cloud SDK version 206.0.0, the gcloud CLI has experimental support for running using
a Python 3.4+ interpreter (run gcloud topic startup for exclusions and more information on
configuring your Python interpreter). All other Cloud SDK tools still requires Python 2.7 interpreter.
3. Download the archive file best suited to your operating system. Most machines will run the 64-bit
package. If you'd like to check, run uname -m to verify if you're running a 64-bit system.
Platform Package Size SHA256 Checksum Linux
For 64-bit
google-cloud-sdk25.6 b1c87fc9451598a76cf66978dd8aa06482bfced639b56cf31559dc2c7f8b7b90
229.0.0-linuxMB
For 32-bit
google-cloud-sdk25.2 ee8c45f8018d0fee92b07c32cc6d8c891241da0b88bfe289d4e58e6746c3f668
229.0.0-linuxMB
(x86) x86.tar.gz
Alternatively, to download the Linux 64-bit archive file from your command-line, run:
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloudsdk-
229.0.0-linux-x86_64.tar.gz
For the 32-bit archive file, run:
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloudsdk-
229.0.0-linux-x86.tar.gz
4. Extract the archive to any location on your file system; preferably, your Home folder. On Linux,
you can extract the archive file by running this command:
tar zxvf [ARCHIVE_FILE] google-cloud-sdk
5. If you're having trouble getting the gcloud command to work, ensure your $PATH is defined
appropriately. Use the install script to add Cloud SDK tools to your path. You will also be able to
opt-in to command-completion for your bash shell and usage statistics collection during the
installation process. Run the script using this command:
./google-cloud-sdk/install.sh
Restart your terminal for the changes to take effect.
Alternatively, you can call Cloud SDK after extracting the downloaded archive by invoking its
executables via the full path.
Initialize the SDK
Use the gcloud init command to perform several common SDK setup tasks. These include
authorizing the SDK tools to access Google Cloud Platform using your user account credentials and
setting up the default SDK configuration.
To initialize the SDK:
1. Run the following at a command
prompt: gcloud init
Note: To prevent the command from launching a web browser, use gcloud init – console-
only instead. To authorize without a web browser and non-interactively, create a service account
with the appropriate scopes using the Google Cloud Platform Console and use gcloud auth
activate-service-account with the corresponding JSON key file.
2. Accept the option to log in using your Google user account:
To continue, you must log in. Would you like to log in (Y/n)? Y
3. In your browser, log in to your Google user account when prompted and click Allow to
grant permission to access Google Cloud Platform resources.
4. At the command prompt, select a Cloud Platform project from the list of those where
you have Owner, Editor or Viewer permissions:

Pick cloud project to use:


[1] [my-project-1]
[2] [my-project-2]
...
Please enter your numeric choice:
If you only have one project, gcloud init selects it for you.
5. If you have the Google Compute Engine API enabled, gcloud init allows you to
choose adefault Compute Engine zone:
Which compute zone would you like to use as project default?
[1] [asia-east1-a]
[2] [asia-east1-b]
...
[14] Do not use default zone
Please enter your numeric
choice:
gcloud init confirms that you have complete the setup steps successfully:gcloud
has now been configured!
You can use [gcloud config] to change more gcloud settings.
Your active configuration is: [default]
Run core gcloud commands
Run these gcloud commands to view information about your SDK installation:
1. To list accounts whose credentials are stored on the local
system:gcloud auth list
gcloud displays a list of credentialed accounts:
Credentialed
Accounts ACTIVE
ACCO
UNT
* [email protected] [email protected]
2. To list the properties in your active SDK configuration:
gcloud config list
gcloud displays the list of properties:
[core]
account = [email protected]
disable_usage_reporting = False
project = example-project
3. To view information about your Cloud SDK installation and the active SDK
configuration: gcloud info
gcloud displays a summary of information about your Cloud SDK installation. This includes
information about your system, the installed SDK components, the active user account and current
project, and the properties in the active SDK configuration.
4. To view information about gcloud commands and other topics from the command
line: gcloud help
For example, to view the help for gcloud compute instances create:
gcloud help compute instances create
gcloud displays a help topic that contains a description of the command, a list of
commandflags and arguments, and examples of how to use it.
How to Run Program:
Now as we have finished installing app engine, now it’s time to create and upload an app. In
this case we will be taking example of a “HELLO WORLD” app in python.
1. As we already have made sure that we have python installed in our system, It will be easier
for us to clone existing code and deploy it rather than creating our own so we will use python
docs- sample. Run the command “git clone https://github.com/GoogleCloudPlatform/pythondocs-
samples”.
2. cd python docs- samples/appengine/standard/hello_world
3. dev_appserver.py app.yaml
It will run and give you the url of default and admin. If you go to the link of default
you see the text hello world like this.
Output :
OR
Google App Engine, Installing it the right way in ubuntu.
1. Make sure you have python installed in your ubuntu system. run
the command “python -V” and most probably you will get
“Python 2.7.6” or above.
2. Crul https://sdk.cloud.google.com and use bash to run the
commands by typing this command curl
https://sdk.cloud.google.com | bash
3. Whenever you get to choose directories just hit enter, “YEAH IT WILL BE FINE”.
4. Follow the instructions in the installation process.
5. Then run gcloud init
6. Follow the installation instructions as they are very straight forward.
7. Choose the account you want to use for google app engine.
8. Choose the project with numeric choice (don’t use textual, you might make mistake). If you do
not already have a google app engine project create a app engine project by following this link.
https://console.cloud.google.com/start
9. Enable google api by pressing Y in the command line prompt.
Now as we have finished installing appengine, now it’s time to create and upload an app. In
this case we will be taking example of a “HELLO WORLD” app in python.
1. As we already have made sure that we have python installed in our system, It will be easier for us
to clone existing code and deploy it rather than creating our own so we will use pythondocs-sample.
Run the command “gitclone https://github.com/GoogleCloudPlatform/python-docssamples”.
2. cd to hello world sample by typing the command “ cd
pythondocs-samples/appengine/standard/hello_world”.
3. Then run the command “dev_appserver.py app.yml”. It will run and give you the url of default
and admin. If you go to the link of default you see the text hello world like this.

This is how you run the python app in your local server. But what we have to do is hosting the
app in google app engine. To do so Now let’s follow the following instructions.
1. Run the command Ctrl + C .
2. Being in the same working directory hello-world runt the command
gcloud app deploy
3. Select the project you want to deploy the app , press Y and enter to continue. after that you will
get the console output “Deployed service[default] to [Your web url for appengine] ”
4. If you copy and paste the url, you will see the hello world in the browser too.
Conclusion : Thus, We have installed and Configured Google App Engine.

Common questions

Powered by AI

Developers can use Google App Engine's SDK to develop and test their applications locally by emulating the App Engine's production environment. They can start by downloading the appropriate SDK for their development language, such as Python, Java, or Go . The SDK provides a deployment toolkit for each language that allows local testing of applications . By running commands such as `dev_appserver.py app.yaml`, developers can launch the application server locally and test their applications before deploying them to the Google App Engine .

Google App Engine's scalability is largely due to its ability to automatically adjust the computing resources based on demand using Google's vast infrastructure . It leverages built-in services like scalable data stores, work queues, and in-memory caching to manage different loads efficiently . Additionally, technologies such as GFS (Google File System) and Big Table are used to provide robust data storage solutions, further contributing to its capacity to handle scale as the application's usage grows .

To set up Google Cloud SDK on an Ubuntu system, start by verifying Python 2.7 installation with `python -V`, as it is needed for SDK tools other than gcloud CLI . Download the applicable 64-bit or 32-bit SDK archive, depending on your system, using commands like `curl` to retrieve files from Google's servers . Extract the downloaded archive, preferably to the Home directory, and run the installation script to add SDK tools to your path . Initialize the SDK with `gcloud init`, which will prompt you to log in with your Google account to authorize SDK tools access and set up the default configuration .

Google App Engine offers several advantages for web application deployment and development: it uses Google’s secure infrastructure, ensuring data and application security ; it provides a faster time to market by facilitating quick development and maintenance ; it is easy to use, with included tools for creating, testing, launching, and updating applications ; it offers scalability with access to technologies like GFS and Big Table ; it delivers excellent performance and reliability, leveraging Google's global infrastructure ; it provides cost savings, eliminating the need for dedicated personnel to manage servers ; and it ensures platform independence with minimal dependencies, aiding easy data relocation .

Google App Engine offers features across several categories with varying availabilities: Generally Usable Features include stable services like computing, data storage, and app configuration . Features in Preview are those expected to be broadly accessible in future updates but might currently change in ways that are not backward-compatible, like Sockets and MapReduce . Experimental Features, which offer advanced capabilities like OAuth and Prospective Search, may not be widely released and often require registration as a 'trusted tester' to access . These categorizations allow developers to choose from stable, upcoming, or cutting-edge functionalities depending on their risk appetite and application needs .

Google App Engine provides a robust security infrastructure for web application developers by hosting application data and code on Google's highly secure servers . This infrastructure, considered one of the safest globally, significantly reduces risks of unauthorized access, thereby alleviating security concerns for developers . This security enables developers to focus more on application development rather than security management, thus enhancing productivity and innovation. However, developers must still adhere to best coding practices as the security of the platform does not negate vulnerabilities within the application code itself .

Python 2.7 plays a crucial role in Google App Engine installations as it is the primary version supported for running cloud SDK tools, except for the gcloud CLI which has experimental support for Python 3.4+ . The full transition to support Python 3 is limited as most Cloud SDK tools remain dependent on Python 2.7, highlighting a lag in adaptation to Python 3 which is necessary for newer features and improved security . This distinction is significant because it influences the choice of runtime environments developers must work within if they aim to utilize the latest language features and security measures, which would be supported by Python 3 in broader Cloud environments. The need to maintain backward compatibility with existing applications further complicates comprehensive Python 3 support .

The gcloud command-line tool offers several functionalities for managing Google Cloud SDK installations that enhance user experience. It enables users to list credentialed accounts with `gcloud auth list` and configure the active SDK setup with `gcloud config list` . It also provides detailed installation information through `gcloud info`, facilitating effective system management . For user support, `gcloud help` offers comprehensive guides on various commands and usage scenarios, simplifying problem-solving and enhancing ease of use . These features streamline cloud management by providing centralized control and detailed guidance directly from the command line.

Developers using experimental features in Google App Engine must consider the possibility of changes that could introduce backward incompatibilities as these features are in testing and might not be finalized . They should be prepared for API updates that could necessitate code adjustments when features become stable. It is also critical for developers to stay informed on feature status updates to align with the latest stable releases and maintain compatibility. Additionally, they should weigh the benefits of innovative features against potential instability that could affect application performance and reliability .

Third-party services play a significant role in extending Google App Engine's capabilities by offering additional functionalities not natively included in the core platform . Google collaborates with various organizations to provide these services, often offering exclusive deals to app engine users and comprehensive documentation and helper libraries to facilitate integration . This allows developers to enhance their applications with specialized services such as advanced analytics, improved storage solutions, or enhanced authentication mechanisms, thereby broadening the potential use cases and effectiveness of their applications without increasing complexity beyond the Google ecosystem .

You might also like