Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Cloud Manual

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 63

GOVERNMENT POLYTECHNIC AMBALA

APPROVED BY AICTE NEW DELHI, AFFILIATED HSBTE PANCHKULA

DEPARTMENT OF COMPUTER ENGINEERING

CLOUD COMPUTING
LAB MANUAL

V-SEMESTER

2022-2023

Prepared by:
Contents

S.No Title Page No

1. Syllabus 3-3

2. Course objective 4-4

3. Course outcome 4-4

4. Do‟s & Don‟ts 5-5

5. List of Practicals 7-61

6. List of Exercises 62

7. Viva questions 63-65

2|Page
Syllabus

CLOUD COMPUTING

SEMESTER – V
LIST OF PRACTICLES

1. Introduction to Cloud Vendors: Amazon, Microsoft, IBM.


2. Setting up Virtualization using Virtualbox/VMWare Hypervisor
3. Introduction to OwnCloud
4. Installation and configuration of OwnCloud software for SaaS
5. Accessing Microsoft AZURE cloud-services
6. Cloud Simulation Software Introduction: CloudSim

Course Objective:

This course offers a good understanding of cloud computing concepts and challenges faced in
implementation of cloud computing.

Course Outcomes:

3|Page
4|Page
DOs and DON’Ts in Laboratory:

1. All the students should sit according to their roll numbers starting from their
left to right.
2. All the students are expected to get at least the algorithm of the program/ concept
to be implement.
3. Keep the lab neat and clean.

4. Do not interchange Mouse/Keyboard of terminals.

5. Do not touch electrical fitting in the lab.


6. Eating is strictly banned in the laboratory.
7. Shut down the computer before leaving.

8. Strictly follow the instructions given by the teacher/ Lab Instructor.

5|Page
LIST OF PRACTICALS

S.No. Name of Practical Page No.


1 Introduction to Cloud Vendors: Amazon, Microsoft, IBM. 7-12
2 Setting up Virtualization using Virtualbox/VMWare 13-32
Hypervisor
3 Introduction to OwnCloud 33-35
4 Installation and configuration of OwnCloud software for 36-43
SaaS
5 Accessing Microsoft AZURE cloud-services 44-56
6 Cloud Simulation Software Introduction: CloudSim 57-61

6|Page
PRACTICAL 1
Introduction to Cloud Vendors: Amazon, Microsoft, IBM

Whether it’s infrastructure, software, applications, services, products, or even an operating


system, everything is making its way to the cloud. As a result, billions of dollars are being
invested in cloud migration. Here we will study most popular cloud providers and their cloud
offerings
loud computing can be divided into three major categories, Software as a Service (SaaS),
Platform as a Service (PaaS), and Infrastructure as a Service (IaaS).
IaaS offers entire IT computing infrastructure, provisioned and managed over the internet.
The key components of IaaS are used to replace existing development and test environments,
virtual machines, website hosting, storage, backup, networking, servers, operating systems,
middleware, data, and applications, and high-performance computing (HPC).
The PaaS component of cloud computing offers a full development and deployment
environment in the cloud, including dev, test, QA, debugging, and deployment tools and
services.
SaaS is a software developed and hosted by someone else. Businesses or individuals are able
to use them as needed.
Today, the majority of top cloud service providers offer all of these services. The two leaders
in cloud computing are Amazon and Microsoft, followed by Google, Alibaba, and IBM. Here
we will study three cloud vendors namely Amazon, Microsoft and IBM.
Amazon: The services provided by Amazon cloud (AWS) are as:

1. Amazon S3
Amazon S3 is listed top in the AWS services list - because, storing and retrieving the data
plays a prominent role in cloud computing. So, AWS offers a wonderful service called
Amazon Simple Storage Service or Amazon S3 to store and retrieve data from the cloud. S3
allows the user to store, upload, retrieve large files up to 5 TB from the cloud. It is a scalable,
low-cost and high-speed web-based service designed for archival and online backup of
application programs and data. Using S3, the user can access the same system that Amazon
uses to run its website. Users have control over the public or private accessibility of the data.
2. Amazon EC2 [Elastic Compute Cloud]
Amazon EC2 provides scalable computing capacity in the AWS cloud. Using Amazon EC2,
you can develop and deploy applications quickly and effectively for a low cost. And also you
can use Amazon EC2 to launch virtual servers according to your requirements.
3. AWS Lambda
Amazon Lambda is a service that allows the user to run code without any server. Amazon
Lambda executes the code only when the user needed and scales automatically. Users pay
only for the compute time, no need to charge when your code is not running. This service
supports the code written in Java, Python, and languages supported by Amazon Linux.
4. Amazon Glacier
Amazon Glacier is one of the most important services provided by AWS. The Glacier is an
online web storage service that provides you with low cost and effective storage with security

7|Page
features for archival and data backup. With Glacier, you can store the information effectively
for months, years, or even decades.
5. Amazon SNS
SNS stands for Simple Notification Service, and it manages and delivers the messages or
notifications to the users and clients from any cloud platform. In SNS, there are two types of
clients, subscribers, and publishers. Publishers produce and send a message to the subscriber
instance through the communication channels.
Subscribers receive notification from the publisher over one of the supported protocols such
as Amazon SQS, HTTP, and Lambda, etc. Amazon SNS automatically triggers the service
and sends an email with a message that “ your EC2 instance is growing” when you are using
Auto Scaling. Amazon SNS automatically triggers the service and sends an email with a
message that “ your EC2 instance is growing” when you are using Auto Scaling.
6. Amazon CloudFront
To Know how fast your website is working, you can use the CloudFront service. It speeds up
the sharing of your dynamic and static web content such as .css, .html and image files to your
users. It securely delivers your images, videos, data and applications to users and clients with
high transfer speed and low latency, all within a developer-friendly environment.
7. Amazon EBS [Elastic Block Store]
EBS is an Amazon service, which is used to store persistent data, and it is block-level storage
to use EC2 instances. You can use EBS service, to move the data from one instance to
another instance without losing the stored data at EBS. You can mount multiple volumes on
the same instance, but each volume can be attached to a single instance at a time.
8. Amazon Kinesis
AWS is offering Amazon Kinesis service to handle big data in real-time. It allows developers
to take any large volume of data from any source that can run on EC2 instance. It stores,
capture and processes the data from large distributed streams like social media feeds and log
events. After completion of processing the data, it distributes the data to the consumers
simultaneously.
9. Amazon VPC
Using the Virtual Private Network, the data is secured because only authorized people can
view the data. So, the information is not exposed to outside people or networks.
10. Amazon SQS
Amazon SQS stands for Simple Queue Service, and it manages the message queue service.
Using this service, you can move the data or message from one application to another even
though it is not in the running or active state. SQS sends messages between multiple services,
including S3, DynamoDB, EC2 Instance, and also it uses the Java message queue service to
deliver the information. The maximum visibility timeout of a message is 12 hours in the SQS
queue.
11. DynamoDB
It is a fully managed NoSQL database service that supports document data structures and key
values that are offered by Amazon.com. DynamoBD allows you to create the database tables
so that you can retrieve and store any format of data. It controls the data traffic over multiple
servers and maintains the performance of the tables.

8|Page
12. Amazon RDS [Relational Database Service]
It is a fully SQL database cloud service that allows users to operate and create relational
databases. RDS can manage from any AWS Management Console. Using RDS, you can
access files and databases from anywhere in a highly scalable and cost-effective way.
13. Amazon ElastiCache
It is a memory cache system service on the cloud and supports Redis and Memcached.
ElasticCache improves the memory performance by CPU Intensive Queries and Caching I/O
queries in memory for quick results. It integrates with all other services, and you can manage
from both user API and management console. Using Virtual Private Cloud, you can run the
Elasticache cluster in Amazon
14. Amazon Redshift
It is a fully managed data warehouse service in the cloud. Redshift gives you to access
structured data from the existing SQL, ODBC, and JDBC. When you are executing the large
query, it divides the query into small parts and assigns them among the multiple nodes for
parallel operations. According to the user requirements, it controls the nodes in the Redshift.
Microsoft Azure Services
Some popular services provided by Microsoft Azure are as:

1. Azure DevOps

The Azure DevOps services are ideal for smarter planning and better collaboration to ensure
faster delivery. Azure DevOps services help in leveraging proven agile tools for planning,
tracking, and discussion of work among different teams.

Furthermore, users could find Azure DevOps services as ideal choices for building, testing,
and deploying with CI/CD. Also, it ensures access to unlimited, cloud-hosted private Git
repos and collaboration for building better code with advanced file management and pull
requests.

2. Virtual Machines

Virtual Machines are another addition among core Azure services in the Compute category.
This service helps in creating Linux and Windows virtual machines (VMs) in a matter of
seconds. The most interesting aspect of this Azure service is the facility of VMs according to
your needs.

You can get Burstable VMs, Compute-optimized VMs, Memory-optimized VMs, and
general-purpose VMs with Microsoft Azure. In addition to these VMs available at
competitive prices, you can also explore the series of VMs on Azure.

9|Page
3. Azure Cosmos DB

One of the most popular Azure cloud computing services is Azure Cosmos DB. Azure
Cosmos DB offers a globally distributed, fully managed database service. The global
distribution is turnkey in nature and also involves transparent multi-master replication.

Cosmos DB restricts read and writes latencies to single-digit milliseconds alongside ensuring
99.999 percent availability. Cosmos DB is also a multi-model with wire protocol-compatible
API endpoints.

4. Azure Active Directory

Azure Active Directory (AD) is the next addition among the most popular Azure cloud
computing services. It serves as a universal identity platform for the management and
security of identities. It is an enterprise identity service that provides single sign-on and
multi-factor authentication for safeguarding users from majority cybersecurity threats.

5. API Management

It helps in publishing, managing, analysis, and security of APIs in a few minutes. Azure’s
API Management is a turnkey solution ideally fit for the publication of APIs to internal and
external customers.

6. Azure Content Delivery Network

The Azure CDN is an Azure service that provides benefits of reliable and secure content
delivery and acceleration. Azure CDM integrates effectively with other services of Azure
such as Web Apps, Storage, and Cloud Services.

The capacity of Azure CDN to manage unprecedented spikes in traffic or load is also a
favorable feature. Azure CDN is developer-friendly and also comes with promising security
features on the content distribution network. Azure CDN also provides the benefit of
advanced analytics that can help in obtaining insights on customer workflows and business
requirements.

7. Azure Backup

Azure backup service is also one of the top Azure services, which are popular among
enterprises. An azure backup is an ideal tool for simplifying data protection from human
errors and ransomware. It is a cost-effective backup solution that requires nothing more than
a click. You can use this service for backup of Azure Virtual machines and SQL workloads
as well as on-premises VMware machines.

10 | P a g e
8. Logic Apps

Logic Apps are one of the best Azure services which are gaining recognition gradually for
their applications in building powerful integration solutions. The vast ecosystem of cloud-
based and SaaS connectors such as Google Services, Office 365, and Twitter is a prominent
highlight.

It can help in connecting data, apps, and devices anywhere. Furthermore, the B2B capabilities
of Logic Apps help in easier working with trading partners through Electronic Data
Interchange (EDI) standards.

9. Azure Site Recovery

Azure Site Recovery may have been late in this list, but is always the priority for enterprises.
It provides a built-in disaster recovery service for your business with unique features for
simplicity and flexibility. You can set up Azure Site Recovery in simple steps through the
replication of an Azure VM to different Azure regions.

10. Azure Bots

The final addition to this list of most popular Azure services refers to Bots that come under
the Automation category. Customers prefer to chat with bots for different customer support
and service issues. Therefore, Azure Bot’s service could help in improving customer
experience by capitalizing on the automation abilities of bots.

IBM Cloud

IBM Cloud developed by IBM is a set of cloud computing services for businesses. Similar to
other cloud service providers, the IBM cloud includes IaaS, SaaS, and PaaS services via
public, private, and hybrid cloud models.

Compute, Network, Storage, Cloud Packs, Management, Security, Database, Analytics, AI,
IoT, Mobile, Dev Tools, Blockchain, Integration, Migration, Private Cloud, and VMware.

BM Cloud is a suite of cloud computing services from IBM that offers both platform as a
service (PaaS) and infrastructure as a service (IaaS).

IBM Cloud products and services


IBM Cloud platform supports access to other IBM tools and services -- including IBM
Watson and IBM Cloud Functions for serverless computing -- as well as those from third-
party vendors.

The IBM Cloud Catalog lists over 170 services across categories, including:

11 | P a g e
1. Compute -- Offers various compute resources, including bare-metal servers, virtual
servers, serverless computing and containers, on which enterprises can host their
workloads;
2. Network -- Provides cloud networking services, such as a load balancer, a content
delivery network (CDN), virtual private network (VPN) tunnels and firewalls;
3. Storage -- Offers object, block and file storage for cloud data;
4. Management -- Provides tools to manage and monitor cloud deployments, such as those
for log analysis, automation and Infrastructure as Code (IaC);
5. Security -- Includes services for activity tracking, identity and access management and
authentication;
6. Data management -- Provides SQL and NoSQL databases, as well as data querying and
migration tools;
7. Analytics -- Offers data science tools such as Apache Spark, Apache Hadoop and IBM
Watson Machine Learning, as well as analytics services for streaming data;
8. Artificial Intelligence (AI) -- Uses IBM Watson to deliver services such as machine
learning, natural language processing and visual recognition;
9. Internet of things (IoT) -- Includes the IBM IoT Platform, which provides services that
connect and manage IoT devices, and analyzes the data they produce;
10. Mobile -- Enables a development team to build and monitor mobile applications and
their back-end components;
11. Developer tools -- Includes a command-line interface (CLI), as well as a set of tools for
continuous delivery, continuous release and application pipelines;
12. Blockchain -- Provides IBM's Blockchain Platform, a software-as-a-service offering to
develop apps, enforce governance and monitor a Blockchain network;
13. Integration -- Offers services to integrate cloud and on-premises systems, or various
applications, such as API Connect, App Connect and IBM Secure Gateway;
14. Migration -- Provides tools to migrate apps to the cloud, such as IBM Lift CLI and
Cloud Mass Data Migration;
15. VMware -- Enables the migration of VMware workloads into the cloud.
Conclusion
Here, we have had an overview of the top AWS, Azure and IBM Cloud services.

12 | P a g e
PRACTICAL 2

Setting up Virtualization using Virtualbox/VMWare Hypervisor

A virtual machine is a program you run on a computer that acts like it is a separate computer.
It is basically a way to create a computer within a computer. A virtual machine runs in a
window on the host computer and gives a user the same experience they would have if they
were using a completely different computer. Virtual machines are sandboxed from the host
computer. A single physical computer can run multiple virtual machines at the same time.
Often a server will use a program called a hypervisor to manage multiple virtual machines
that are running at the same time. Virtual machines have virtual hardware, including CPUs,
memory, hard drives, and more. Each piece of virtual hardware is mapped to real hardware
on the host computer.

There are many different virtual machine programs you can use. Some options are
VirtualBox (Windows, Linux, Mac OS X), VMware Player (Windows, Linux), VMware
Fusion (Mac OS X) and Parallels Desktop (Mac OS X).

VirtualBox is one of the most popular virtual machine programs since it is free, open source,
and available on all the popular operating systems. We'll show you how to set up a virtual
machine using VirtualBox.

Installing VirtualBox
To start with, we will download VirtualBox and install it. We should follow the steps given
below for the installation.
Step 1− To download VirtualBox, click on the following
link https://www.virtualbox.org/wiki/Downloads Now, depending on your OS, select which
version to install. In our case, it will be the first one (Windows host).

13 | P a g e
Step 2 − Once the option is selected, click on “Next”.

Step 3 − You have the option asking where to install the application. We can leave it as
default and click on “Next”.

Step 4 − Once the options are selected as shown in the following screenshot, click on Next.

14 | P a g e
Step 5 − A dialog box will come up asking whether to proceed with the installation. Click
“Yes”.

Step 6 − In the next step, click on “Install”.

15 | P a g e
Step 7 − Tick the start VirtualBox check box and click on “Finish”.

Step 8 − VirtualBox application will now open as shown in the following screenshot. Now,
we are ready to install the virtual machines.

16 | P a g e
Creating a VM with VirtualBox
To create a virtual machine with Oracle VirtualBox, we should follow the steps given
below.
Step 1 − To begin with, click on the “Oracle VM VirtualBox” icon on the desktop as shown
in the screenshot below.

Step 2 − The next step is to click on “New” button, which is in the top left hand side of the
screen.

17 | P a g e
Step 3 − A table will pop-up requesting you the parameters for the virtual machine. These
will be −
 Name − We have to put a friendly name for this Virtual Machine.
 Type − Enter the OS that is going to be installed on it.
 Version − Enter the specific version for that OS, which we have selected earlier.

Once all the above parameters are filled, click on “Next”.

Step 4 − Select the amount of memory that you need to allocate in this VM → Click on
“Next”.

18 | P a g e
Step 5 − Check one of the three options for the HDD and click on “Create”.

Step 6 − Select a file extension for your virtual HDD (It is recommended to use a common
file extension that most of the hypervisors use like VHD) → click on “Next”.

19 | P a g e
Step 7 − Choose whether you want the Virtual HDD as dynamic or fixed. This is based on
your needs → Click on “Next”.

Step 8 − Put a name for your virtual HDD file and select the disk size for your VM → Click
on “Create”.

20 | P a g e
All the above steps can be done in one shot by selecting the “Expert mode”.

The virtual machine created will be as shown in the screenshot below.

21 | P a g e
Setting up Networking with VirtualBox
There are two types of networking modes in VirtualBox, which are −
 Nat Networks and
 Host-only Networks.
Both of these are explained in detail below.

Nat Networks
For setting up Nat Networks, we should follow the steps given below.
Step 1 − Go to Oracle VM VirtualBox Manager → Click on “Preferences…”

Step 2 − Click on “Network” and then on the left panel click on the “NAT Networks” tab.

22 | P a g e
Step 3 − Click on the “+” button, which is highlighted in the screenshot below.

Step 4 − Here, we have to put the “Network Name” and the IP range for this network that
will be NAT-ed, in order to have access to internet and to other networks.

23 | P a g e
Host-only Networks
For setting up Host-only Networks, we should follow the steps given below.
Step 1 − If you click on the “Host-only Networks” tab, you can create networks that are
isolated from the other networks. However, VM hosts communicate with each other and the
Hypervisor machine. Click on the “+” sign.

Step 2 − The host interface will continue to be created as shown in the screenshot below.

24 | P a g e
Step 3 − If you click on button, you can edit the settings.

Step 4 − If you want your host machines to take “DHCP IP”, click on the “DHCP Server”
tab and check the box “Enable Server” → Click “OK”.

25 | P a g e
Step 5 − In the “Adapter” tab, put the IP of the hypervisor.

After all these preparations for setting up the network modes is complete. It is now time to
assign a network to our VMs.
To do this, Click on the VMs on the left side of the panel, then right click on the “Network”
option and a table will be open.

26 | P a g e
You can have up to four Ethernet adaptors per machine. The following image has four
sections highlighted, which are explained below.
 Check the box “Enable Network Adapter” to enable the vNIC on the VM and attach
it to one network.
 You can have many networks created, so we have to select one of them in the
“Name” dropdown box.
 In the adapter type dropdown-box, we have to select a physical NIC that the
hypervisor has.
 Promiscuous Mode: Here, we can select “Deny”, if we do not want the VMs to
communicate with each other.
Once all the above parameters are completed. Click on “OK”.

Allocating Processors & Memory to a VM

27 | P a g e
To allocate processors and memory to a virtual machine using VirtualBox, we should follow
the steps given below.
Step 1 − To allocate a processor and memory, you have to click on “Settings” after you have
selected the VM.

Step 2 − Click on “System” on the left side tab, then click on the “Motherboard” tab. Move
the arrow left or right to allocate the memory as shown in the screenshot below.

Step 3 − To allocate processors, click on the “Processor” tab. Move the arrow left or right to
allocate the number of processors as shown in the screenshot below.

28 | P a g e
Step 4 − After all those changes are done → click on “OK”.

Duplicating a VM Using VirtualBox


To duplicate a virtual machine using VirtualBox, we should follow the steps given below.

29 | P a g e
Step 1 − To duplicate a VM that we created before, right click on the VM and select
“Clone”. A wizard will open.

Step 2 − Write the name of the cloning machine and click on “Next”.

Step 3 − Select one of the options and Click on “Clone”.

30 | P a g e
Step 4 − The newly created VM will be as shown in the following screenshot.

Deleting a VM on VirtualBox
To delete a virtual machine on VirtualBox, we should follow the steps given below.
Step 1 − To start with, we have to right click on the VM that we want to delete and then
click on “Remove”.

31 | P a g e
Step 2 − To delete a virtual machine completely, select “Delete all files”.

32 | P a g e
PRACTICAL 3
Introduction to OwnCloud
OwnCloud is a web-based file synchronization and sharing tool that allows you
to automatically sync up files saved locally on your computer to a remote server.
How does ownCloud work?
ownCloud is a server/client software. When you setup ownCloud, you can either
access your files through the web portal or through the ownCloud client installed
in your computer. You can set the client software to automatically startup when
the computer is turned on, and sync new or modified files saved in the ownCloud
directory every time it detects changes, and if an internet connection is present.
The ownCloud client software can be installed in multiple computers including
Macs and Linux so you can access your synced files from anywhere you have
access to the Internet or the ownCloud client is installed.
Top ownCloud features
 Sharing with ownCloud you can share files with everybody including none ownCloud
users
 Syncing with ownCloud you can sync files from multiple devices including smartphones
and tablets
 Live Collaboration with ownCloud you can collaborate in real time e.g. editing
documents.
 Universal File Access from ownCloud you can access all data spread out in multiple
locations like Windows shared drives, SharePoint, S3 buckets, etc.
 Favorites Files favorite files in ownCloud for easy access
 Active Directory/LDAP AD integration for corporate users.
Popular Linux distributions that support ownCloud out of the box :
 Debian 7, 8
 Ubuntu 14.04, 16.04 LTS
 RHEL/CENTOS 6.6, 7
Web components required:
 Apache: 2.4
 PHP 5.6 or greater
 GD Library
 cURL
 Databases: MySQL 5.1 or higher; PostgreSQL 9.1.14 or higher
Virtual platforms supported:
 Hyper-V
 VMware ESX
 Xen
 KVM

33 | P a g e
Let's look at some creative things ownCloud can do. Some of these are possible because
ownCloud is open source, whereas others are just unique features it offers.

1. A scalable ownCloud Pi cluster

Because ownCloud is open source, you can choose between self-hosting on your own server
or renting space from a provider you trust—no need to put your files at a big company that
stores it who knows where. Find some ownCloud providers here or grab packages or a virtual
machine for your own server here.

The most creative things we've seen are a Banana Pi cluster and a Raspberry Pi cluster.
Although ownCloud's scalability is often used to deploy to hundreds of thousands of users,
some folks out there take it in a different direction, bringing multiple tiny systems together to
make a super-fast ownCloud. Kudos!

2. Keep your passwords synced

To make ownCloud easier to extend, it is extremely modular and have an ownCloud app
store. There you can find things like music and video players, calendars, contacts,
productivity apps, games, a sketching app, and much more.

Picking only one app from the almost 200 available is hard, but managing passwords is
certainly a unique feature. There are no less than three apps providing this
functionality: Passwords, Secure Container, and Passman.

3. Store your files where you want

External storage allows you to hook your existing data storage into ownCloud, letting you to
access files stored on FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive
through one interface.

A very creative solution is adding Google Drive and Dropbox as external storage. You can
work with files on both seamlessly and share them with others through a simple link—no
account needed to work with you!

4. Get files uploaded

Because ownCloud is open source, people contribute interesting features without being
limited by corporate requirements. Our contributors have always cared about security and
privacy, so ownCloud introduced features such as protecting a public link with a password
and setting an expire date years before anybody else did.

Today, ownCloud has the ability to configure a shared link as read-write, which means
visitors can seamlessly edit the files you share with them (protected with a password or not)
or upload new files to your server without being forced to sign up to another web service that
wants their private data.

34 | P a g e
This is great for when people want to share a large file with you. Rather than having to
upload it to a third-party site, send you a link, and make you go there and download it (often
requiring a login), they can just upload it to a shared folder you provide, and you can get to
work right away.

5. Get free secure storage

We already talked about how many of our contributors care about security and privacy. That's
why ownCloud has an app that can encrypt and decrypt stored data.

Using ownCloud to store your files on Dropbox or Google Drive defeats the whole idea of
retaking control of your data and keeping it private. The Encryption app changes that. By
encrypting data before sending it to these providers and decrypting it upon retrieval, your
data is safe as kittens.

6. Share your files and stay in control

As an open source project, ownCloud helps you enter Federated Cloud Sharing: a
protocol developed and published by ownCloud that enables different file sync and share
servers to talk to one another and exchange files securely.

35 | P a g e
PRACTICAL 4

Installation and configuration of OwnCloud software for SaaS

The OwnCloud server is an open-source cloud storage solution with multimedia playing and
file-sharing capabilities. Here we will install OwnCloud in Windows 10 using the Windows
subsystem for Linux (WSL) for better stability and performance. The Linux environment
app which we will use for it is Ubuntu. The various steps are given as:

Install Owncloud Server on Windows 10 via Ubuntu

Step 1: Enable the Windows subsystem for Linux (WSL)

Step 2: Install Ubuntu 18.04 Linux App

Step 3: Install Apache, MySql/ MariaDB plus PHP on Windows 10

Step 4: Check your Windows 10 Apache installation

Step 5: Download Owncloud server via Repository on Command Line

Step 6: Create an Owncloud configuration file for Apache

Step 7: Create a symlink for Owncloud

Step 8: Additional modules installation

Step 9: Create a MySQL or MariaDB database for Owncloud

Step 10 –Install, Setup and Configuring ownCloud server on Windows 10

Step 11: Login Owncloud server

Install Owncloud Server on Windows 10 via Ubuntu


Step 1: Enable the Windows subsystem for Linux (WSL)
To enable the Windows subsystem for Linux feature on Windows 10, go to Search box type
“Turn Windows feature on or off” click on that as it appears and enables the WSL
(Windows Subsystem for Linux) feature:

36 | P a g e
Step 2: Install Ubuntu 18.04 Linux App
From Windows 10 search box or from program list search for Microsoft store. When the store
opened, search for Ubuntu 18 to download and install. After installing click on
the Launch button which in return open the Ubuntu bash or command screen from where we
can use all Ubuntu commands except few directly on Windows 10.

37 | P a g e
Step 3: Install Apache, MySql/ MariaDB plus PHP on Windows 10
Before installing the Owncloud 10.1.0. we need to set up a web server environment basically
a LAMP setup. Here is the command which we need to execute for
installing Apache+PHP+MariaDB.

sudo apt-get install apache2

sudo apt-get install mysql-server mysql-client

sudo apt-get install php libapache2-mod-php php-mysql php-gd php-json php-curl php-xml

sudo apt-get -y install libmcrypt-dev

Owncloud also needs one more PHP extension i.e intl extension, so install that too.

sudo apt-get install php-intl

Step 4: Check your Windows 10 Apache installation


To check whether our Apache server is working, go to to your Windows 10 browser and
type http://localhost/ or the IP address of your Windows 10 local machine. You can find out
the IP address by typing ifconfig . As you enter the IP address, the Apache testing page will
open which means everything is fine and time to move to the next step.

38 | P a g e
Step 5: Download Owncloud server via Repository on Command Line
We can download the Owncloud archive directly from its website but here we are using the
command line, so it makes sense if we use the same for Owncloud server files downloading.

sudo -i

wget -nv https://download.owncloud.org/download/repositories/production/Ubuntu_18.04/

Release.key -O Release.key

apt-key add - < Release.key

echo 'deb http://download.owncloud.org/download/repositories

/production/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/owncloud.list

apt-get update

apt-get install owncloud-files

The above commands will automatically download and extract the Owncloud files under the
Apache directory.

Step 6: Create an Owncloud configuration file for Apache


Now create an Owncloud configuration file using the below command:

nano /etc/apache2/sites-available/owncloud.conf

And then add the following lines in it to points the Apache root directory towards the
Owncloud.

Alias /owncloud "/var/www/owncloud/"

<Directory /var/www/owncloud/>

Options +FollowSymlinks

AllowOverride All

<IfModule mod_dav.c>

Dav off

</IfModule>

SetEnv HOME /var/www/owncloud

39 | P a g e
SetEnv HTTP_HOME /var/www/owncloud

</Directory>

After adding the above lines press Crtl +O to write the files and then CTRL+X to save and
exit.

Step 7: Create a symlink for Owncloud


To tell the Apache about the Owncloud configuration we will create a reference or symlink
using the below command:

ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

Step 8: Additional modules installation


Add these additional modules for proper Owncloud working.

a2enmod headers

a2enmod env

a2enmod dir

a2enmod mime

a2enmod unique_id

After adding the modules restart the Apache server using the command:

sudo service apache2 restart

40 | P a g e
Step 9: Create a MySQL or MariaDB database for Owncloud
First of all stop and restart the MySQL/MariaDB:

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql start

Now let’s create a MySQL user and database for OwnCloud:

sudo mysql

We are creating a database with a name owncloud you can use some other name if you want.

CREATE DATABASE owncloud;

Now create a user with password and at the same time assigning all right of the above-created
database to that. Here we are creating a user with a name h2smedia along with a password
for the same. You can use your own username and password:
GRANT ALL ON owncloud.* to 'h2smedia'@'localhost' IDENTIFIED BY
'enter_your_password';
Flush privileges operations:

FLUSH PRIVILEGES;

Exit the MySQL using the command:

exit

41 | P a g e
Step 10 –Install, Setup and Configuring ownCloud server on Windows 10
After performing all the above steps again go to the browser and type http://localhost/ or the
IP address of your Windows 10 local machine.
However, this time you will see the Owncloud server setup and configuration screen rather
the Apache one.

Create an admin account for Windows 10 install own cloud. Just enter whatever user name
along with a password for the same you want to assign Admin account.
Just after the admin account, you will see a storage and database option click on that and then
MySQL/MariaDB tab. After that add the MySQL database details we have created above;
means database username its password and the database name which is owncloud in our case.
Finally, once you provided all the information to Owncloud, scroll down and click on Finish
Setup button.

Step 11: Login Owncloud server


The moment you click on the Finish setup button, the Owncloud will take few seconds to
authenticate all provided details and then will offer you a login page.
Login it with the admin account you have created above.
As we know the Owncloud also offers a client application which one can use on different
operating systems to sync the files between PC/smartphone and Owncloud server.
The first screen that appears to you dedicated for the same. Click on the one OS platform for
you want to download the Owncloud client.

42 | P a g e
In this way, we can easily install the Owncloud server on Windows 10 for high performance
and stability without using any XAMMP or WAMP like software.

43 | P a g e
PRACTICAL 5
Accessing Microsoft AZURE cloud-services

Azure Portal Overview


Azure portal is a platform where we can access and manage all our AWS applications at one
place. We can build, manage, and monitor everything from simple web-apps to complex
cloud applications using a single console.
So, first of all, to log into the Azure portal, we need to register.
Creating an Azure Account
Step 1: Open https://azure.microsoft.com/en-in/free/ then click on Start free; it will redirect
you to the next step.

Step 2: It will ask you to login with your Microsoft account. If you already have a Microsoft
account, you can fill the details and login. And if you don?t have one, you must signup first
to proceed further.

44 | P a g e
Step 3: After logging in to your Microsoft Account. You will be redirected to the next page,
as shown below. Here you need to fill the required fields, and they will ask for your credit
card number to verify your identity and to keep out spam and bots. You won’t be charged
unless you upgrade to paid services.

45 | P a g e
Step 4: After filling all the details, it will ask you to check the privacy and agreement. Click
the checkbox and then click on Sign up.

Step 5: Your free Account is created, and you will be redirected to the Azure homepage, as
shown in the figure below. You can take a tour of Azure services.

When you log-in to Azure for the first time. The Azure portal looks similar to the picture
given below. We will see popular tools and services on the homepage.

46 | P a g e
Creating a Resource
To create a resource, you can select any resource form the homepage.

Or, if you want to create another resource that is not on the homepage, you can browse
the Navigation Drawer on the top left corner of the screen.

In case if you can't find the right resource in the navigation drawer, you may click on "All
Service" in the navigation drawer, and the following window will appear with all the services
available in Azure.

47 | P a g e
There is one more way to create a resource. Click on "Create a resource" and then type the
desired resource name in the search box.
This portal not only includes the services provided by Azure but also includes service
provided by the third-party providers on the platform of Azure. They were using CPU or
virtual machines of Azure and deployed their platform on it and offering that platform as a
Service to you on a pay as you go basis.
Resource Group: A container that holds the related resources for an Azure solution. It can
include all the resources for the solution or include only those resources which you want to
manage as a group. Resource groups are containers of resources that have a common
lifecycle or share an attribute such as "all SQL servers" or "Application Attendance".
Creating a Resource Group
Step 1: Hover your cursor over the "Resource groups" button inside the navigation drawer,
then click on "Create" in the appeared pop up.

48 | P a g e
Step 2: In the next window, you have to fill the "Subscription" type, Resource group name,
and Region. Then click review + create or next (to add tags).

Step 3:You are now on the Tags window, where you can create a tag to organize Azure
resources by categories logically. We have to give it a name and value. Click Next

49 | P a g e
Step 4: You are now on the Review + Create window, Check the details shown below, if they
are correct, then click on create.

Step 5: You will be redirected to the homepage, and a notification will appear showing the
Resource group is created.

50 | P a g e
Step 6: Click on Go to Resource group to view the resource group window.

Let's have a quick look at the menu item of this page, but remember it may be different for
different resources. For example, the configuration setting will be different for VMs as
compared to databases.

51 | P a g e
1) Overview: On the overview pan, we can see all the resources that belong to that resource
group and also some Metadata of the resource groups such as to which subscription it belongs
to, any tags associated with it, what deployments had been carried out, etc.
2) Activity log: It provides administrative activity data that has been carried out on that
particular resource. So, in this case, we create a resource group. Hence we have one update
resource succeeded. So when we click on it, we can see the Metadata associated with it, and
when we click on JSON, we can see what operations have been carried-out (See figure
below).

3) Access control (IAM): If we want to delegate access to any resource to somebody else,
then we can assign a contributor role or owner role to any resource group to somebody. And
the details of this role-based access control we can find on the Security Services page of this
tutorial.
4) Tags: We can assign Tags to any resource in Azure to classify them into categories.

52 | P a g e
5) Events: Any events that are happening in any particular resource group, we can subscribe
to those events and do something with it. For example, a virtual machine has been started or
stopped. In that case, we can capture the event and send an email to somebody.
6) Deployment: We can see any implementations that happened here.
7) Policies: We can create and view policies here.
8) Cost Management: We can view the resource cost here.
9) Monitoring: We can set alerts, see the metrics associated with this resource group,
diagnostic settings, and so on.
Subscription
To view subscription. Go on the search box and type subscription and click on
"Subscription," as shown in the figure below. You can see the subscribed services here.

We are subscribed to the Free Trial here. See the figure below.

53 | P a g e
When you click on the subscription, you can view all the details, which includes the
subscription name, Cost, ID, to which directory it belongs to, and billing period.

There is an integrated management portal, which we need to see.

54 | P a g e
It is a portal where we can see all the subscriptions we have.

So we can see here, we have one free subscription. If we click on Free Trial, we can see all
the costs we have incurred, and we can see the billing history, and also we can set alerts. For
example, if the cost is crossing a certain limit, then we will get alerted.

55 | P a g e
And on the right-hand side tile below, we have options to manage the payment methods,
download the details of the uses, contact Microsoft support and change the subscription
details, edit subscription details, change address, change partner, etc.

56 | P a g e
PRACTICAL 6

Cloud Simulation Software Introduction: CloudSim

CloudSim is a simulation toolkit that supports the modeling and simulation of the core
functionality of cloud, like job/task queue, processing of events, creation of cloud
entities(datacenter, datacenter brokers, etc), communication between different entities,
implementation of broker policies, etc. This toolkit allows to:
 Test application services in a repeatable and controllable environment.
 Tune the system bottlenecks before deploying apps in an actual cloud.
 Experiment with different workload mix and resource performance scenarios on
simulated infrastructure for developing and testing adaptive application provisioning
techniques
Features of CloudSim Simulation Toolkit
1. Support for modeling and simulation of large-scale Cloud computing environments,
including data centers, on a single physical computing node(could be a desktop,
laptop, or server machine).
2. A self-contained platform for modeling Clouds, service brokers, provisioning, and
allocation policies.
3. Facilitates the simulation of network connections across the simulated system
elements.
4. Facility for simulation of federated Cloud environment that inter-networks resources
from both private and public domains, a feature critical for research studies related to
Cloudbursts and automatic application scaling.
5. Availability of a virtualization engine that facilitates the creation and management of
multiple, independent, and co-hosted virtualized services on a data center node.
6. Flexibility to switch between space-shared and time-shared allocation of processing
cores to virtualized services.
All these features would help in accelerating the development, testing and deployment of
potential resource/application provisioning policies/algorithms for Cloud Computing based
systems.

CloudSim Architecture

57 | P a g e
The above diagram demonstrates the layered architecture of CloudSim Simulation Toolkit.
The CloudSim Core simulation engine provides support for modeling and simulation of
virtualized Cloud-based data center environments including queuing and processing of
events, creation of cloud system entities (like data center, host, virtual machines, brokers,
services, etc.) communication between components and management of the simulation clock.
The CloudSim layer provides dedicated management interfaces for Virtual Machines,
memory, storage, and bandwidth. Also, it manages the other fundamental issues, such as
provisioning of hosts to Virtual Machines, managing application execution, and monitoring
dynamic system state(e.g. Network topology, sensors, storage characteristics, etc), etc.
The User Code layer is a custom layer where the user writes their own code to redefine the
characteristics of the stimulating environment as per their new research findings.
Design and Implementation of CloudSim
The classes of CloudSim Simulation Toolkit are building blocks of the simulator. The overall
class design diagram for CloudSim is as:

The description of all the major classes mentioned in the class diagram above is
described below:
1. Cloudlet: This class model(define specific attributes such as length of instruction,
input/output filesize, no of processor required, etc) the Cloud-based application
services (program based tasks) such as content delivery, social networking, etc.
CloudSim implements the complexity of an application in terms of its computational
requirements. As a developer, we know that every individual executable
application/service workload has a pre-defined instruction length and requires certain
network data flow (both pre and post fetches) overhead that it needs to undertake
during its life cycle. this class allows modeling all the above-said requirements
2. CloudletScheduler: This is responsible for the implementation of different policies
that determine the share of processing power among Cloudlets in a VM. There are

58 | P a g e
two types of provisioning policies offered: space-shared (using
CloudetSchedulerSpaceShared class) and time-shared (using
CloudletSchedulerTimeShared class).
3. Datacenter: This class model the core infrastructure-level services (i.e. hardware)
that are offered by Cloud providers (Amazon, Azure, and App Engine). It
encapsulates a set of hosts(resembling server machine model) instances that can
either be homogeneous or heterogeneous concerning their hardware
configurations (memory, cores, capacity, and storage). Also, every Datacenter
component takes care of generalized application provisioning that enforces a set of
policies for the allocation of bandwidth, memory, and storage devices to hosts and its
related VMs.
4. DatacenterBroker or Cloud Broker: This class model a broker, which is responsible
for mediating negotiations between SaaS and Cloud providers and such negotiations
are driven by QoS requirements. The broker class acts on behalf of applications. Its
prime role is to query the CIS to discover suitable resources/services and undertakes
negotiations for the allocation of resources/services that can fulfill the application’s
QoS needs. This class must be extended for evaluating and testing custom brokering
policies.
5. DatacenterCharacteristics: This class contains configuration information of data
center resources like the available host list, the fine-grained cost for each resource
type, etc.
6. Host: This class model a physical resource such as a computer or storage server. It
encapsulates important information such as the amount of memory and storage, a list
and type of processing cores (if it is a multi-core machine), an allocation of policy for
provisioning the compute, memory and bandwidth to the VMs.
7. NetworkTopology: This class contains the information for inducing network
behavior (latencies) in the simulation. It stores the topology information, which is
generated using the BRITE topology generator.
8. RamProvisioner: This is an abstract class that represents the provisioning policy for
allocating primary memory (RAM) to Virtual Machines. The execution and
deployment of VM on a host are feasible only if the RamProvisioner component
approves that the host has the required amount of free memory. The
RamProvisionerSimple does not enforce any limitation on the amount of memory that
a VM may request. The RAM resource request will be rejected if it is beyond the
available capacity.
9. BwProvisioner: The main role of this component is to undertake the allocation of
network bandwidths to a set of competing VMs that are deployed across the data
center. Cloud system developers and researchers can extend this class with their
policies (priority, QoS) to reflect the needs of their applications.
10. Vm: This class model a Virtual Machine (VM), which is managed and hosted by a
Cloud host component. Every VM component has access to a component that stores
the following characteristics related to a VM (i.e.) accessible memory, processor,
storage size, and the VM’s internal provisioning policy that is extended from an
abstract class called the CloudletScheduler.

59 | P a g e
11. VmAllocationPolicy: This is an abstract class that represents a provisioning policy to
be utilized by VM Monitor for mapping VMs to hosts. The primary role is to select
the best fit host in a data center that meets the memory, storage, and availability
requirement for VM deployment mapping.
12. VmScheduler: This is an abstract class implemented by a Host component that
models the allocation policies (space-shared, time-shared) defining the rules for
processor cores allocations to VMs. To accommodate application-specific processor
sharing policies, the class functionality can be extended to define a new set of
provisioning rules.
13. CloudSim: This is the prime class, with the role of managing entity event queues and
controlling the sequential execution of simulation events. Every event that is
generated by the CloudSim entity at run-time is stored in the queue called future
events. These events are sorted by their time parameters and are enqueued into the
future queue. Next, the events that are scheduled at each step of the simulation are
removed from the future events queue and transferred to the deferred event queue.
Following this, an event processing method is invoked for each entity, which chooses
events from the deferred event queue and performs appropriate actions. Such an
organization allows flexible management of simulation and provides the following
powerful capabilities:
a. Deactivation (hold/pause) of entities.
b. Context switching of entities between different states (e.g. waiting to active).
Pause and resume the process of simulation.
c. Creation of new entities at run-time.
d. Aborting and restarting simulation at run-time.
14. FutureQueue: This class implements the future event queue accessed by CloudSim
and acts as a ready queue to the simulation engine.
15. DeferredQueue: This class implements the deferred event queue used by CloudSim
and hold such events which are failed or paused. It acts as a wait queue of the
simulation engine, where preempted resource requests are kept.
16. CloudInformationService: A CIS is an entity that provides resource registration,
indexing, and discovering capabilities. CIS supports two basic primitives:
a. publish(), on the start of simulation it allows entities to register themselves
with CIS
b. search(), allows Brokers in discovering resources status and endpoint
addresses of other entities. This entity also acts as a notification service to the
other entities about the end of the simulation.
17. SimEntity: This is an abstract class, which represents a simulation entity (such as
DataCenter, DatacenterBroker, etc) ) that is able to send messages to other entities
and processes received messages as well as fire and handle events. SimEntity class
provides the ability to schedule new events and send messages to other entities, where
network delay is calculated according to the BRITE model. Once created, entities
automatically register with CIS. All entities must extend this class and override its
three core methods:
a. startEntity(), which define actions for entity initialization.

60 | P a g e
b. processEvent(), which defines actions processing of each called event(s) with
respect to the entity.
c. shutdownEntity(),which define actions for entity destruction.
18. CloudSimTags. This class contains various static event/command tags that indicate
the type of action that needs to be undertaken by CloudSim entities when they receive
or send events.
19. SimEvent: This entity represents a simulation event that is passed between two or
more entities. SimEvent stores the following information about an event:
1. type,
2. init time,
3. time at which the event should occur,
4. finish time,
5. time at which the event should be delivered to its destination entity,
6. IDs of the source and destination entities,
7. the tag of the event, and
8. Data that have to be passed to the destination entity.
CloudSimShutdown: This is an entity class that waits for the termination of all end-
user submitted cloudlets(tasks) and broker entities events, and once detected, then
signals the end of simulation to CIS.

List of Exercise:
1. Download Install Virtual Box from website virtualbox.org.
2. Install windows –XP on windows 11 using virtual box.
3. Install a C compiler in the virtual machine created using virtual box
and execute Simple Programs
4. Download Install owncloud from website www.owncloud.com.
5. Make virtual file storage using owncloud.
6. Find a procedure to transfer the files from one virtual machine to
another virtual machine.
7. Installation and working of Microsoft Azure.
8. Install CloudSim using Eclipse IDE

61 | P a g e
Viva Questions
1) What are the advantages of using cloud computing?
2) Mention platforms which are used for large scale cloud computing?
3) Explain different models for deployment in cloud computing? 4) What is the difference in
cloud computing and computing for mobiles?
5) How user can gain from utility computing?
6) For a transport in cloud how you can secure your data?
7) What are the security aspects provided with cloud?
8) List out different layers which define cloud architecture?
9) What are system integrators in Cloud Computing?
10) What is “ EUCALYPTUS” stands for?
11) Explain what is the use of “EUCALYPTUS” in cloud computing?
12) What is the requirement of virtualization platform in implementing cloud?
13) Before going for cloud computing platform what are the essential things to be taken in
concern by users?
14) Mention some open source cloud computing platform databases?
15) What are the security laws which are implemented to secure data in a cloud ?
16) Mention the name of some large cloud providers and databases?
17) Explain the difference between cloud and traditional datacenters?

62 | P a g e
18) Explain what are the different modes of software as a service (SaaS)?
19) What is the use of API’s in cloud services?
20) What are the different data centers deployed for cloud computing?
21) In cloud computing what are the different layers?
22) How important is the platform as a service?.
23) What is a cloud service?
24) List down the three basic clouds in cloud computing?
25) As a infrastructure as a service what are the resources that are provided by it?
26) What are the business benefits involved in cloud architecture?
27) What are the characteristics of cloud architecture that separates it from traditional one?
28) Mention what is the difference between elasticity and scalability in cloud computing?
29) Mention the services that are provided by Window Azure Operating System?
30) In cloud architecture what are the different components that are required?
31) In cloud architecture what are the different phases involved?
32) List down the basic characteristics of cloud computing?
33) In cloud architecture what are the building blocks?
34) Mention in what ways cloud architecture provide automation and performance
transparency? 35) In cloud computing explain the role of performance cloud?
36) Explain hybrid and community cloud?
37) In cloud what are the optimizing strategies?
38) What is Amazon SQS?
39) How buffer is used to Amazon web services?
40) Mention what is Hypervisor in cloud computing and their types?
41) What is ownCloud?
42) What is VirtualBox?
43) What is CloudSim?
44) What are features of CloudSim?

63 | P a g e

You might also like