0% found this document useful (0 votes)
5 views

Cloud Computing Lab_Manual Final

The document is a laboratory manual for a Cloud Computing course at MET's Institute of Engineering, detailing assignments for the Information Technology department. It covers tasks such as installing Google App Engine, simulating cloud scenarios with CloudSim, and transferring files between virtual machines. Each assignment includes theoretical background, requirements, and step-by-step instructions for implementation.

Uploaded by

jakhuranusrat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Cloud Computing Lab_Manual Final

The document is a laboratory manual for a Cloud Computing course at MET's Institute of Engineering, detailing assignments for the Information Technology department. It covers tasks such as installing Google App Engine, simulating cloud scenarios with CloudSim, and transferring files between virtual machines. Each assignment includes theoretical background, requirements, and step-by-step instructions for implementation.

Uploaded by

jakhuranusrat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 94

MET’s Institute of Engineering

Department of Information Technology

Laboratory Manual
LP-II [CLOUD COMPUTING]

TE-Information Technology

SEMESTER-II

A.Y. 2024-2025
INDEX

Sr. No Title Page No

1 Install Google App Engine. Create hello world app 01


and other simple web applications using
Python/Java.
2 Use GAE launcher to launch the web applications 07

3 Simulate a cloud scenario using CloudSim and run 13


a scheduling algorithm that is not present in
CloudSim.
4 Find a procedure to transfer the files from one 22
virtual machine to another virtual machine

5 Find a procedure to launch virtual machine. 29

6 Design and deploy a web application in a PaaS 42


environment.

7 Design and develop custom Application (Mini 63


Project) using Salesforce Cloud.

8 Design an Assignment to retrieve, verify, and 72


store user credentials using Firebase
Authentication, the Google App Engine standard
environment, and Google Cloud Data store.
Assignment 1

Title

Install Google App Engine. Create hello world app and other simple web
applications using Python/Java.

Requirements

1. Google App Engine


2. Python Interpreter (Python2.7.x)
3. Text Editor
4. Browser

Theory

A) Google App Engine

1. Google App Engine (GAE) is a platform-as-a-service product that


provides web app developers and enterprises with access to
Google's scalable hosting and tier 1 internet service.
2. GAE requires that applications be written in Java or Python, store data in
Google Bigtable and use the Google query language.
3. Noncompliant applications require modification to use GAE.
4. GAE provides more infrastructure than other scalable hosting services,
such as Amazon Elastic Compute Cloud (EC2).
5. GAE also eliminates some system administration and development tasks
to make writing scalable applications easier.
6. Google provides GAE free up to a certain amount of use for resources
like CPU, storage, API calls and concurrent requests
B) Google Cloud SDK

1. Google Cloud SDK (Software Development Kit), in simple terms, is a set


of tools that are used to manage applications and resources that are
hosted on the Google Cloud Platform.
2. It is composed of the gsutil, gcloud, and bqcommand line tools.
3. The gcloudtool is automatically downloaded with the Cloud SDK.
4. Google Cloud SDK run on specific platforms – Windows, Linux, and
macOS and requires Python 2.7.x.
5. SDK might have further necessities like Java tools used for the
development of Google App Engine needs Java 1.7 or the later one.
6. It can be used to locally deploy and test web applications.

C) Directory Structure for creating hello world application


1. The web applications to be deployed can be organized in the following
directory structure

root_directory
| templates
| | index.html
| static
| main.py
| app.yaml

2. The templates directory can be used to store the web templates of the
web application (HTML files).
3. The static directory can be used to store the web static files which
contain the styling and the business logic data for the web application
(CSS and JS files).
4. The main.py is used to define the routes, rendering logic, data
acquisition logic.
5. It provides the WSGI abstraction to the application.
6. The app.yaml file provides the runtime environment, URLs for routes and
launch configuration of the application in the form of key value pairs.
Steps

A) Install Google Cloud SDK on Windows or Linux machines

1. Visit the https://cloud.google.com/sdk/docs/install link to download the


CLI (Command line interface) tool for the Cloud SDK.
2. Select the appropriate operating system from the installation manual
3. Follow the provided instructions in the displayed section
a) For Windows users, the executable downloader is provided for
downloading.
b) For Ubuntu and Fedora users, terminal commands for installation are
provided using apt and dnf repositories respectively.

B) Creating the application

1. The application must be initialized using the above-mentioned directory


structure.
2. It is a recommended format for organization and readability of code.
3. The app.yaml file should contain the following content:

Contents of app.yaml

runtime : python2
api_version : 1
threadsafe : true

handlers
- url : /
script : main.app

4. The logic of the application, i.e. the Web server interaction code of the
application must be placed in the main.py file.
5. A simple code displaying the hello world on a web page is as follows

Contents of main.py for Hello World application


import webapp2

class MainPage(webapp2.RequestHandler) :

def get(self):
self.response.write(“Hello World”)

app = webapp2.WSGIApplication(
[(“/”, MainPage)],
debug=True
)

6. Finally, after saving the above code, the application can be run on the
localhost server using the following command. (The command must be
run on the Google Cloud Shell or the terminal in case of Ubuntu).

Command:
python <path_to_sdk>/bin/devappserver.py
<path_to_application_directory>

Sample Output

1. The application, if no errors are found, is launched on the port 8080 of the
localhost server.
2. The cloud console is visible on port 8000 of the localhost server.
3. The URL of localhost:8080 can be typed in the address bar of the browser to
view the application

4. Screenshots:
a) Application launch at port 8080

b) Terminal / Command Line prompts


c) Cloud Console at port 8000
Assignment 2

Title

Use GAE launcher to launch the web applications.

Requirements

1. Google App Engine


2. Python Interpreter (Python2.7.x)
3. Browser

Theory

A) Google App Engine

1. Google App Engine (GAE) is a platform-as-a-service product that


provides web app developers and enterprises with access to
Google's scalable hosting and tier 1 internet service.
2. GAE requires that applications be written in Java or Python, store data in
Google Bigtable and use the Google query language.
3. Noncompliant applications require modification to use GAE.
4. GAE provides more infrastructure than other scalable hosting services,
such as Amazon Elastic Compute Cloud (EC2).
5. GAE also eliminates some system administration and development tasks
to make writing scalable applications easier.
6. Google provides GAE free up to a certain amount of use for resources
like CPU, storage, API calls and concurrent requests

B) Directory Structure for creating web application


1. The web applications to be deployed can be organized in the following
directory structure
root_directory
| templates
| | index.html
| | results.html
| static
| main.py
| app.yaml

2. The templates directory can be used to store the web templates of the
web application (HTML files).
3. The static directory can be used to store the web static files which
contain the styling and the business logic data for the web application
(CSS and JS files).
4. The main.py is used to define the routes, rendering logic, data
acquisition logic.
5. It provides the WSGI abstraction to the application.
6. The app.yaml file provides the runtime environment, URLs for routes and
launch configuration of the application in the form of key value pairs.

Steps

A) Creating the application

1. The application must be initialized using the above-mentioned directory


structure.
2. It is a recommended format for organization and readability of code.
3. Create index.html and results.html as web templates with index.html for
taking user input and results.html for displaying response from the API
call.
4. The app.yaml file should contain the following content:

Contents of app.yaml

runtime : python2
api_version : 1
threadsafe : true
handlers
url : /
script : main.app

5. The logic of the application, i.e. the Web server interaction code of the
application must be placed in the main.py file.
6. The following python code sends request for information to the API and
interprets response from the API (here, World Time API is used).

Command:
python <path_to_sdk>/bin/devappserver.py
<path_to_application_directory>
Sample Output

A) The application, if no errors are found, is launched on the port 8080 of the
localhost server.
B) The cloud console is visible on port 8000 of the localhost server.
C) The URL of localhost:8080 can be typed in the address bar of the browser to
view the application

D) Screenshots:

a) Application launch at port 8080 (Displaying index.html)


b) Displaying results.html to display results from the API call
Assignment 3

Title

Simulate a cloud scenario using CloudSim and run a scheduling algorithm that is
not present in CloudSim.

Requirements

1. Java JDK and JRE


2. CloudSim archives (CloudSim4)
3. Eclipse IDE

Theory

A) CloudSim

1. CloudSim is an open-source framework, which is used to simulate cloud


computing infrastructure and services.
2. It is developed by the CLOUDS Lab organization and is written entirely in
Java.
3. It is used for modelling and simulating a cloud computing environment
as a means for evaluating a hypothesis prior to software development in
order to reproduce tests and results.
4. If you were to deploy an application or a website on the cloud and
wanted to test the services and load that your product can handle and
also tune its performance to overcome bottlenecks before risking
deployment, then such evaluations could be performed by simply coding
a simulation of that environment with the help of various flexible and
scalable classes provided by the CloudSim package, free of cost.

B) Benefits of CloudSim

1. No capital investment involved


2. Easy to use and Scalable
3. Risks can be evaluated at an earlier stage
4. No need for try-and-error approaches

C) Architecture

1. CloudSim has a layered architecture which separates the User Code and
the simulation environment.
2. It can be depicted as follows

D) CloudSim Components

• Datacenter: used for modelling the foundational hardware equipment


of any cloud environment, that is the Datacenter. This class provides
methods to specify the functional requirements of the Datacenter as
well as methods to set the allocation policies of the VMs etc.
• Host: this class executes actions related to management of virtual
machines. It also defines policies for provisioning memory and
bandwidth to the virtual machines, as well as allocating CPU cores to
the virtual machines.
• VM: this class represents a virtual machine by providing data members
defining a VM’s bandwidth, RAM, mips (million instructions per
second), size while also providing setter and getter methods for these
parameters.
• Cloudlet: a cloudlet class represents any task that is run on a VM, like a
processing task, or a memory access task, or a file updating task etc. It
stores parameters defining the characteristics of a task such as its
length, size, mi (million instructions) and provides methods similarly to
VM class while also providing methods that define a task’s execution
time, status, cost and history.
• DatacenterBroker: is an entity acting on behalf of the user/customer. It
is responsible for functioning of VMs, including VM creation,
management, destruction and submission of cloudlets to the VM.
• CloudSim: this is the class responsible for initializing and starting the
simulation environment after all the necessary cloud entities have
been defined and later stopping after all the entities have been
destroyed.

E) SJF algorithm
1. SJF stands for Shortest Job First
2. Shortest Job first has the advantage of having a minimum average
waiting time among all scheduling algorithms.
3. It is a Greedy Algorithm.
4. It may cause starvation if shorter processes keep coming. This problem
can be solved using the concept of ageing.
5. It is practically infeasible as Operating System may not know burst time
and therefore may not sort them. While it is not possible to predict
execution time, several methods can be used to estimate the execution
time for a job, such as a weighted average of previous execution times.
SJF can be used in specialized environments where accurate estimates
of running time are available.

Steps

A) Installation of CloudSim and creation of simulation environment

1. Visit https://github.com/Cloudslab/cloudsim/releases to download the


CloudSim archives for CloudSim 4.
2. Extract the archive.
3. The jars folder of the extracted archive should contain the following files:
a) cloudsim-4.0.jar
b) cloudsim-examples.jar
4. Create a new Java Project using the Eclipse IDE.
5. Right click on the project root and select the Build Path option from the
dropdown.

6. Select the Configure Build Path section from the extended dropdown
7. Select the Libraries section and click on Add External JARs field on the pop
up

8. Navigate to the jars directory of the CloudSim archive and include the 2 jars
in the project.
9. Create a new package in the src directory of the project.
10. Copy the code files for the constants, Data Center Creator, Data Center
Broker, Matrix Generator and the SJF scheduler files from the
https://github.com/suyash-more/Cloud-Computing-
Projects/tree/master/Scheduling-Algorithm-in-CloudSim/src link.
11. Make sure that the package name provided in each file is the same as the
previously created package.

B) Execution of code

1. Right click on the project


2. Run the project as a Java Application (option in extended dropdown)

3. The result is displayed on the console


Assignment 4

Title:
Find a procedure to transfer the files from one virtual machine to another virtual machine

Requirements:
2 Virtual machines installed, for this case we have Ubuntu 21 and Kali Linux.

Steps:
1. Create a Nat network in which 2 virtual machine can communicate.

• Go to prefesences by clicking File option in Top.

• Now select the network option and create a new NAT network
• After creating a NAT network, now go to virtual machine setting by right clicking
on the preferred machine.

• Now go to Network and change the attached option to “NAT network” and select
the network we created earlier.
• Now repeat the same process for another machine.

2. Launch both virtual machines


• Now install “Net-tools” on both machine which will help to identify i/p address of
the machine. Command: sudo apt install net-tools

• Now create a file in Home folder using any text editor. Here we have used
“Test_file.txt” and will transfer from Kali Linux (Right Machine) to Ubuntu (left
Machine).
• Now we can check i/p address of Ubuntu where we want to transfer the file using
“ ifconfig ” command. Here Ubuntu has i/p address 10.0.2.4.
• Transfer the file using command- scp Test_file.txt [email protected]:
Where Test_file.txt is our file
raghav is username of Ubuntu
10.0.2.4 is ip address of Ubuntu (left machine)

Optional: if scp is not installed then install by using command:


sudo apt install openssh-server

• Now enter the password for Ubuntu(left machine) admin, after enter the
password, the file will be sent from Kali Linux(Right machine) to Ubuntu(Left
machine)
Assignment 5

Problem Statement:
Find a procedure to launch virtual machine.

Theory:

Virtual Machine:

Virtual machines allow you to run an operating system in an app window on


your desktop that behaves like a full, separate computer. You can use them play
around with different operating systems, run software your main operating
system can’t, and try out apps in a safe, sandboxed environment.
A virtual machine app creates a virtualized environment—called, simply
enough, a virtual machine—that behaves like a separate computer system,
complete with virtual hardware devices. The VM runs as a process in a window
on your current operating system. You can boot an operating system installer
disc (or live CD) inside the virtual machine, and the operating system will be
“tricked” into thinking it’s running on a real computer. It will install and run just
as it would on a real, physical machine. Whenever you want to use the operating
system, you can open the virtual machine program and use it in a window on
your current desktop.
In the VM world, the operating system actually running on your computer is
called the host and any operating systems running inside VMs are called guests.
The main purpose of VMs is to operate multiple operating systems at the same time, from the
same piece of hardware.
Advantages of VM:
The multiplicity of Operating Systems Reduced Overhead
Safety Net for Data – Rapid Disaster Recovery and Auto Backups Scalability
Centralization

Requirement:

Account on

AWS or Azure or Google Cloud.

Detailed Steps:-

1. https://www.awseducate.com/registration/s/

2. Register your self in "Learn Cloud Skills" by

entering email id

3.
4.
5.

Accessing the AWS Management Console

1. At the top of these instructions, choose Start Lab to launch your lab.

A Start Lab panel opens, and it displays the lab status.

2. Wait until you see the message Lab status: ready, then close the Start Lab panel by
choosing the X.
3. At the top of these instructions, choose AWS .

This opens the AWS Management Console in a new browser tab. The system will
automatically log you in.

6.

Follow all instructions as given:

Task 1: Launching your EC2 instance


In this task, you launch an EC2 instance with termination protection. Termination protection
prevents you from accidentally terminating an EC2 instance. You deploy your instance with a
user data script in order to deploy a simple web server.

1. In the AWS Management Console on the Services menu, choose EC2.


2. Choose Launch instance, and then select Launch instance.

Step 1: Choose an Amazon Machine Image (AMI)


An AMI provides the information required to launch an instance, which is a virtual server in the
cloud. An AMI includes the following:

• A template for the root volume for the instance (for example, an operating system or
an application server with applications)
• Launch permissions that control which AWS accounts can use the AMI to launch
instances
• A block device mapping that specifies the volumes to attach to the instance when it is
launched
The Quick Start list contains the most commonly used AMIs. You can also create your own AMI
or select an AMI from the AWS Marketplace, an online store where you can sell or buy
software that runs on AWS.

1. At the top of the list, choose Select next to Amazon Linux 2 AMI.
Step 2: Choose an instance type
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases.
Instance types comprise varying combinations of CPU, memory, storage, and networking
capacity and give you the flexibility to choose the appropriate mix of resources for your
applications. Each instance type includes one or more instance sizes so that you can scale your
resources to the requirements of your target workload.

Select a t2.micro instance This instance type has 1 virtual CPU and 1 GiB of memory.

1. Choose Next: Configure Instance Details


Step 3: Configure instance details
You use this page to configure the instance to suit your requirements. This configuration
includes networking and monitoring settings.

The Network indicates which virtual private cloud (VPC) you want to launch the instance into.
You can have multiple networks, including different ones for development, testing, and
production.

1. For Network, select Lab VPC.

The Lab VPC was created using an AWS CloudFormation template during the setup
process of your lab. This VPC includes two public subnets in two different Availability
Zones.

2. For Enable termination protection, select Protect against accidental termination.

When you no longer require an EC2 instance, you can terminate it, which means that
the instance stops, and Amazon EC2 releases the instance's resources. You cannot
restart a terminated instance. If you want to prevent your users from accidentally
terminating the instance, you can enable termination protection for the instance, which
prevents users from terminating instances.

Step 4: Add storage


Amazon EC2 stores data on a network-attached virtual disk called Amazon Elastic Block Store
(Amazon EBS).

You launch the EC2 instance using a default 8 GiB disk volume. This is your root volume (also
known as a boot volume).
1. Choose Next: Add Tags

Step 5: Add tags


Using tags, you can categorize your AWS resources in different ways (for example, by purpose,
owner, or environment). This categorization is useful when you have many resources of the
same type: you can quickly identify a specific resource based on the tags you have assigned to
it. Each tag consists of a key and a value, both of which you define.

1. Choose Add Tag, and then configure the following:


o Key: Name
o Value: Web-Server

Make sure the punctuation for the tags matches exactly as above.

1. Choose Next: Configure Security Group

Note: Notice the "Rules with source of 0.0.0.0/0 allow all IP addresses to access your instance.
We recommend setting security group rules to allow access from known IP addresses only."
While this is true and common best practice, this has been simplified for the sake of this lab.
Step 6: Configure a security group
A security group acts as a virtual firewall that controls the traffic for one or more instances.
When you launch an instance, you associate one or more security groups with the instance.
You add rules to each security group that allow traffic to or from its associated instances. You
can modify the rules for a security group at any time; the new rules are automatically applied
to all instances that are associated with the security group.

1. On Step 6: Configure Security Group, configure the following:


o Security group name: Web Server security group
o Description: Security group for my web server

In this lab, you do not log in to your instance using SSH. Removing SSH access improves
the security of the instance.

2. To delete the existing SSH rule, choose the next to the existing SSH rule.
3. Choose Review and Launch

+Step 7: Review instance launch


The Review page displays the configuration for the instance that you are about to launch.

1. Choose Launch

A Select an existing key pair or create a new key pair window will appear.

Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. To
log in to your instance, you must create a key pair, specify the name of the key pair
when you launch the instance, and provide the private key when you connect to the
instance.

In this lab, you do not log in to your instance, so you do not require a key pair.

2. Choose the Choose an existing key pair dropdown list, and select Proceed without a
key pair.
3. Select the next to the text I acknowledge that ....
4. Choose Launch Instances

Your instance will now be launched.

5. Choose View Instances

The instance appears in a Pending state, which means it is being launched. It then
changes to Running, which indicates that the instance has started booting. There will be
a short time before you can access the instance.

The instance receives a public DNS name that you can use to contact the instance from
the Internet.

Select the box next to your Web Server. The Details tab displays detailed information
about your instance.

To view more information in the Details tab, drag the window divider upward.

Review the information displayed in the Details, Security and Networking tabs.

6. Wait for your instance to display the following:

Note: Refresh if needed.

o Instance State: Running


o Status Checks: 2/2 checks passed
Assignment 6

Title

Design and deploy a web application in a PaaS environment.

Objectives

• Launch virtual machine EC2


• Launch a web server with termination protection enabled
• Running web page
• Monitor Your EC2 instance
• Modify the security group that your web server is using to allow HTTP access
• Resize your EC2 instance to scale

Theory
Platform as a service (PaaS)
It is a cloud computing model where a third-party provider delivers hardware and
software tools to users over the internet. Usually, these tools are needed for
application development. A PaaS provider hosts the hardware and software on its
own infrastructure.

Platform as a service (PaaS) or application platform as a service (aPaaS) or


platform-based service is a category of cloud computing services that allows
customers to provision, instantiate, run, and manage a modular bundle comprising
a computing platform and one or more applications, without the complexity of
building and maintaining the infrastructure typically associated with developing
and launching the application(s); and to allow developers to create, develop, and
package such software bundles.

PaaS can be delivered in three ways:

• As a public cloud service from a provider, where the consumer controls


software deployment with minimal configuration options, and the provider
provides the networks, servers, storage, operating
system (OS), middleware (e.g. Java runtime, .NET runtime, integration,
etc.), database and other services to host the consumer's application.
• As a private service (software or appliance) behind a firewall.
• As software deployed on public infrastructure as a service

Detailed Steps:-

1. https://www.awseducate.com/registration/s/

2. Register your self in "Learn Cloud Skills" by

entering email id
3.
4.
5.

Accessing the AWS Management Console


1. At the top of these instructions, choose Start Lab to launch your lab.

A Start Lab panel opens, and it displays the lab status.

2. Wait until you see the message Lab status: ready, then close the Start Lab panel by
choosing the X.

3. At the top of these instructions, choose AWS .

This opens the AWS Management Console in a new browser tab. The system will
automatically log you in.

6.

Follow all instructions as given:

Task 1: Launching your EC2 instance


In this task, you launch an EC2 instance with termination protection. Termination protection
prevents you from accidentally terminating an EC2 instance. You deploy your instance with a
user data script in order to deploy a simple web server.
1. In the AWS Management Console on the Services menu, choose EC2.
2. Choose Launch instance, and then select Launch instance.

Step 1: Choose an Amazon Machine Image (AMI)


An AMI provides the information required to launch an instance, which is a virtual server in the
cloud. An AMI includes the following:

• A template for the root volume for the instance (for example, an operating system or an
application server with applications)
• Launch permissions that control which AWS accounts can use the AMI to launch
instances
• A block device mapping that specifies the volumes to attach to the instance when it is
launched

The Quick Start list contains the most commonly used AMIs. You can also create your own AMI
or select an AMI from the AWS Marketplace, an online store where you can sell or buy software
that runs on AWS.

1. At the top of the list, choose Select next to Amazon Linux 2 AMI.
Step 2: Choose an instance type
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases.
Instance types comprise varying combinations of CPU, memory, storage, and networking
capacity and give you the flexibility to choose the appropriate mix of resources for your
applications. Each instance type includes one or more instance sizes so that you can scale your
resources to the requirements of your target workload.

Select a t2.micro instance This instance type has 1 virtual CPU and 1 GiB of memory.

1. Choose Next: Configure Instance Details


Step 3: Configure instance details
You use this page to configure the instance to suit your requirements. This configuration
includes networking and monitoring settings.

The Network indicates which virtual private cloud (VPC) you want to launch the instance into.
You can have multiple networks, including different ones for development, testing, and
production.

1. For Network, select Lab VPC.

The Lab VPC was created using an AWS CloudFormation template during the setup
process of your lab. This VPC includes two public subnets in two different Availability
Zones.

2. For Enable termination protection, select Protect against accidental termination.

When you no longer require an EC2 instance, you can terminate it, which means that
the instance stops, and Amazon EC2 releases the instance's resources. You cannot
restart a terminated instance. If you want to prevent your users from accidentally
terminating the instance, you can enable termination protection for the instance, which
prevents users from terminating instances.
3. Scroll down, and then expand Advanced Details.

A field for User data appears.

When you launch an instance in Amazon EC2, you have the option of passing user data
to the instance that can be used to perform common automated configuration tasks and
even run scripts after the instance starts.

4. Copy the following web application home page sample code into user data filed.
5. Also code other pages for your web application.

#!/bin/bash
yum -y install httpd
systemctl enable httpd
systemctl start httpd
echo '<html><h1>Hello From Your Web Server!</h1></html>' > /var/www/html/index.html

The script does the following:

o Install an Apache web server (httpd)


o Configure the web server to automatically start on boot
o Activate the Web server
o Create a simple web page
1. Choose Next: Add Storage
Step 4: Add storage
Amazon EC2 stores data on a network-attached virtual disk called Amazon Elastic Block Store
(Amazon EBS).

You launch the EC2 instance using a default 8 GiB disk volume. This is your root volume (also
known as a boot volume).

1. Choose Next: Add Tags

Step 5: Add tags


Using tags, you can categorize your AWS resources in different ways (for example, by purpose,
owner, or environment). This categorization is useful when you have many resources of the
same type: you can quickly identify a specific resource based on the tags you have assigned to
it. Each tag consists of a key and a value, both of which you define.

1. Choose Add Tag, and then configure the following:


o Key: Name
o Value: Web-Server
Make sure the punctuation for the tags matches exactly as above.

1. Choose Next: Configure Security Group

Note: Notice the "Rules with source of 0.0.0.0/0 allow all IP addresses to access your instance.
We recommend setting security group rules to allow access from known IP addresses only."
While this is true and common best practice, this has been simplified for the sake of this lab.
Step 6: Configure a security group
A security group acts as a virtual firewall that controls the traffic for one or more instances.
When you launch an instance, you associate one or more security groups with the instance. You
add rules to each security group that allow traffic to or from its associated instances. You can
modify the rules for a security group at any time; the new rules are automatically applied to all
instances that are associated with the security group.

1. On Step 6: Configure Security Group, configure the following:


o Security group name: Web Server security group
o Description: Security group for my web server

In this lab, you do not log in to your instance using SSH. Removing SSH access improves
the security of the instance.

2. To delete the existing SSH rule, choose the next to the existing SSH rule.
3. Choose Review and Launch
Step 7: Review instance launch
The Review page displays the configuration for the instance that you are about to launch.

1. Choose Launch

A Select an existing key pair or create a new key pair window will appear.

Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. To
log in to your instance, you must create a key pair, specify the name of the key pair
when you launch the instance, and provide the private key when you connect to the
instance.

In this lab, you do not log in to your instance, so you do not require a key pair.

2. Choose the Choose an existing key pair dropdown list, and select Proceed without a
key pair.
3. Select the next to the text I acknowledge that ....
4. Choose Launch Instances

Your instance will now be launched.

5. Choose View Instances

The instance appears in a Pending state, which means it is being launched. It then
changes to Running, which indicates that the instance has started booting. There will be
a short time before you can access the instance.

The instance receives a public DNS name that you can use to contact the instance from
the Internet.

Select the box next to your Web Server. The Details tab displays detailed information
about your instance.

To view more information in the Details tab, drag the window divider upward.

Review the information displayed in the Details, Security and Networking tabs.

6. Wait for your instance to display the following:

Note: Refresh if needed.

o Instance State: Running


o Status Checks: 2/2 checks passed
Task 2: Monitoring your instance
Monitoring is an important part of maintaining the reliability, availability, and performance of
your EC2 instances and your AWS solutions.

1. Choose the Status checks tab.

With instance status monitoring, you can quickly determine whether Amazon EC2 has
detected any problems that might prevent your instances from running applications.
Amazon EC2 performs automated checks on every running EC2 instance to identify
hardware and software issues.

Notice that both the System reachability and Instance reachability checks have passed.

2. Choose the Monitoring tab.

This tab displays Amazon CloudWatch metrics for your instance. Currently, there are not
many metrics to display because the instance was recently launched.

You can chose a graph to see an expanded view.


Amazon EC2 sends metrics to Amazon CloudWatch for your EC2 instances. Basic (5
minute) monitoring is enabled by default. You can enable detailed (1 minute)
monitoring.

3. At the top of the page, choose the Actions dropdown menu. Select Monitor and
troubleshoot Get system log.

The system log displays the console output of the instance, which is a valuable tool for
problem diagnosis. It is especially useful for troubleshooting kernel problems and
service configuration issues that could cause an instance to terminate or become
unreachable before its SSH daemon can be started. If you do not see a system log, wait
a few minutes and then try again.

1. Scroll through the output, and note that the HTTP package was installed from the user
data that you added when you created the instance.
2. Choose Cancel to return to the Amazon EC2 dashboard.
3. With your web server selected, choose the Actions dropdown menu, and select Monitor
and troubleshoot Get instance screenshot.

This option shows you what your EC2 instance console would look like if a screen were
attached to it. Notice it is essentially a command line interface.

If you are unable to reach your instance via SSH or RDP, you can capture a screenshot of
your instance and view it as an image. This option provides visibility about the status of
the instance and allows for quicker troubleshooting.

4. At the bottom of the page, choose Cancel.


Task 3: Updating your security group and accessing
the web server
When you launched the EC2 instance, you provided a script that installed a web server and
created a simple web page. In this task, you access content from the web server.

1. Select box next to the EC2 web server you created, and then choose the Details tab.
2. Copy the Public IPv4 address of your instance to your clipboard.
3. In your web browser, open a new tab, paste the IP address you just copied, and then
press Enter.

Question: Are you able to access your web server? Why not?

You are not currently able to access your web server because the security group is not
permitting inbound traffic on port 80, which is used for HTTP web requests. This is a
demonstration of how to use a security group as a firewall to restrict the network traffic
that is allowed in and out of an instance.

To correct this issue, you now update the security group to permit web traffic on port
80.

4. Keep the browser tab open, but return to the EC2 Management Console tab.
5. In the left navigation pane, choose Security Groups.
6. Select the check box next to the Web Server security group.
7. Choose the Inbound rules tab.

The security group currently has no rules.

8. Choose Edit inbound rules and then choose Add rule and configure the following:
o Type: Choose HTTP.
o Source: Choose Anywhere.
9. Choose Save rules
10. Return to the web server tab that you previously opened, and choose to refresh the
page.

You should see the message Hello From Your Web Server!
Assignment 7

Title

Design and develop custom Application (Mini Project) using Salesforce Cloud.

Requirements

1. Salesforce
2. Browser

Theory

A) Salesforce:

1. Salesforce, Inc. is a famous American cloud-based software company that


provides CRM services.
2. Salesforce is a popular CRM tool for support, sales, and marketing teams
worldwide.
3. Salesforce services allow businesses to use cloud technology to better
connect with partners, customers, and potential customers. Using the
Salesforce CRM, companies can track customer activity, market to
customers, and many more services.
4. A CRM platform helps you go deeper with all your metrics and data; you
could also set up a dashboard that showcases your data visually. In
addition to this, you can also have personalized outreach with
automation.
5. Another significant benefit is that a CRM platform can also improve
customer service's ability to help customers or a sales team's outreach
efforts.
6. Today, Salesforce is the #1 customer relationship management (CRM)
platform in the world. It also offers organizations easy access to web-
based software over the internet.
7.

B) Salesforce Architecture:

The different layers of the Salesforce architecture are:

1. Multi-tenant:
Salesforce stores data in a single database schema. There can be a single
instance of a software server with multiple tenants. Speaking about a multi-
tenant architecture, there is a single shared application service to several
clients. This makes it cost-effective. On the contrary, in a single-tenant, the
development and maintenance cost must be entirely owned by one client.
Hence the multi-tenant architecture is a boon.

2. Metadata:
Salesforce uses a metadata-driven development model. This allows
developers to only focus on building the application. This metadata-driven
platform makes customization and scaling up easy.

3. API:
Salesforce provides a powerful source of APIs. This helps in developing and
customizing the Salesforce1 Mobile App. Every feature of the Salesforce
design has been planned and implemented precisely.
C) Salesforce Cloud Services:

1. Sales Cloud: It is one of the most essential and popular products of


Salesforce. It is a CRM platform that allows you to manage your company's
sales, marketing, and customer support aspects. Sales Cloud gives you the
status of the lead that will be helpful for sales executives.
2. Marketing Cloud: Marketing is crucial when it comes to running a business.
Marketing cloud lets you run campaigns, manage emails, messages, social
media, content management, data analytics, etc., with the help of a
tracking system.
3. Analytics Cloud: This enables users to create a highly visually appealing
dashboard of the available data. By doing so, you can get an in-depth
understanding and analyze the trends, business, and more.
4. IoT Cloud: Salesforce IoT cloud is used when your company needs to handle
the Internet of Things (IoT) data. This platform can take vast volumes of
data generated by various IoT devices; following this, you get real-time
responses.
5. Salesforce App Cloud: You can use this service to develop custom apps that
will run on the Salesforce platform.
6. Salesforce Service Cloud: Salesforce also helps you serve your customers.
This is a service platform for your organization’s support team. It provides
features like case tracking and social networking plug-in.

Steps

1. Signup and Setup:

a. Signup for Salesforce:


b. Login and you will be directed to Home page:

c. Go to the Setup home page for custom application creation:

2. Custom Application Creation:


a. Go to the App Manager from the Setup console and click on New Lightning App:

b. In the modal that appears, enter app details and add logo and color for branding:
c. Add App options like Navigation and Supported Form Factors:
d. Add required Utility Items for your application:

e. Add required Navigation Items for your application:


f. Add required User Profiles for your application:
g. Your application is successfully created. You can view your application enlisted
in the App Manager. You can visit your application by clicking the apps icon in
the top left of the home page, then search for your app and click on it to visit:

3. Custom Object Creation details:


Assignment 8

Title

Design an Assignment to retrieve, verify, and store user credentials using Firebase
Authentication, the Google App Engine standard environment, and Google Cloud
Data store.

Requirements

1. Google App Engine


2. Firebase
3. Google Cloud
4. Text Editor
5. Browser

Theory

A) Firebase:

1. Google Firebase is a mobile application development platform from Google


with powerful features for developing, handling, and enhancing applications.
Firebase is a backend platform for building web and mobile applications.

2. Firebase is fundamentally a collection of tools developers can rely on,


creating applications and expanding them based on demand.

3. Firebase aims to solve three main problems for developers:

a. Build an app, fast


b. Release and monitor an app with confidence
c. Engage users,

4. Developers relying on this platform get access to services that they would
have to develop themselves, and it enables them to lay focus on delivering
robust application experiences.
5. Some of the Google Firebase platform’s standout features include databases,
authentication, push messages, analytics, file storage, and much more.

6. Since the services are cloud-hosted, developers can smoothly perform on-
demand scaling without any hassle. Firebase is currently among the top app
development platforms relied upon by developers across the globe.

B) Firebase Key Features:

1. Authentication:
It supports authentication using passwords, phone numbers, Google,
Facebook, Twitter, and more. The Firebase Authentication (SDK) can be
used to manually integrate one or more sign-in methods into an app.

2. Realtime database:
Data is synced across all clients in real-time and remains available even
when an app goes offline.

3. File Storage:
Firebase Storage provides a simple way to save binary files — most often
images, but it could be anything — to Google Cloud Storage directly from
the client. Firebase Storage has it’s own system of security rules to protect
your GCloud bucket from the masses, while granting detailed write
privileges to your authenticated clients.

4. Hosting:
Firebase Hosting provides fast hosting for a web app; content is cached
into content delivery networks worldwide.

5. Test lab:
The application is tested on virtual and physical devices located in
Google’s data centers.
6. Notifications:
Notifications can be sent with firebase with no additional coding. Users
can get started with firebase for free; more details can be found on
the official website.
C) Firebase Uses:
Steps
1. Initial Setup:
a. Install and configure Google App Engine:
b. Signup and Login to Google Cloud platform:

c. Login to Firebase:
2. Creation of project in Google Cloud:

a. Create a new project in Google Cloud platform:

b. You can view the created project in the dashboard:


3. Setup Google App Engine:

a. Open the GAE SDK shell and type the command ‘gcloud init’. Then select
appropriate configuration an account:

b. From the list that appears select the appropriate project that we created in
Google Cloud:
4. Adding Firebase to the project:

a. Go to the Firebase console and click on Create a project:

b. In the next window, add the project name that we created in Google Cloud:
c. Confirm Firebase billing plan:

d. The next window shows some instructions. Read those and click Continue:
e. Enable Google Analytics for the project:

f. Configure Google Analytics by selecting Default Account for Firebase:


g. We have successfully added Firebase to our project.

5. Adding an App to the Firebase project:

a. From the console, go to your project and click ‘</>’ to add your app:
b. Add a nickname for your app and click Register app:

c. You will receive further configuration details then click Continue to console:
d. You will see the app on the console, click on it to view all its details.
6. Authentication in Firebase:

a. Go to the project’s console and select Authentication:


b. In the Sign-in methods you will see various options, select any one option:

c. Perform appropriate configuration for that platform. You can also add
domains:
d. Then you can see the added sign-in methods and the domains:
e. Also, when the users login to your application, their details will be visible at
the Users tab:

7. Installing dependencies and Running application locally:


a. Go to the backend directory of your application. By using the command ‘pip
install -t lib -r requirements.txt’ install the dependencies:

b. The requirements will be installed at specified location:


c. Run ‘py dev_appserver.py frontend/app.yaml backend/app.yaml’ to run your
application on localho

8. Deploying your app:

a. Enter ‘gcloud app deploy’ command to deploy your application as shown


below:
b. Select appropriate region if prompted.

c. The backend and the frontend of your application will be deployed:


Sample Output

a. The initial page has a heading and the login options:

b. The login page has to options to login. You can login through anyone of them
as follows:
(i) Google Account: Choose appropriate Google account to login:
(ii) Mail: Use a valid mail address to login. The user is then prompted to

enter name and create a password:

c. Then the user can add a note and then save it. Further user can sign out by
clicking respective button:

You might also like