Professional Documents
Culture Documents
Project Preet PDF
Project Preet PDF
Project Preet PDF
PROJECT REPORT
ON
“ProjectX-Cloud Automation”
In partial fulfillment of
Bachelor of Technology
in Department of Computer Science and Engineering
Certificate
This is to certify that Project Entitled “ProjectX-Cloud Automation” has been car-
ried out by the students of college Jodhpur Institute of Engineering and Tech-
nology, Jodhpur under my guidance and supervision in partial fulfillment of
degree of Bachelor of Engineering in Computer Science and Engineering or
Rajasthan Technical University, Kota during the academic year 2018-19.
Date:
CSE, JIET, Jodhpur
ACKNOWLEDGEMENT
We express our sincere gratitude to our guide Prof. Manish Gehlot and our in-charge Prof.
Rajendra Purohit for his motivation during the course of the project which served as a spur to
keep the work on schedule. I convey my regards to all the other faculty members of Department
of Computer Science and Engineering for their valuable guidance and advices at appropriate
times.
Finally, I would like to thank my friends for their help and assistance all through this project.
Thank you
Team:
Date:
ABSTRACT
Cloud computing is the most emergent technology. You can define cloud computing as a host
of data or server not on the local storage elements but on the Internet and servers. After
launch of cloud computing in the market it comes to action. When organization don’t want
to spend much money on the hardware and wants to improve the efficiency in data processing
and keep all the data global. Cloud automation is a method of provisioning, deploying, and
decommissioning using—well—automation software. Without automation, provisioning capacity
is a manual process, and managing all those pooled resources would be too cumbersome. That’s
why automation is regarded as a necessary component of cloud computing.
In this project we are providing the cloud services like Container as a Service (CAAS), Storage
as a Service (StAAS), Software as a Service (SAAS), and Platform as a Service (PAAS). This
deployment is done on Linux Virtual Machine and can be used by anyone who has access to the
portal. We have also implemented a Face Authentication method so that only registered people
would be able to access the portal and utilize the services we offer.
There is also a section where a user can manage Hadoop clusters i.e. the configuration of Namen-
odes and Datanodes is done automatically as per the user requirement. For this configuration
purpose we have used Ansible which is Red-Hat Technology used to configuring systems inde-
pendent of the platform which they run.
All the above-mentioned services are completely on user demand. If a user demands for a service
then only he/ she would be provided the service. Currently in Platform as a Service we are pro-
viding Python Interpreter and Java Compiler. In Software as a Service we are providing Mozilla
Firefox and Gedit. In Container as a Service we are providing a fresh lightweight operating sys-
tem which would be user customizable which means that the user can add software applications
to the instance of the operating system provided.
Table of Contents
Contents
Contents 5
CONCLUSION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 REFERENCES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
LIST OF FIGURES
5
continued from previous page
Fig 5.1.12 Prompt for Successful Installation 27
Fig 5.2.1 Command for Ansible Installtion 27
Fig 5.2.2 Accepting the Installation Conditions 28
Fig 5.2.3 Installing Ansible 28
Fig 5.2.4 Ansible Installation Complete 29
Fig 5.3.1 OpenCv Installation Complete 29
Fig 5.4.1 Python Installation 30
Fig 5.4.2 Accept the Installation Condition 30
Fig 5.4.3 Installation Complete 31
Fig 6.1 Home Page 52
Fig 6.2 PAAS Home Screen 52
Fig 6.3 PAAS Python Home Screen 53
Fig 6.4 Python Editor 53
Fig 6.5 Python Interpreter 54
Fig 6.6 PAAS JAVA Execution 54
Fig 6.7 SAAS Home Screen 55
Fig 6.8 StAAS Home Screen 55
Fig 6.9 CAAS Home Screen 56
Fig 6.10 CAAS Deployment 56
Fig 6.11 Container Management 57
Fig 6.12 Hadoop Home Screen 57
• INTRODUCTION
◦ Cloud Computing
◦ Agility for organizations may be improved, as cloud computing may increase users’
flexibility with re-provisioning, adding, or expanding technological infrastructure re-
sources.
on a utility computing basis is "fine-grained", with usage-based billing options. As well, less
in-house IT skills are required for implementation of projects that use cloud computing.
The e-FISCAL project’s state-of-the-art repository contains several articles looking into
cost aspects in more detail, most of them concluding that costs savings depend on the type
of activities supported and the type of infrastructure available in- house.
• Device and location independence enable users to access systems using a web browser
regardless of their location or what device they use (e.g., PC, mobile phone). As infras-
tructure is off-site (typically provided by a third-party) and accessed via the Internet, users
can connect to it from anywhere.
• Maintenance of cloud computing applications is easier, because they do not need to be
installed on each user’s computer and can be accessed from different places (e.g., different
work locations, while travelling, etc.).Performance is monitored by IT experts from the service
provider, and consistent and loosely coupled architectures are constructed using web services as
the system interface.
• Performance is monitored by IT experts from the service provider, and consistent and loosely
coupled architectures are constructed using web services as the system interface.
• Multitenancy enables sharing of resources and costs across a large pool of users thus al-
lowing for:
◦ centralization of infrastructure in locations with lower costs (such as real estate, elec-
tricity, etc.)
◦ peak-load capacity increases (users need not engineer and pay for the resources and
equipment to meet their highest possible load-levels)
◦ utilisation and efficiency improvements for systems that are often only 10–20% utilised.
• Types of Cloud
◦ Public Cloud: A cloud is called a "public cloud" when the services are rendered over
a network that is open for public use. Public cloud services may be
◦ Private Cloud: Private cloud is cloud infrastructure operated solely for a single
organization, whether managed internally or by a third party, and hosted either inter-
nally or externally.Undertaking a private cloud project requires significant engagement
to virtualize the business environment, and requires the organization to reevaluate de-
cisions about existing resources. It can improve business, but
every step in the project raises security issues that must be addressed to prevent serious vulner-
abilities. Self-run data centers are generally capital intensive. They have a significant physical
footprint, requiring allocations of space, hardware, and environmental controls. These assets
have to be refreshed periodically, resulting in additional capital expenditures. They have at-
tracted criticism because users "still have to buy, build, and manage them" and thus do not
benefit from less hands-on management, essentially "[lacking] the economic model that makes
cloud computing such an intriguing concept".
community or public) that remain distinct entities but are bound together, offering
the benefits of multiple deployment models. Hybrid cloud can also mean the ability
to connect collocation, managed and/or dedicated services with cloud resources.
Gartner defines a hybrid cloud service as a cloud computing service that is com-
posed of some combination of private, public and community cloud services, from
different service providers. A hybrid cloud service crosses isolation and provider
boundaries so that it can’t be simply put in one category of private, public, or
community cloud service. It allows one to extend either the capacity or the capa-
bility of a cloud service, by aggregation, integration or customization with another
cloud service.
• Docker
◦ Features of Docker
• ◦ ∗ Load images
∗ Attach container
∗ Start/Stop container
∗ Virtualization
∗ Shell in a box
• Ansible
Ansible is an open source IT configuration management (CM) and automation platform,
provided by Red Hat. It uses human-readable YAML templates so that users can program
repetitive tasks to occur automatically, without learning an advanced language.
◦ Configure ansible
∗ Inventory file
∗ ansible.cfg
∗ Role folder
∗ Playbook
∗ YAML
∗ Controller node
∗ Managed node
◦ Exception handling
∗ block
∗ rescue
∗ always
◦ Ansible vault
• Python Programming
Python is an interpreted, object-oriented programming language similar to PERL, that
has gained popularity because of its clear syntax and readability.
• ◦ ∗ NumPy
∗ OpenCV
◦ Speech to text conversion
◦ Face recognition using OpenCV
∗ Collecting samples
∗ Training the model
∗ Testing
◦ Python CGI (Common Gateway Interface)
• Big Data
"Big data" is a field that treats ways to analyze, systematically extract information
from, or otherwise deal with data sets that are too large or complex to be dealt with
by traditional data-processing application software. Data with many cases (rows)
offer greater statistical power, while data with higher complexity (more attributes or
columns) may lead to a higher false discovery rate
Big data challenges
include capturing data,
search, sharing, transfer, visualization, querying, updating, information privacy,
data storage, data analytics and data source. Big data was originally associated
with three key concepts: volume, variety, and velocity. Other concepts later at-
tributed with big data are veracity (i.e., how much noise is in the data) and value
Hadoop distributed file system (HDFS) is the world’s most reliable storage system.
HDFS stores very large files running on a cluster of commodity hardware. It works on
the principle of storage of less number of large files rather than the huge number of
small files. HDFS stores data reliably even in the case of hardware failure.
Hadoop HDFS architecture consist of Master/Slave architecture in which Master is
Name Node that store meta-data and Slave is Data Node that store actual data. HDFS
architecture consist of single Name Node and all other nodes are Data Node.
o MapReduce in HDFS:
MapReduce is a processing technique and a program model for distributed comput-
ing based on java. The MapReduce algorithm contains two important tasks, namely
Map and Reduce. Map takes a set of data and converts it into another set of data,
where individual elements are broken down into tuples (key/value pairs). Secondly,
reduce task, which takes the output from a map as an input and combines those
data tuples into a smaller set of tuples. As the sequence of the name MapReduce
implies, the reduce task is always performed after the map job.
The major advantage of MapReduce is that it is easy to scale data processing over
ing nodes. Under the MapReduce model, the data processing primitives are called
mappers and reducers. Decomposing a data processing application
into mappers and reducers is sometimes nontrivial. But, once we write an appli-
cation in the MapReduce form, scaling the application to run over hundreds, thou-
sands, or even tens of thousands of machines in a cluster is merely a configuration
change. This simple scalability is what has attracted many programmers to use the
MapReduce model.
LITERATURE SURVEY
In April 2017, Priya Dhir and Sushil Garg ( Research scholar- RMIT UNIVERSITY)
done a survey on the cloud computing techniques. Cloud computing is a technology,
which provides low cost, scalable computation capacity and services to enterprises
on demand for expansion. Although, cloud computing is facilitating the Informa-
tion technology industry, the research and development in this arena is yet to be
satisfactory. Cloud computing resources offered service on an as-needed basis, and
delivered by IP-based connectivity, providing highly scalable, reliable on-demand
services with agile management capabilities. There are a lot of development in the
cloud computing, security of the data in the cloud has become the one of major
aspects in the cloud computing. Cloud computing is nothing but the sharing of the
resources in an open environment which leads to the security problems. This paper
aim is to provide different models of cloud computing and data masking techniques
for providing security.
In March 2017, Babak Bashari Rad, Harrison John Bhatti, Mohammad Ahmadi (Asia
Pacific University of Technology and Innovation Technology Park Malaysia, Kuala
Lumpur, Malaysia) discuss the introduction of docker and its performance. They
discuss that Docker provide some facilities, which are useful for developers and ad-
ministrators. It is an open platform can be used for building, distributing, and
running applications in a portable, lightweight runtime and packaging tool, known
as Docker Engine. It also provide Docker Hub, which is a cloud service for sharing
applications. Costs can be reduced by replacing traditional virtual machine with
docker container. It excellently reduces the cost of re-building the cloud develop-
ment platform.
are active in various industries. As part of our findings, observed that all organizations were
positive about their experiences and only minor problems were encountered while adopting De-
vOps.
In September 2012, Garrison, G., Kim, S., Wakefield, R.L presented a paper, Titled
as “Success Factors for Deploying Cloud Computing” . The paper shows Trust
between client organization and cloud provider is a strong predictor of successful
cloud deployment. They concluded that Cloud computing services can provide IT
functionality to small and large organizations alike. Organizations throughout the
industrialized world, challenged by competition and government regulation, show
strong interest in cloud computing to help reduce operating costs and increase busi-
ness agility while addressing their computing and data-storage needs.18 While many
benefits are associated with cloud computing, one key to success is for the client
organization to use its IT-related capability to leverage cloud-provided resources.
3. REQUIREMENT SPECIFICATION
3.1 Functionalities
• Login panel
To get the needed services user have to register first whereas the Admin will automatically
login in through face detection. Any time if the user who has already registered, needs the
services he will be automatically logged in through the face detection.
• Services panel
After the Authentication process user will get a web interface where he/she can buy any
of services needed by the user. There will be many option like Hadoop Services (where
user can manage his/her data), Dockers (if the user have troubleshoot in using different
OS then any OS can be launched using our docker service) & Cloud Services (To get any
of cloud services like Software as a Service, Container as a Service, Platform as a service,
Storage as a service or Gaming as a Service).
• User Window
This window is completely user process where the user have give input of needed information
for getting that particular service. For example For getting the HDFS Cluster the user must
input the number of data-nodes he/wants as the Master’s Ip as well. The user have to give
information that which software/platform/container is needed. And if the user want storage
then how much storage does he needs.
Interfaces
• This web interface is user interactive. The interface is simple, easy to handle and self-
explanatory.
• Once opened, user will easily come into the flow with the application and easily uses all.
◦ Framework
Jupyter-Notebook
◦ Technologies
DevOps (Ansible), Docker, Cloud Computing, Big-Data Hadoop
◦ Operating System
4. ARCHITECTURAL DESIGN
• Functional Partitions
∗ Output Dependencies
◦ Module: StAAS
∗ Input Dependencies
∗ Output Dependencies
Click
• ◦ Module:PAAS
∗ Input Dependencies
∗ Output Dependencies
◦ Module: SAAS
∗ Input Dependencies
∗ Output Dependencies
Module Data Description
SAAS Software added Services will be added to service panel
Click
◦ Module: CAAS
∗ Input Dependencies
∗ Output Dependencies
Click
◦ Module: HDFS
∗ Input Dependencies
∗ Output Dependencies
Flow Charts:
o
For Platform as Service
5. EXPERIMENTAL SETUP
Step2:-
Memory size are selected your OS compatible.
Figure 5.1.2 (Allocate RAM)
Step4:-
Step5:-
Press the button the create. Figure 5.1.5 (Create the Virtual Operating System)
Step6:
- Select the file and choose the Preferences.
Step7:-
24
Processingwait
Step12:-
Press the button ok then virtual Box are success- Figure 5.1.12
fully installed. (Prompt for Successful Installation)
Step1:
Run the linux command to installed the ansible software. Then press the enter key.
Step2:-
Press the ‘y’ key and enter.
Step3:-
Installation process.
Step4:-
• OpenCv :-
29
30
Codes:
• Home Page:
<!DOCTYPE html>
<html>
<head>
<title>PROJECTX | Home</title>
<link rel="stylesheet" type="text/css" href="./css/master.css">
<link rel="stylesheet" type="text/css" href="./css/index.css">
</head>
<body>
<nav>
href="index.html">PROJECTX</a></li>
<li class="img_cloud"><img src="./images/cloud.png"></li>
<li class="right"><a class="signin" href="login.html">Login / Register</a></li>
</ul>
</nav>
<div class="content">
<section>
<span class="heading"><h1>Offered
</div> </a>
<div id="service-container">
<a href="http://192.168.43.87/cgi-
bin/staas/index.py" id="services">
name">STAAS</span> </a>
<div id="service-container">
<a href="http://192.168.43.87/cgi-
bin/saas/index.py" id="services">
name">SAAS</span> </a>
<span class="service-
</div>
</section>
<section>
<div id="service-container">
<a href="http://192.168.43.87/cgi-
bin/paas/index.py" id="services">
name">PAAS</span> </a>
<div id="service-container">
<a href="http://192.168.43.87/cgi-
bin/caas/index.py" id="services">
cloud.png"> name">CAAS</span>
</a>
src="./images/Hadoop-Interview-Questions.jpeg">
<span class="service-
</div> </section>
<footer>
<div class="dev-right">
<div>
</div> </body>
</div> </html>
</footer>
<div class="details">
</div>
• SAAS:
o Index.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
print("""
<form method=’post’ action=’sassy.py’>
<input type=’text’ name=’username’ placeholder="Username">
<br><br>
<input type=’password’ name=’password’ placeholder="Password"><br><br>
<!–Google Chrome<input type=’radio’ value=’google-chrome’ name=’g’ /><br /–
>
<div class="options">
Firefox<input type=’radio’ value="firefox" name=’g’>
<br>
Gedit<input type=’radio’ value="gedit" name=’g’>
<br><br>
</div>
<!–Visual Studio Code<input type=’radio’ value="code" name=’g’ /><br /> Sublime<input
type=’radio’ value="sublime" name=’g’ /><br /–>
<input type="submit" value="Create"> <br> """)
o Sassy.py:
password=form.getvalue(’password’) soft=form.getvalue(’g’)
# username="xd"
# password="xd"
# soft="gedit"
# ip = "192.168.43.87"
a = str(random.randint(1000, 9999))
sp.getstatusoutput(’sudo ansible-playbook sassy.yml –extra-vars="uname={ 0} rand={ 1} pswd={
2} soft={ 3} "’.format(username,a,password,soft)) print("execute the downloaded shell script")
print(’<META HTTP-EQUIV=refresh CONTENT="0;URL=http://192.168.43.87/down/{ 0}
{ 1} .tar">\ n’.format(userna me,a))
o Sassy.yml:
—
- hosts: localhost tasks:
- user:
name: "{ { uname } } " state: present
shell: "/usr/bin/{ { soft } } "
password: "{ { pswd | password_hash(’sha512’) } } "
• copy:
content: "ssh -X { { uname } } @192.168.43.87" dest: "/tmp/{ { uname } } { { rand } }
.sh"
mode: 0755
PAAS:
o Index.py:
<br>
</center> """)
o Ev.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
import subprocess
data=subprocess.getoutput("sudo docker start pyos") data=subprocess.getoutput("sudo docker
exec pyos shellinaboxd -t") print("<h1 align =’center’>Click here to use</h1>")
print("<br>")
print("<a href=’http://192.168.43.87:4201’>Python as Interpreter</a> ") print("<br>")
print("<a href=’text.py’ align=’center’>Python as a editor </a>")
o Java.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
print("""
<center>
<br>
<form action=’java3.py’>
<p><b>Enter Class Name: <input type=’text’ name=’classname’></p><b>
<b>This class name should be same in program main class.</b>
<br>
<textarea cols="120" rows="30" name=’code’ placeholder=’Use Same class name here’></textarea>
<br>
<p>Enter Command line Inputs if any:<input type=’text’ name=’cmd’></p><br>
<input type=’submit’ value=’Execute’>
</form>
</center> """)
o Java1.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
import cgi
import subprocess flag = 0
form=cgi.FieldStorage() data=form.getvalue(’classname’) data2=form.getvalue(’code’) data3=form.ge
if data3 is None: data3=’ ’
flag = 1 data4=data3.split(" ") print("<pre>")
subprocess.getstatusoutput("sudo touch { } .java".format(data)) subprocess.getstatusoutput("sudo
chmod 777 { } .java".format(data)) subprocess.getstatusoutput("sudo chmod +x { } .java".format(data
subprocess.getstatusoutput("sudo echo ’{ } ’ > { } .java".format(data2, data))
o Pyenv.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n") import cgi
import subprocess print("<html>") print("<body>") print("""
<form action=’pyenv.py’>
<table>
<tr>
<td ><textarea name=’hello’ id = "nbox"></textarea></td>
</tr>
<tr>
<td><input type=’button’ onclick=’test()’></td>
</tr>
</form>
</table> """)
print("""
<script>
function test()
{ """)
form=cgi.FieldStorage() data=form.getvalue(’hello’) print("<pre>")
subprocess.getoutput("sudo echo ’{ } ’ > /tmp/test123.py".format(data)) result = subpro-
cess.getoutput("sudo python36 /tmp/test123.py") print(result)
print("</pre>") print("} ") print("</script>") print("<script>")
print(’document.getElementById("nbox").innerHTML = "{ } "; ’.format(data)) print("</script>")
print("</body>") print("</html>")
o Text.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
print("""
<form action=’try.py’>
<table>
<tr>
<td><textarea name=’hello’ rows=20 cols=120></textarea></td>
</tr>
<tr>
<td><input type=’submit’></td>
</tr>
</form>
</table> """)
• StAAS:
o Index.py:
# !/usr/bin/python36 print("content-type: text/html") print("\ n")
print("""
<div class="data">
<form action=’object.py’> username:<input type=’text’ name=’user’ />
<br>
Enter the size:<input type="text" name="size" placeholder="Storage Size">
<br>
<br>
<input type="submit" value="Create">
</form>
</div> """)
o Mount.yml:
—
◦ hosts: localhost tasks:
∗ command: "mount /dev/vgcloud/{ { storage } } /cloud/{ { storage } } "
∗ lineinfile:
line: "/cloud/{ { storage } } ∗ (rw,no_root_squash)" path: "/etc/exports"
∗ service: name: nfs
state: restarted enabled: yes
∗ lineinfile:
line: "sudo mkdir /media/{ { storage } } " path: "/tmp/{ { storage } } .sh"
o Object.py:
# !/usr/bin/python36
print("content-type: text/html") print("\ n") import subprocess as sp
import cgi import random
form=cgi.FieldStorage() username=form.getvalue(’user’) size=form.getvalue(’size’)
a = str(random.randint(1,5000)) storage= str(username) + str(a)
sp.getstatusoutput("sudo lvcreate –size { 0} G –name { 1} { 2} vgcloud".format(size,username,a))
sp.getstatusoutput("sudo mkfs.ext4 /dev/vgcloud/{ 0} { 1} ".format(username,a)) sp.getstatusoutput(
mkdir -p /cloud/{ 0} { 1} ".format(username,a)) sp.getstatusoutput(’sudo ansible-playbook
mount.yml –extra- vars="storage={ 0} "’.format(storage))
print(’<META HTTP-EQUIV=refresh CONTENT="0;URL=http://192.168.43.87/down/{ 0}
.tar">\ n’.format(storage))
• CAAS:
o Index.py:
# !/usr/bin/python36 import subprocess
</td>
</tr>
<tr>
<td align="right">
<h4>Select image name <br> form Present iamges:</h4>
</td>
<td>
""")
<select name="ci">
o Docker_console.py:
# !/usr/bin/python36 print("content-type: text/html") print("")
import subprocess import cgi form=cgi.FieldStorage() data1=form.getvalue(’pt’)
raghav=subprocess.getoutput("sudo docker ps -a") raghav=raghav.split("\ n")
ex=raghav[1] fx=ex.split() data2=fx[-1]
data=subprocess.getoutput("sudo docker start { 0} ".format(data2))
data=subprocess.getoutput("sudo docker exec { 0} shellinaboxd - t".format(data2))
o Docker_manage.py:
# !/usr/bin/python36 import subprocess as sp import cgi
print("content-type: text/html") print("")
list = sp.getoutput("sudo docker ps -a") form=cgi.FieldStorage() data1=form.getvalue(’rt’)
flist = list.split("\ n")
print("<table align=’center’ width=’90% ’ border=’1’>") print("""
<tr>
<th>Status</th>
<th>Image Name</th>
<th>Container Name</th>
<th>start</th>
<th>stop</th>
<th>Console</th>
</tr> """)
for i in flist[1:]: j = i.split() print("<tr>")
print("<td>")
if "Exited" in i:
print("down") elif "Up" in i:
print("up")
else:
print("unknown")
print("</td>") print("<td>")
print("</table>")
o Docker_start.py:
# !/usr/bin/python36 import subprocess as sp import cgi
print("content-type: text/html") form = cgi.FieldStorage() cname = form.getvalue(’x’)
o = sp.getstatusoutput("sudo docker start { } ".format(cname)) if o[0] == 0:
print("location: docker-manage.py") print("") else:
print("location: docker-manage.py") print("")
o Docker_stop.py:
# !/usr/bin/python36 import subprocess as sp import cgi
print("content-type: text/html") form = cgi.FieldStorage() cname = form.getvalue(’x’)
o = sp.getstatusoutput("sudo docker stop { } ".format(cname)) if o[0] == 0:
print("location: docker-manage.py") print("")
else:
print("location: docker-manage.py") print("")
o Mycaaslaunch.py:
# !/usr/bin/python36 import subprocess import cgi
import random
print("content-type: text/html") print("\ n") form=cgi.FieldStorage() data1=form.getvalue(’ci’)
data2=form.getvalue(’cn’)
port = str(random.randint(4000, 9999)) output=subprocess.getstatusoutput("sudo docker run
-dit -p { prt} :4200 –name
{ data2} { data1} ".format(data2=data2 , data1=data1 , prt=port)) if output[0]==0:
print("<h3 align=’center’>Container { } launch Sucesfully
</h3>".format(data2) )
print("<a href=’docker-manage.py?rt={ 0} ’>To Manage All containers</a>".format(port))
else:
print("You may have some error")
• Hadoop:
o Client.py:
# !/usr/bin/python36 print("content-type: text/html")
print("\ n")
import subprocess import sys
client=subprocess.getstatusoutput("sudo ansible-playbook client.yml") if client[0]==0:
print("Client setup is done") print(’<META HTTP-EQUIV=refresh
CONTENT="0;URL=http://192.168.43.193/cgi-bin/namenode.py">/n’)
• Client.yml:
• Configuration.yml:
o Coressite.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!– Put site-specific property overrides in this file. –>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://192.168.43.241:9001</value>
</property>
</configuration>
o Datanode.py:
# !/usr/bin/python36 print("content-type: text/html")
print("\ n")
import subprocess
subprocess.getoutput("sudo ansible-playbook datanode.yml") subprocess.getoutput("sudo an-
sible datanode -m command -a ’sudo mkdir
/share’")
datanode=subprocess.getstatusoutput("sudo ansible datanode -m command -a ’hadoop-
daemon.sh start datanode’")
print(datanode[1]) if datanode[0]==0:
print("All done Bro") print(’<META HTTP-EQUIV=refresh
CONTENT="0;URL=http://192.168.43.241:50070">\ n’)
• Datanodehdfs2j.py:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!– Put site-specific property overrides in this file. –>
<configuration>
<Property>
<name>dfs.data.dir</name>
<value>/share</value>
</Property>
</configuration>
o Datanode.yml:
o Hadoopsetup.py:
# !/usr/bin/python36 print("content-type: text/html")
print("\ n")
import subprocess
print("Wait Setting up hadoop cluster") conf=subprocess.getstatusoutput("sudo ansible-
playbook configuration.yml") if conf[0]==0:
print("Inital setup for hadoop cluster is done") client=subprocess.getstatusoutput("sudo
ansible-playbook client.yml") if client[0]==0:
print("Client setup is done")
subprocess.getstatusoutput("sudo ansible-playbook namenode.yml") subprocess.getoutput("sudo
ansible namenode -m command -a ’hadoop namenode -format’")
namenode=subprocess.getstatusoutput("sudo ansible namenode -m command -a ’hadoop-
daemon.sh start namenode’")
if namenode[0]==0: print("namenode
setup is done")
subprocess.getoutput("sudo ansible-playbook datanode.yml") subprocess.getoutput("sudo an-
sible datanode -m command -a ’mkdir /share’") subprocess.getoutput("sudo ansible datanode
-m command -a ’hadoop-daemon.sh start datanode’")
o Namenode.py:
# !/usr/bin/python36 print("content-type: text/html")
print("\ n")
import subprocess
subprocess.getstatusoutput("sudo ansible-playbook namenode.yml") hello=subprocess.getoutput("sud
ansible namenode -m command -a ’hadoop namenode -format’")
namenode=subprocess.getstatusoutput("sudo ansible namenode -m command -a ’hadoop-
daemon.sh start namenode’")
print(namenode[0]) if namenode[0]==0
:
print("namenode setup is done") print (’<META HTTP-
EQUIV=refresh
CONTENT="0;URL=http://192.168.43.193/cgi-bin/datanode.py">\ n’)
• Namednodehdfs.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!– Put site-specific property overrides in this file. –>
<configuration>
<Property>
<name>dfs.name.dir</name>
<value>/data</value>
</Property>
</configuration>
o Namenode.yml:
6.SCREEN-SHOTS
• Initial Screen
• PASS Python
• Python Editor
Figure: 6.4 (Python Editor)
• Python Interpretor
Figure: 6.5 (Python Interpreter) Figure: 6.6 (PAAS JAVA Execution)
• ◦ ∗ Container Management
7. RESULT
In conclusion, cloud computing is recently new technological development that has the
potential to have a great impact on the world. It has many benefits that it provides to it
users and businesses. For example, some of the benefits that it provides to businesses, is
that it reduces operating cost by spending less on maintenance and software upgrades and
focus more on the businesses itself. But there are other challenges the cloud computing
must overcome. People are very skeptical about whether their data is secure and private.
There are no standards or regulations worldwide provided data through cloud computing.
Europe has data protection laws but the US, being one of the most technological advance
nation, does not have any data protection laws. Users also worry about who can disclose
their data and have ownership of their data. But once, there are standards and regulation
worldwide, cloud computing will revolutionize the future.
Cloud automation is a method of provisioning, deploying, and decommissioning using—
well—automation software. Without automation, provisioning capacity is a manual pro-
cess, and managing all those pooled resources would be too cumbersome. That’s why
automation is regarded as a necessary component of cloud computing.
In the near future we can aim to make the Graphical User Interface a bit better since we
had put no efforts in how the interface looked like. Alos we can add a lot more services to
the Cloud Platform.
More and more softwares can be added based on the usage percentage of the software. For
eg. Adobe Acrobat is used mostly for PDF management and so, we can provide Adobe
Acrobat for a nominal fee so that people who cannot afford the actual one may leverage
ours.
The future lies in cloud computing. And we hope to build on it.
GLOSSARY
• RHEL7.5: Red Hat Enterprise Linux (RHEL) 7.5 released. This version includes updates
and various improvements such as GNOME rebased to version 3.26, LibreOffice rebased to
version 5.3, Support for VA-API added, G-Streamer now supports mp3 and more. RHEL
is one of the leading enterprise Linux distribution for both bare metal and cloud platform.
REFRENCES
[1] Garrison, G., Kim, S., Wakefield, R.L.: Success Factors for Deploying Cloud Computing.
ACM. 55, 62–68 (2012)
[2] Babak Bashar Rad, Harrison John Bhatti, Mohammad Ahmadi :” Introduction of Docker
and its Performance” (2017). https://www.researchgate.net/publication/318816158
[3] Priya Dhir and Sushil Garg( RIMT – University) : “Survey on cloud computing
technology” International Journal of Innovations & Advancement in Computer Science
IJIACS, April 2014.
[4]https://www.researchgate.net/publication/316879884_A_Qualitative_Study_of_DevO
ps_Usage_in_Practice.
[5] White paper published by RED-HAT organisation, Titled as ” How to do devOps without
leaving legacy behind” .
[6] White paper published by RED-HAT organisation, Titled as “ Integration : Cloud Sup-
port with Ansible” .
[7] BOSTON – RED HAT SUMMIT 2017 — RED HAT announced its vision for the
automated enterprise powered by Ansible, the leading simple, powerful, and agentless open
source IT automation framework.
[12] "Cloud Computing: Clash of the clouds". The Economist. 2009-10-15. Retrieved 2009-
11-03.
[13] White, J.E. "Network Specifications for Remote Job Entry and Remote Job Output
Retrieval at UCSB". tools.ietf.org. Retrieved 2016-03-21.
[15] Danielson, Krissi (2008-03-26). "Distinguishing Cloud Computing from Utility Com-
puting". Ebizq.net. Retrieved 2010-08-22.