Bachelor of Technology
Computer Science & Engineering Department
LAB MANUAL
CLOUD COMPUTING
CS 804
CSE: 8thSemester
Session: JANUARY2025 - JUNE2025
Submitted By
Name :
RollNo.:
Faculty Name:-[Link] Soni
HOD(CSE):-[Link] Shukla
Department of Computer Science & Engineering
SHRI RAM GROUP OF INSTITUTIONS (SRGI),
JABALPUR
December2024
1
DEPARTMENTOFCOMPUTERSCIENCE
ANDENGINEERINGVIISEM–AI/DS
AD-704CLOUDCOMPUTINGLABORATORY
NAMEOFEXPERIMENTS Page Remark
[Link] No.
1. InstallVirtualbox/VMwareWorkstationwithdifferentflavoursoflinuxor
windows
OS ontopofwindows7or8.
2. InstallaCcompilerinthevirtualmachinecreatedusingvirtualboxa
ndexecute Simple Programs
3.
[Link]
plicationsusingpython/java
4. Use GAE launch ert o launch the web applications.
5. SimulateacloudscenariousingCloudSimandrunaschedulingalgorithmth
atisnot
Presentin Cloud Sim.
6. Findaproceduretotansfer
thefilesfromonevirtualmachinetoanothervirtualmachine.
7. Findaproceduretolaunchvirtualmachineusing
trystack(OnlineOpenstack
DemoVersion)
8.
InstallHadoopsinglenodeclusterandrunsimpleapplications
likewordcount.
2
DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING
VIIISEM– CSE
CS 804 CLOUD COMPUTING LABORATORY
CYCLEI
1. InstallVirtualbox/VMwareWorkstationwithdifferentflavoursoflinuxorwindowsOS
ontopofwindows7or8.
2. InstallaCcompilerinthevirtualmachinecreatedusingvirtualboxandexecuteSimpleProgram
s
3. [Link]
/java.
4. UseGAElaunchertolaunchthewebapplications.
CYCLEII
5. SimulateacloudscenariousingCloudSimandrunaschedulingalgorithmthatisnotpresentinCloudSi
m.
6. Findaproceduretotransfer thefiles fromonevirtualmachinetoanother virtualmachine.
7. Findaproceduretolaunchvirtualmachineusing trystack(OnlineOpenstackDemoVersion)
8. InstallHadoopsinglenodeclusterandrunsimpleapplications likewordcount
3
[Link] InstallVirtualbox/VMwareWorkstationAim:
Findprocedureto
InstallVirtualbox/VMwareWorkstationwithdifferentflavoursoflinuxorwindowsOSontopofwindows7or8.
PROCEDURETOINSTALL
Step 1-Download Link
Link for downloading the software is [Link]
[Link]. Download the software for windows. Good thing is that there is no
[Link].Softwareisaround541MB.
Step2-Downloadtheinstallerfile
It shouldprobablybeinthedownloadfolderbydefault,ifyou havenotchangedthesettings in [Link] should
be something like [Link]. This file name can changedependingonthe
versionof
the software currently available for download. But for now, till the next version is available, they
willallbeVMwareWorkstation15Pro.
Step3-Locatethedownloadedinstallerfile
For demonstration purpose, I have placed the downloaded installer on my desktop. Find the installer
onyoursystemanddoubleclicktolaunchthe application.
VMwareworkstation15profor windows10installerfilescreenshot.
4
[Link].
ScreenshotforVMwareWorkstation15proinstallationprocess.
[Link].
Youmay beasked to [Link] onYesto restart.
9
Step11-LaunchVMwareWorkstation
Aftertheinstallationcompletes,youshouldseeVMwareWorkstationicononthedesktop.
Doubleclickonittolaunchtheapplication.
Step12-LicenceKey
If you see the dialog box asking for licence key, click on trial or enter the licence key. Then what
youhave is the VMware Workstation 15 Pro running on your windows 10 desktop. If don’t have
ScreenshotforVMwareWorkstation15Proicononwindows10desktop.
thelicencekey,youwillhave 30daystrial.
VMwareWorkstation15Prohomescreen
10
Step13-Atsomepointifyou decideto buy
At some point of time if you decide to buy the Licence key,you can enterthe Licence key by
goingtoHelp->EnteraLicenceKey You can enter the 25 character licence key in the dialog box shown
[Link] versionofthesoftware.
Result:
ThustheVMwareworkstationiscreatedonwindows7.
1
Exno2.a: SettingupCProgrammingEnvironment
Aim:
To Setupthevirtualmachineandinstalltheccompilerin virtualmachine.
1. [Link]
[Link][Link]
2. DownloadVirtualBoxplatformpackagesforyourOS
3. OpentheInstallat
ion
Packagebydoubleclicking
2
Exno3: Installing andRunningtheGoogleAppEngineonWindows
Aim:
To perform the installation of the Google App Engine Software Development
Kit(SDK)onaMicrosoftWindowsandrunningasimple “helloworld”application.
Procedure:
• The App Engine SDK allows you to run Google App Engine Applications on
[Link]-
•‐timeenvironmentoftheGoogleAppEngineinfrastructure.
Step1:Toinstallpython
Pre-•Requisites:Python2.5.4
If you don't already have Python 2.5.4 installed in your computer,
downloadandInstallPython2.5.4from:
[Link]
Step
2:toinstallGoogleAppEngine
Download andInstall
You can download the Google App Engine SDK by going
to:[Link]
appropriateinstallpackage.
Step4:Runtheprogram
Output:
Once you have selected your application and press Run. After a few moments
yourapplicationwillstartandthelauncherwillshowalittlegreeniconnexttoyourapplication.
Then press Browse to open a browser pointing at your application which
isrunningat[Link]
Paste[Link] yourbrowserandyoushouldseeyourapplicationasfollows
Result:
Thusthe pythonapplicationprogramwasexecuted
Exno4:Use GAElaunchertolaunchthewebapplicationsonWindows
Aim:
TodeploytheGAElauncheronaMicrosoftWindowsandrunningasimple“helloworld”ap
plication.
Procedure:
[Link]
Nomatterwhatplatformyoubuildproductson,thereisalwayssomehousekeepingstuffyouneedtoputinplace before
you can hit the ground running. And deploying apps within the Google App Engine is noexception.
1. DownloadPython2.7
As of when this article was written, the Google App Engine standard environment supports
Pythononly upto version 2.7. However, it is only a matter of time before support for Python 3.x is
[Link] latestinfo.
2. DownloadGoogleCloudSDK
Thiswillallowyoutoforkappsontoyourlocalmachine,makechanges(editanddeveloptheapp),anddeployy
ourappbacktothe cloud.
3. SetthePythonpathintheGoogleAppEnginelauncher
AfterdownloadingtheSDK,launchthe AppEngine launcher,gotoEdit->Preferencesand
makesureyousetthe pathforwhereyouinstalledPythoninstep1above.
.Hereisadescriptionofthevarious files.
[Link]
Thisfileisabasicmarkupfilethatstoresinformation(somemetadata)[Link]
followingcrucialparts ofthefile.
1. application
ThisistheprojectIDwhichyoushouldneverchange. This istheuniqueidentifierfortheapp
2. url->script
Thisisthehomepagefortheapp. Inother words,this filewillberenderedinyourbrowser
whenyoulaunchtheapp
3. libraries
This iswhereyoucanincludeexternallibrariestousewithinthewebapp
[Link]
Output:
Savethechanges, [Link]“MEOW”displayed.
Finally,itistimetodeployyourchangestothecloudtomakethemgloballyaccessibleviaaURL.
GototheAppEnginelauncher,selectthe app,andhittheDeploybutton.
Exno5: CloudSiminEclipse
Aim:
ToSimulateacloudscenariousingCloudSimandrunaschedulingalgorithmthatisnotprese
ntinCloudSim.
Procedure:
CloudSim is written in Java. The knowledge you need to use CloudSim is basic
Javaprogramming and some basics about cloud computing. Knowledge of
programmingIDEs such as Eclipse or NetBeans is also helpful. It is a library and,
hence, CloudSimdoes nothave tobe installed. Normally,you can unpack the downloaded
package inany directory, add it to the Java classpath and it is ready to be used. Please
verifywhetherJavais availableonyoursystem.
TouseCloudSiminEclipse:
1. DownloadCloudSiminstallablefilesfrom[Link]
ndunzip
2. OpenEclipse
3. CreateanewJavaProject:File->New
4. ImportanunpackedCloudSimprojectintothenewJavaProject
5. ThefirststepistoinitialisetheCloudSimpackagebyinitialisingtheCloudSimlibrary,as
follows:
[Link](num_user,calendar,trace_flag)
6. Data centres are the resource providers in CloudSim; hence, creation of
datacentres isasecondstep. TocreateDatacenter,
youneedtheDatacenterCharacteristicsobject that stores the properties of a data centre
such as architecture, OS, list ofmachines, allocation policy that covers the time or
spaceshared, the time zone anditsprice:
Datacenterdatacenter9883=newDatacenter(name,characteristics,ne
w VmAllocationPolicySimple(hostList),s
7. Thethird step isto createabroker:
DatacenterBrokerbroker =createBroker();
8. Thefourthstepistocreateone virtualmachine unique IDofthe
VM,userIdIDoftheVM’s owner, mips, number Of Pes amount of CPUs, amount of
RAM, amount ofbandwidth, amount of storage, virtual machine monitor, and
cloudletScheduler policyforcloudlets:
Vmvm=newVm(vmid,brokerId,mips,pesNumber,ram,bw,size,vmm,newCloudl
etSchedulerTimeShared())
9. Submit the VM list to
thebroker:[Link](vml
ist)
10. Createacloudletwithlength,filesize,output size,andutilisationmodel:
Cloudletcloudlet=newCloudlet(id,length,pesNumber,fileSize,outputSize,utilizationModel,utilizationMo
de
11. Submit thecloudletlist
tothebroker:[Link](clo
udletList)
12. Start
thesimulation:[Link]
Simulation()
SampleOutputfromtheExistingExample:St
arting
OUTPUT:
CloudletIDSTATUSDatacenterIDVMIDTimeStartTimeFinishTime0SUCCES
S 20 4000.1 400.1
*****Datacenter:Datacenter_0*****Userid
Debt3 35.6
CloudSimExample1finished!
RESULT:
ThustheschedulingalgorithmiscreatedwiththeCloudSim.
Exno6: FileTransferfromonevirtualmachinetoanothervirtualmachineAim:
Tofindaproceduretotransfer thefilesfromonevirtualmachineto another virtualmachine.
Procedure:
Method1:CreatingaSharedFolderinVirtualBox
Asharedfolderisafolderwhichmakesitsfilesavailableonboththeguestmachine and thehostmachine at the same
time. Creating a shared folder between the guest and the host allows you to easilymanage files which should
be present on both machines. The course virtual machines are ready to use sharedfolders right away, but if
you are using the virtual machine on your personal computer you will need tospecifywhichfoldertouse as
sharedstorage.
SharedFoldersonSCSLabComputersusingCourseVMs:
If you are using a course VM on a lab computer, it is likely that a shared folder has already been setup
foryou. On the desktop of your course VM you should notice a folder titled SharedFolders. Inside of this
youwillfindanyfoldersthathavebeensharedbetweenthe course VMandlabcomputers.
Youshouldseetwofoldersthathavealreadybeenconfiguredforyou:Z_DRIVEandTemp.
Z_DRIVE gives you access to your Windows AccountZ:\drive. This is storage that is persistent to
yourSCSaccountandavailableasanetworkdrive onthelabcomputers.
Temp gives you access to the folder found at D:\tempon thelab computer. Files stored in thisfolder
arelocaltothemachine,meaningthattheycanbeaccessedfaster,butwilldeletefromthesystemwhenyoulogout.
If you are working with data that you will need to use again, use the Z_DRIVE for your shared folder. If
youneed faster read/write speed, use the Temp folder, but remember to backup your files or they will be
deletedwhenyoulogoffthecomputer.
Exno7:Launchvirtualmachineusingtrystack(OnlineOpenstackDemoVersion)
Aim:
Tofind aprocedureto launchvirtualmachineusingtrystack (OnlineOpenstack DemoVersion).
OpenStack is an open-source software cloud computing platform. OpenStack is primarily used
fordeploying an infrastructure as a service (IaaS) solution like Amazon Web Service (AWS). In
otherwords, you can make your own AWSby usingOpenStack. If you wantto try
outOpenStack,TryStackis the easiestandfree waytodoit.
InordertotryOpenStackinTryStack,youmustregisteryourselfbyjoiningTryStackFacebookGroup. The
acceptance of group needs a couple days becauseit’s approved [Link]
beenacceptedinthe TryStackGroup,youcanloginTryStack.
[Link]
[Link]
intothe TryStack,youwillsee theComputeDashboardlike:
Youneedtorequestapublic(floating) IPaddresstobeassignedtoyour instance.
1. Goto Compute>Instance.
2. Inoneofyourinstances, click More>AssociateFloatingIP.
3. InIPAddress,click Plus[+].
4. SelectPooltoexternalandthenclick AllocateIP.
5. ClickAssociate.
6. NowyouwillgetapublicIP,e.g.[Link],foryourinstance.
Step5:ConfigureAccess& Security
OpenStackhasa featurelikea [Link]/blacklistyourin/[Link]
iscalledSecurityGroup.
1. Goto Compute>Access& SecurityandthenopenSecurityGroupstab.
2. Indefaultrow,click ManageRules.
3. ClickAddRule, chooseALLICMPruletoenablepingintoyourinstance, andthenclickAdd.
4. Click Add Rule,chooseHTTPruletoopenHTTPport(port80),andthenclickAdd.
5. Click Add Rule,chooseSSHruletoopenSSHport (port22),and thenclickAdd.
6. You canopenotherportsbycreatingnewrules.
Step6:SSHtoYourInstance
Now,you canSSHyourinstancestothefloating IPaddressthat yougot inthestep [Link]
areusingUbuntuimage,theSSHuserwillbeubuntu.
Result:
Thusthevirtualmachineis launched usingtrystack.
Exno8a:InstallHadoopsinglenodecluster
Aim:
To InstallHadoopandcreatethesinglenode cluster.
Step1:[Link].
Step2:ExtracttheJavaTarFile.
Command:[Link]
Fig:Hadoop Installation– Extracting JavaFiles
Step3:Download theHadoop2.7.3Package.
Command:wget [Link]
[Link]
Fig:Hadoop Installation– DownloadingHadoop
Step4:Extract theHadooptarFile.
Command:tar -[Link]
Step14:TocheckthatalltheHadoopservicesareupandrunning,runthebelowcommand.
Command:jps
Fig:Hadoop Installation– CheckingDaemons
Step15:NowopentheMozillabrowser and go
tolocalhost:50070/[Link] checktheNameNodeinterface.
Fig:Hadoop Installation–Starting WebUI
• Congratulations,youhavesuccessfullyinstalledasingle nodeHadoopcluster
Result:
ThustheHadoopsinglenodeclusterwascreatedsuccessfully.
[Link]
Aim:
To writea wordcount programto demonstratetheuseofMap and Reduce tasks.
Procedure:
step1
hduser@nspublin:/usr/local/hadoop/sbin$mkdir/home/hduser/wc
step2:Compilingthejavafile- [Link]
hduser@nspublin:/usr/local/hadoop/sbin$sudo/usr/lib/jvm/java-8-oracle/bin/javac-classpath
/home/hduser/[Link]-d/home/hduser/wc/home/hduser/[Link]
step3:Creating jarfile [Link]:
hduser@nspublin:/usr/local/hadoop/sbin$jar-cvf/home/hduser/[Link]-
C/home/hduser/wc/.addedmanifest
adding: WordCount$[Link](in = 1739) (out= 739)(deflated
57%)adding: WordCount$[Link](in=
1736)(out=753)(deflated56%)adding:[Link](in=1491)(out=814)(deflated45
%)
[Link] jarfile [Link]
hduser@ksrietcsevb:/usr/local/hadoop/sbin$hadoopjar/home/hduser/[Link]/user/input
/user/output
PickedupJAVA_TOOL_OPTIONS:-javaagent:/usr/share/java/[Link]
16/09/[Link][Link]:Unabletoloadnative-
hadooplibraryforyourplatform...usingbuiltin-javaclasses where applicable
Step5:tocheckthefileinOutputfilehduser@ksrietcsevb:/usr/local/hadoop/s
bin$hadoop fs -ls /user/outputPickedupJAVA_TOOL_OPTIONS:-
javaagent:/usr/share/java/[Link]
16/09/[Link][Link]:Unabletoloadnative-
hadooplibraryforyourplatform...usingbuiltin-javaclasses where applicable
InterruptedException{intsum=0;
for (IntWritableval:values) { sum+=[Link]();
}[Link](sum);[Link](key, result);}}
publicstaticvoidmain(String[]args)throwsException{Con
figurationconf=new Configuration();
Jobjob=
[Link](conf,"wordcount");[Link](W
[Link]);[Link]([Link]
ass);[Link]([Link]);[Link]
ReducerClass([Link]);[Link]
ass([Link]);[Link]([Link]
s);[Link](job, new
Path(args[0]));[Link](job, new
Path(args[1]));[Link]([Link](true)?
0 :1);}
}
Input:
hai iamingcclab
Output
hduser@ksrietcsevb:/usr/local/hadoop/sbin$hadoopfs-cat/user/output/*
PickedupJAVA_TOOL_OPTIONS:-javaagent:/usr/share/java/[Link]
16/09/[Link][Link]:Unabletoloadnative-
hadooplibraryforyourplatform...usingbuiltin-javaclasses where applicable
am 1
gcc 1
hai 1
i 1
in 1
lab 1
hduser@ksrietcsevb:/usr/local/hadoop/sbin$
Result:
Thusthewordcountprogramwasexecutedusinghadoopmarreducefunction.