NAME – VINAY SHARAD BHUWAD
SMT.K.G. MITTAL COLLEGE OF ARTS &
COMMERECE
CLASS – TYBSC.CS
SUB – CLOUD COMPUTING
SEAT NO –
PRACTICAL -1
Aim – Define a simple services like Converting Rs into Dollar and Call it from different
platform like JAVA and .NET Framework.
A] Convert Rupees into Dollar and Dollar into Rupees using Java.
1. Open Netbins and create new project.
2. Java webweb applicationProject nameNextFinish
3. Right click on projectnewweb service
4. Now delete this block of code
5. Right clickinsert codeAdd web service operations
6. Give nameAdd
7. Right click on web service fileTest web service
OUTPUT:
8. Right click on Web pagesnewJSP
9. Follow the same steps.
10. Write click on projectNewWeb Service clientbrowseok
11. Drag the button in body tang of output.jsp file.
12. Right click on projectbuildRight click on input.jspRun file
OUTPUT:
B] Convert Rupees into Dollar and Dollar into Rupees using .NET Framework.
1. create new projectsearch MVC and select it.
2. Give the project NameNextcreate
3. After successful creation of projectopen solution explorer
4. ViewsHomeIndex.cshtml and write the following code
5. After that open ControllerHomeController.cs
OUTPUT:
PRACTICAL NO – 2
Aim – Create a simple SOAP Service.
1. Create the new project in netbence software
2. FileNew ProjectJava webweb ApplicationNext
3. Now right click on your project and AddNewWeb Service.
4. Give the web service name and package Name.
5. Now open Web services folder Right click on your web webserviceAdd operation
6. After that give operation namegive return typeclick on add buttongive the name of two
numbersok.
7. Now you can the method of Addition will generate automatically. You have to edit it according your
function.
8. Now follow the same steps to create the methods for Subtraction, Multiplication and Division.
9. Right click on projectDeploy
10. Write click on webserviceTest Web Service
OUTPUT:
11. Now we can perform any Addition, Subtraction, Multiplication and Division.
PRACTICAL NO – 3
Aim – Create simple REST service.
1. Create a java web application.
2. Right click on projectnewothersweb services RESTful web services from patterns.
3. Change the code and create methods as following…
4. Right click on project and clean the project and after deploy it.
5. Right click on RESTful web servicesTest Restful web serviceok
OUTPUT:
PRACTICAL NO – 4
Aim – Develop application to consume Google’s search / Google map RESTful Web service.
1. write a following code for index.html
2. create index.jsp file
Index.jsp file
Now go to the chrome and search Google cloud console.
API’s and services libraryMap JavaScript API and place API Enable
API’s and services Credentials
create credentialAPI keyclose
Now click on API key
Scroll down.
Now select Restrict key and select dropdown and select both checkboxes.
Now click on show key and copy it.
After placing the key Right click on projectcleanbuildRun
OUTPUT:
PRACTICAL NO – 5
Aim – Installation and configuration of virtualization using a KVM.
1. Open the VMWere.
1. Click Power on this virtual machine.
2. Now select the Ubuntu 64-bit and enter the password.
3. Now open terminal in ubuntu and type the following command
Sudo apt-get update
4. Now type the following commands.
Sudo grep -c “svm\|vmx”/proc/cpuinfo
Cat /proc/cpuinfo
5. Now type the following command
Sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-
manager
Sudo virt-manager
OUTPUT:
PRACTICAL NO – 6
Aim – Download image from server.
1. Open Visual studio and create new project
2. Select ASP.NET Application (.NET Framework)
3. Give the project name.
4. After that open solution explorerRight click on projectAddNew Itemweb
service(ASMX) and give the nameAdd
DownloadImageWS.asmx.cs file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace VinayDownloadImgFromWS
{
/// <summary>
/// Summary description for DownloadImageWS
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the
following line.
// [System.Web.Script.Services.ScriptService]
public class DownloadImageWS : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod, Description("Get Image Content")]
public byte[] GetImageFile(String filename)
{
if (System.IO.File.Exists(Server.MapPath("~/Images/") + filename))
{
return System.IO.File.ReadAllBytes(Server.MapPath("~/Images") + filename);
}
else
{
return new byte[] { 0 };
}
}
}
}
5. Now again right click on projectAddnew itemsearch handlerselect generic handler and give
name
VinayHandler.ashx.cs file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace VinayDownloadImgFromWS
{
/// <summary>
/// Summary description for VinayHandler
/// </summary>
public class VinayHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
DownloadImageWS ws = new DownloadImageWS();
byte[] binImage = ws.GetImageFile(context.Request["filename"]);
if (binImage.Length == 1)
{
}
else
{
context.Response.ContentType = "image/jpeg";
context.Response.BinaryWrite(binImage);
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
6. Again right click on projectAddnew itemselect web formGive the name
7. Click on Viewtoolboxtdesign the following form
8. Now double click on button and change code
9. Write click on Project and create folder images and paste the images.
10. After that execute the code and Enter the Image name in Textfield.
OUTPUT:
PRACTICAL NO – 7
Aim - Implement FOSS-Cloud Functionality VSI (Virtual Server
Infrastructure) Infrastructure as a Service (IaaS), Storage
1. Open the System where you have downloaded the FOSS- Cloud.
2. Enter user-root & Password-admin.
3. Now Right following
command
fc-node-
configuration -n demo-
system –password admin
4. Now enter ifconfig command.
5. Now copy or save the IP Address (192.168.0.192)
6. Now open the browser of another device and type that IP address in new tab.
7. Username-admin & Password-admin
8. Now download Virtviewer software and Spice client software
9. Now open Registry editor
10. Computer\HKEY_CLASSES_ROOT\spice\shell\open\command
11. We have to edit the command.
12. Open the path of Remote viewer.
13. C:\Users\ A(find in hidden files and folders) \AppData\Local\virt-viewer\bin
14. Now open Registry editor andRight click on itModifyPaste the path and add \remote-viewer
%1 at the end.
15. Come back to browservirtual MachineUpload ISO filechoose file
16. Select the Ubuntu ISO file.
17. After successful upload you will get message Upload finished.
18. ProfilecreatewindowsdefaultX_86_64en-US
19. Now do following setup and click on create button.
20. Virtual MachineVM tampletecreate
21. Now click on Right arrow button under Run action.
22. Now you can see status is running.
23. Click on VM template bar button in Action
24. You will get alert box Click on open-remote viewer.
OUTPUT:
25.
PRACTICAL NO – 8
Aim - Implementation of Openstack with user and private network creation.
WHAT IS OPENSTACK?
OpenStack is a cloud operating system that controls large pools of compute, storage, and
networking resources throughout a datacentre, all managed and provisioned through APIs with
common authentication mechanisms.
A dashboard is also available, giving administrators control while empowering their users to
provision resources through a web interface.
1. Open terminal and Type the following commands.
2. Before starting the installation you have to update or upgrade the system
Sudo apt-get update
3. Create new user and give permissions to start the OpenStack.
Sudo adduser stack
Sudo -i
Echo “stack ALL=(ALL) NOPASSWD:ALL”>>/etc/sudoers.
4. Download the Devstack from Github.com
Sudo apt-get install git
Git clone https://git .openstack.org/openstack-dev/dev/devstack
5. Run the following commands to avoid the Errors before installation
Sudo rm /var/lib/dpkg/lock
Sudo rm /var/lib/apt/lists/lock
Sudo rm /var/cache/apt/archives/lock
Sudo rm -rf/var/lib/apt/lists/*
6. Configure local.conf file
cd devstack/
cd samples
cp local.conf ../
cd..
sudo nano local.conf
ADMIN_PASSWORD=pass1
DATABASE_ PASSWORD=pass1
RABBIT_PASSWORD=pass1
SERVICE_ PASSWORD=pass1
HOST_IP=10.0.2.15(your ip address)
FLOATING_RANGE=10.0.2.224/24
ctrl+x ->y
7. Now you can start your installation process.
./stack.sh