CC Final 2
CC Final 2
“WISDOM TREE“,
REG. NO :711619104046
SEMESTER :VII
YEAR :2022-2023
KATHIR COLLEGE OF ENGINEERING
ISO 9001
“WISDOM TREE“,
NEELAMBUR, COIMBATORE - 641 062.
Bonafide Certificate
This is to certify that the record work for CS8711- CLOUD COMPUTING
Laboratory is the bonafide record of work done by
1. windows7 or 8.
4.
5. CloudSim.
EX NO. : 1
DATE:
Install Virtualbox / VMware Workstation with different flavours of linux or
windows OS on top of windows7 or 8.
Aim:
To Install Virtualbox / VMware Workstation with different flavours of linux or windows
OS on top of windows7 or 8.
PROCEDURE:
Cancel
Version 5.0.20
Version 5.0.20
Version 5.0.20
Ready to Install
Click Install to begin the installation. If you want to review or change any of your installation settings, dick Back. Click Cancel to exit the wizard.
Version 5.0.20
6. Then installation was completed..the show virtual box icon on desktop screen.
711619104046
APPLICATIONS:
There are various applications of cloud computing in today’s network world. Many search
engines and so websites are using the concept of cloud computing like
www.amazon.com,hotmail.com, facebook. linkedln.com c etc. the advantages of cloud computing
in context to scalability is like reduced risk , low cost te ,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.
711619104046
EX.NO.:2
DATE:
Install a C compiler in the virtual machine created using virtual box and
execute Simple Programs
Aim:
To Install a C compiler in the virtual machine created using virtual box and execute
Simple Programs'
PROCEDURE:
Terminal
O dlnesh(g>dlnesh-VlrtualBox: /opt/axis2/axls2-1.7.3/bin
dinesh9dtnesh-VtrtualBox:/opt/axis2/axts2-1.7.3/bin$ gcc first.c dtneshQdtnesh-VtrtualBox:/opt/axts2/axis2-
1.7.3/btn$ ./a.out Enter two number:
65
23
The addition of a and b:88 dtneshgdtnesh-VtrtualBox:/opt/axis2/axts2-l.7.3/bin$ |
APPLICATIONS:
Simply running all programs in grid environment.
RESULT:
Ex. No. 03 Install Google App Engine. Create hello world app and other simple
Date: web Applications using python/java.
Aim:
To Install Google App Engine. Create hello world app and other simple
webApplications using python/java.
☆ ☆☆☆☆
Send feedback
Procedure:
and frameworks to develop your apps, then let App Engine take care of provisioning servers and scaling your app instances based on demand.
Go PHP Java
View docs View docs View docs
w
Python Node.js .NET
.NET
View docs View docs View docs
Ruby
View docs
0 More languages
View custom runtime docs
711619104046
Google Cloud Why Google Solutions Products Pricing Getting Started Q, Docs Support
☆ ☆☆☆☆
Serverless computing > App Engine > Documentation > Standard Environment > Python 3
Google App Engine
Quickstart
Environment documentation
» Building an App Migrating from
Python 2.7 IZ
Python 3 apps in the App Engine standard environment run within containers inside of secure sandboxes. Your apps scale automatically to
How-to Guides All How-to Guides
meet traffic demand.
» SettmgUp
► Securing
0 Quickstart Ej How-to guides < > APIs and reference
Your App
Deploy your first app Learn a task
API, Configuration Files,
» Defining Configuration Files App Engine Glossary
Testing and Deploying Your App
Cloud SDK
Documentation
Product overview gcloud CLI Developer tools > Cloud SOK: Command Line Interface > Documentation ☆☆☆☆☆
Developer tools
Quickstarts
You are now authenticated with the Google sondh^k
The authentication flow has completed successfully. You may close this window, or check out the resources below.
How-to guides
All how to guides
» Installing the SDK
Information about command-line tools and client libraries
• Setting up the SDK
Managing SDK components
To learn more about gcloud command-line tool commands, see the gcloud command-line tool guide.
Scripting guidelines
Enabling accessibility features Using For further information about the command-line tools for Google App Engine, Compute Engine. Cloud Storage. BigQuery, Cloud SQL and Cloud DNS (which are all bundled
gcloud Interactive shell £ Uninstalling with Cloud SDK), see Accessing Services with the gcloud CLI.
the Cloud SDK
If you are a client application developer and want to find out more about accessing Google Cloud Platform services with a programming language or framework, see Google
Output:
Open the browser: URL - Localhost: 8080
Result:
Thus the simple webApplications hello world ceated using
python/java successfully executed.
711619104046
Ex. No. 04
Use GAE launcher to launch the web applications.
Date:
Aim:
Procedure:
class TodoModel(db.Model):
author = db.UserProperty(required=True)
shortDescription = db.StringProperty(required=True)
longDescription = db.StringProperty(multiline=True)
url = db.StringProperty()
created = db.DateTimeProperty(auto_now_add=True)
updated = db.DateTimeProperty(auto_now=True)
dueDate = db.StringProperty(required=True)
finished = db.BooleanProperty()
# The main page where the user can login and logout
711619104046
# MainPage is a subclass of webapp.RequestHandler and overwrites
the get method
class MainPage(webapp.RequestHandler):
def get(self):
user = users.get_current_user()
url = users.create_login_url(self.request.uri)
url_linktext = 'Login'
if user:
url = users.create_logout_url(self.request.uri)
url_linktext = 'Logout'
values = {
'todos': todos,
'numbertodos' : todos.count(),
'user': user,
'url': url,
'url_linktext': url_linktext,
}
self.response.out.write(template.render('index.html', values))
class Email(webapp.RequestHandler):
def get(self):
user = users.get_current_user()
if user:
raw_id = self.request.get('id')
id = int(raw_id)
todo = TodoModel.get_by_id(id)
message = mail.EmailMessage(sender=user.email(),
subject=todo.shortDescription)
message.to = user.email()
message.body = todo.longDescription
message.send()
self.redirect('/')
application = webapp.WSGIApplication(
[('/', MainPage),
('/new', New),
('/done', Done),
('/email', Email)],
debug=True)
def main():
run_wsgi_app(application)
711619104046
In app.yaml file
handlers:
- url: /css
static_dir: css
- url: /images
static_dir: images
- url: /.* URL - Localhost:8080
Open the browser:
script: todo.py
Output:
711619104046
Result:
Thus the use GAE launcher to launch the web applications sucessfully
completed.
711619104046
Ex. No. 05 Simulate a cloud scenario using CloudSim and run a scheduling algorithm
Date: that is not present in CloudSim.
Aim:
To Simulate a cloud scenario using CloudSim and run a scheduling algorithm
that is not present in CloudSim.
Procedure:
EJ You have succes X Qf Mail - KAVIYA.P X M Inbox - kaviyaap X | 3 netbeans 8.2 witl X
■8
OB i n (T
P Type here to search
’ I examples
|S| Documents
Downloads
J) Music
i-' Pictures
S Videos
Windows
Data (D:) (C:)
— kaviyait (\\192.168.2
X it (\\192.168.2.6) (Zf
Network
File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help |CV Search (Ctrl+I)
E Q douds«n-4.0.jar
s a JDK 1.8 (Default)
t DNSCIient
E) & DNSServer
E & EchoClient
$ ■Jj'jj EchoServer t File
E FTPClient
I+I 5k FTPServer
E& HTTPClient
i HTTPServer | Search (Ctrl+I)
■y 2i I o □ I a
[• Sauce Packages
B £ cloudsim
dj) CloudSm.java Log. print Line ( "Starting CloudSimExainple2
65J CloudSimExamplel.
java
CloudSmExample2.)d
va
fl) CkoudSrnExample7
java
CloudS«nExample8.)
ava
B Is Lixanes
E § doudsim-4.0.)ar
// Second step: Create Datacenters
S g) JDK 1.8 (Default)
//Datacenters are the resource providers in CloudSim.
@SuppressWarnings("unused")
Projects X Start Page X | [ffi CloudSim.java X | CloudSimExamplel .java X | CloudSimExample2. java x~| _________________________________________ t9
It)--4^ Abstractclass ± Sf ARPCIi i+
Source History ® 0 - g -| & Q Lj | £■ | & H|fij s
ARPClient ® ARPSer ARPServer t S’
Array $ & ChatClient ± ChatServer . 133 //bind the cloudlets to the vms. This way, the broker
134 // will submit the bound cloudlets only to the specific VM
CloudSim e Source Packages
135 broker.bindCloudletToVmfcloudletl.getCloudletId(),vml.getld());
Ei s doudsm 136 broker.bindCloudletToVm(cloudlet2.getCloudletldf),vm2.getld());
CloudSimjava 137
|tsj^ 138 // Sixth step: Starts the simulation -
CloudSimExamplel.ja 139 CloudSim.startSimulation^ ;
140
va
141
CloudSimExample2.ja
142 /I Final step: Print results when simulation is over
va 143 List<Cloudlet> newList = broker.getCloudletReceivedList0;
CloudSimExample3.ja 144
va 145 CloudSim.stopSimulation() ; —
146
CloudSimExample4.ja
147 pri.ntCloud2.etLis t (newList) ;
va
148
[ajj
149 Log.printLine("CloudSimExample2 finished!"); —
CloudSimExampleS.java 150 } —
CloudSimExample6.java Q catch (Exception e) {
t e.printStackTrace() ;
CloudSimExampte7.java Q
t & t CloudSimExampleS.java
> Q (£
153 Log.printLine("The simulation has been terminated due to an unexpected error");
± 154 }
Libraries
t 155 V
£ 3 cloudsm-4-O.jar
t& < >
JDK 1.8 (Default)
X
t®
±
DNSCIient DNSServer >
Output - CloudSim (run) X —
EchoClient EchoServer File *
| run.
t ©■ FTPCIient FTPServer
d? GQ Notifications | dp ® Navigator
HTTPClient
!S P Type HTTPServer
here to search O HI iji n C 1*1 D A *i
Result
Thus Simulate a cloud scenario using CloudSim and run a
scheduling algorithm that is not present in CloudSim executed
successfully .
711619104046
Ex. No. 06 Find a procedure to transfer the files from one virtual machine to another
Date: virtual machine.
Aim:
To Find a procedure to transfer the files from one virtual machine to another
virtual machine.
Procedure:
5.Look for the Command Line Interface (CLI) of the Virtual Machine.
6.Login: root, Password: opennebula
711619104046
g. Click on infrastructure
h. Select clusters and enter the cluster name
i. Then select host tab, and select all host
j. Then select Virtual networkss tab, and select all VNets
k. Then select datastores tab, and select all datastores
l. And then choose host under infrastructure tab
m. Click on + symbol to add new host, name the host then click on create.
11. On instances, select VMs to migrate then follow the stpes
a. Click on 8th icon, the drop-down list display
b. Select migrate on that, the popup window display
c. On that select the target host to migrate then click on migrate.
Result:
Thus procedure to transfer the files from one virtual machine to another virtual
machine successfully executed
711619104046
Ex. No. 07 Find a procedure to launch virtual machine using trystack (Online
Date Openstack Demo Version)
Aim:
Find a procedure to launch virtual machine using trystack (Online
Openstack Demo Version)
Procedure:
Apps YouTube Video Do... □ Tamil Jothida Palan... 0 WhatsApp □ Solve Python | Hack... * Microsoft Teams Bloom's Revised Ta... © s tanscstnic.in Stude... Reading list
Q. All (Hl News 0 Videos Q Images <J) Shopping • More Tools SafeSearch on
Fl You have successfully logger X Gfe Mail - KAVIYA.P - Outlook X <*> 2018-2021 Batch Vaccination X M Inbox - [email protected] X ♦ Thank you for creating your X + Q— □X
Apps v- YouTube Video Do... □ Tamil Jothida Palan... 0 WhatsApp Q Solve Python | Hack... E^i Microsoft Teams iGC Bloom's Revised Ta... © s tanscstnic.in Stude... [TH] Reading
list
PLATFORM? Products Solutions Pricing Resources Docs About Q, Login Contact Us Get Started
Thank you!
Begin your Kubernetes or Openstack journey by
following the steps below.
To Login “Platform9”.
Click URL ^ Give “User Name” and
“Password”
711619104046
1.6 Instances
Fl You have successfully logge X Mail - KAVIYA.P - Outlook X 2 IT8711 FOSS & CC Lab - Ex 8 X ♦ Platform!? - simple, efficient X M Inbox - kaviyaap@gmail. con X + Q OX
-> C A sandbox-pmo.platform9.net/clarity/index.html?utm_medium=email&_hsmi=87604397&_hsenc=p2ANqtz-9_5dYVeY_MRPql<IFtfDHKI<cPEght9aylb55O4coBSe9BHuZtl65gSts5... ☆ •
Apps YouTube Video Do... o Tamil Jothida Palan... 0 WhatsApp □ Solve Python | Hack... tji Microsoft Teams CC Bloom's Revised Ta... © s tanscst.nic.in Stude... Reading list
Welcome! You are in the Platforms Live Demo. Request Free Trial or Contact Us
2. Instance Creation
Move to Instances ^ Click “+INSTANCE”
Fl You have successfully logger x Mail - KAVIYA.P - Outlook X 12 ITB711 FOSS&CC Lab - Ex 8 X ♦ Platform9 - simple, efficient X M Inbox - [email protected] X+ Q— GX
0 A sandbox-pmo.platform9.net/darity/index.htmPutm_medium = email&_hsmi=87604397&_hsenc=p2ANqtz-9_5dYVeY_MRPqklFtfDHKkcPEght9aylb55O4coBSe9BHuZtl65gSts5... ☆ * ■
■■■ Apps YouTube Video Do... Q Tamil Jothida Palan... 0 WhatsApp □ Solve Python | Hack... * Microsoft Teams a Bloom's Revised Ta... 0 S tanscst.nic.in Stude... [TH] Reading list
Source: Boot Instance from ^ Image, Image Selection ^ Choose an “OS image” ^ Click
“Next”
Flavor:
Availability Zone ^ Choose “Nova”
Flavor Selection ^ Choose “ml.small” ^ Click “Next”
Network Selection: Select “tenant-01” ^ Click “Next”
Configure:
1. Instance Name (Eg: Test)
2. SSH Key (Optional)
3. Server Group (Optional)
Enter the details ^ Click “Next”
(Optional) Customize ^ Click “Finish”
New VM Instance Review ^ Click “Create Instance”
Instance is Created
3. To Create new SSH Key
711619104046
Move “Access & Security” ^ Click “+ NEW SSH KEY” ^ Give “Keypair name” &
“Public key content”
To generate SSH public key, In Linux (CentOS), Open
TerminalSwitch to “root” user [Password: newitlab]
To install SSH ^ #yum -y install openssh-server openssh-clients
Set the service to start with the machine ^ #chkconfig sshd on
To generate SSH Key ^ #ssh-keygen -t rsa -f cloud-key
To view “Private Key” of cloud-key
To view “Public Key” of cloud-key
4. Copy “cloud-key.pub” key ^ Paste in platform9 “Import SSH Key Pair ^ Public key
content” ^ Click “IMPORT”
Pl You have successfully logged in. X Q| Mail - KAVIYA.P - Outlook X ♦ Platform!)-simple, efficient cloi X M [email protected] X + Q OX
C ft sandbox-pmo.platform9.net/clarity/mdex.htmPutm_medium =email&_hsmi=87604397&_hsenc=p2ANqtz-_HusiNOPPEglYkvfYVfYXvUCxwiWkPyNf-LT5QKelDxn3Hgh-iBe2jKC... ☆ •
Apps YouTube Video Do... □ Tamil Jothida Palan... 0 WhatsApp □ Solve Python | Hack... « Microsoft Teams CC Bloom's Revised Ta... © s tanscstnic.in Stude... OU
("S Dashboard
ffi Applications Choose a key pair name you will recognize and paste
your SSH public key into the space provided.
Volumes &
Public SSH keys are normally located at
Snapshots
~/.ssh/ld_rsa.pub .
,ll|| Networks
To create your own SSH key pair: ssh-keygen -t
Welcome! You are in the Platform9 Live Demo. Request Free Trial or ContactUs
H SSH_KEY_GEN_Scre....zip ® Ex 6 - Cloudlet Sc....pdf ® Ex 5 - VM Schedul....pdf Showall X
■■ P Type here to search O si Q ■ n ,W'j
Result:
Thus procedure to launch virtual machine using trystack succesfully Paste the contents of the public key in the space
711619104046
Ex. No. 08 Install Hadoop single node cluster and run simple applications like
Date: word count.
Aim:
To Install Hadoop single node cluster and run simple applications like word
count.
Procedures:
/home/sivasamy/Downloads/hadoop-2.7.0
Browse Directory
/opl Go!
Permission Owner Group Size Last Modified Replication Block Size Name
Hadoop, 2014.
2. Steps to be followed to Shut down the Hadoop sbin/stop-dfs.sh -> to stop the
nodes sbin/stop-yarn.sh ^ to stop the node managers
711619104046
Result:
Thus Install Hadoop single node cluster simple applications word count
succesfully executed.
711619104046
Ex No:9
Develop a new web service for Calculator
Date:
AIM:
To develop a new web service for a Calculator.
PROCEDURE:
• On the next screen check the box for Axis2 Web Services
• Make sure Generate Deployment Descriptor is selected
and click Next.
Useful Information
Depending upon your environment, you may see the error message
"Failed while installing Axis2 Web Services Core 1.1". Do not
worry. We will just have to manually point Axis2 to the installation
directory of Apache Geronimo to fix this error.
2. AXIS2 Configuration
• Select Window->Preferences.
package org.apache.geronimo.samples.jws;
import javax.annotation.Resource;
import javax.jws.WebService;
import javax.xml.ws.WebServiceContext;
@WebService(serviceName = "Calculator",
portName="CalculatorPort", endpointInterface =
"org.apache.geronimo.samples.jws.Calculator", targetNamespace
= "http://jws.samples.geronimo.apache.org" )
import="java.net.URL,javax.xml.namespace.QName,
\javax.xml.ws.Service,org.apache.geronimo.samples.jws.Calcul
ator"%>
<head>
<title>Calculator</title>
</head>
<body>
</form>
</body>
</html>
javax.xml.ws.Service,org
.apache.geronimo.samples.jws.Calculator"%>
<head>
711619104046
<title>Calculator Result</title>
</head>
int value2 = 0;
int sum = 0;
try
catch ( Exception e )
e.printStackTrace(); }
%>
<body>
711619104046
</body>
</html>
<display-name>CalculatorService</display-name>
<servlet-name>
CalculatorService</servlet-name>
<servlet-class>
org.apache.geronimo.samples.jws.CalculatorService </servlet-
class>
</servlet>
<servlet-mapping>
<servlet-name>CalculatorService</servlet-name>
<url-pattern>/calculator</url-pattern>
</servlet-mapping> <service-ref>
<service-ref-name>services/Calculator</service-ref-name>
<service-interface>javax.xml.ws.Service</service-interface>
711619104046
<wsdl-file>WEB-INF/CalculatorService.wsdl</wsdl-file>
</service-ref>
</web-app>
<dep:moduleId>
<dep:groupId>org.apache.geronimo.samples.jws</dep:groupId
>
<dep:artifactId>Calculator</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type> </dep:moduleId>
<dep:dependencies> </dep:dependencies> </dep:environment>
<context-root>
/jaxws-calculator-1.0</context-root>
<service-ref>
<service-ref-name>services/Calculator</service-ref-name>
<port>
<port-name>CalculatorPort</port-name>
<protocol>http</protocol>
<host>localhost</host>
<port>8080</port> <uri>
/jaxws-calculator/calculator</uri> </port>
711619104046
</service-ref> </web-app>
OUTPUT:
Jaxws Calculator
711619104046
Server Page
Browser Page
Calculation
711619104046
Result
RESULT:
Thus developing a new web service for a calculator was executed
successfully.
711619104046
Ex No:10
Find procedure to attach virtual block to the virtual
Date: machine and check whether it holds the data even after
the release of the virtual machine.
AIM:
To write a procedure to attach virtual block to the virtual machine
and to check whether it holds the data even after the release of the virtual machine.
PROCEDURE:
1. Create and List Existing VMs
2. Pause VM Instances.
3. Reset VM Instances.
4. Delay VM Instances.
5. To attach to a running VM the Image named storage:
$ onevm disk-attach one-5 --image storage
6. To detach a disk from a running VM
OUTPUT:
RESULT:
Thus the program to attach virtual block to virtual machine was
successfully executed & checked whether it holds the data after the release of the
virtual machine.