KEMBAR78
CC Manual Final | PDF | Apache Hadoop | Map Reduce
0% found this document useful (0 votes)
13 views56 pages

CC Manual Final

The document outlines the Cloud Computing laboratory course at KGiSL Institute of Technology, detailing various experiments and procedures for students to complete during their fourth semester. It includes installation and usage instructions for software such as VirtualBox, Google App Engine, CloudSim, Hadoop, and Docker, along with the aims and results of each experiment. The document serves as a practical guide for students to gain hands-on experience in cloud computing technologies.
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)
13 views56 pages

CC Manual Final

The document outlines the Cloud Computing laboratory course at KGiSL Institute of Technology, detailing various experiments and procedures for students to complete during their fourth semester. It includes installation and usage instructions for software such as VirtualBox, Google App Engine, CloudSim, Hadoop, and Docker, along with the aims and results of each experiment. The document serves as a practical guide for students to gain hands-on experience in cloud computing technologies.
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/ 56

KGiSL Institute of Technology

(Approved by AICTE, New Delhi; Affiliated to Anna University, Chennai)

Recognized by UGC, Accredited by NBA (IT)

365, KGiSL Campus, Thudiyalur Road, Saravanampatti, Coimbatore – 641035.

CCS335 – CLOUD COMPUTING

NAME : …………………………………

REG. NO. : …………………………………

COURSE : …………………………………

SEMESTER : ………………………………….

BATCH : ………………………………….
KGiSL Institute of Technology

(Approved by AICTE, New Delhi; Affiliated to Anna University, Chennai)

Recognized by UGC, Accredited by NBA (IT)

365, KGiSL Campus, Thudiyalur Road, Saravanampatti, Coimbatore – 641035.

NAME :

CLASS :

UNIVERSITY REG NO :

Certified that this is a bonafide record of work done by ………………………………………..

Of ……………………………………………………………….. branch in CLOUD


COMPUTING LABORATORY, during fourth semester of the academic year 2023-2024.

Faculty In-charge Head of the Department

Submitted during Anna University Practical Examination held ........................................ at


KGiSL Institute of Technology, Coimbatore – 641 035.

Internal Examiner External Examiner


S.NO DATE LIST OF THE EXPERIMENTS PAGE NO MARKS SIGNATURE

1 Install Virtualbox/VMware Workstation with


different flavours of linux or Windows OS on
top of Windows 8 and above.

2 Install a C Compiler in the virtual machine


created using virtual box and execute a simple
program.

3 Install Google App Engine and Create a Hello


World app and other simple web applications
using Python/java.

4
Launch the web applications by using the
GAE launcher.

5 Simulate a cloud scenario using cloudsim


and run a scheduling algorithm that is not
present in cloudsim.

6 Find a procedure to transfer the files from


one virtual machine to another virtual
machine.

7 Installation of Hadoop single node cluster


and run simple applications like
wordcount.

8 Creating and Executing Your First


Container Using Docker

9 Run a container from docker hub.


EXP.NO : 01 INSTALL VIRTUALBOX/VMWARE/EQUIVALENT OPEN SOURCE CLOUD
WORKSTATION WITH DIFFERENT FLAVOURS OF LINUX OR WINDOWS OS ON TOP
DATE :
OF WINDOWS 8 AND ABOVE.

AIM :

To install Virtualbox/VMware Workstation with different flavours of linux or windows


OS on top of Windows 8 and above.

PROCEDURE :

DOWNLOADING AND INSTALLING VMWARE


Step 1: Download VMware
Step 2: Install the VMware Application.

Step 3: Accept and Click Next.


Step 4: Click Install.

Step 5: Click Finish.

DOWNLOADING UBUNTU

Step 6: Download the Ubuntu OS

Step 7: Create new virtual machine.


Step 8: Browse the downloaded Ubuntu file and click next.

Step 9: Create an username and password and click next.

Step 10: Choose the location to use your virtual machine and click next.

Step 11: Select create a new virtual disk and click next

Step 12: Specify the disk size and click next

Step 13: Click Next


Step 14: Click Finish.

Step 15: Installing Ubuntu on VMware and unzipping files.


Step 16: Login to Ubuntu

Step 17: Click Done


Step 18: Thus we have installed VMware Workstation with different flavours of linux on top of
windows.

RESULT :

Thus, VMware Workstation with different flavours of linux or windows OS on top of Windows 8 and above has
been successfully installed and executed.
EXP.NO : 02 INSTALL A C COMPILER IN THE VIRTUAL MACHINE CREATED USING A VIRTUAL
BOX AND EXECUTE SIMPLE PROGRAM.
DATE :

AIM :
To install a C Compiler in the virtual machine created using virtual box and execute a simple program.

PROCEDURE :

Step 1: Open the terminal on Ubuntu and install C compiler – “sudo apt install gcc”.

Step 2: Once the installation finished open the editor.

Step 3: Type a simple C program on editor and save it.


Step 4: Compile and run the C program.

RESULT :
Thus a C compiler is installed in the virtual machine and C program was executed and output
was obtained successfully.
EXP.NO : 03 INSTALL GOOGLE APP ENGINE. CREATE A HELLO WORLD APP AND OTHER
SIMPLE WEB APPLICATIONS USING PYTHON/JAVA.
DATE :

AIM :
To install Google App Engine and Create a Hello World app and other simple web applications using
Python/java.

PROCEDURE :

Step 1:Open the following link - https://cloud.google.com/appengine/downloads and click


python.

Step 2:Select setting up your environment development and click on install the and initialize
the cloud sdk.
Step 3:Download the sdk installer and install it.

Step 4:Select single user and click Next.


Step 5:Select the destination location and click Next.
Step 6:Downloading all the requirements and installing.

Step 7:Click Finish.

Step 8: Once successfully installed,login with your google account in cmd prompt.

Step 9: Create the Python Script.


Create a new Python file and open it in your preferred text editor.
Step 10: Run the Python Script.
Save the file, and in your terminal or command prompt, navigate to the directory where the file is
located.

Step 11: Open a web browser and navigate to http://localhost:8080. You should see the Welcome to the
Cloud Computing Lab message displayed on the page.
RESULT :

Thus ,Google App Engine was installed and simple web applications using Python/java was created.
EXP.NO : 04
USE THE GAE LAUNCHER TO LAUNCH THE WEB APPLICATIONS.
DATE :

AIM :

To launch the web applications by using the GAE launcher.

PROCEDURE :

Step 1:Open the following link - https://cloud.google.com/appengine/downloads and click


python.

Step 2:Select Setting Up your environment development and click on install and initialize the
cloud SDK.
Step 3:Download the SDK installer and install it.

Step 4:Select a single user and click Next.


Step 5:Select the destination location and click Next.
Step 6:Downloading all the requirements and installing.

Step 7:Click Finish.


Step 8: Once successfully installed ,login with your google account in cmd prompt.

Step 9: Create a new project in Google App Engine.


Step 10: Create a HTML file for course selection application form.
Step 11: Create an application and deploy it in sdk.

Step 12: Finally the application is deployed and the output is displayed through the local host 8080.
RESULT :

Thus a web application is launched by using the GAE launcher and the output is obtained successfully.
EXP.NO :05 SIMULATE A CLOUD SCENARIO USING CLOUDSIM AND RUN A SCHEDULING
ALGORITHM THAT IS NOT PRESENT IN CLOUDSIM
DATE :

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

PROCEDURE :

Step 1: Install Java JDK.(Windows)


Step 2: Install CloudSim.
Step 3: Download CloudSim as a zip file and extract it.
Step 4: Install Eclipse.

Step 5: After installing Eclipse, navigate to "File," then "New," and select "Project."
Step 6: Choose the Java folder and then select the Java project within it, and proceed to the next step.
Step 7: Enter the project name, proceed to the next step, and finish.
Step 8: On the left side of the window, locate the folder with the name you provided, then click "New" and further
click on "Package."

Step 9: Name the package and proceed to finish.

Step 10: The package can be found on the left side inside the "src" folder. To add the source files to it, right-click on
"src," select "Show In," then choose "System Explorer," copy all files from the source folder to the package folder,
and refresh.
Step 11: Maintain the same package name in both the source file and package file to avoid any errors after
refreshing.
Step 12: To proceed further and rectify errors in data center creation, CloudSim is required. In CloudSim, there will
be a JAR file.
Step 13: Right-click on the main folder, click "Build Path," then "Add Libraries," and proceed with the steps until
finished.
Step 14: Again, right-click on the main folder, click "Build Path," select "Configure Build Path," then "Add
External JARs" on the right side of the pop-up window, and choose the file to be added.
Step 15: After completing the above steps, apply and close the window, then check if all errors have been resolved.
Step 16: Select "SIF_schedular.java" under the package, then run and search for your main file, and click "Okay."
RESULT :

Thus ,cloud scenario using CloudSim has been Simulated and scheduling algorithm that is not
present in CloudSim has been executed successfully.
EXP.NO :06 FIND A PROCEDURE TO TRANSFER THE FILES FROM ONE VIRTUALMACHINE TO
ANOTHER VIRTUAL MACHINE
DATE :

AIM :

To find a procedure to transfer the files from one virtual machine to another virtual machine.

PROCEDURE :

Step 1: Create a folder on your desktop that needs to be shared.


Step 2: Open Ubuntu, navigate to settings, change the shared folder option from disabled to always enabled,
enable auto protect, enable VNC connection, encrypt access control, and then click "OK."
Step 3: Right-click on the created folder, select "Permission," click on the "Change Permission" option for
enclosed files, and make the necessary adjustments.
Step 4: In Ubuntu, click on "Settings," then copy the path of the file that needs to be shared.
Step 5: Search for "Run" on the desktop, paste the path into the provided space, and then click "OK."

Step 6: The final output page will appear.


RESULT :
Thus ,the files is transferred from one virtual machine to another virtual machine.
EXP.NO : 07 INSTALLATION OF HADOOP SINGLE NODE CLUSTER AND RUN SIMPLE
APPLICATIONS LIKE WORDCOUNT.
DATE :

AIM :
To install a hadoop single node cluster and run simple applications like wordcount.

PROCEDURE :
I. JAVA Installation
Step 1: Go to official Java Downloading page.
https://www.oracle.com/java/technologies/javase-jre8-downloads.html
Step 2: After downloading java, run the jdk-8u241-windows-x64.exe file.
Step 3: Follow the instructions and click next.
Step 4: After finishing the installation it is need to set Java environment variable.
Step 5: Go to Start->Edit the System environment variable->Environment variable.
Step 6: Then Click new and enter variable name as “JAVA_HOME”
Step 7: In the value field Enter the java path such as “C:\Java\jdk1.8.0_241”(Consider your installation
folder).

Step 8: Go to path and click edit then type “%JAVA_HOME%\bin”.


Step 9: Then click Ok and Go to Command Prompt.
Step 10: Type “Java -version”. If it prints the installed version of java, now java successfully installed in
your System.
II .CONFIGURING AND INSTALLING HADOOP.

Step 1: Download Hadoop 2.8.0 from (http://archive.apache.org/dist/hadoop/core//hadoop-2.8.0/hadoop-


2.8.0.tar.gz)
Step 2: Extract the tar file.
Step 3: After finishing the extraction it is need to set Hadoop environment variable.
Step 4: Go to Start->Edit the System environment variable->Environment variable.
Step 5: Then Click new and enter variable name as “HADOOP_HOME”.
Step 6: In the value field Enter the java path such as “D:\hadoop”.

Step 7: Go to path and click edit then type “%HADOOP_HOME%\bin”.


Step 8: Now we have to configure the hadoop.
Step 9: Go to D:/hadoop/etc/hadoop/.. folder, find the below-mentioned files and paste the following.
i)Core-Site.xml
ii.Rename "mapred-site.xml.template" to "mapred-site.xml" and edit this fileD:/Hadoop/etc/hadoop/mapred-
site.xml, paste below xml paragraph and save this file.

iii. Create folder "data" under "D:\Hadoop".


• Create folder "datanode" under "D:\Hadoop\data"
• Create folder "namenode" under "D:\Hadoop\data" data
iv. hdfs-site.xml.
v.yarn-site.xml.
vi. Edit file D:\Hadoop\etc\hadoop\hadoop-env.cmd by closing the command line
"JAVA_HOME=%JAVA_HOME%" instead of set "JAVA_HOME= C:\Java\jdk1.8.0_241".
vii. Download file Hadoop Configuration.zip.
viii. Delete file bin on D:\Hadoop\bin and replace it by the bin file of Downloaded configuration file (from
Hadoop Configuration.zip).
ix. Open cmd and type the command "hdfs name node –format".You will see through the command prompt
which tasks are processing, after completion, you will get a message like name node format successfully and
a shutdown message.

III. Testing Hadoop Installation

Step 1: Open Cmd and type the following “Hadoop -version”.

Step 2: To start the hadoop locate to “D:\hadoop\sbin” via command prompt and press start-all.cmd.

Now, you can see the namenode, datanode and yarn engines getting start,
Step 3: Now type “jps”. JPS (Java Virtual Machine Process Status Tool) is a command is used to check
all the Hadoop daemons like NameNode, DataNode, ResourceManager, NodeManager etc.

Step 4: Open: http://localhost:8088 in any browser.

Step 5: Open: http://localhost:50070 in any browser.

Now hadoop succesfully installed in your System.

IV. SIMPLE WORDCOUNT PROGRAM.

Step 1: After successful hadoop installation we need to create an directory in the hadoop file system.
Step 2: Start the hadoop via command prompt $ start-all.cmd.

Step 3: By using $jps command Ensure hadoop nodes are running.

Step 4: To create a directory, use: $ hadoop fs –mkdir /inputdir.

Step 5: To input a file within a directory, use: $ hadoop fs –put D:/input_file.txt/inputdir.

Step 6: To ensure whether your file succesfully imported, use: $ hadoop fs –ls /inputdir/.

Step 7: To view the content of the file, use: $ hadoop dfs –cat /inputdir/input_file.txt.

Step 8: Now app mapreduce the program to the input file. We have a mapReduceClient.jar which
contains java mapper and reducer programs. After applying the jar file you can see the task per-
formed in the Mapreduce phase. All the results of completed tasks will be printed in the command
prompt.
Step 9: After completed the mapreduce tasks the output will be stored in the output_dir directory
To see the output, use: $ hadoop dfs –cat /output_dir/

Step 10: To stop the Hadoop type $stop-all. Cmd


RESULT :
Thus the Hadoop single-node cluster was installed and the simple word count program was executed
successfully.
EXP.NO :08
CREATING AND EXECUTING YOUR FIRST CONTAINER USING DOCKER.
DATE :

AIM:
To create and execute your first container using docker.

PROCEDURE:

Step 1: Install Docker

Step 2: Open Terminal (or Command Prompt): Open a terminal or command prompt on your computer. This
is where you'll enter Docker commands.

Step 3: Pull an Image- Use the following command to download a basic image called hello-world from
Docker Hub:"docker pull hello-world"

Step 4: Run the Container- Execute the following command to run a container based on the hello-world
image:"docker run hello-world"

Step 5: Verify Output- Docker will run the container, and you should see a message confirming that your
Docker installation is working correctly.

Step 6: Explore Running Containers- You can list all running containers with:"docker ps"

Step 7: Stop and Remove Containers- If you want to stop and remove a container, use the following
commands:"docker stop <container_id_or_name>
docker rm <container_id_or_name>"

PROCEDURE 1: ( How to create docker container)

Step 1:Get the image from the docker hub named as hello world image.

Step 2: Run the image – docker run <image-name>


PROCEDURE 2: ( How to view docker container)

Step 1: To view all the container created – docker ps –a


j

Step 2:To view only running container – docker ps

PROCEDURE 3: (How to stop docker container)

Step 1: For stopping the running container – docker stop id.


PROCEDURE 4:(How to inspect docker container)

Step 1: To inspect docker container – inspect <container-id/container name>


RESULT:
Thus,the first Container Using Docker has been created and executed successfully.

EXP.NO: 09
RUN A CONTAINER FROM DOCKER HUB
DATE :

AIM:
To create and execute your first container using docker.

PROCEDURE:
START A DOCKER CONTAINER.
Step 1: Open Your Browser and go to the Docker Hub. Click Explore and search hello world Open the
official Docker image

Step 2: Open Terminal (or Command Prompt): Open a terminal or command prompt on your computer. This
is where you'll enter Docker commands.

Step 3: Download the image using the command mentioned in the Docker Hub website for Hello World
docker pull hello-world and paste the commend in Terminal
Step 4: Use the command docker images to view the downloaded Docker images

Step 4: Images are identified by the tags if the tag is not given while uploading it will set as Latest

Step 5 : if we download multiple files at the same name they are identified by its unique image id

Step 6: Docker image can be considered a blueprint/class and docker container is an Object/instance of that
image

Step 7: Each container containes


• Operating System
• OS Libs
• Application Dependencies
• Application source code

RESTART A DOCKER CONTANIER

Step 1: Open Terminal (or Command Prompt): Open a terminal or command prompt on your computer. This
is where you'll enter Docker commands.
Step 2: Use the command docker ps -a to view the non running containers and running containers status

Step 3: Use the command docker ps to view the all running containers (no container is currently executed)

Step 4: Now we can start the container using the command docker start <Container id>

Step 5: Check the container is started using the command docker ps to view the all running containers

RESULT:

Thus,the First Container Using Docker has been created and executed successfully.

You might also like