Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
40 views

CC Lab

The document describes procedures for installing and configuring virtual machines and cloud computing software. It outlines steps to install VirtualBox and create a virtual machine, install an operating system image on the virtual machine, and explore the VirtualBox interface. It also provides instructions for installing a C compiler on a virtual machine and executing simple programs.

Uploaded by

srihaas.x
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

CC Lab

The document describes procedures for installing and configuring virtual machines and cloud computing software. It outlines steps to install VirtualBox and create a virtual machine, install an operating system image on the virtual machine, and explore the VirtualBox interface. It also provides instructions for installing a C compiler on a virtual machine and executing simple programs.

Uploaded by

srihaas.x
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Hyderabad Institute of Technology and Management Roll.

No:

HYDERABAD INSTITUTE OF TECHNOLOGY AND MANAGEMENT

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

LAB MANUAL

CLOUD COMPUTING LABORATORY

Year / Semester:
HR-21III / VI

2023-2024
Hyderabad Institute of Technology and Management Roll. No:

LIST OF EXPERIMENTS

1. Install Virtualbox/VMware Workstation with different flavours of linux or windows


OS on top of windows7 or 8.
2. Install a C compiler in the virtual machine created using virtual box and execute

Simple Programs.
3. Install Google App Engine. Create hello world app and other simple web

applications using python/java.


https://www.youtube.com/watch?v=rkrwHc_URrY
https://www.youtube.com/watch?
v=ZGn5ahF6Bv0&list=PLvzMa5ek7hEUgEbKT5CE0Nrxm16lVvNh7&index=1
https://www.youtube.com/watch?v=1TqIL7RLrx4
https://www.youtube.com/watch?v=VP4hR3LSXGg
4. Use GAE launcher to launch the web applications.
https://www.youtube.com/watch?v=KrN7yg2Kqxo
https://www.youtube.com/watch?v=q1a06R2YVFI
https://www.youtube.com/watch?v=ZGn5ahF6Bv0
https://www.youtube.com/watch?v=dm8ruAggRkY
https://www.youtube.com/watch?v=uXPZsNA96Rw

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

present in CloudSim.
https://www.youtube.com/watch?v=jfjvOmTQxz8
https://www.youtube.com/watch?v=6-2y3yA2w3M
https://www.youtube.com/watch?v=a7sj6nT0na0
https://www.youtube.com/watch?v=uqsg0lLvbj0
https://www.youtube.com/watch?v=jfjvOmTQxz8
https://www.youtube.com/watch?v=PWVtpd6n8ks
https://www.youtube.com/watch?
v=u1olWm2agFM&list=PL9IfziJ50JY5z2ppTLAFJ2yxyVtBbhpgD
6. Find a procedure to transfer the files from one virtual machine to another virtual

machine.
https://www.youtube.com/watch?v=0aQEgGOF9RE
https://www.youtube.com/watch?v=IRNIogwTkII
https://www.youtube.com/watch?v=7YcLgTj4Peg
https://www.youtube.com/watch?v=FYmck1G0fqY
Hyderabad Institute of Technology and Management Roll. No:

7. Find a procedure to launch virtual machine using trystack (Online Openstack Demo
Version)
https://www.youtube.com/watch?v=XVsn2e2fvLQ
https://www.youtube.com/results?
search_query=7.%09Find+a+procedure+to+launch+virtual+machine+using+trystack+
(Online+Openstack+Demo+Version)
https://www.youtube.com/watch?v=N6Cbb_dSzpc
https://www.youtube.com/watch?v=X7IfK-pDLDM

8. Install Hadoop single node cluster and run simple applications like wordcount.
https://www.youtube.com/watch?v=5rJTPMLKsq0
https://www.youtube.com/watch?v=g7Qpnmi0Q-s
https://www.youtube.com/watch?v=98UCknD8_qA
https://www.youtube.com/watch?v=_F4CaEu0yTg
https://www.youtube.com/watch?v=QXXMNIzFRDY
https://www.youtube.com/watch?v=1-tQz1K_k1g
https://www.youtube.com/watch?v=OF4CzB54VYc
Hyderabad Institute of Technology and Management Roll. No:

EXP NO.: 1 DATE:

Aim: Install Virtualbox / VMware Workstation with different flavours of linux or windows
OS on top of windows7 or 8.

PROCEDURE:

1. Overview

2. Create a new virtual machine on host operating system

3. Install your guest ISO image on virtual image

4. Explore Virtual Box

1. Overview

we’ll walk you through one of the easiest ways to try out Ubuntu Desktop on a virtual
machine. VirtualBox is a general purpose virtualiser that is available across Linux, Mac OS
and Windows.

Hardware requirements:

Recommended system requirements:

• 2 GHz dual-core processor or better

• 4 GB system memory

• 25 GB of free hard drive space

• Internet access is helpful

• Either a DVD drive or a USB port for the installer media/ ISO file of guest machine.

Steps to install Virtual Box:


1. Download the Virtual box exe from https://www.virtualbox.org/wiki/Downloads
2. Double click on the VirtualBox-7.0.14-161095-Win.exe file …and select next button.
Hyderabad Institute of Technology and Management Roll. No:

3. Click on the next button custom setup wizard appeared on the screen and select the
way you want features to be installed. Click on the icons in the tree below to change
the way features will be installed.
Hyderabad Institute of Technology and Management Roll. No:

4. Click the Yes button

5. Click the Yes Button


Hyderabad Institute of Technology and Management Roll. No:

6. Click the install button the setup wizard is ready to begin the custom installation

7. The setup wizard installs oracle VM VirtualBox 7.0.14.


Hyderabad Institute of Technology and Management Roll. No:

8. Click the finish button to exit the setup wizard and start oracle VM virtualBox 7.0.14
after installation

9. Once you have completed the installation, go ahead and run VirtualBox.
Hyderabad Institute of Technology and Management Roll. No:

2. Create a new virtual machine


https://ubuntu.com/download/desktop
Click New to create a new virtual machine. Fill in the appropriate details:

 Name: If you include the word Ubuntu in your name the Type and Version will auto-
update.
 Machine Folder: This is where your virtual machines will be stored so you can
resume working on them whenever you like.
 ISO Image: Here you need to add a link to the ISO you downloaded from the Ubuntu
website.

We want to install Ubuntu unattendedly so we can leave the checkbox to skip unchecked.

10. Fill the required attributes of guest operating system like name, folder, ISO image ,
which is located in the drives and click the next button.

Create a user profile


To enable the automatic install we need to prepopulate our username and password here in
addition to our machine name so that it can be configured automatically during first boot.

The default credentials are:

 Username: vboxuser
 Password: changeme
It is important to change these values since the defaults will create a user without sudo
access.
Hyderabad Institute of Technology and Management Roll. No:

Ensure your Hostname has no spaces to proceed!

It is also recommended to check the Guest Additions box to install the default Guest
Additions ISO that is downloaded as part of VirtualBox.
Define Virtual resources:
we can specifiy how much of our host machine’s memory and processors the virtual
machine can use. For good performance it’s recommended to provide your VM with around
8GB of RAM (althought 4GB will still be usable) and 4 CPUs. Try to remain in the green areas
of each slider to prevent issues with your machine running both the VM and the host OS.
Hyderabad Institute of Technology and Management Roll. No:

Then we need to specify the size of the hard disc for the virtual machine. For Ubuntu we
recommend around 25 GB as a minimum. By default, the hard disk will scale dynamically as
more memory is required up to the defined limit.

Click Next to continue and view a summary of your machine setting.

After this click Finish to initialize the machine!


Hyderabad Institute of Technology and Management Roll. No:

3.Install your image

Click Start to launch the virtual machine.

You will see a message saying ‘Powering VM up …’ and your desktop window will appear.
Hyderabad Institute of Technology and Management Roll. No:

You will notice at this stage that the resolution of the window is fixed at 800x600. This is
because the Guest Additions features are not installed until after the Ubuntu installation has
completed.
Hyderabad Institute of Technology and Management Roll. No:

Once the installation completes, the machine will automatically reboot to complete the
installation.
Hyderabad Institute of Technology and Management Roll. No:

Finally you will be greeted with the Ubuntu log-in screen where you can enter your
username and password defined during the initial setup (don’t forget that the default
password is ‘change me’ if you left everything as the default).

4. Explore Virtual Box


Enjoy your shiny new Ubuntu Desktop!
Hyderabad Institute of Technology and Management Roll. No:

As always we recommend opening a terminal and running sudo apt update && sudo apt
upgrade -y and then sudo snap refresh to get everything updated to the latest versions.

APPLICATIONS:

There are various applications of cloud computing in today’s network world. Many
search engines and social websites are using the concept of cloud computing like
www.amazon.com, hotmail.com, facebook.com, linkedln.com etc. the advantages of cloud
computing in context to scalability is like reduced risk , low cost testing ,ability to
segment the customer base and auto-scaling based on application load.

RESULT:

Thus the procedure to run the virtual machine of different configuration


Hyderabad Institute of Technology and Management Roll. No:

EXP NO: 2 DATE:


Aim
Install a C compiler in the virtual machine created using virtual box and execute Simple
Programs
Procedure:
How to install GCC on Ubuntu 18
What is GCC?
GCC is a widely used compiler for various programming languages - a compiler is a software
tool that translates the code you write for computer programs, commonly known as the
"source code," into instructions a computer can understand. This translation process is
known as compilation.
As an important part of free and open-source software development, the GCC (GNU
Compiler Collection) was developed by the Free Software Foundation (FSF) through a
collaborative effort of developers led by Richard Stallman.
#How to use GCC?
GCC is widely used in creating software for Unix-like systems, and it has been adapted for
various platforms, demonstrating its adaptability and flexibility in the realm of open-source
programming.
The GCC (GNU Compiler Collection) supports various programming languages for
compilation. Although initially developed in C, GCC can now compile the following
prominent languages, such as C++, Fortran, Ada, and Go.
#Prerequisites
To follow along this tutorial and install GCC on Ubuntu 18, you will need:
The latest Ubuntu server installed
An account with administrator privileges

#1. How to install GCC on Ubuntu 18


In the first part of this tutorial, we will show you how to install GCC on Ubuntu in three
steps, and in the second part, how to compile a C program.
We will see the different methods of installing GCC and compile a C program, exploring
various options.
#Step 1: Update Ubuntu package list
To update the package list, use the following command:
Hyderabad Institute of Technology and Management Roll. No:

# sudo apt update

Write a C code by using any one of the editor and save it sample.c, and set file path at
terminal
Hyderabad Institute of Technology and Management Roll. No:

#Step 2: Install GCC on Ubuntu


We now install GCC with the following command.
sudo apt install gcc
If GCC is already installed on your system, the command will list the version installed.
You can install GCC with the build-essential package. This will install GCC as well as other
popular packages such as make, which is often used with GCC to automate the compilation
process of bigger software.
To install build-essentials, use the following command:
sudo apt install build-essential

#Step 3: Test GCC installation


Let's now check if GCC has been installed on Ubuntu:
gcc --version
#2. How to compile a C program?
Now that we’ve installed GCC on Ubuntu and everything is correctly set up, we can continue
to compile a C program.
#Step 1: Write a basic C program
Open your favorite code editor and write in the following C source code:
Hyderabad Institute of Technology and Management Roll. No:

#include <stdio.h>
int main() {
printf("Welcome to Cherry Servers\n");
return 0;
}
Save the file as sample.c
#Step 2: Compile sample.c using GCC
Now that we have our source code, we can compile it with GCC using the following
command:
gcc sample.c
By default, GCC will output the compiled source code in a file called a.out
Let's execute it and check the results:

#Step 3: Generate an assembly listing of the C program


You can also use GCC to generate an assembly listing of the C source code. This can be done
using the -S switch:
gcc -S sample.c
This will generate a file called sample.s. You can then display its content using:
cat sample.s
The output should be similar to the following code:
Hyderabad Institute of Technology and Management Roll. No:

https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/

RESULT: Thus the simple C programs executed successfully.

EXP NO:3 Date:


Aim:

To Install Google App Engine. Create HitamWorld app and other simple web applications
using python/java.

Software Requirements:

Java 8 and Java 11+ runtimes on the App Engine standard environment
eclipse-java-2021-09-R-win32-x86_64
Install GoogleCloudSDKInstaller for windows operating system. The software
access from the below link
https://cloud.google.com/sdk/docs/install#windows

Installing Cloud Tools for Eclipse


python-3.13.0a4-amd64

Procedure:

1. Install the Eclipse IDE for Java Developers, version 4.8 - 4.21 (later versions are not
supported).

a. Download eclipse IDE by using the below link


https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-
developers
Hyderabad Institute of Technology and Management Roll. No:

Note:
 When installing the plugin on Eclipse versions 4.21 (2021-09) and 4.20 (2021-06) you
Hyderabad Institute of Technology and Management Roll. No:

may run into a Public key not found error.


 You can work around this by going to Window > Preferences > Install/Update
> Available Software Sites.
 Disable Latest Eclipse IDE Packages Release and Latest Eclipse
Simultaneous Release

b. If you have the Google Plugin for Eclipse installed, complete the migrating from
GPE procedures.
c. Install JDK 8. Earlier and later versions of Java are not supported.

2. Install Cloud Tool for Eclipse


https://marketplace.eclipse.org/content/google-cloud-tools-eclipse#details

a. Click on Help menu


b. Click on market place option. Eclipse market wizard appeared on the screen.
c. Search for Google Cloud Tools for Eclipse in the search box.
Hyderabad Institute of Technology and Management Roll. No:
Hyderabad Institute of Technology and Management Roll. No:

3. Creating a new Java project in the App Engine standard environment

Creating an application in the App Engine standard environment (online registration/


Creating a new Java project in the App Engine standard environment
https://cloud.google.com/eclipse/docs/creating-new-webapp

To create a new project for the App Engine standard environment in Eclipse:

1. Click the Google Cloud Platform toolbar button .

2. Select Create New Project > Google App Engine Standard Java Project
Hyderabad Institute of Technology and Management Roll. No:

3. Enter a Project name and (optionally) a Java package.

4. Click Next.
5. Select any libraries you need in the project.

6. Click Finish.

7. This is java application file


Hyderabad Institute of Technology and Management Roll. No:

8. The extra is this file “appengine-web.xml“, Google App Engine need this
to run and deploy the application.

4. Running the project locally


a) Select the project in the Project Explorer or Package Explorer.
b) Open the context menu.
c) Select Run As > App Engine.
Hyderabad Institute of Technology and Management Roll. No:

d) Log messages appear in the console as the server starts up.


e) Eclipse opens its internal web browser to your application. You can also open an external

browser and navigate to http://localhost:8080. Either way, you'll see a static HTML page with
a link to the servlet.

Note: You may see a message that says, Port 8080 already in use. If so, you can run your
application on a different host or port.
Hyderabad Institute of Technology and Management Roll. No:

Just click on the servlet link message will be displayed on the host machine
Hyderabad Institute of Technology and Management Roll. No:

5. Debugging the project locally

To debug your project locally, complete the running the project locally steps, except
select Debug As > App Engine instead of Run As > App Engine in the context menu.

The server stops at the breakpoints you set and shows the Eclipse debugger view.

6. Running App Engine Standard Apps on a Different Host or Port

To run your App Engine standard application on a different host or port:

1. Right-click your project.


2. Select Run As > Run on Server.
Note:
Needed information:
To Install Google App Engine. Create hello world app and other simple web applications
using python/java Creating a New App Engine Application

Creating a New App Engine Standard Application


Create a new Eclipse application for the App Engine standard environment.

Creating a New App Engine Flexible Application


Create a new Eclipse application for the App Engine flexible environment.

1. Running Applications Locally


Hyderabad Institute of Technology and Management Roll. No:

Running and Debugging an App Engine Standard Application


Run or debug an App Engine standard app locally inside Eclipse.

Running a Local Jetty Server for an App Engine Flexible Application


Run or debug your App Engine flexible app on a Jetty server.

Configuring Objectify When Running Applications Locally


Configure Cloud Tools for Eclipse to use Objectify when running your application locally.

2. Deploying to App Engine


Deploying to the App Engine Standard Environment
Deploy a project to the App Engine standard environment from within Eclipse.
Deploying to the App Engine Flexible Environment
Deploy a project to the App Engine flexible environment from within Eclipse.

3. Managing Cloud Client Libraries


Managing Cloud Client Libraries in an Eclipse Project
Manage the Cloud Client Libraries for Java and the App Engine standard libraries for your
Eclipse projects.

Using Cloud Client Libraries for Java in a Local Server


Configure Cloud Client Libraries for Java to run in a Local Server.

4. Uninstalling Cloud Tools for Eclipse


Uninstall Cloud Tools for Eclipse.
Note : Dear Students access the link https://cloud.google.com/eclipse/docs/how-to
and read the steps.

Result: Thus the simple application was created successfully.


Hyderabad Institute of Technology and Management Roll. No:

EXP: 4
https://github.com/suyash-more/Cloud-Computing-Projects
https://www.youtube.com/watch?v=KrN7yg2Kqxo

https://github.com/suyash-more/Cloud-Computing-Projects

helloworld
https://www.youtube.com/watch?v=cURnZmHcvIQ
https://www.youtube.com/watch?v=qtiZwxXFy8I
Hyderabad Institute of Technology and Management Roll. No:

EXP: 5 Date:

Aim: Simulate a cloud scenario using CloudSim and run a scheduling algorithm

that is not present in CloudSim.

Procedure:

Software Requirements:

1. Download Java SE Development Kit 8u401 and later versions


https://www.oracle.com/in/java/technologies/javase/javase8u211-later-archive-
downloads.html
2. Download CloudSim 3.0.3 zip file from the below link
https://code.google.com/archive/p/cloudsim/downloads --- > unzip to specific
folder

3. Download eclipse-inst-jre-win64.exe then choose Eclipse IDE for Java Developers


https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2024-03/R/
eclipse-inst-jre-win64.exe

4. Download commons-math4-4.0-beta1-bin zip file from


https://commons.apache.org/math/download_math.cgi
Hyderabad Institute of Technology and Management Roll. No:

Procedure:

1. Install any of the IDE for running JAVA applications (eclipse recommended)
2. Install JDK and JRE for the same
3. Add the jdk\bin path to the environment variables Open environment variables
window, add the following to the path variable

4. Open eclipse in your confined workspace


5. Click on new and open a new JAVA Project, give it a name
6. Create a package inside he src folder.
7. Dump in all the files here / https://github.com/suyash-more/Cloud-Computing-
Projects/tree/master/Scheduling-Algorithm-in-CloudSim/src

inside the package.

8. Now right click on the project and choose configure build path.
9. Click on the libraries section and add external jars
10. Extract the Cloudsim.tar file you downloaded
11. Now import the jar files in that Cloudsim.tar into the external jars.
12. Do remember to change the name of the package in all the source files.
13. Now right click on the project and run the project as JAVA Application.
14. Select the SJF_Scheduler.java file present in the list.
15. Add CloudSim and commons math .jar files to the Java Project using build path select
configure Build path

1. Create new --- > Java Project


Hyderabad Institute of Technology and Management Roll. No:

2. Create a Java project wizard displayed on the console – CloudSimulator_SJF


then click next button setting build path wizard displayed click finish button
Hyderabad Institute of Technology and Management Roll. No:

3. Create a new java package name com.abc inside the src folder then click finish
Hyderabad Institute of Technology and Management Roll. No:

Button( ClousSimulator_SJF/src/com.abc) then package-info.java will be created

4. Dump the five .java files into the ClousSimulator_SJF/src/com.abc which are not existed
in the cloudsim and these files are accessing from github
https://github.com/suyash-more/Cloud-Computing-Projects/tree/master/Scheduling-
Algorithm-in-CloudSim
Hyderabad Institute of Technology and Management Roll. No:

4. Refresh the eclipse IDE dumping files are appeared in the folder hierarchy and
remember to change the name of the package in all the source files.
Hyderabad Institute of Technology and Management Roll. No:

Supporting cloudSim and commons math libraries are needed

4. Add CloudSim and commons math .jar files to the Java Project. right click on the
project name then choose build path select configure Build path, then choose class
path click on external jar button ---- > click on apply and close button.
Hyderabad Institute of Technology and Management Roll. No:

5. Run as Java application then output will be displayed


Hyderabad Institute of Technology and Management Roll. No:

Output:
Hyderabad Institute of Technology and Management Roll. No:
Hyderabad Institute of Technology and Management Roll. No:

Results: Thus the CloudSim application project was created successfully.


Hyderabad Institute of Technology and Management Roll. No:

1. Initialize the cloudsim packages

2. Create data centers

3. Create brokers

4. Create one cloudlet

5. Start the simulation

6. Print the results

https://www.youtube.com/watch?v=YYTrlyUYpRU

https://www.youtube.com/watch?v=ohNUqIQ2t3M

https://www.youtube.com/watch?v=Ci-mKYbpeYQ

https://www.youtube.com/watch?v=c8DsJzxkhos

https://www.youtube.com/watch?v=u1olWm2agFM

You might also like