CC Lab Manual 2018-19 - 29-01-2019
CC Lab Manual 2018-19 - 29-01-2019
CC Lab Manual 2018-19 - 29-01-2019
Marathwada
COMP, Sem-II, 2018-19 Mitra Mandal’s
College of Engineering, Pune
Karve Nagar,Pune-411 052
Lab Manual
LP-IV Lab(Cloud Computing)
Prepared by,
Prof. Geetha Chillarge
BE Computer
Semester II Academic Year 2018-19
PROGRAMME OUTCOMES:
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
COURSE OUTCOME
Course Statement
Outcome
Ability to install and configure cloud computing environments.
4410253
(C).1
Ability to Install ,configure Saas, Paas, Iaas on cloud service
410253
(C).2
Build applications on cloud computing
410253
(C).3
INDEX
Sr. No Asg Title of Assignment CO PO
No.
1 1 Installation and configuration of own Cloud 1 1,3,5
2 2 Write a Program to Create, Manage and 1,3,5 1,2,3
groups User accounts in own Cloud by
Installing Administrative Features.
3 3 Implementation of Virtualization in Cloud 1,2 1,3,5
Computing to Learn Virtualization Basics,
Benefits of Virtualization in Cloud using Open
Source Operating System
4 4 Write a program for Web feed using PHP and 1,3 1,2,3
HTML.
5 5 Study and implementation of infrastructure as 1,2 1,3,5
Service using Open Stack.
6 6 Case study on Amazon EC2 to learn about 1,3,5 1,2,3
Amazon EC2,Amazon Elastic Compute
Cloud is a central part of Amazon.com's cloud
computing platform, Amazon Web
Services. How EC2 allows users torrent virtual
computers on which to run their own
computer applicationsSimulation/ Design,
planning and modeling of a Real-Time /
Embedded System for- (any one)
7 7 Mini-Project 1: Setup your own cloud for 1,3,9,11,12 1,2,3
Software as a Service (SaaS) over the existing
LAN in your laboratory. In this assignment you
have to write your own code for cloud
controller using open source technologies
without HDFS. Implement the basic operations
may be like to upload and download file
on/from cloud in encrypted form.
8 8 Mini-Project 2: Setup your own cloud for 1,3,9,11,12 1,2,3
Software as a Service (SaaS) over the existing
LAN in your laboratory. In this assignment you
have to write your own code for cloud
controller using open source technologies to
implement with HDFS. Implement the basic
operations may be like to divide the file in
segments/blocks and upload/ download file
on/from cloud in encrypted form.
Software Required:
Operating System :-Operating System recommended :- 64-bit Open source Linux or its
derivative
Programming Languages: C++/JAVA/PYTHON/R
Programming tools recommended: Front End: Java/Perl/PHP/Python/Ruby/.net, Backend :
MongoDB/MYSQL/Oracle, Database Connectivity : ODBC/JDBC, Additional Tools: Octave,
Matlab, WEKA.
Write-ups must include:
Group:
Assignment No.
Title
Problem Statement
Prerequisites
Course Objectives
Course Outcomes
Theory(in brief)
Algorithm
Conclusion:
FAQs:
Assignment No: 1
After installing, the commands below can be used to stop, start and enable MariaDB service to
always start up when the server boots.
sudo systemctl stop mysql.service
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 64M
max_execution_time = 360
date.timezone = America/Chicago
EXIT;
unzip owncloud-10.0.3.zip
Then run the commands below to set the correct permissions for OwnCloud to function.
sudo chown -R www-data:www-data /var/www/html/owncloud/
10.65.6.109 testcloud.com
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud/
ServerName testcloud.com
ServerAlias www.testcloud.com
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
</VirtualHost>
To load all the settings above, restart Apache2 by running the commands below.
sudo systemctl restart apache2.service
Then open your browser and browse to the server domain name followed by install. You should
see OwnCloud setup wizard to complete. Please follow the wizard carefully.
https://server_IP/owncloud
You should then see OwnCloud setup page. Connect to the database using the information you
created and continue. Select the database server installed on your systems by clicking it as shown
in the image below
6. What allows users to rent processing, storage, networking and other fundamental computing
resources for all purposes?
7. What allows users to run existing online applications?
Assignment No: 2
TITLE: Write a Program to Create, Manage and groups User accounts in own Cloud by
installing Administrative Features.
PROBLEM STATEMENT: Write a Program to Create, Manage and groups User accounts in
own Cloud by installing Administrative Features
PREREQUISITES: Basic cloud concepts
COURSE OBJECTIVES: To create and manage user accounts in owncloud
THEORY:
Step 1:
Step 2:
Step 3:
Step 4:
FAQ’S
1. What are the limitations of owncloud
2. How encryption is done on owncloud files
Assignment No: 3
THEORY:
WHAT IS VIRTUALIZATION?
BENEFITS OF VIRTUALIZATION
Virtualization can increase IT agility, flexibility and scalability while creating significant cost
savings. Greater workload mobility, increased performance and availability of
resources, automated operations – they’re all benefits of virtualization that make IT simpler to
manage and less costly to own and operate. Additional benefits include:
Reduced capital and operating costs.
Minimized or eliminated downtime.
Increased IT productivity, efficiency, agility and responsiveness.
Faster provisioning of applications and resources.
Greater business continuity and disaster recovery.
Simplified data center management.
Availability of a true Software-Defined Data Center..
Virtualization relies on software to simulate hardware functionality and create a virtual computer
system. This enables IT organizations to run more than one virtual system – and multiple
operating systems and applications – on a single server
Partitioning
Run multiple operating systems on one physical machine.
Divide system resources between virtual machines.
Isolation
Provide fault and security isolation at the hardware level.
Preserve performance with advanced resource controls.
Encapsulation
Save the entire state of a virtual machine to files.
Move and copy virtual machines as easily as moving and copying files.
Hardware Independence
Provision or migrate any virtual machine to any physical server.
TYPES OF VIRTUALIZATION
Server Virtualization
Server virtualization enables multiple operating systems to run on a single physical server as
highly efficient virtual machines.
NETWORK VIRTUALIZATION
By completely reproducing a physical network, network virtualization allows applications to run
on a virtual network as if they were running on a physical network
DESKTOP VIRTUALIZATION
Deploying desktops as a managed service enables IT organizations to respond faster to changing
workplace needs and emerging opportunities. Virtualized desktops and applications can also be
quickly and easily delivered to branch offices, outsourced and offshore employees, and mobile
workers using iPad and Android tablets.
1) Click on create new virtual machine.
3) In choose the virtual machine hardware compatibility window, click on next button.
4) In the Guest operating system window, choose iso image file from the disk or any drive. I
have put the iso file of ubuntu in e: drive. So browse your iso image and click on next
button
5) In the easy install information window, provide full name, username, password and
confirm password then click on next button
7) In the memory of the virtual machine window, you can set the memory limit. Click on
the next button.
8) In the specify disk capacity window, you can set the disk size. Click on the next button
9) In the specify disk file window, you can specify the disk file then click on the next button.
10) In the ready to create virtual machine window, click on the finish button
11) Now you will see vmware screen then ubuntu screen
ASSIGNMENT 4
TITLE: Write a program for Web feed using PHP and HTML
PROBLEM STATEMENT: Write a program for Web feed using PHP and HTML
COURSE OUTCOMES: Ability to implement Web feed using PHP and HTML
CO1: Ability to install and configure cloud computing environments
THEORY
RSS (originally Rich Site Summary/Really Simple Syndication) is a type of web feed which
allows users and applications to access updates to online content in a standardized, computer-
readable format. These feeds can, for example, allow a user to keep track of many different
websites in a single news aggregator. The news aggregator will automatically check the RSS
feed for new content, allowing the content to be automatically passed from website to website or
from website to user. This passing of content is called web syndication. Websites usually use
RSS feeds to publish frequently updated information, such as blog entries, news headlines, or
episodes of audio and video series.
WHAT IS AJAX?
AJAX = Asynchronous JavaScript and XML.
AJAX is a technique for creating fast and dynamic web pages.
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data
with the server behind the scenes. This means that it is possible to update parts of a web page,
without reloading the whole page.
Classic web pages, (which do not use AJAX) must reload the entire page if the content should
change.
Examples of applications using AJAX: Google Maps, Gmail, Youtube, and Facebook tabs.
Property Description
onreadystatechange Defines a function to be called when the readyState property changes
Holds the status of the XMLHttpRequest.
0: request not initialized
1: server connection established
readyState
2: request received
3: processing request
4: request finished and response is ready
200: "OK"
403: "Forbidden"
status
404: "Page not found"
Client Script
<html>
<head>
<script>
function showRSS(str) {
if (str.length==0) {
document.getElementById("rssOutput").innerHTML="";
return;
}
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (this.readyState==4 && this.status==200) {
document.getElementById("rssOutput").innerHTML=this.responseText;
}
}
xmlhttp.open("GET","getrss.php?q="+str,true);
xmlhttp.send();
}
</script>
</head>
<body>
<form>
<select onchange="showRSS(this.value)">
<option value="">Select an RSS-feed:</option>
<option value="Google">Google News</option>
<option value="ZDN">ZDNet News</option>
</select>
</form>
<br>
Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19
}
?>
Assignment No: 5
THEORY:
OpenStack is a free, open source platform developed specifically for cloud computing. Through
this cloud-centric platform, virtual machines and other resources can be made available to clients
as Infrastructure-as-a-Service. There are a number of ways to get OpenStack installed.
One such means of installing OpenStack is through DevStack. DevStack is a series of scripts that
are used to bring up a complete OpenStack environment based on the latest version. Although
installing with DevStack might be one of the easiest methods of installing OpenStack
4. Completely disable Selinux policy on the machine by issuing the below commands. Also edit /
etc/selinux/config file and set SELINUX line from enforcing to disabled as illustrated on the
below screenshot.
# setenforce 0
# getenforce
# vi /etc/selinux/config
Disable SELinux
5. On the next step using the hostnamectl command to set your Linux system hostname. Replace
the FQDN variable accordingly.
# hostnamectl set-hostname cloud.centos.lan
7. OpenStack will be deployed on your Node with the help of PackStack package provided by
rdo repository (RPM Distribution of OpenStack).
In order to enable rdo repositories on RHEL 7 run the below command.
# yum install https://www.rdoproject.org/repos/rdo-release.rpm
On CentOS 7, the Extras repository includes the RPM that actives the OpenStack repository.
Extras is already enabled, so you can easily install the RPM to setup the OpenStack repository:
# yum install -y centos-release-openstack-mitaka
Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19
# yum update -y
8. Now it’s time to install PackStack package. Packstack represents a utility which facilitates
the deployment on multiple nodes for different components of OpenStack via SSH connections
and Puppet modules.
Install Packstat package in Linux with the following command:
# yum install openstack-packstack
9. On the next step generate an answer file for Packstack with the default configurations which
will be later edited with the required parameters in order to deploy a standalone installation of
Openstack (single node).
The file will be named after the current day timestamp when generated (day, month and year).
# packstack --gen-answer-file='date +"%d.%m.%y"'.conf
# ls
and replace the following parameters to match the below values. In order to be safe replace the
passwords fields accordingly.
CONFIG_NTP_SERVERS=0.ro.pool.ntp.org
Please consult http://www.pool.ntp.org/en/ server list in order to use a public NTP server near
your physical location.
13. Once the installation of OpenStack components is successfully completed, the installer will
display a few lines with the local dashboard links for OpenStack and Nagios and the required
credentials already configured above in order to login on both panels.
Note: In case you still can’t browse Openstack web panel on port 443 restart the installation
process from beginning with the same command issued for the initial deployment.
# packstack --answer-file /root/13.04.16.conf
15. In order to access OpenStack web panel from a remote host in your LAN navigate to your
machine IP Address or FQDN/dashboard via HTTPS protocol.
Due to the fact that you’re using a Self-Signed Certificate issued by an untrusted Certificate
Authority an error should be displayed on your browser.
Accept the error and login to the dashboard with the user admin and the password set on
CONFIG_KEYSTONE_ADMIN_PW parameter from answer file set above.
https://192.168.1.40/dashboard
Openstack Projects
16. Alternatively, if you opted to install Nagios component for OpenStack, you can browse
Nagios web panel at the following URI and login with the credentials setup in answer file.
https://192.168.1.40/nagios
FAQ’S
1. WHAT ARE THE FEATURES OF OPENSTACK CLOUD
2. WHAT ARE THE BENEFITS OF USING OPEN STACK IN YOUR BUSINESS
3. WHAT ARE THE CHALLENGES OF OPENSTACK
4. WHAT ARE THE CORE COMPONENTS OF OPENSTACK.
5. WHAT IS OPEN NEBULA.
ASSIGNMENT 6
TITLE: Case study on Amazon EC2 Conclusion: Problem Statement: Case study on Amazon
EC2 to learn about Amazon EC2,Amazon Elastic Compute Cloud is a central part of
Amazon.com's cloud computing platform, Amazon Web Services. How EC2 allows users torrent
virtual computers on which to run their own
computer applications.
THEORY
Amazon Web Services (AWS) is Amazon’s cloud web hosting platform that offers flexible,
reliable, scalable, easy-to-use, and cost-effective solutions
Cloud computing is an internet-based computing service in which large groups of remote
servers are networked to allow centralized data storage, and online access to computer services
or resources.
Using cloud computing, organizations can use shared computing and storage resources rather
than building, operating, and improving infrastructure on their own.
Cloud computing is a model that enables the following features.
Users can provision and release resources on-demand.
Resources can be scaled up or down automatically, depending on the load.
Resources are accessible over a network with proper security.
Cloud service providers can enable a pay-as-you-go model, where customers are charged
based on the type of resources and per usage.
Types of Clouds
There are three types of clouds − Public, Private, and Hybrid cloud.
Amazon Web Services - Basic Architecture
NOTE − IN THE ABOVE DIAGRAM S3 STANDS FOR SIMPLE STORAGE SERVICE. IT ALLOWS
THE USERS TO STORE AND RETRIEVE VARIOUS TYPES OF DATA USING API CALLS. IT
DOESN’T CONTAIN ANY COMPUTING ELEMENT.
EC2 instances can be resized and the number of instances scaled up or down as per our
requirement. These instances can be launched in one or more geographical locations or regions,
and Availability Zones (AZs). Each region comprises of several AZs at distinct locations,
connected by low latency networks in the same region.
FEATURES OF EC2
RELIABLE −
Designed for Amazon Web Services −
Secure
Flexible Tools
Inexpensive
Now a group is created. Select the edit option in the inbound rules tab to create rules.
Step 6 − Launch EC2 instance into VPC using the following instructions.
Open EC2 console by using the following link − https://console.aws.amazon.com/ec2/
LOAD BALANCING
Load balancing simply means to hardware or software load over web servers, that improves the
efficiency of the server as well as the application. Following is the diagrammatic representation
of AWS architecture with load balancing.
Elastic load balancing can dynamically grow and shrinkthe load -balancing capacity to adjust to
traffic demands and also support sticky seszsions to address more advanced routing needs
STEP 2 − SELECT THE CHOICE FROM THE LIST OF CATEGORIES AND WE GET
THEIR SUB-CATEGORIES SUCH AS COMPUTER AND DATABASE CATEGORY IS
SELECTED IN THE FOLLOWING SCREENSHOTS.
Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19
COMPUTE
Amazon EC2
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable
compute capacity in the cloud. It is designed to make web scale computing easier for developers.
The Amazon EC2 simple web service interface allows you to obtain and configure capacity with
minimal friction. It provides you with complete control of your computing resources and lets you
run on Amazon’s proven computing environment.
Amazon EC2 reduces the time required to obtain and boot new server instances (called Amazon
EC2 instances) to minutes, allowing you to quickly scalecapacity, both up and down, as your
computing requirements change. Amazon EC2 changes the economics of computing by allowing
you to pay only for capacity that you actually use.
Amazon EC2 provides developers and system administrators the tools to build failure resilient
applications and isolate themselves from common failure scenarios.
Launch an Instance
Select Launch Instance to create and configure your virtual machine.
Configure your Instance
FAQ’s
2. What is AWS?
AWS (Amazon Web Services) is a platform to provide secure cloud services, database storage,
offerings to compute power, content delivery, and other services to help business level and
develop.
An Elastic Load Balancer ensures that the incoming traffic is distributed optimally across various
AWS instances. A buffer will synchronize different components and makes the arrangement
additional elastic to a burst of load or traffic. The components are prone to work in an unstable
way of receiving and processing the requests. The buffer creates the equilibrium linking various
apparatus and crafts them effort at the identical rate to supply more rapid services.
The aptitude of any scheme to enhance the tasks on hand on its present hardware resources to
grip inconsistency in command is known as scalability. The capability of a scheme to augment
the tasks on hand on its present and supplementary hardware property is recognized as
flexibility, hence enabling the industry to convene command devoid of putting in the
infrastructure at all. AWS has several configuration management solutions for AWS scalability,
flexibility, availability and management.
6. What is DynamoDB?
When You require a fast and flexible NoSQL database with a flexible datamodel and reliable
performance then DynamoDB is the service from AWS
Starting, stopping and terminating are the three states in an EC2 instance, let’s discuss them in
detail:
Stopping and Starting an instance: When an instance is stopped, the instance performs a
normal shutdown and then transitions to a stopped state. All of its Amazon EBS volumes
remain attached, and you can start the instance again at a later time. You are not charged
for additional instance hours while the instance is in a stopped state.
Terminating an instance: When an instance is terminated, the instance performs a normal
shutdown, then the attached Amazon EBS volumes are deleted unless the volume’s dele-
teOnTerminationattribute is set to false. The instance itself is also deleted, and you can’t
start the instance again at a later time.
There are several best practices to secure Amazon EC2. A few of them are given below:
Use AWS Identity and Access Management (IAM) to control access to your AWS re-
sources.
Restrict access by only allowing trusted hosts or networks to access ports on your in-
stance.
Review the rules in your security groups regularly, and ensure that you apply the princi-
ple of least
Disable password-based logins for instances launched from your AMI. Passwords can be
found or cracked, and are a security risk