You are on page 1of 27

Cloud Computing Lab (CS -711) ROLLNO

PRACTICAL - 1
AIM: Introduction to Cloud Computing.
Cloud Computing is a computing paradigm, where a large pool of systems is connected in private or
public networks, to provide dynamically scalable infrastructure for application, data and file storage. With
the advent of this technology, the cost of computation, application hosting, content storage and delivery is
reduced significantly.
Cloud computing is a practical approach to experience direct cost benefits and it has the potential to
transform a data centre from a capital-intensive set up to a variable priced environment.
The idea of cloud computing is based on a very fundamental principal of „reusability of IT capabilities'.
The difference that cloud computing brings compared to traditional concepts of “grid computing”,
“distributed computing”, “utility computing”, or “autonomic computing” is to broaden horizons across
organizational boundaries.
Forrester defines cloud computing as: “A pool of abstracted, highly scalable, and managed compute
infrastructure capable of hosting end customer applications and billed by consumption.”

Fig 1. Conceptual Model of Cloud Computing

1
Cloud Computing Lab (CS -711) ROLLNO
• Cloud Computing Service Models:
Cloud Providers offer services that can be grouped into three categories:
1. Software as a Service (SaaS): In this model, a complete application is offered to the customer, as a
service on demand. A single instance of the service runs on the cloud & multiple end users are
serviced. On the customers’ side, there is no need for upfront investment in servers or software
licenses, while for the provider, the costs are lowered, since only a single application needs to be
hosted & maintained. Today SaaS is offered by companies such as Google, Salesforce, Microsoft,
Zoho, etc.

2. Platform as a Service (Paas): Here, a layer of software, or development environment is


encapsulated & offered as a service, upon which other higher levels of service can be built. The
customer has the freedom to build his own applications, which run on the provider’s infrastructure.
To meet manageability and scalability requirements of the applications, PaaS providers offer a
predefined combination of OS and application servers, such as LAMP platform (Linux, Apache,
MySQL and PHP), restricted J2EE, Ruby etc. Google’s App Engine, Force.com, etc. are some of
the popular PaaS examples.

3. Infrastructure as a Service (Iaas): IaaS provides basic storage and computing capabilities as
standardized services over the network. Servers, storage systems, networking equipment, data
centre space etc. are pooled and made available to handle workloads. The customer would
typically deploy his own software on the infrastructure. Some common examples are Amazon,
GoGrid, 3 Tera, etc.

Fig 2. Cloud Models

2
Cloud Computing Lab (CS -711) ROLLNO

• Cloud Computing Deployment Models:

Enterprises can choose to deploy applications on Public, Private or Hybrid clouds. Cloud
Integrators can play a vital part in determining the right cloud path for each organization.

1. Public Cloud: Public clouds are owned and operated by third parties; they deliver superior
economies of scale to customers, as the infrastructure costs are spread among a mix of users,
giving each individual client an attractive low-cost, “Pay-as-you-go” model. All customers share
the same infrastructure pool with limited configuration, security protections, and availability
variances. These are managed and supported by the cloud provider. One of the advantages of a
Public cloud is that they may be larger than an enterprises cloud, thus providing the ability to scale
seamlessly, on demand.

2. Private Cloud: Private clouds are built exclusively for a single enterprise. They aim to address
concerns on data security and offer greater control, which is typically lacking in a public cloud.
There are two variations to a private cloud:

▪ On-premise Private Cloud: On-premise private clouds, also known as internal clouds are
hosted within one’s own data centre. This model provides a more standardized process and
protection, but is limited in aspects of size and scalability. IT departments would also need to
incur the capital and operational costs for the physical resources. This is best suited for
applications which require complete control and configurability of the infrastructure and
security.

▪ Externally hosted Private Cloud: This type of private cloud is hosted externally with a cloud
provider, where the provider facilitates an exclusive cloud environment with full guarantee of
privacy. This is best suited for enterprises that don’t prefer a public cloud due to sharing of
physical resources.

3. Hybrid Cloud: Hybrid Clouds combine both public and private cloud models. With a Hybrid
Cloud, service providers can utilize 3rd party Cloud Providers in a full or partial manner thus
increasing the flexibility of computing. The Hybrid cloud environment is capable of providing on
demand, externally provisioned scale. The ability to augment a private cloud with the resources of
a public cloud can be used to manage any unexpected surges in workload.
3
Cloud Computing Lab (CS -711) ROLLNO

PRACTICAL - 2
AIM: Creating a Warehouse Application in Sales Force.com

Step 1: Creating Custom Object for Warehouse:


1.1 Click on Create →Objects under Build Section of Setup page.

1.2 Click on New Custom Object

1.3 Enter the following values in the given fields:


Label: Aks_Employee Plural Label: Aks_Employees
Object Name: Aks_Employee Description: Employee record of Aks company Record Name:
Aks_Employee Name Data Type: Text
4
Cloud Computing Lab (CS -711) ROLLNO

Then click on Save.

Step 2: Creating Custom Fields for Warehouse Object:


2.1 Under Aks_Employee, go to Custom Fields & Relationships → Click on New

2.2 Creating 1st Field:


→Select Data type as Number → Click on Next
→ Enter the following values in fields:
Field Label: E_ID Field Name: E_ID

Length: 18 Decimal Places: 0


Description: Employee identity number

5
Cloud Computing Lab (CS -711) ROLLNO

→ Click on Next.
→ Grant Edit Access to all by selecting Visible.
→ Click on Next → Select Aks_Employee Layout to add field in it.

6
Cloud Computing Lab (CS -711) ROLLNO

→ Click Save & Continue.

2.2 Creating 2nd Field:


→Select Data type as email → Click on Next
→ Enter the following values in fields:
Field Label: Email Field Name: Email

Description: Employee Email ID


→ Click on Next → Grant Edit Access to All and add it to Aks_Employee Layout → Click on Save.

Step 3: Creating Custom Tab for Warehouse Object:


3.1 Click on Create →Tabs under Build Section of Setup page.
s

→ Click on New under Custom Object Tabs.

7
Cloud Computing Lab (CS -711) ROLLNO

3.2 Enter the following values in fields:


Object: Aks_Employee Tab Style: computer Description: custom tab for computer
employees Splash Page Custom Link: None
→ Click on Next → Apply Visibility to All Profiles → Click on Save.

3.3 The custom tab will appear like this,

Step 4: Adding items into Warehouse Object:


4.1 To add items into Aks_Employee warehouse, simply click on Aks_Employee tab

8
Cloud Computing Lab (CS -711) ROLLNO
→ Then Click on New.

4.2 Add following items’ information into fields:


Aks_Employee Name: Akshay kumar

E_ID: 1610513302
Email: ak5072240@gmail.com
DOB: 09/09/1997
Sallary: 55000

→ Then Click on Save & New to similarly add more items into the warehouse object.

4.3 After adding more items into the warehouse → Click on Save.
The final warehouse will look like this,

9
Cloud Computing Lab (CS -711) ROLLNO
Step 5: Creating an App for Warehouse Object:
5.1 Click on Create → Apps under Build Section of Setup page → Click on New.

5.2 Add the following values into the fields:


App label & Name: Aks_Employee

→ Then Click on Next.

10
Cloud Computing Lab (CS -711) ROLLNO

5.3 Click on Insert an Image to choose the image for custom app logo.

→ Then Click on Next.

5.3 Add nautiyals tab from Available Tabs by clicking Add Button → Choose Default Landing Tab
as nautiyal.

11
Cloud Computing Lab (CS -711) ROLLNO → Click on Next → Assign Visibility to All Profiles
→ Then Click on Save.
5.3 The Aks_Employee App will appear in the Apps list like this,

5.4 Click on the Aks_Employee App to open it and we can see the various tabs and the list of
items that we created earlier inside the object

12
Cloud Computing Lab (CS -711) ROLLNO

PRACTICAL - 4
AIM: Implementation of SOAP Web services in JAVA Applications.

SOAP is an acronym for Simple Object Access Protocol. It is an XML-based messaging protocol for
exchanging information among computers. SOAP is an application of the XML specification.
• SOAP is a communication protocol designed to communicate via Internet.
• SOAP can extend HTTP for XML messaging.
• SOAP provides data transport for Web services.
• SOAP can exchange complete documents or call a remote procedure.
• SOAP can be used for broadcasting a message.
• SOAP is platform - and language-independent.
• SOAP is the XML way of defining what information is sent and how.
• SOAP enables client applications to easily connect to remote services and invoke remote methods.
Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of
transport protocols, the initial focus of SOAP is remote procedure calls transported via HTTP.
Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to SOAP, but
SOAP messages are written entirely in XML and are therefore uniquely platform- and language
independent.

Implementation:

Step 1: Create project

Open Netbeans >> Select File >> New Project >> Java Web: Web Application:

13
Cloud Computing Lab (CS -711) ROLLNO
Click Next >> Enter Project name: ‘WebServ’:

Click Next >> Select Server:

14
Cloud Computing Lab (CS -711) ROLLNO
Click next or Finish

Step 2: Create WebService

1. Right click on the project ‘WebServ’ >> New >> Web Service:
2. Enter Web service name: RectArea and Enter Package: com.akshay.example

Click Finish
Step 3: Add/Update web method

• We can update the default given method inside the RectArea and can also add another methods.
15
Cloud Computing Lab (CS -711) ROLLNO • Right click on the RectArea inside the web services and select add
operation to add the new method into the web services
• Then the RectArea.java file is given as
package com.akshay.example;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
/**
*
* @author AKSHAY THAKUR
*/
@WebService(serviceName = "RectArea")
public class RectArea {
@WebMethod(operationName = "Area")
public int RectArea(@WebParam(name = "l") int l, @WebParam(name = "b") int b,
@WebParam(name = "h") int h)
{
int a=l*b*h;
return a;
}}
Step 4: Clean and build the application
Right click on the project, select ‘Clean and Build’.

16
Cloud Computing Lab (CS -711) ROLLNO
Step 5: Deploy the application

Right click on the project, select ‘Deploy’.


Step 6: Test the webservice

Right click on the web service ‘RectArea’ and select ‘Test Web Service’.

It will open up the browser where the service we created can be tested:

Enter the values in the textbox and hit ‘area’ button, you could see the response from the server
as shown below:
17
Cloud Computing Lab (CS -711) ROLLNO
Step 7: Accessing the webservice by client

• Create new project java>java Application


• Give the name for project say Client and press finish.
• Right click on the client project and click on new>web service client
• Browse the web services on project and also give the name of the package say com.akshay.example

18
Cloud Computing Lab (CS -711) ROLLNO

• Wright the following code on the client.java file or right click on the class body and click on inset
code>web services operation and then select the operation :
public class Client {
private static int area(int l, int b, int h) {
com.akshay.example.RectArea_Service service = new com.akshay.example.RectArea_Service();
com.akshay.example.RectArea port = service.getRectAreaPort();
return port.area(l, b, h);
}
public static void main(String[] args) {
System.out.println("Area ="+area(12, 13, 9));
}
}

• Right click on the client.java file and click on run the output of the running services will be:
19
Cloud Computing Lab (CS -711) ROLLNO

PRACTICAL - 5
AIM: Implementation of Para-Virtualization using VM Ware’s Workstation/
Oracle’s Virtual Box and Guest O.S.

Virtual Box is a cross-platform virtualization application. For one thing, it installs on your existing Intel
or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems.
Secondly, it extends the capabilities of your existing computer so that it can run multiple operating
systems (inside multiple virtual machines) at the same time. So, for example, you can run Windows and
Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and
so on, all alongside your existing applications. You can install and run as many virtual machines as you
like the only practical limits are disk space and memory. Virtual Box is deceptively simple yet also very
powerful. It can run everywhere from small embedded systems or desktop class machines all the way up
to data centre deployments and even Cloud environments.

The techniques and features that Virtual Box provides are useful for several scenarios:

• Running multiple operating systems simultaneously: Virtual Box allows you to run more than
one operating system at a time. This way, you can run software written for one operating system
on another (for example, Windows software on Linux or a Mac) without having to reboot to use it.
Since you can configure what kinds of "virtual" hardware should be presented to each such
operating system, you can install an old operating system such as DOS or OS/2 even if your real
computer's hardware is no longer supported by that operating system.
• Easier software installations: Software vendors can use virtual machines to ship entire software
configurations. For example, installing a complete mail server solution on a real machine can be a
tedious task. With Virtual Box, such a complex setup (then often called an "appliance") can be
packed into a virtual machine. Installing and running a mail server becomes as easy as importing
such an appliance into Virtual Box.
• Testing and disaster recovery. Once installed, a virtual machine and its virtual hard disks can be
considered a "container" that can be arbitrarily frozen, woken up, copied, backed up, and
transported between hosts.
• Infrastructure consolidation. Virtualization can significantly reduce hardware and electricity costs.
Most of the time, computers today only use a fraction of their potential power and run with low
average system loads. A lot of hardware resources as well as electricity is thereby wasted. So,
instead of running many such physical computers that are only partially used, one can pack many
virtual machines onto a few powerful hosts and balance the loads between them.

When dealing with the virtualization there are some terminologies which are most commonly used are:

Host operating system (host OS): This is the operating system of the physical computer on which
Virtual Box was installed. There are versions of Virtual Box for Windows, Mac OS X, Linux and Solaris
hosts.

Guest operating system (guest OS): This is the operating system that is running inside the virtual
machine.

Virtual machine (VM): This is the special environment that Virtual Box creates for your guest operating
system while it is running. In other words, you run your guest operating system "in" a VM. In other
words, you run your guest operating system "in" a VM. Normally, a VM will be shown as a window on
your computer’s desktop, but depending on which of the various frontends of VirtualBox you use, it can
20
Cloud Computing Lab (CS -711) ROLLNO
be displayed in full screen mode or remotely on another computer. In a more abstract way, internally,
Virtual Box thinks of a VM as a set of parameters that determine its behaviour. They include hardware
settings (how much memory the VM should have, what hard disks VirtualBox should virtualize through
which container files, what CDs are mounted etc.) as well as state information (whether the VM is
currently running, saved, its snapshots etc.). These settings are mirrored in the VirtualBox Manager
window as well as the V Box Manage command line program.

Guest Additions: This refers to special software packages which are shipped with VirtualBox but
designed to be installed inside a VM to improve performance of the guest OS and to add extra features.

Starting Virtual Box:

After installation, you can start Virtual Box as follows:

1. On a Windows host, in the standard "Programs" menu, click on the item in the "VirtualBox" group.

2. When you start Virtual Box for the first time, a window like the following should come up:

This window is called the "VirtualBox Manager". On the left, you can see a pane that will later list all
your virtual machines. Since you have not created any, the list is empty. A row of buttons above it allows
you to create new VMs and work on existing VMs, once you have some. The pane on the right displays
the properties of the virtual machine currently selected, if any. Again, since you don't have any machines
yet, the pane displays a welcome message.

Creating your first virtual machine:

Click on the "New" button at the top of the Virtual Box Manager window. A wizard will pop up to guide
you through setting up a new virtual machine (VM):
1. Specify the name type and version of the guest OS and click on the next.

21
Cloud Computing Lab (CS -711) ROLLNO

.
2. On the next page, select the memory (RAM) that Virtual Box should allocate every time the virtual
machine is started. The amount of memory given here will be taken away from your host machine and
presented to the guest operating system, which will report this size as the (virtual) computer's installed
RAM.

3. Next, you must specify a virtual hard disk for your VM.
4. Choose the hard disk file type and click Next.

22
Cloud Computing Lab (CS -711) ROLLNO

5. Select the storage on the physical hard disk either Dynamically Located or Fixed Size.
6. Then choose the location of the image of guest operating system and specify the memory space for that
guest operating system and click on the create.

7. The created virtual machine list will be displayed as in the given image.

23
Cloud Computing Lab (CS -711) ROLLNO

Running your virtual machine:

To start a virtual machine, you have several options:


• Double-click on its entry in the list within the Manager window or
• select its entry in the list in the Manager window it and press the "Start" button. • After that
select the ISO image of the operating system i.e. Ubuntu and click on start button.
• The guest operating system will start loading and it will shows the installation wizard where we have
to select the language and selecting one between try Ubuntu and install Ubuntu.

24
Cloud Computing Lab (CS -711) ROLLNO


After that the guest operating system will started.
25

You might also like