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

Cloud Computing Lab Manual for IoT

The document is a lab manual for a Cloud Computing and Virtualization course, detailing objectives, outcomes, and a list of experiments. It covers hands-on activities involving virtualization tools like Oracle VirtualBox, cloud services such as AWS and Google App Engine, and data processing with Hadoop. The manual includes procedures for each experiment, expected outcomes, and required tools, along with an evaluation scheme and references.

Uploaded by

22tq1a6912
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 views11 pages

Cloud Computing Lab Manual for IoT

The document is a lab manual for a Cloud Computing and Virtualization course, detailing objectives, outcomes, and a list of experiments. It covers hands-on activities involving virtualization tools like Oracle VirtualBox, cloud services such as AWS and Google App Engine, and data processing with Hadoop. The manual includes procedures for each experiment, expected outcomes, and required tools, along with an evaluation scheme and references.

Uploaded by

22tq1a6912
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

Department of Computer Science and Engineering (IoT)

Lab Manual
Course Title: Cloud Computing and Virtualization Lab
Course Code: IO612PE
Semester: [Link]. IV Year I Semester LT PC
0021
Course Objectives
1. To understand guiding design principles for Cloud Computing.
2. To explore the concepts of virtualization and its importance in cloud computing.
3. To gain hands-on experience in using public cloud services and virtualization tools.
4. To understand the use of Hadoop, AWS, Google App Engine, and Azure for cloud-based
applications.
Course Outcomes
Upon successful completion of this lab, students will be able to:
1. Understand the fundamental concepts of Cloud Computing and Virtualization.
2. Explore and configure several cloud services and tools.
3. Deploy and execute applications in virtualized and cloud environments.
4. Demonstrate basic Hadoop applications and simple cloud service integrations.

List of Experiments

Exp.
Name of the Experiment Expected Outcome / Objective
No.

Install Oracle VirtualBox and create two Virtual Learn to create and manage multiple
1
Machines (VMs) on your laptop. virtual machines using VirtualBox.

Understand software installation in a


Install Turbo C in the guest OS and execute a C
2 virtualized environment and run basic
program.
programs.

Test the ping command to check communication Verify network communication


3
between the Guest OS and the Host OS. between VMs and the host system.

Set up a single-node Hadoop


4 Install Hadoop Single Node Setup.
environment for big data processing.
Exp.
Name of the Experiment Expected Outcome / Objective
No.

Understand virtualization of hardware


Hopkinson’s Test on DC Shunt Machines (Virtual
5 resources and testing through
Simulation).
simulation.

Develop a Hadoop application to count the number of Learn to write and execute
6
characters, words, and each character frequency. MapReduce programs in Hadoop.

Process datasets and perform


Develop a Hadoop application to find the year of
7 analytical computations using
maximum and minimum data usage.
Hadoop.

Develop a Hadoop application to count male/female Learn structured data processing and
8 students in schools with output in a specific format custom output formatting using
(GP-F, GP-M, MS-F, MS-M). MapReduce.

Establish an AWS account, launch an EC2 instance, Learn basic cloud infrastructure setup
9
and connect using SSH. and remote server connection.

Design a protocol and use AWS Simple Queue Learn message queuing and
10 Service (SQS) for barrier synchronisation after the synchronisation in distributed cloud
first phase. applications.

Implement coordination and


Use ZooKeeper to implement the coordination model
11 synchronisation using Apache
in Experiment 10.
ZooKeeper.

Develop a “Hello World” application using Google Gain hands-on experience with
12
App Engine. Google Cloud Platform (PaaS).

Develop a Guestbook Application using Google App Learn data storage and retrieval in a
13
Engine. PaaS environment.

Develop a “Hello World” application using Microsoft Explore the Azure environment and
14
Azure. application deployment.

Learn web data aggregation and API


15 Create a Mashup using Yahoo! Pipes.
integration concepts.
Experiment 1: Installation of Oracle VirtualBox and
Creation of VMs
Aim:
To install Oracle VirtualBox and create two virtual machines on a laptop.

Procedure:

1. Download Oracle VirtualBox from [Link]


2. Install VirtualBox on your host system.
3. Create two virtual machines (VM1 and VM2).
4. Install OS (Ubuntu/Windows) in both VMs.
5. Configure memory, storage, and network settings.

Result:
Successfully installed Oracle VirtualBox and created two VMs.

Experiment 2: Install Turbo C in the Guest OS and


Execute a C Program
Aim:
To install the Turbo C compiler inside the guest OS and run a C program.

Procedure:

1. Open the guest OS.


2. Install Turbo C software.
3. Write a simple C program to display "Hello Cloud!".
4. Compile and execute the program.

Result:
Turbo C was successfully installed, and the C program was executed in the guest OS.

Experiment 3: Test Ping Command Between Guest


and Host OS
Aim:
To test the network communication between the Host and Guest OS using the ping
command.

Procedure:

1. Note the IP addresses of both systems.


2. Open the command prompt in Host OS and type: ping <guest_ip>.
3. Similarly, test from the Guest OS to the Host OS.

Result:
Ping successful, indicating proper communication between Host and Guest OS.

Experiment 4: Hadoop Single Node Setup


Aim:
To set up a Hadoop single-node cluster.

Procedure:

1. Install Java (JDK).


2. Download Hadoop binary from the Apache website.
3. Configure [Link], [Link], and [Link].
4. Format Hadoop namenode.
5. Start all Hadoop services and verify.

Result:
Hadoop single-node setup was successfully installed.

Experiment 5: Hopkinson's Test on DC Shunt


Machines (Virtual Simulation)
Aim:
To perform Hopkinson's Test on DC Shunt Machines (Virtual Simulation).

Tools: Virtual lab software with DC machines, ammeters, voltmeters, rheostats, tachometer.

Procedure:

1. Launch virtual lab; load "Hopkinson's Test on DC Shunt Machines" module and
observe circuit diagram.
2. Set motor and generator field rheostats to minimum resistance (max field current);
ensure SPST switch open.
3. Close DPST switch to supply motor; start using virtual 3-point starter.
4. Adjust motor field rheostat for rated speed via tachometer reading.
5. Adjust generator field rheostat until voltmeter across SPST shows zero (voltages
equal); close SPST switch.
6. Vary generator field rheostat; record supply V, total input I, generator output I,
motor/gen field I, speed at multiple loads.
7. Use lab calculator for armature Cu losses, field losses, constant losses, and
efficiencies.

Result:
Hopkinson's test completed successfully via simulation; efficiencies determined for motor
and generator.

Experiment 6: Hadoop Word and Character Count


Aim:
To develop a Hadoop MapReduce program to count characters, words, and their frequency.

Tools: Hadoop, Java.

Procedure:

1. Write Mapper and Reducer classes.


2. Run the program with sample text input.
3. View output files using hdfs dfs -cat.

Result:
Program executed successfully, showing word and character counts.

Experiment 7: Hadoop application to find the year of


maximum and minimum data usage
Aim:
To develop a Hadoop application to find the year of maximum and minimum data usage.

Tools: Hadoop cluster, Java IDE, HDFS.

Procedure:
1. Prepare input file (format: 2020,1500 per line); upload: hdfs dfs -put [Link]
/input.
2. Write Mapper: split line by comma, emit <year, usage> as Text-IntWritable.
3. Reducer: track running max/min usage and corresponding years across input.
4. Set job config: input/output paths, mapper/reducer classes, key/value types.
5. Compile to JAR; submit: hadoop jar [Link] /input /output.
6. Verify: hdfs dfs -cat /output/part-r-* shows "Max Year: YYYY usage", "Min
Year: YYYY usage".

Result:
Hadoop application executed; years of maximum and minimum data usage identified
correctly.

Experiment 8: Hadoop application to count


male/female students in schools with output in a
specific format (GP-F, GP-M, MS-F, MS-M)
Aim:
To develop a Hadoop application to count male/female students in schools with output in a
specific format (GP-F, GP-M, MS-F, MS-M).

Tools: Hadoop, Java, sample school dataset.

Procedure:

1. Create input (format: GP,M or MS,F per line); upload: hdfs dfs -put
[Link] /input.
2. Mapper: parse school+gender → emit key "GP-F"/"GP-M"/"MS-F"/"MS-M" with
IntWritable(1).
3. Reducer: sum counts for each key; output as "GP-F: count".
4. Configure job: TextInputFormat, TextOutputFormat, set classes/combiners if needed.
5. Run: hadoop jar [Link] /input /output.
6. Check: hdfs dfs -cat /output/part-r-* displays GP-F:#, GP-M:#, MS-F:#, MS-
M:#.

Result:
Student counts generated successfully in specified GP-F, GP-M, MS-F, MS-M format.

Experiment 9: AWS EC2 Instance Setup


Aim:
To create an AWS EC2 instance and connect to it.

Procedure:

1. Create an AWS account.


2. Open AWS Management Console → EC2 → Launch Instance.
3. Choose Amazon Linux AMI and instance type.
4. Configure security group and key pair.
5. Connect via SSH: ssh -i [Link] ec2-user@<public_dns>.

Result:
Successfully launched and connected to the AWS EC2 instance.

Experiment 10: Design a protocol and use AWS


Simple Queue Service (SQS) for barrier
synchronisation after the first phase
Aim:
To design a protocol and use AWS Simple Queue Service (SQS) for barrier synchronisation
after the first phase.

Tools: AWS Console, SQS, AWS SDK (Java/Python), EC2 instances.

Procedure:

1. AWS Console → SQS → Create standard queue named barrier-queue.


2. Code N worker programs: simulate Phase-1 work → send "READY-<workerID>"
message to queue.
3. Code coordinator: poll queue using receiveMessage(), count unique READYs.
4. When N READYs received, coordinator sends "PROCEED-<workerID>" to each
worker.
5. Workers after READY: poll queue for own PROCEED → start Phase-2 simulation.
6. Deploy/run N workers + coordinator; monitor SQS metrics in CloudWatch.

Result:
Barrier synchronisation protocol implemented successfully using AWS SQS.
Experiment 11: Use ZooKeeper to implement the
coordination model in Experiment 10
Aim:
To use ZooKeeper to implement the coordination model in Experiment 10.

Tools: ZooKeeper standalone server, Java client API, [Link].

Procedure:

1. Start ZooKeeper: bin/[Link] start; connect CLI: bin/[Link].


2. Clients connect API; create persistent /barrier znode if missing.
3. After Phase-1, each client creates ephemeral sequential child: create -s -e
/barrier/node- "".
4. Client gets children: getChildren("/barrier", true); if count < N, wait on
watch callback.
5. On notify (count==N), proceed to Phase-2; delete own znode on exit.
6. Monitor CLI: ls /barrier shows node creation until barrier releases all.

Result:
ZooKeeper coordination model implemented successfully for Experiment 10 barrier.

Experiment 12: Hello World Using Google App


Engine
Aim:
To develop and deploy a simple "Hello World" application on Google App Engine.

Procedure:

1. Install Google Cloud SDK.


2. Create a new project in the GCP console.
3. Write a simple Python/Java web app.
4. Deploy using the command: gcloud app deploy.
5. Access through the deployed URL.

Code:

from flask import Flask

app = Flask(__name__)
@[Link]('/')

def hello():

"""Return a friendly HTTP greeting."""

return 'Hello World from Google App Engine!'

@[Link]('/about')

def about():

return 'This is a simple Hello World app deployed on Google Cloud Platform!'

if __name__ == '__main__':

# This is used when running locally only. When deployed to Google App

# Engine, a webserver process such as Gunicorn will serve the app.

[Link](host='[Link]', port=8080, debug=True)

Result:
"Hello World" app successfully deployed on Google App Engine

Software / Tools Required

Tool Description

Oracle VirtualBox Virtualization software for creating virtual machines

Hadoop Framework for distributed data processing

AWS Public cloud service for compute and storage

Google App Engine Platform-as-a-Service (PaaS) for web apps

Microsoft Azure Cloud platform for building, testing, and deploying apps
Tool Description

Yahoo! Pipes (legacy/simulated) Tool for creating web mashups

Apache ZooKeeper Coordination service for distributed systems

Evaluation Scheme

Component Marks

Continuous Evaluation / Record 20

Viva Voce 10

Internal Practical Exam 30

End-of-Semester Practical Exam 40

Total 100

Text Books
1. Cloud Computing and Virtualization – Dac-Nhuong Le, Raghvendra Kumar, Gia Nhu
Nguyen, Jyotir Moy Chatterjee, Wiley.
2. Cloud Computing: Concepts, Technology & Architecture – T. Erl, R. Puttini, Z. Mahmood,
Prentice Hall, 2013.

Reference Books
1. Balwinder Singh Sodh, Topics in Virtualization and Cloud Computing, IIT Ropar.
2. T. Mather, S. Kumaraswamy, S. Latif, Cloud Security and Privacy: An Enterprise Perspective
on Risks and Compliance, O’Reilly, 2009.
3. ACM Workshop on Cloud Computing Security (CCSW 09), Controlling Data in the Cloud:
Outsourcing Computation Without Outsourcing Control, 2009.

Faculty In-Charge:
Name: ________________________

Designation: __________________

Signature: ____________________

You might also like