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

CC Lab Manual 2018-19 - 29-01-2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Cloud Computing Manual BE

Marathwada
COMP, Sem-II, 2018-19 Mitra Mandal’s
College of Engineering, Pune
Karve Nagar,Pune-411 052

Department of Computer Engineering

Lab Manual
LP-IV Lab(Cloud Computing)

Prepared by,
Prof. Geetha Chillarge

BE Computer
Semester II Academic Year 2018-19

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

PROGRAMME OUTCOMES:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization for the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for public health and safety, and cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: The problems that cannot be solved by
straightforward application of knowledge, theories and techniques applicable to the engineering
discipline.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools, including prediction and modeling to complex engineering activities,
with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with the society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

 Mathematical Model (Important)

 Conclusion:

 FAQs:

 Output: Printout of program with output

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Assignment No: 1

TITLE: Installation and Configuration of own cloud.

PROBLEM STATEMENT: Installation and Configuration of own cloud

PREREQUISITES: Networking Basics


COURSE OBJECTIVES: To learn installation and Configuration of own cloud

COURSE OUTCOMES: Ability to installation and Configuration of own cloud

CO1: Ability to install and configure cloud computing environments

Installation and Configuration of own cloud

Step 1: Install Apache2


OwnCloud requires a webserver to function and the most popular webserver in use today is
Apache2. So, go and install Apache2 on Ubuntu by running the commands below:
sudo apt install apache2
After installing Apache2, run the commands below to disable directory listing.
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/"
/etc/apache2/apache2.conf
Next, run the commands below to stop, start and enable Apache2 service to always start up with
the server boots.
sudo systemctl stop apache2.service

sudo systemctl start apache2.service

sudo systemctl enable apache2.service

Step 2: Install MariaDB


OwnCloud also requires a database server to function.. and MariaDB database server is a great
place to start. To install it run the commands below.
sudo apt-get install mariadb-server mariadb-client

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

sudo systemctl start mysql.service

sudo systemctl enable mysql.service

After that, run the commands below to secure MariaDB server.


sudo mysql_secure_installation
When prompted, answer the questions below by following the guide.
 Enter current password for root (enter for none): Just press the Enter

 Set root password? [Y/n]: Y

 New password: Enter password

 Re-enter new password: Repeat password

 Remove anonymous users? [Y/n]: Y

 Disallow root login remotely? [Y/n]: Y

 Remove test database and access to it? [Y/n]: Y

 Reload privilege tables now? [Y/n]: Y

Restart MariaDB server


sudo systemctl restart mysql.service
Step 3: Install PHP and Related Modules
PHP 7.1 isn’t available on Ubuntu default repositories… in order to install it, you will have to
get it from third-party repositories.
Run the commands below to add the below third party repository to upgrade to PHP 7.1
sudo apt-get install software-properties-common

sudo add-apt-repository ppa:ondrej/php

Then update and upgrade to PHP 7.1


sudo apt update
Run the commands below to install PHP 7.1 and related modules.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

sudo apt install php7.1 libapache2-mod-php7.1 php7.1-common libapache2-mod-php7.1


php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-apcu php7.1-smbclient php7.1-ldap
php7.1-redis php7.1-gd php7.1-xml php7.1-intl php7.1-json php7.1-imagick php7.1-mysql
php7.1-cli php7.1-mcrypt php7.1-ldap php7.1-zip php7.1-curl
After install PHP 7.1, run the commands below to open PHP-FPM default file.
sudo nano /etc/php/7.1/apache2/php.ini
Then make the change the following lines below in the file and save.
file_uploads = On

allow_url_fopen = On

memory_limit = 256M

upload_max_filesize = 64M

max_execution_time = 360

date.timezone = America/Chicago

Step 4: Create OwnCloud Database


Now that you’ve install all the packages that are required, continue below to start configuring the
servers. First run the commands below to create OwnCloud database.
Run the commands below to logon to the database server. When prompted for a password, type
the root password you created above.
sudo mysql -u root -p
Then create a database called owncloud
CREATE DATABASE owncloud;
Create a database user called ownclouduser with new password
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'new_password_here';
Then grant the user full access to the database.
GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY
'user_password_here' WITH GRANT OPTION;
Finally, save your changes and exit.
FLUSH PRIVILEGES;

EXIT;

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Step 5: Download OwnCloud Latest Release


Next, visit OwnCloud site to download your free copy. The community edition is what you’ll
want to download.
After downloading, run the commands below to extract the download file into Apache2 root
directory.
cd /tmp && wget https://download.owncloud.org/community/owncloud-10.0.3.zip

unzip owncloud-10.0.3.zip

sudo mv owncloud /var/www/html/owncloud/

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/

sudo chmod -R 755 /var/www/html/owncloud/

We need to make changes in our host file for domain name


sudo nano /etc/hosts

In host file at the end add your ip and domain name:-

10.65.6.109 testcloud.com

Step 6: Configure Apache2


Finally, configure Apahce2 site configuration file for OwnCloud. This file will control how users
access OwnCloud content. Run the commands below to create a new configuration file called
owncloud.conf
sudo nano /etc/apache2/sites-available/owncloud.conf
Then copy and paste the content below into the file and save it. Replace the highlighted line with
your own domain name and directory root location.
<VirtualHost *:80>

ServerAdmin admin@example.com

DocumentRoot /var/www/html/owncloud/

ServerName testcloud.com

ServerAlias www.testcloud.com

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

<Directory /var/www/html/owncloud/>

Options +FollowSymlinks

AllowOverride All

Require all granted

<IfModule mod_dav.c>

Dav off

</IfModule>

SetEnv HOME /var/www/html/owncloud

SetEnv HTTP_HOME /var/www/html/owncloud

</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Save the file and exit.


Step 7: Enable the OwnCloud and Rewrite Module
After configuring the VirtualHost above, enable it by running the commands below
sudo a2ensite owncloud.conf

sudo a2enmod rewrite

sudo a2enmod headers

sudo a2enmod env

sudo a2enmod dir

sudo a2enmod mime

Step 8 : Restart Apache2


Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Click Finish setup and you’re done.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Conclusion: Thus,we have studied and implemented owncloud


FAQ’s
1. What is owncloud? What are its features?
Ans: ownCloud gives you universal access to your files through a web interface or WebDAV. It
also provides a platform to easily view & sync your contacts, calendars and bookmarks across all
your devices and enables basic editing right on the web. Installation has minimal server
requirements, doesn’t need special permissions and is quick.
a. Access Your Data
b. Sync Your Data
c. Share Your Data
d. Versioning
e. Encryption
f. Drag and Drop Upload
g. Themeing
h. Viewer for ODF Files
i. Application API’s
j. Migration and Backup
k. Tasks
l. Application Store
m. Calendars
n. File Notifications
o. Galleries
p. External Storage
2. Define Saas
3. Describe Paas
4. What is Iaas
5. What allows users to create their own cloud applications using supplier-specific tools and
languages?
Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

COURSE OUTCOMES: Ability to create and manage user accounts in owncloud

CO1: Ability to install and configure cloud computing environment

THEORY:

Step 1:

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Step 2:

Step 3:

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Step 4:

Conclusion: Thus we have created user groups and managed them

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

FAQ’S
1. What are the limitations of owncloud
2. How encryption is done on owncloud files

Assignment No: 3

TITLE: Study of Virtualization in Cloud Computing to Learn Virtualization Basics, Benefits of


Virtualization in Cloud using Open Source Operating System..

PROBLEM STATEMENT: Implementation of Virtualization in Cloud Computing


PREREQUISITES: Networking Basics
COURSE OBJECTIVES: To Study and implement Virtualization in Cloud Computing

COURSE OUTCOMES: Ability to implement Virtualization in Cloud Computing

CO1: Ability to install and configure cloud computing environment

THEORY:

WHAT IS VIRTUALIZATION?

Virtualization is the process of creating a software-based, or virtual, representation of something,


such as virtual applications, servers, storage and networks. It is the single most effective way to
reduce IT expenses while boosting efficiency and agility for all size businesses

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

VMS HAVE THE FOLLOWING CHARACTERISTICS, WHICH OFFER SEVERAL


BENEFITS.

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.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

2) In welcome window, choose custom option and click next button.

3) In choose the virtual machine hardware compatibility window, click on next button.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

You can see the given information.

6) In the processor configuration information, you can select number of processors,


number of processor per core. If you don't want to change the default settings, click on next
only.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

11) Now you will see vmware screen then ubuntu screen

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Conclusion: Thus we have studied and implemented virtualization


FAQ’s
1. What is Virtualization?
2. What are the advantages and disadvantages of Virtualization?
3. What are the types of virtualization?

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

PREREQUISITES: LAMP,Networking Basics


COURSE OBJECTIVES: To implement 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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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.

HOW AJAX WORKS

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

AJAX IS BASED ON INTERNET STANDARDS


AJAX is based on internet standards, and uses a combination of:
 XMLHttpRequest object (to exchange data asynchronously with a server)
 JavaScript/DOM (to display/interact with the information)
 CSS (to style the data)
 XML (often used as the format for transferring data)

THE XMLHTTPREQUEST OBJECT


All modern browsers support the XMLHttpRequest object.
The XMLHttpRequest object can be used to exchange data with a server behind the scenes.
CREATE AN XMLHTTPREQUEST OBJECT
All modern browsers (Chrome, Firefox, IE7+, Edge, Safari Opera) have a built-in
XMLHttpRequest object.
Syntax for creating an XMLHttpRequest object:
variable = new XMLHttpRequest();

OLD VERSIONS OF INTERNET EXPLORER (IE5 AND IE6)


Old versions of Internet Explorer (IE5 and IE6) use an ActiveX object instead of the
XMLHttpRequest object:
variable = new ActiveXObject("Microsoft.XMLHTTP");

SEND A REQUEST TO A SERVER


To send a request to a server, we use the open() and send() methods of the
XMLHttpRequest object:

xhttp.open("GET", "ajax_info.txt", true);


xhttp.send();

THE ONREADYSTATECHANGE PROPERTY


The readyState property holds the status of the XMLHttpRequest.

The onreadystatechange property defines a function to be executed when the readyState


changes.
The status property and the statusText property holds the status of the XMLHttpRequest
object.
Department of Computer Engineering, MMCOE
Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

<div id="rssOutput">RSS-feed will be listed here...</div>


</body>
</html>
Server Script
<?php
//get the q parameter from URL
$q=$_GET["q"];

//find out which feed was selected


if($q=="Google") {
$xml=("http://news.google.com/news?ned=us&topic=h&output=rss");
} elseif($q=="ZDN") {
$xml=("https://www.zdnet.com/news/rss.xml");
}

$xmlDoc = new DOMDocument();


$xmlDoc->load($xml);

//get elements from "<channel>"


$channel=$xmlDoc->getElementsByTagName('channel')->item(0);
$channel_title = $channel->getElementsByTagName('title')
->item(0)->childNodes->item(0)->nodeValue;
$channel_link = $channel->getElementsByTagName('link')
->item(0)->childNodes->item(0)->nodeValue;
$channel_desc = $channel->getElementsByTagName('description')
->item(0)->childNodes->item(0)->nodeValue;

//output elements from "<channel>"


echo("<p><a href='" . $channel_link
. "'>" . $channel_title . "</a>");
echo("<br>");
echo($channel_desc . "</p>");

//get and output "<item>" elements


$x=$xmlDoc->getElementsByTagName('item');
for ($i=0; $i<=2; $i++) {
$item_title=$x->item($i)->getElementsByTagName('title')
->item(0)->childNodes->item(0)->nodeValue;
$item_link=$x->item($i)->getElementsByTagName('link')
->item(0)->childNodes->item(0)->nodeValue;
$item_desc=$x->item($i)->getElementsByTagName('description')
->item(0)->childNodes->item(0)->nodeValue;
echo ("<p><a href='" . $item_link
. "'>" . $item_title . "</a>");
echo ("<br>");
echo ($item_desc . "</p>");

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

}
?>

Conclusion: Thus we have studied and implemented RSS feed


FAQ’S
1. What is the significance of line feed?
2. What are the various Status codes for server response?
3. What are the different methods in accessing the web pages?
4. What is XML? Give its advantages and disadvantages.
5. What is DOM? Give its significance

Assignment No: 5

TITLE: Study and implementation of infrastructure as Service using Open Stack.

PROBLEM STATEMENT: Study and implementation of infrastructure as Service using Open


Stack.
PREREQUISITES: Networking Basics
COURSE OBJECTIVES: To Study and implement infrastructure as Service using Open Stack.

COURSE OUTCOMES: Ability to implement infrastructure as Service using Open Stack.

CO1: Ability to install and configure cloud computing environments

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Reference Link: https://www.tecmint.com/create-deploy-and-launch-virtual-machines-in-


openstack/
Step 1: Initial System Configurations
1. Before you begin preparing the node in order to deploy your own virtual cloud
infrastructure, first login with root account and assure that the system is up to date.
2. Next, issue the ss -tulpn command to list all running services.
# ss -tulpn

List All Running Linux Services


3. Next, identify, stop, disable and remove unneeded services, mainly postfix, NetworkManager
and firewalld. At the end the only daemon that would be running on your machine should be
sshd.
# systemctl stop postfix firewalld NetworkManager
# systemctl disable postfix firewalld NetworkManager
# systemctl mask NetworkManager
# yum remove postfix NetworkManager NetworkManager-libnm

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Set Linux System Hostname


6. Finally, install ntpdate command in order to synchronize time with a NTP server on your
premises near your physical proximity.
# yum install ntpdate

Step 2: Install OpenStack in CentOS and RHEL

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

Generate Packstack Answer Configuration File


10. Now edit the generated answer configuration file with a text editor.
# vi 13.04.16.conf

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.

Add NTP Server in Packstack


CONFIG_PROVISION_DEMO=n

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Add Provision in Packstack


CONFIG_KEYSTONE_ADMIN_PW=your_password for Admin user

Add Admin Account in Packstack


Access OpenStack dashboard via HTTP with SSL enabled.
CONFIG_HORIZON_SSL=y

Enable HTTPS for OpenStack


The root password for MySQL server.
CONFIG_MARIADB_PW=mypassword1234

Set MySQL Root Password in OpenStack


Setup a password for nagiosadmin user in order to access Nagios web panel.
CONFIG_NAGIOS_PW=nagios1234

Set Nagios Admin Password


11. After you finished editing save and close the file. Also, open SSH server configuration file
and uncomment PermitRootLogin line by removing the front hashtag as illustrated on the below
screenshot.
# vi /etc/ssh/sshd_config

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Enable SSH Root Login


Then restart SSH service to reflect changes.
# systemctl restart sshd

Step 3: Start Openstack Installation Using Packstack Answer File


12. Finally start Openstack installation process via the answer file edited above by running the
below command syntax:
# packstack --answer-file 13.04.16.conf

Openstack Installation in Linux

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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.

OpenStack Installation Completed


The credentials are also stored under your home directory in keystonerc_admin file.
14. If for some reasons the installation process ends with an error regarding httpd service, open
/etc/httpd/conf.d/ssl.conf file and make sure you comment the following line as illustrated
below.
#Listen 443 https

Disable HTTPS SSL Port

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Then restart Apache daemon to apply changes.


# systemctl restart httpd.service

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

Step 4: Remotely Access OpenStack Dashboard

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 Login Dashboard

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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

Nagios Login Dashboard

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Nagios Linux Monitoring Interface


Now you can start setup your own internal cloud environment.
Reference : https://www.tecmint.com/openstack-networking-guide/
to Configure OpenStack Network to Enable Access to OpenStack Instances

CONCLUSION:Thus,we have studied and implemented openstack

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.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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.

PREREQUISITES: Networking Basics


COURSE OBJECTIVES: To implement SaaS,Paas,Iaas on AWS cloud system

COURSE OUTCOMES: Ability to implement SaaS,Paas,Iaas on AWS cloud system

CO2: Ability to Install ,configure Saas, Paas, Iaas on cloud service

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

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

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.

AWS - ELASTIC COMPUTE CLOUD

AMAZON EC2 (ELASTIC COMPUTE CLOUD) IS A WEB SERVICE INTERFACE THAT


PROVIDES RESIZABLE COMPUTE CAPACITY IN THE AWS CLOUD. IT IS DESIGNED FOR
DEVELOPERS TO HAVE COMPLETE CONTROL OVER WEB-SCALING AND COMPUTING
RESOURCES.

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.

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

FEATURES OF EC2
RELIABLE −
 Designed for Amazon Web Services −

 Secure

 Flexible Tools
 Inexpensive

How to Use AWS EC2


Step 1 − Sign-in to AWS account and open IAM console by using the following link
https://console.aws.amazon.com/iam/.
Step 2 − In the navigation Panel, create/view groups and follow the instructions.
Step 3 − Create IAM user. Choose users in the navigation pane. Then create new users and add
users to the groups.
Step 4 − Create a Virtual Private Cloud using the following instructions.
 Open the Amazon VPC console by using the following link −
https://console.aws.amazon.com/vpc/
 Select VPC from the navigation panel. Then select the same region in which we have
created key-pair.
 Select start VPC wizard on VPC dashboard.
 Select VPC configuration page and make sure that VPC with single subnet is selected.
The choose Select.
 VPC with a single public subnet page will open. Enter the VPC name in the name field
and leave other configurations as default.
 Select create VPC, then select Ok.
Step 5 − Create WebServerSG security groups and add rules using the following instructions.
 On the VPC console, select Security groups in the navigation panel.
 Select create security group and fill the required details like group name, name tag, etc.
 Select your VPC ID from the menu. Then select yes, create button.

 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/

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

 Select launch instance option in the dashboard.


 A new page will open. Choose Instance Type and provide the configuration. Then select
Next: Configure Instance Details.
 A new page will open. Select VPC from the network list. Select subnet from the subnet
list and leave the other settings as default.
 Click Next until the Tag Instances page appears.
Step 7 − On the Tag Instances page, provide a tag with a name to the instances. Select Next:
Configure Security Group.
Step 8 − On the Configure Security Group page, choose the Select an existing security group
option. Select the WebServerSG group that we created previously, and then choose Review and
Launch.
Step 9 − Check Instance details on Review Instance Launch page then click the Launch button.
Step 10 − A pop up dialog box will open. Select an existing key pair or create a new key pair.
Then select the acknowledgement check box and click the Launch Instances button.

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

HOSTING RDMS ON EC2 INSTANCES


Amazon RDS allows users to install RDBMS (Relational Database Management System) of your
choice like MySQL, Oracle, SQL Server, DB2, etc. on an EC2 instance and can manage as
required.
Amazon EC2 uses Amazon EBS (Elastic Block Storage) similar to network-attached storage. All
data and logs running on EC2 instances should be placed on Amazon EBS volumes, which will
be available even if the database host fails.
Create an AWS account

Go to AWS homepage http://www.aws.amazon.com . Click the Sign In to Console or Create an


AWS account button on the top right corner. This will bring you to the sign in/sign up page.
STEP 1
CREATE YOUR ACCOUNT THERE WITH YOUR EMAIL AND PASSWORD

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

FOLLOWING SCREEN SHOT OF AWS MANAGEMENT CONSOLE FOR AMAZON EC2


SERVICE

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

STEP 3 − SELECT THE SERVICE OF YOUR CHOICE AND THE CONSOLE OF


THAT SERVICE WILL OPEN.

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

1. Compare AWS and OpenStack

Criteria AWS OpenStack

License Amazon proprietary Open Source

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Operating System Whatever cloud administrator pro- Whatever AMIs provided by


vides AWS

Performing repeatable opera- Through templates Through text files


tions

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.

3. What is the importance of buffer in Amazon Web Services?


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.

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.

4. Name the several layers of Cloud Computing.


PaaS – Platform as a Service
IaaS – Infrastructure as a Service
SaaS – Software as a Service
5. Distinguish between scalability and flexibility

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?

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

When You require a fast and flexible NoSQL database with a flexible datamodel and reliable
performance then DynamoDB is the service from AWS

7. How is stopping and terminating an instance different from each other?

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.

8. What are the best practices for Security in Amazon EC2?

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

 Privilege – only open up permissions that you require.

 Disable password-based logins for instances launched from your AMI. Passwords can be
found or cracked, and are a security risk

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Department of Computer Engineering, MMCOE


Cloud Computing Manual BE
COMP, Sem-II, 2018-19

Department of Computer Engineering, MMCOE

You might also like