Professional Documents
Culture Documents
LAB MANUAL
Cloud Computing
Semester: VII
Today, various computing technologies are supported by the cloud in both the business and consumer
space. Cloud computing is an umbrella term that covers a plethora of computing resources. You can
think of cloud computing as utility services that provide convenient access to computing services at
affordable rates.
After reading this article, you’ll be able to hold your own in conversations about cloud computing, the
benefits it brings to businesses and the various cloud delivery models and cloud service models.
If you’re serious about moving into cloud computing professionally, taking cloud certification courses
such as the AWS Certified Cloud Practitioner or AWS Certified Solutions Architect are good choices
to help you build a strong skill set.
Cloud Computing
Let’s start our discussion of cloud computing concepts with the most important term, “Cloud
computing” itself. Often referred to simply as ‘cloud,’ this is web-based computing that provides
on-demand access to various compute resources. These resources include things like data centers,
servers, application software and more. Most cloud computing service providers adopt a
pay-as-you-go model. This allows companies to avoid the heavy infrastructure setup costs that were
inevitable before the advent of the cloud.
XaaS (Anything-As-A-Service)
XaaS is another term you’ll often come across and it relates to what is known as cloud service models.
This is a general category of services related to remote access and cloud computing. It includes a wide
selection of technologies, tools and products that are offered to users as a service over the web.
Basically, any IT function can be changed into a service for business consumption. The service is not
paid as a license or upfront purchase, but in a flexible pay-for-what-you-use consumption model.
XaaS comes with several benefits, including speeding up business processes and application
development, improving the expense model (CAPEX vs OPEX), and streamlining operations to free
up resources for innovation.
SaaS (Software-As-A-Service)
SaaS is a software distribution model where a third-party provider hosts a variety of applications and
makes them available to customers on the internet.
In this model, the provider gives clients network-based access to one copy of an application created
for SaaS distribution. The source code of the application is similar for all customers. When an update
is rolled out, it is distributed to all customers.
Depending on the implementation, customers can store data in the cloud, locally, or both. Companies
can use application programming interfaces (APIs) to integrate SaaS applications with other software
to achieve optimal benefits.
SaaS has several benefits, including flexibility in payments thanks to its pay-as-you-go model,
scalable usage, easy accessibility and persistence and automatic updates.
PaaS (Platform-As-A-Service)
PaaS is one of the major cloud computing models where a third-party provider delivers software and
hardware tools over the web. More often than not, these tools are used for app development. The
provider hosts these tools on their own infrastructure. Therefore, PaaS allows developers to work
without investing in in-house hardware and software, which saves costs!
Something worth noting is that PaaS doesn’t replace your IT infrastructure for software development.
Rather, it provides you with a simple and convenient way to get the job done in a timely fashion. It is
provided through a cloud service and users access offerings through their web browsers. PaaS can be
offered through hybrid, private, mobile or public clouds to deliver a host of services, including java
development and application hosting.
Normally, you will pay for this service on a pay-as-you-go model, although some providers charge a
monthly fee.
PaaS comes with several benefits, including eliminating the capital expenses companies used to incur
for in-house hardware and software. It can also speed up application deployment.
IaaS (Infrastructure-As-A-Service)
IaaS delivers virtual computing infrastructure that is delivered and managed over the web. This model
scales with demand and allows companies to only spend on what they use. It helps businesses avoid
the complexity and expense of purchasing and managing in-house data center infrastructure.
There are lots of things businesses can do with IaaS, including:
● Test and deployment – teams can swiftly dismantle development and test (dev-test)
environments and create new applications faster.
● Web apps – IaaS provides a host of resources and infrastructure needed for the
development of web apps such as networking resources, application servers and
storage.
● Big data analysis – Big data is one of the most popular terms you will come across.
IaaS provides the infrastructure and processing power needed to mine big data.
● High-performance computing – Commonly referred to as HPC, helps solve complex
problems involving millions of calculations or variables. This includes evaluating
product designs, financial modelling, climate and weather predictions, and many
more. IaaS provides the infrastructure to accomplish this.
● Web hosting – Running websites using IaaS is easier, more convenient and less
costly than doing on traditional platforms.
IaaS increases reliability, supportability, and stability. Additionally, it enables users to scale up
resources quickly and respond to shifting business conditions.
Serverless
Serverless is a cloud computing model that allows developers to build modern applications without
thinking about servers. It allows them to shift most of their operational responsibilities to the provider.
By using this model, you can concentrate on writing application code while the platform takes care of
resource allocation, run times, security, scaling and other server solutions.
Serverless eliminates a range of infrastructure management tasks like patching, operating system
maintenance, server provisioning and more. This goes a long way in saving costs in all aspects of
application development.
Examples of serverless cloud computing services include AWS Lambda and Microsoft Azure
Functions.
Public Cloud : Public cloud is a type of cloud deployment. It refers to computing services delivered by
third-party providers over the public internet in a multi-tenant model.Public cloud services are made
available to anyone who wants to buy or use them.
Private Cloud : Also known as corporate or internal cloud, private cloud refers to computing services
provided over a private network. These services are consumed by internal company departments
rather than the general public.Private cloud provides businesses with a vast array of benefits,
including scalability, elasticity and affordability.
Hybrid Cloud : Hybrid cloud refers to an environment that incorporates private cloud and public cloud
services. This kind of ecosystem allows workloads to move between public and private clouds.
Experiment - 2
Eucalyptus is an open source cloud platform that enables organisations to create private clouds inside
their data centres using existing virtualized infrastructure.
First released in 2008, ‘Eucalyptus’ is actually an acronym that stands for ‘Elastic Utility Computing
Architecture for Linking Your Programs to Useful Systems’.
Eucalyptus enables IT organisations to build Amazon Web Services (AWS)-compatible private clouds
that can pool together existing virtualized IT resources and provide them to its customers in a flexible,
on-demand, pay-as-you-go basis.
The Eucalyptus cloud platform primarily comprises of five main components, each briefly explained
below:
Cloud controller (CLC): The cloud controller is essentially a Web-based interface between Eucalyptus
and the outside world. It provides cloud administrators an interface with which they can configure and
manage the cloud’s underlying compute, storage and network resources. It also handles high-level
user authentication, quota management along with a few basic accounting and reporting mechanisms.
Users can also query the CLC using Eucalyptus’s command line tools called Euca2ools.
Walrus: Walrus provides persistent storage capabilities to all of the virtual machines in the Eucalyptus
cloud. It is basically a large storage container where users can upload data from any file type using
simple HTTP put-get queries.
Cluster controller (CC): A typical Eucalyptus cloud set-up can comprise multiple nodes, which are
actually hypervisors on which virtual machines are provisioned. These nodes can be collectively
grouped and managed by using the cluster controller, which primarily looks after the inter-node
communications and Service Level Agreements (SLAs) of each cluster.
Storage controller (SC): The storage controller provides persistent block-level storage for virtual
machines that are launched within a Eucalyptus cloud. The SC interfaces with a wide variety of
storage systems including local file systems, NFS, SAN and even iSCSI.
Node controller (NC): Node controllers or nodes are hypervisor-based virtualised servers that host
virtual machines which are provisioned by the Eucalyptus cloud. Eucalyptus additionally provides an
optional add-in component that even supports VMware ESXi hypervisor as a node, called a VMware
broker.
Note: It is recommended that you install the node controllers first so that it becomes easier to add
them to the cloud controller once they are all up and ready.
Installing the node controller is a very simple process. Once your machine boots from the Eucalyptus
Faststart DVD, select the option ‘Install CentOS 6 with Eucalyptus Node Controller’ from the boot
screen.
Next, select the appropriate ‘Language’ and ‘Keyboard settings’ according to your locale.
Provide a ‘Static IP’ and a suitable ‘Host Name’ to your node controller in the ‘Network
Configuration’ wizard.
Provide a strong ‘Root Password’ for your node controller. Once done, your node controller along
with the base OS will be installed. You will have to reboot your system once the installation
completes.
Log in to the node controller using the root user’s username and password. A few scripts run
automatically at this time to set the node controller’s networking configurations. Once completed,
your node controller is ready to be added to a cloud controller.
Note: Follow the above mentioned steps for each of the node controllers that you wish to use for your
cloud.
Installation of the cloud controller is very similar to the nodes, with a few exceptions. Once your
machine boots from the Eucalyptus Faststart DVD, select the option ‘Install CentOS 6 with
Eucalyptus Frontend’ from the boot screen.
Again, select the appropriate ‘Language’ and ‘Keyboard settings’ according to your needs.
Provide a ‘Static IP’ and a suitable ‘Host Name’ to your cloud controller in the ‘Network
Configuration’ wizard.
Once done, you will be provided with an interface to supply a ‘Public IP Range/ List’ (see Figure 4)
for your Eucalyptus cloud. You need to enter a valid IP address range here. These public IPs will be
mapped to individual Eucalyptus instances (virtual machines) once they are launched in the cloud.
The rest of the installation process remains the same. Once the cloud controller reboots, it will start
executing a lot of configuration scripts that will set Walrus, the cluster controller and the storage
controller with a few default parameters. The scripts also create a CentOS 6 EMI (Eucalyptus
Machine Image). You can use this EMI to launch multiple CentOS 6 instances in your cloud.
To test whether the installation was successful, open a Web browser and type in the following to view
the Eucalyptus user console: http://<Cloud_Controller_IP>:8888
To launch your first instance, all you need to do is follow these simple steps:
1) Create a security group: A security group is similar to a firewall that protects your instance
against network-related attacks. By default, all inbound traffic to the instance is blocked.
To open a port for your security group, use the following syntax:
Installing a guest operating system inside your VMware Workstation virtual machine is essentially the
same as installing it on a physical computer. The basic steps for a typical operating system are:
The next section provides notes on installing a Windows XP guest operating system.The screen shots
illustrate the process on a Windows host. The steps are the same on a Linux host.
Experiment - 4
Aim - Check how many virtual machines can be utilized at a particular time.
There are several factors that determine how many virtual machines can be run on a specific host
machine. Because of this, it is not possible to directly specify how many virtual machines a given host
can run at once. The factors can be roughly sorted in this order of importance:
Memory
● Each virtual machine requires some overhead memory to manage it, which means each
uses a total of up to about 1.3 times the amount of memory (RAM) given in the virtual
machine settings.
● Total virtual machine memory restrictions, for different versions of VMware Workstation:
○ 4.5.1 and earlier: a maximum of 1GB total available for all running virtual
machines.
○ 4.52 - 5.5: a maximum of 4GB total available for all running virtual machines.
○ 6.x and later: No maximum limit for the total available for all virtual machines.
CPU
The number and speed of host machine CPUs determine the performance of multiple virtual
machines.
Hard drive speed
The faster the drive on the host system, the better a virtual machine performs.
Host Operating System
At this time, a Linux host operating system seems to require less memory to run, and it seems to
handle task switching better than Windows.
However, Windows host machines handle video redraw with better speed than Linux.
Experiment - 5
Aim - Install a C compiler in the virtual machine and execute a sample program
Download and install
To download, point your browser to
http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express and select Language and
click on Free Download. After you complete download, run the executable file, it will ask you to
select whether you want to install some other optional products, uncheck those options so that you can
install only the product required. The installation process will start downloading other files from the
Microsoft site and depending upon your connection speed it will take a while to complete the
installation.
Once the installation is complete, in Windows 7, start the Visual Studio 2008 Command Prompt
from All Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual
Studio 2008 Command Prompt.
Write, compile and execute your first program
Step 1 : type notepad demo.c (you can replace the filename with your own) and press Enter, when
asked if you want to create a new file, say yes.
Step 2 : type the following code and click File > Save . When asked where to save the file, select
the location suitable.
Step 3 : Type cl sample.c and press enter now. This will compile the program to create an
executable file (.exe).
Step 4 : Now simply type the name of the file sample and enter. That will show you the output.
Install, compile and execute C program with Turbo C++ in Windows
Turbo C++ is very popular C compiler and IDE. The problem is, Borland, the creator organization
of the compiler and IDE does not provide any option to download the compiler and IDE. But if you
google with "turbo c++ download", you will get plenty of sites to download the compiler and IDE.
There are three files to download - TC.exe, tc.r00 and tc.r01. After downloading, run TC.exe file it
will create a folder TC at the end the installation process. To run turbo C++, enter bin directory
within TC and look for tc.exe. Double click the tc.exe file and turbo C++ IDE will open.
Those who are running Turbo C++ is Windows 7, when the IDE is opened, click on "Ignore" in the
popup window saying that it does not support full-screen mode. Now, click on the top left corner of
the Turbo C++ window and select "Properties" . Select "Font" tab and change the font to "Lucidia
Console" from default "Raster fonts". Also, change the font size to "28". Now select "Layout" tab
and set "width" as 80 and "Height" as 25 under "Screen Buffer Size". Under "Window Size",
change "Width" as 60 and "Height" as 25. Under "Window Position", set the value of "Left" and
"Top" both as -4. Make sure "Left System Position Window" is unchecked. Click "Ok" to close the
properties window. Now you can see the Turbo C++ IDE in full screen.
Write, Compile and Run C program
Open a new file from File > New in the Turbo C++ IDE. Write a small program in the IDE.
Now go to File > Save As and save the program with the filename of your choice (make sure
extension of the filename is .c).
Click on Options and go to Directories. Click on Directories and set Output Directory as you want
and Source Directory as where you have saved the C program file.
Now go to compile and click on Compile. And then Click on Run. You will see the output of your
C program.
wxDev-C++ is easy to use IDE which you may opt for to write C Program. You may download the
installer from wxdsgn.sourceforge.net. We found it working perfectly on Windows 7 and Windows
XP. It also installs MinGW along with and you don't need to set any environment variables. The
default compiler for this IDE is gcc.
After downloading the installer, run the exe file by double clicking on it and an installation wizard
will guide you to install. Once you finish the installation, you start it from Programs and the first
time when you run it, it takes a while for parsing header files. The IDe window looks like
following:
You may start programming by clicking on File > New > Source File in the window. Note that
while saving the file, you must select file type as C as this IDE supports C++ also.
Though slightly dated, we find wxDev-C++ an excellent IDE for programming C. You may try it if
you are using Windows.
If the C compiler is already installed, it will show you a message like above. If not, it will install all
the necessary packages.
Now open a text editor and write a small C program like following and save it as demo.c :
Copy
Now run the command as shown below to compile and execute the file :
This is how you can install the GNU Gcc compiler, write a C program and run it in a virtual
machine.
Experiment - 6
Aim - Show the virtual machine migration based on the certain condition from
one node to the other.
You can move virtual machines from one compute resource or storage location to another by using
cold or hot migration. For example, with vSphere vMotion you can move powered on virtual
machines away from a host to perform maintenance, to balance loads, to collocate virtual machines
that communicate with each other, to move virtual machines apart to minimize fault domain, to
migrate to new server hardware, and so on. Moving a virtual machine from one inventory folder to
another folder or resource pool in the same data center is not a form of migration. Unlike migration,
cloning a virtual machine or copying its virtual disks and configuration file are procedures that create
a new virtual machine. Cloning and copying a virtual machine are also not forms of migration.
By using migration, you can change the computer resource that the virtual machine runs on. For
example, you can move a virtual machine from one host to another host or cluster.
To migrate virtual machines with disks larger than 2 TB, the source and destination ESXi hosts must
be version 6.0 and later.Depending on the power state of the virtual machine that you migrate,
migration can be cold or hot.
1. On the Compute view Virtual Machine widget, locate the required VM and select it.
3. From the Select Node drop-down list, select the node to which you want to migrate the VM, and
click OK.
Cloud computing enables companies and customer to compute resources as a utility to maintain and build
computing infrastructures in-house. Cloud computing promises several attractive benefits for businesses and
users. The main benefits of cloud computing include:
1. Elasticity: Companies can scale up and down of the recourses.
2. Self-service provisioning: users can spin up computing resources for almost any type of workload on-demand.
3. Pay per use: Computing resources are measured at a particular level, allowing customers to pay only for the
resources and workloads they use.
Cloud computing is a technology which uses one remote server and the internet to maintain various data and
applications. Cloud computing provides important cost effective IT resources as a cost on demand IT based on
the actual usage of the customer. Because of rapid growth, many companies are unable to handle their IT
requirement even after having an in-house data center. Cloud services are used to improve IT capabilities
without investing large amounts in new datacenters. This technology helps companies with much more efficient
computing by centralizing processing, storage, memory and bandwidth. Cloud computing segments :
Applications, Storage, and Connectivity.
C. Implementation
A typical implementation of n-tier architecture is built on of four –tier architecture. Most important is where
each layer goes. Figure (4) shows how a developer can distribute the layers across provided by his cloud services.
In this method of n-tier architecture, three different client layers are provided: one for basic HTML and JavaScript,
another for IPhone and Ipad Clients, and a third for standard desktop clients .These three layers each can present
the information to the user and set directly on the client's machine. A developer cannot trust anything coming
from any of these clients, so a developer must perform all authentication and authorization below this layer.
Directly under these client layers is the filter layer that enables a developer to abstract the authentication and
authorization from the representation and application layers. It sits directly on top of representation layer,
modifying any input and output that flows through it. These two layers must both speak the same communication
Protocol.
The representation layer sits directly below the filter layer and typically is on the same system as the application
layer. This layer modifies any output from the application layer into a usable format for the filter and client
layers.This typically transforms your internal representation , usually a raw object, into a standard such XML
(a markup language that defines a group of rules for encoding documents in a format that is both machine-readable
and human-readable).
The application layer resets directly below the representation layer and often actually merged with the
representation layer. This layer contains all business logic and communicates directly with the database layer, in
this layer developer can use boto package from Amazon cloud, all programming perform on a virtual server (EC2)
that is taken from Amazon cloud service.
The database layer rests outside of primary servers. In some cloud platforms, this will actually be provided for
developer automatically and developer not needs to control it.
Database layers come in two main flavors: relational and nonrelational. Typical relational database layers include
MySQL and Oracle, in this work S3 is used as a relational DB is taken from Amazon cloud services .some newer
databases, including SimpleDB, are nonrelational and do not support complex queries or joining to provide better
scalability.
III. Methodology:
IV. Results
When developer gathers all this services and package boto, a simple application can be built, demonstrate how to
gathered this software in a real application, take a look at this proposed application to perform Portable Document
Format (PDF) documents into preview images to a possibility of displaying it on a Web site. This application that
allows users to upload a PDF and a short time later have PNG previews of every page in that document.
D. Conclusion
This paper is considered a guide if developer wants to use Amazon cloud services, and he can easily build
application using cloud , also the cost of cloud computing is little because all software and hardware that are
needed are rent for use time as well as high performance that application acquired it from cloud services.