Ccs335 Cc Lab Manual Lab Experiments
Ccs335 Cc Lab Manual Lab Experiments
REGULATION – 2021
SEMESTER-V
2023-2024(Odd)
LAB MANUAL
Prepared by,
Dr. M. SUPRIYA,
AP/ Dept. of CSE
Institute Vision:
Institute Mission:
Department Vision:
Department Mission:
PEO1:
PEO2:
Graduates will be capable of managing leading positions with a broad understanding of the
application of ethics in evolving computer-based solutions for the societal needs.
PEO3:
Graduates will imbibe entrepreneurial qualities and develop their career by upgrading their,
communication, analytical and professional skills constantly.
PSO1:
Use data management techniques and algorithmic thinking for Software Design and
Development practices.
PSO2:
PSO3:
COURSE OBJECTIVES:
To understand the principles of cloud architecture, models and infrastructure.
To understand the concepts of virtualization and virtual machines.
To gain knowledge about virtualization Infrastructure.
To explore and experiment with various Cloud deployment environments.
To learn about the security issues in the cloud environment
COURSE OUTCOMES:
CO4: Develop and deploy services on the cloud and set up a cloud environment.
1. Install Virtualbox/VMware/ Equivalent open source cloud Workstation with different flavours
2. Install a C compiler in the virtual machine created using a virtual box and execute Simple
Programs
3. Install Google App Engine. Create a hello world app and other simple web applications using
python/java.
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. Install Hadoop single node cluster and run simple applications like wordcount.
3 30/08/23 Install Google App Engine. Create a hello world app and other
simple web applications using python/java.
4 12/09/23 Use the GAE launcher to launch the web applications.
6 5/10/23 Find a procedure to transfer the files from one virtual machine to
another virtual machine.
7 13/10/23 Install Hadoop single node cluster and run simple applications like
wordcount.
Ex No:1
INSTALL VIRTUALBOX/VMWARE WORKSTATION
Date:
AIM:
To find the procedure to install VirtualBox/VMWARE workstation with different flavours
of Linux or Windows OS on the top of the Windows 7 or 8
PROCEDURE:
STEP1: Download the link. Download the software for Windows click and download
begins.
STEP2: Download the installer file.
STEP3: Locate the downloaded installer file.
STEP4: User Access Control Warning. In UAC dialog box, Click yes to continue. Install
splash screen will appear
. STEP5: VMware workstation setup wizard dialog box click next to continue.
STEP6: End user license Agreement. Check “I accept the terms in the license Agreement”
box and press next to continue.
STEP7: Custom setup options. Select the folder in which you would like to install the
application.
STEP8: User experience setting.
STEP9: Application shortcuts preference. Please select both the options, desktop and start
menu and click next.
STEP10: Installation begins.
. STEP11: Launch the VMware workstation and License.
STEP12: The virtualbox/VMware software is ready
CONCLUSION:
Thus the installation of VMware workstation with different flavour of Windows OS
on the top of Windows was successfully completed.
Ex No:2
SETTING UP C PROGRAMMING ENVIRONMENT
Date:
AIM:
To install a C program compiler in the virtual machine created using virtual box
and execute simple program.
PROCEDURE:
CONCULSION:
Thus the C compiler was installed in the virtual machine created using Virtual box
and the C program was executed successfully.
AIM:
To install google app engine and create hello world app and other simple web
application using Python / Java.
PROCEDURE:
STEP 1: Download and install Python.
STEP 2: Download the google app engine SDK.
STEP 3: Download the Windows Installer.
STEP 4: Double click on the google App Engine Installer click through the installation
wizard and it should install the App Engine.
STEP 5: Make a folder for your google App Engine Application and then make a sub
folder called “ae-01-trivial”
STEP 6: Using a text editor such as JEdit, Create a File called app.yaml in the “ae-01-
trivial” folder with the following contents
application: ae-01-trivial
version: 1
runtime: Python
api_version:1
handlers:
-url : %*
script: index.py
Then create a folder called index.py with three lines
Print”Content-type text/Plain”
Print””
Print”Hello there”
STEP 7: Start the Google App Engine Launcher program using file-> Add existing
Application , select the ae-01- trivial folder. Once you have selected the application ;
Press Run
STEP 8: After a few moments, your application will start and the Launcher will
show a green icon next to it. Then press Browse do open a browser pointing
at your application which is running at http://localhost.8080/
STEP 9: Paste http://localhost.8080/ into your browser and you should see your
applications output.
STEP 10: Select your application in the Launcher and press the logs button to bring
up a log Window.
STEP 11: To shut down the server , use the launcher select you application and press
the stop button.
CONCLUSION:
Thus the google app engine was installed and a simple application using python was
created and executed successfully.
EX NO:4
USE GAE LAUNCHER TO LAUNCH THE WEB APPLICATIONS
DATE:
AIM:
To use GAE launcher to launch the web applications.
PROCEDURE:
STEP 1: Create a new cloud console project or retrieve the project ID of an existing
project.
STEP 2: Install and then initialize the Google Cloud SDK.
STEP 3: The basic structure for the project consisted of two files, namely , app.yaml
which continue the configure settings of your AppEngine application Next , the
www.directory to store all of your static files, such as HTML, CSS, image and Java Script.
STEP 4: In the google SDK shell, initialize the cloud. Then deploy your application to
AppEngine using gcloud app deploy.
. STEP 5: To view your application and launch it use the command gcloud app browse.
STEP 6: Now we can view the app with the corresponding link shown in the shell like
https://PROJECT_ID.REGION_ID_r.appspot.com.
CONCLUSION:
Thus the web application was launched successfully using the GAE launcher.
AIM:
To simulate a cloud scenario using clous sim and run a scheduling algorithm that is
not present in cloud sim
PROCEDURE:
STEP 1: Download the cloud sim installable files from
http://code.google.com/p/cloudsim/downloads/list and unzip
STEP 2: Open the IDE’s such as Eclipse or NetBeans in your system
STEP 3: Create a new java project
File -> New
STEP 4: Import an unpacked Cloud Sim project into the new Java project
. STEP 5: The first step is to initialize the cloud sim package by initializing the cloud
Sim Library ,as cloud Sim.init (num-user , calender , trace-flag)
STEP 6: Creation of data centers is the second step. To create datacenter, you need
the Data center characteristics object that stores the properties of data center such as OS , list
of machines,time zone etc
STEP 7: The third step is to create a broker.
DataCenter Broker broker =CreateBroker();
STEP 8: The fourth step is to create one virtual machine Unique mips, ID of the VM ,
UserID ID the VM’s owner,mips,amount of storage etc
Vm vm = new Vm (VMid ,brokerID ,mips.ped Number,ram,bw,size,vmm,new
CloudScheduler Time Shared())
STEP 9: Submit the VM list of the broker
Broker.submit Vmlist (Vmlist)
STEP 10: Create a cloud let with length , file size , output and utilization model.
Cloudlet.Cloudlet =new
cloudlet(id,length,pesNumber,filesize,outputsize,utilization,Model,Utilization mode)
STEP 11: Submit the cloud let list to the broker broker.submit Cloudlet list(Cloudlet
List)
STEP 12: Start the simulation
Cloudsim , startSimulation()
CONCLUSION:
Thus a cloud scenario using Cloud Sim was simulated and a scheduling algorithm that
is not present in cloud Sim was executed and the output is verified successfully.
Date:
Aim:
To find a procedure to transfer the files from one virtual machine to another virtual machine.
Procedure:
STEP 1: You can copy dew (or more) lines with copy & paste mechanism, For this you need to
share clipboard between, host OS and guest OS, installing Guest Addition on both the virtual
machines.
STEP 2: You can enable drag and drop too with the same method (Click on the machine,
settings, general, advanced , drag and drop: set to bidirectional)
STEP 3: You can have common shared folders on both virtual machines and use one of the
directory shared as buffer to copy. Installing Guest Additions you have the possibility to set
shared folders too.
STEP 4: You can use usual method to copy file between two different computer with client
server application (eg: scp with sshd active for linux)
STEP 5: You can mount part of the wile system op a virtual machine via NFS or 3S HFS (or)
you can also share file and directory with samba.
CONCLUSION:
Thus the procedure to transfer the files from one virtual machine to another virtual machine
was explained and the output is verified successfully.
Aim:
To install Hadoop single node cluster and run simple applications like word count.
Procedure:
STEP 1: Download the Java & package from https ://drive google.com/field /oBwIBPXSo Ix-
FIKIRN21 = MU9ZMm8/ view and save this file in your home directory.
STEP 2: Extract the Java Jar File using the command, tar-xuf jdk-swor-linux. I586. tar.gz
STEP 3: Download the Hadopp 3.7.3 package using the command wget https ://archive.
Apache.org/disk / hadopp / core/ hadap-2.7.3/ hadoop-2.7. 3. Tar.gz
STEP 4: Extract the Hadopp tur file using command bar. xvf hadoop.2.7. 3. tar.gz.
STEP 5: Add the Hadoop and Java path in the bash file, save the bash tile and close it.
STEP 6: Edit the Hadoop Configuration files using the command cd hadoop-2.7.3 / etc / Hadoop
STEP 7: Open the core site.xml and edit the property mentioned below using Vi core site.xmI
STEP 8: Edit the half site.xml and edit the property using Vi hdfs.site.xml
STEP 9: Edit the mapred site.xml file and edit the property using cp mapred-site.xmI template
mapred-site.xml and then use the command vi mapred-site. xmI
STEP 10:Edit yarn site.xml and edit the property using vi yarn- site. xml.
STEP 11: Edit hadoop.env,sh and add the Java Path using vi hadoop- env. sh
STEP 13 : Once the NameNode is formatted, go to hadoop-2.7.3 /sbin directory and start all the
demons using /startallsh
STEP 14: Once the hadoop single node cluster is installed, we can now run a simple application
like word count in it.
STEP 15: Create a new Java project and add JAR files to it.
STEP 16: Create a new package within the project with the name com. code, dezyre.
STEP 17: Now implement the word count example program and create a Mapper class within
the word count class which extends Map Reduce Base class to implement mapper interface.
STEP 18: Finally, execute the Hadoop Map Reduce word count program.
CONCLUSION:
Thus the program for find procedure to set up the Hadoop single node cluster and run
simple application like word count was executed successfully and the output is verified
E.x.No: 8
Date: Creating and Executing First Container using Docker
AIM:
To create and execute the first docker container.
PROCEDURE:
Step 1:
The rest of this guide requires you to run commands in the new project directory.
Run the following command before moving on.
cd welcome-to-docker
Step 2:
Verify the docker file
Open the sample application in your IDE. Note that it already has a Dockerfile.
For your ownprojects you need to create this yourself.
Step 3:
Build Your Image
You can build an image using the following docker build command via a CLI in
your project folder.
docker build -t welcome-to-docker .
Breaking down this command
The -t flag tags your image with a name. (welcome-to-docker in this case).
And the . letsDocker know where it can find the Docker file.
Step 4 :
Run your Container
Once the build is complete, an image will appear in the Images tab. Select the
image name to see its details. Select Run to run it as a container. In the
Optional settings remember to specifya port number (something like 8089).
Step 5:
View the output in the localhost:8080
OUTPUT / SCREENSHOTS:
CONCLUSION:
Thus, the first docker container has been created and executed successfully.
E.x. No: 9
Date: Run a Container from Docker Hub
AIM:
To run a container from docker hub.
PROCEDURE:
Step 1:
docker login
Step 2:
Pull the docker image.
docker pull hello-world
Step 3:
Run your image.
Once the build is complete, an image will appear in the Images tab. Select the
image name to see its details. Select Run to run it as a container
Also, you can run an image using the following docker run command via a CLI
in your project folder.
OUTPUT / SCREENSHOTS:
CONCLUSION:
Thus, the first docker image has been pulled from docker hub and ran a container
successfully.