0% found this document useful (0 votes)
20 views81 pages

Overview of Cloud Computing Tools

The document outlines various cloud computing tools including Aneka, Windows Azure, Google App Engine, Amazon Web Services, Salesforce, and OpenStack, detailing their features, architecture, and applications. Each tool offers unique capabilities such as workload management, scalability, and CRM functionalities, catering to different business needs. Additionally, it includes practical instructions for implementing para-virtualization using VMware Workstation and Oracle's Virtual Box.

Uploaded by

hetvip243
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views81 pages

Overview of Cloud Computing Tools

The document outlines various cloud computing tools including Aneka, Windows Azure, Google App Engine, Amazon Web Services, Salesforce, and OpenStack, detailing their features, architecture, and applications. Each tool offers unique capabilities such as workload management, scalability, and CRM functionalities, catering to different business needs. Additionally, it includes practical instructions for implementing para-virtualization using VMware Workstation and Oracle's Virtual Box.

Uploaded by

hetvip243
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Cloud Computing 1721BEIT30002

Practical – 1

Aim: To Study Various Cloud Computing Tools

1. Aneka
Basic Overview:
Aneka is a market oriented Cloud development and management platform with rapid
application development and workload distribution capabilities. Aneka is an integrated
middleware package which allows you to seamlessly build and manage an interconnected
network in addition to accelerating development, deployment and management of
distributed applications using Microsoft .NET frameworks on these networks.

Aneka is a workload distribution and management platform that accelerates


applications in Microsoft .NET framework environments. Some of the key advantages of
Aneka over other GRID or Cluster based workload distribution solutions include:
· rapid deployment tools and framework,
· ability to harness multiple virtual and/or physical machines for
accelerating application result
· provisioning based on QoS/SLA
· support of multiple programming and application environments

Application:
Supported APIs include:
- Task Model for batch and legacy applications
- Thread Model for applications that use object oriented thread
- MapReduce Model for data intensive applications like data mining or analytics.
- Others such as MPI (Message Passing) and Actors (Distributive Active
Objects/Agents) can be customized

Supported Tools include:


- Design Explorer for Parameter Sweep applications. Built on-top of task model with
no additional requirements for programming.
- Work Flow applications. Built on-top of task model with some additional
requirements for programming.

Build different types of Run-time environments:


- PC Grids (also called Enterprise Grids)
- Data Centres (Clusters)
- MultiCore Computers
- Public and/or private networks
- Virtual Machine or Physical

LDRP-ITR 1
Cloud Computing 1721BEIT30002

Architecture:
Aneka is a platform and a framework for developing distributed applications on the
Cloud. It harnesses the spare CPU cycles of a heterogeneous network of desktop PCs and
servers or data centers on demand. Aneka provides developers with a rich set of APIs for
transparently exploiting such resources and expressing the business logic of applications
by using the preferred programming abstractions. System administrators can leverage on a
collection of tools to monitor and control the deployed infrastructure.

The Aneka based computing cloud is a collection of physical and virtualized


resources connected through a network, which are either the Internet or a private intranet.
Each of these resources hosts an instance of the Aneka Container representing the runtime
environment where the distributed applications are executed. The container provides the
basic management features of the single node and leverages all the other operations on the
services that it is hosting. The services are broken up into fabric, foundation, and
execution services.

LDRP-ITR 2
Cloud Computing 1721BEIT30002

2. Windows Azure
Basic Overview:

Azure is a cloud computing platform and an online portal that allows you to access
and manage cloud services and resources provided by Microsoft. Microsoft Azure is a
flexible cloud platform that helps you grow with greater efficiency and be more
responsive to change. With Azure, you can be up and running fast, scale up or down as
needed, and avoid high capital costs—paying only for what you use.

Microsoft Azure offers a range of key benefits that help enable the modern business.
The cloud is about instantly expanding your IT capabilities.

 About Microsoft Azure Cloud Security:


 Fully managed and monitored infrastructure
 Data backed up in a choice of geographies
 Robust physical security and data protection

 Offer a great customer experience by hosting your website in the cloud


 High availability
 Fast, Responsive , Performance
 The latest security and protection
 Premium resources at budget prices

 Microsoft Azure Backup


 Recover data in case of disasters (server destroyed/stolen, disk crash)
 Recover data in case of data loss scenarios such as data accidentally deleted, volume
deleted, viruses
 Simple installation and configuration
 Reduced cost for backup storage and management
 Ideal for small businesses, branch offices, and departmental business needs
 Use either the Microsoft Online Backup Service Agent or the Online Backup
Windows PowerShell cmdlets

 Things that you should know about Azure:

 It was launched on February 1, 2010, signficantly later than its main competitor,
AWS.
 It’s free to start and follows a pay-per-use model, which means you pay only for the
services you opt for.
 Interestingly, 80 percent of the Fortune 500 companies use Azure services for their
cloud computing needs.
 Azure supports multiple programming languages, including Java, Node Js, and C#.

LDRP-ITR 3
Cloud Computing 1721BEIT30002

Architecture:

Application:
 The cloud is ideal when you need to:
• Get apps up and running fast
• Scale instantly
• Pay only for what you use
• Leverage enterprise-level security

 Get simple, reliable backup in the cloud with Microsoft Azure:


 Back up your files and data to the cloud, simply and affordably.
 Avoidcapital expense for storage hardware & media.

 Windows Azure is usually misinterpreted as just a hosting solution, but there is a lot
more that can be done using Windows Azure. It provides a platform to develop
applications using a range of available technologies and programming languages. It
offers to create and deploy applications using .net platform, which is Microsoft’s own
application development technology. In addition to .net, there are many more
technologies and languages supported. For example, Java, PHP, Ruby, Oracle, Linux,
MySQL, Python.
 Azure platform is developed in such a way that developers need to concentrate on only
the development part and need not worry about other technical stuff outside their
domain. Thus most of the administrative work is done by Azure itself.

LDRP-ITR 4
Cloud Computing 1721BEIT30002

3. Google App
Engine Basic
Overview:

Google App Engine is an application hosting and development platform that powers
everything from enterprise web applications to mobile games, using the same
infrastructure that powers Google’s global-scale web applications. Developers know that
time-to-market is critical to success, and with Google App Engine’s simple development,
robust APIs and worry-free hosting, you can accelerate your application development and
take advantage of simple scalability as the application grows.
With support for Python, Java, and Go, you don’t have to change the way you work.
Your application can take advantage of powerful APIs, High Replication data storage, and
a completely hands-free hosting environment that automatically scales to meet any
demand, whether you’re serving several users or several million.

Google App Engine makes it easy to take your app ideas to the next level.

 Quick to start With no software or hardware to buy and maintain, you


can prototype and deploy applications to your users in a matter of hours.
 Simple to use Google App Engine includes the tools you need to create,
test, launch, and update your apps.
 Rich set of APIs Build feature-rich services faster with Google App
Engine’s easy-to-use APIs.
 Immediate scalability There’s almost no limit to how high or how quickly
your app can scale.
 Pay for what you use Get started without any upfront costs with App
Engine’s free tier and pay only for the resources you use as your application
grows.

Simple development in Python, Java, and Go


Google App Engine offers support for Python version 2.5 or 2.7, Java version 5 or 6,
and Google Go version 1. Developers can also take advantages of Java Virtual Machine
(JVM) based support for JRuby and Rhino.
App Engine offers automatic scaling for web applications—as the number of requests
increases for an application, App Engine automatically allocates more resources for the
web application to handle the additional demand.
Google App Engine is free up to a certain level of consumed resources.

LDRP-ITR 5
Cloud Computing 1721BEIT30002

Architecture:

Application:
 Google App Engine has many built-in APIs and services that let developers quickly
build robust apps with rich functionality including:
 Logs, Durable Logging and Programmatic access to application Logs.
 App Engine Map Reduce, for data processing and transformation.
 Search API, easily create and query indexes from your application’s data
 Blobstore API, serve large data objects
 XMPP API, send and receive instant messages
 Channel API, establish browser channels for instant updates to users
 Users API, authenticate users through Google Accounts or OpenID

 Infrastructure for Security


 Scalability
 Performance and Reliability
 Cost Savings
 Platform Independence

LDRP-ITR 6
Cloud Computing 1721BEIT30002

4. Amazon Web
Services Basic
Overview:

AWS provides you flexibility when provisioning new services. Instead of the weeks
and months it takes to plan, budget, procure, set up, deploy, operate, and hire for a new
project, you can simply sign up for AWS and immediately begin deployment on the cloud
the equivalent of 1, 10, 100, or 1,000 servers. Whether you want to prototype an
application or host a production solution, AWS makes it simple for you to get started and
be productive. Many customers find the flexibility of AWS to be a great asset in
improving time to market and overall organizational productivity.

Amazon has a long history of using a decentralized IT infrastructure. This


arrangement enabled our development teams to access compute and storage resources on
demand, and it has increased overall productivity and agility. By 2005, Amazon had spent
over a decade and millions of dollars building and managing the large-scale, reliable, and
efficient IT infrastructure that powered one of the world’s largest online retail platforms.
Amazo n launched Amazon Web Services (AWS) so that other organizations could
benefit from Amazon’s experience and investment in running a large-scale distributed,
transactional IT infrastructure.

AWS has been operating since 2006, and today serves hundreds of thousands of
customers worldwide. Today [Link] runs a global web platform serving millions of
customers and managing billions of dollars’ worth of commerce every year.

Using AWS, you can requisition compute power, storage, and other services in
minutes and have the flexibility to choose the development platform or programming
model that makes the most sense for the problems they’re trying to solve. You pay only
for what you use, with no up-front expenses or long-term commitments, making AWS a
cost-effective way to deliver applications.

 AWS is readily distinguished from other vendors in the traditional IT computing


landscape because it is:
 Flexible
 Cost-effective
 Scalable and elastic.
 Secure
 Experienced

LDRP-ITR 7
Cloud Computing 1721BEIT30002

Architecture:

Application:
 Amazon Web services are widely used for various computing purposes like:

 Web site hosting


 Application hosting/SaaS hosting
 Media Sharing (Image/ Video)
 Mobile and Social Applications
 Content delivery and Media Distribution
 Storage, backup, and disaster recovery
 Development and test environments
 Academic Computing
 Search Engines
 Social Networking

LDRP-ITR 8
Cloud Computing 1721BEIT30002

5. Salesforce
Basic Overview:
Salesforce is a leading CRM (Customer Relationship Management) software which is
served form cloud. It has more than 800 applications to support various features like
generating new leads, acquiring new leads, increasing sales and closing the deals. It is
designed to manage the organization's data focused on customer and sales details. It also
offers features to customize its inbuilt data structures and GUI to suit the specific needs of
a business. More recently, it has started offering the IOT (internet of things) connectivity
to the CRM platform.
Salesforce started as a cloud based solution for CRM. CRM stands for Customer
Relationship Management. It involves managing all aspects of relationship between an
organization and its customers. For example, the contact details of the customer, the deals
that are in progress or already completed, the support requests from a customer or a new
lead from a new customer. Beyond the customer related information, it also involves
storing and managing the details of the people and the concerned department from the
seller organization that is managing the customer’s account and needs. This makes it easy
to manage and enhance the relationship with the customer and hence better growth for the
organization.

 Following are the different features of the Salesforce platform:


 Contact Management
 Opportunity Management
 Salesforce Engage
 Sales Collaboration
 Sales Performance Management
 Lead Management
 Partner Management
 Salesforce Mobile App
 Workflow and Approvals
 Email Integration
 Files Sync and Share
 Reports and Dashboards
 Sales Forecasting

LDRP-ITR 9
Cloud Computing 1721BEIT30002

Architecture:

 Architecture of Salesforce:
 The architecture of Salesforce can be put into layers for better understanding. The
purpose and function of each layer is described below:
 Trusted Multitenant Cloud
 Scalable Metadata Platform
 Enterprise Ecosystem
 CRM and Related Functionality
 APIs

Application:
 Contact Management
 Opportunity Management
 Salesforce Engage
 Sales Collaboration
 Sales Performance Management
 Lead Management
 Partner Management
 Salesforce Mobile App
 Workflow and Approvals
 Email Integration
 Files Sync and Share

LDRP-ITR 10
Cloud Computing 1721BEIT30002

6. Openstack
Basic Overview:
OpenStack is an open source cloud platform. OpenStack software controls large pools
of compute, storage, and networking resources throughout a datacenter, all managed by a
dashboard that gives administrators control while empowering their users to provision
resources through a web interface.

More than 300 companies have joined the OpenStack project till date.

 OpenStack is open source software to build private and public clouds. There are three
main components:

 OpenStack Compute : Provision and manage large networks of virtual machines


 OpenStack Networking: Pluggable,scalable, API-driven network and
IP management
 OpenStack Storage : Object and Block storage for use with servers and applications

Architecture:

 . A client : any application that makes use of a Glance server.


 REST API : Glance functionalities are exposed via REST.
 Database Abstraction Layer (DAL) : an application programming interface
o (API) that unifies the communication between Glance and databases.

 Glance Domain Controller : middleware that implements the main


o Glance functionalities such as authorization, notifications, policies, database
connections.

 Glance Store : used to organize interactions between Glance and various


o data stores.

 Registry Layer : optional layer that is used to organise secure

LDRP-ITR 11
Cloud Computing 1721BEIT30002

Application:

 There are a lot of compelling reasons to move to an open source private cloud, from
pragmatic cost savings to altruistic community membership. Here are the reasons we
hear most often when we ask our customers why OpenStack is their cloud platform of
choice:

 Tenant-Level Control
 Flexibility
 Low Cost of Ownership
 Openness & Modularity
 Agility
 Mature Community

LDRP-ITR 12
Cloud Computing 1721BEIT30002

Practical-2

AIM: Implementation of Para-Virtualization using VM


Ware‘s Workstation/ Oracle‘s Virtual Box and Guest O.S.

To create a virtual machine using VMware Workstation:

1. Launch VMware Workstation.

2. Click New Virtual Machine.

LDRP-ITR 13
Cloud Computing 1721BEIT30002

3. Select the type of virtual machine you want to create and click Next:

Note: Your choice depends partially on the hardware version you want your
virtual machine to have. For more information, see Virtual machine
hardware versions (1003746).

o Custom: This gives you an option to create a virtual machine and


choose its hardware compatibility. You can choose from Workstation
14.x, Workstation 12.x, Workstation 11.x, Workstation 10.x,
Workstation 9.x, Workstation 8.x, Workstation 6.5 -7.x, Workstation
6, Workstation 5, and Workstation 4. o Typical: This creates a
virtual machine which has the same hardware version as the version
of Workstation you are using. If you are using Workstation 8.x, it
creates a virtual machine with hardware version 8. If you are using
Workstation 6.5.x or 7.x, a virtual machine with hardware version 7 is
created.

4. Click Next.
5. Select your guest operating system (OS), then click Next. You can install the
OS using:

o An installer disc (CD/DVD) o An installer disc image file (ISO)

LDRP-ITR 14
Cloud Computing 1721BEIT30002

6. Click Next.
7. Enter your Product Key.

8. Create a user name and password.


9. Click Next.

10. Enter a virtual machine name and specify a location for virtual machine files to
be saved, click Next.

LDRP-ITR 15
Cloud Computing 1721BEIT30002

11. Establish the virtual machine's disk size, select whether to store the virtual disk
as a single file or split the virtual disk into 2GB files, click Next.

12. Verify the other configuration settings for your virtual machine:

o Memory – change the amount of memory allocated to the


virtual machine.
o Processors – change the number of processors, number of cores
per processor, and the virtualization engine.
o CD / DVD – with advanced settings where you can choose between
SCSI, IDE. o Network adapter – configure it to bridge, NAT, or
Host-only mode, or customize where you can choose between 0 to
9 adapters.
o USB Controller. o Sound card. o Display – enable 3D graphics.

LDRP-ITR 16
Cloud Computing 1721BEIT30002

13. Click Finish.


14. When the virtual machine is powered on, the VMware Tools installation
starts. You are prompted to restart your virtual machine once the Tools
installation completes.

LDRP-ITR 17
Cloud Computing 1721BEIT30002

PRACTICAL - 3
AIM:- Installation and Configuration of Hadoop.

The Following are the steps to install Hadoop

Step 1 − Extract all downloaded files:

The following command is used to extract files on command prompt:

Command: cd Downloads

Step 2 − Create soft links (shortcuts).

The following command is used to create shortcuts:

Command: ln -s ./Downloads/hadoop-3.3.0/ ./hadoop

Step 3 − Configure .bashrc

This following code is to modify PATH variable in bash shell.

Command: vi ./.bashrc

The following code exports variables to path :

ExportHADOOP_HOME=/home/luck/hadoop export
PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbi
n

The Following are the steps to Configure Hadoop

Configuring Hadoop in Non-Secure Mode

Hadoop’s Java configuration is driven by two types of important configuration files:

• Read-only default configuration - [Link], [Link],


[Link] and [Link].
• Site-specific configuration - etc/hadoop/[Link],
etc/hadoop/[Link], etc/hadoop/[Link] and etc/hadoop/mapred-
[Link].

Additionally, you can control the Hadoop scripts found in the bin/ directory of the distribution,
by setting site-specific values via the etc/hadoop/[Link] and etc/hadoop/[Link].

LDRP-ITR 18
Cloud Computing 1721BEIT30002
To configure the Hadoop cluster you will need to configure the environment in which the Hadoop
daemons execute as well as the configuration parameters for the Hadoop daemons.

LDRP-ITR 19
Cloud Computing 1721BEIT30002

HDFS daemons are NameNode, SecondaryNameNode, and DataNode. YARN daemons are
ResourceManager, NodeManager, and WebAppProxy. If MapReduce is to be used, then the
MapReduce Job History Server will also be running. For large installations, these are generally
running on separate hosts.

Configuring Environment of Hadoop Daemons

Administrators should use the etc/hadoop/[Link] and optionally the etc/hadoop/mapred-


[Link] and etc/hadoop/[Link] scripts to do site-specific customization of the Hadoop
daemons’ process environment.

At the very least, you must specify the JAVA_HOME so that it is correctly defined on each remote
node.

Administrators can configure individual daemons using the configuration options shown below
in the table:
Daemon Environment Variable
NameNode HDFS_NAMENODE_OPTS
DataNode HDFS_DATANODE_OPTS
Secondary NameNode HDFS_SECONDARYNAMENODE_OPTS
ResourceManager YARN_RESOURCEMANAGER_OPTS
NodeManager YARN_NODEMANAGER_OPTS
WebAppProxy YARN_PROXYSERVER_OPTS
Map Reduce Job History Server MAPRED_HISTORYSERVER_OPTS
For example, To configure Namenode to use parallelGC and a 4GB Java Heap, the following

statement should be added in [Link] : export HDFS_NAMENODE_OPTS="- XX:

+UseParallelGC -Xmx4g" See etc/hadoop/[Link] for other examples.

Other useful configuration parameters that you can customize include:


HADOOP_PID_DIR - The directory where the daemons’ process id files are stored.
HADOOP_LOG_DIR - The directory where the daemons’ log files are stored. Log files
are automatically created if they don’t exist.

HADOOP_HEAPSIZE_MAX - The maximum amount of memory to use for the Java heapsize.
Units supported by the JVM are also supported here. If no unit is present, it will be
assumed the number is in megabytes. By default, Hadoop will let the JVM determine
how much to use. This value can be overriden on a per-daemon basis using the
appropriate _OPTS variable listed above. For example, setting
HADOOP_HEAPSIZE_MAX=1g and HADOOP_NAMENODE_OPTS="-Xmx5g" will
configure the NameNode with 5GB heap.

In most cases, you should specify the HADOOP_PID_DIR and HADOOP_LOG_DIR directories such that
they can only be written to by the users that are going to run the hadoop daemons.

LDRP-ITR 20
Cloud Computing 1721BEIT30002
Otherwise there is the potential for a symlink attack.

LDRP-ITR 21
Cloud Computing 1721BEIT30002

It is also traditional to configure HADOOP_HOME in the system-wide shell environment


configuration. For example, a simple script inside /etc/profile.d:
HADOOP_HOME=/path/to/hadoop export
HADOOP_HOME

Configuring the Hadoop Daemons


This section deals with important parameters to be specified in the given configuration files:

• etc/hadoop/[Link]
Parameter Value Notes
[Link] NameNode hdfs://host:port/
URI
[Link] 131072 Size of read/write buffer used in
SequenceFiles.
• etc/hadoop/[Link]
• Configurations for NameNode:
Parameter Value Notes
[Link] Path on the local filesystem If this is a
where the NameNode stores commadelimited list of
the namespace and directories then the
transactions logs name table is replicated
persistently. in all of the directories,
for redundancy.
[Link] / [Link] List of permitted/excluded If necessary, use these
DataNodes. files to control the list of
allowable datanodes.
[Link] 268435456 HDFS blocksize of
256MB for large
filesystems.
[Link] 100 More NameNode server
threads to handle RPCs
from large number of
DataNodes.

• Configurations for DataNode:


Parameter Value Notes
[Link] Comma separated list of If this is a comma-delimited list
paths on the local of directories, then data will be
filesystem of a DataNode stored in all named directories,
where it should store its typically on different devices.
blocks.
• etc/hadoop/[Link]

LDRP-ITR 22
Cloud Computing 1721BEIT30002

• Configurations for ResourceManager and NodeManager:


Parameter Value Notes
[Link] true / Enable ACLs? Defaults to false.
false
[Link] Admin ACL to set admins on the cluster. ACLs are of for
ACL comma-separated-usersspacecomma-separated-
groups.
Defaults to special value of * which means
anyone.
Special value of just space means no one has
access.
[Link] false Configuration to enable or disable log
aggregation

• Configurations for ResourceManager:


Parameter Value Notes
[Link] Resource host:port If set, overrides the hostname set in
.address Manager [Link].
host:port
for clients
to submit
jobs.
[Link] Resource host:port If set, overrides the hostname set in
.[Link] Manager [Link].
host:port
for
Applicatio
nMasters
to talk to
Scheduler
to obtain
resources.
[Link] Resource host:port If set, overrides the hostname set in
.[Link] Manager [Link].
host:port
for
NodeMan
agers.
[Link] Resource host:port If set, overrides the hostname set in
.[Link] Manager [Link].
host:port
for
administra
tive
command
s.

LDRP-ITR 23
Cloud Computing 1721BEIT30002

[Link] Resource host:port If set, overrides the hostname set in


.[Link] Manager [Link].
web-ui
host:port.
[Link] Resource host Single hostname that can be set in place of
.hostname Manager setting all [Link]*address
host. resources. Results in default ports for
ResourceManager components.
[Link] Resource CapacityScheduler (recommended),
.[Link] Manager FairScheduler (also recommended), or
Scheduler FifoScheduler. Use a fully qualified class name,
class. e.g.,
[Link]
[Link].
[Link] Minimum In MBs
um-allocation-mb limit of
memory
to allocate
to each
container
request at
the
Resource
Manager.
[Link] Maximum In MBs
um-allocation-mb limit of
memory
to allocate
to each
container
request at
the
Resource
Manager.
[Link] List of If necessary, use these files to control the list of
permitted/ allowable NodeManagers.
.[Link]-path /
excluded
[Link]
NodeMan
.[Link]-path agers.

• Configurations for NodeManager:


Parameter Valu Notes
e

LDRP-ITR 24
Cloud Computing 1721BEIT30002

[Link] Reso Defines total available resources on the NodeManager to be made


[Link] urce available to running containers
[Link] i.e.
ry-mb availa
ble
physi
cal
mem
ory,
in
MB,
for
given
Node
Mana
ger
[Link] Maxi The virtual memory usage of each task may exceed its physical
[Link] mum memory limit by this ratio. The total amount of virtual memory
m-pmemratio ratio used by tasks on the NodeManager may exceed its physical
by memory usage by this ratio.
which
virtua
l
mem
ory
usage
of
tasks
may
excee
d
physi
cal
mem
ory
[Link] Com Multiple paths help spread disk i/o.
[Link] al- ma-
dirs separ
ated
list of
paths
on the

LDRP-ITR 25
Cloud Computing 1721BEIT30002

local
filesy
stem
where
inter
media
te
data
is
writte
n.
[Link] Com Multiple paths help spread disk i/o.
[Link] ma-
-dirs separ
ated
list of
paths
on the
local
filesy
stem
where
logs
are
writte
n.
[Link] 1080 Default time (in seconds) to retain log files on the NodeManager
[Link] 0 Only applicable if log-aggregation is disabled.
.retainseconds
[Link] /logs HDFS directory where the application logs are moved on
[Link] application completion. Need to set appropriate permissions.
ote-applog-dir Only applicable if log-aggregation is enabled.
[Link] logs Suffix appended to the remote log dir. Logs will be aggregated to
[Link] ${[Link]-app-log- dir}/${user}/$
ote-applog- {thisParam} Only applicable if log-aggregation is
dirsuffix enabled.
[Link] mapr Shuffle service that needs to be set for Map Reduce applications.
[Link] educe
-services _shuf
fle
[Link] Envir For mapreduce application in addition to the default values
[Link] - onme HADOOP_MAPRED_HOME should to be added. Property value
whitelist nt should
prope JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDF
rties to S_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_D
be ISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_
inheri HOME
ted by
contai

LDRP-ITR 26
Cloud Computing 1721BEIT30002

ners
from
Node
Mana
gers

• Configurations for History Server (Needs to be moved elsewhere):


Parameter Value Notes
[Link] -1 How long to keep aggregation logs before
deleting them. -1 disables. Be careful, set this
too small and you will spam the name node.

[Link]- -1 Time between checks for aggregated log


interval-seconds retention. If set to 0 or a negative value then
the value is computed as one-tenth of the
aggregated log retention time. Be careful, set
this too small and you will spam the name
node.

• etc/hadoop/[Link]
• Configurations for MapReduce Applications:
Parameter Value Notes
[Link] yarn Execution framework
set to Hadoop YARN.
[Link] 1536 Larger resource limit for
maps.
[Link] - Larger heap-size for
Xmx1024M child jvms of maps.
[Link] 3072 Larger resource limit
for reduces.
[Link] - Larger heap-size for
Xmx2560M child jvms of reduces.
[Link] 512 Higher memory-limit
while sorting data for
efficiency.
[Link] 100 More streams merged
at once while sorting
files.

LDRP-ITR 27
Cloud Computing 1721BEIT30002

[Link] 50 Higher number of


parallel copies run by
reduces to fetch
outputs from very large
number
of maps.

• Configurations for MapReduce JobHistory Server:


Parameter Value Notes
[Link] MapReduce Default port is
JobHistory Server 10020.
host:port
[Link] MapReduce Default port is
JobHistory Server 19888.
Web UI host:port
[Link]-dir /mr-history/tmp Directory where
history files are
written by
MapReduce jobs.
[Link]-dir /mr-history/done Directory where
history files are
managed by the MR
JobHistory Server.

LDRP-ITR 28
Cloud Computing 1721BEIT30002

PRACTICAL 4
AIM: Running a sample application on Alchemi Grid and analysing it.

Configure

Configure PrimeNumberGenerator to point to a Manager:

 Examples\PrimeNumberGenerator\bin\Debug\[Link]

If the bin folder does not appear in the PrimeNumberGenerator folder, then it is necessary to
follow the following steps for the first time:
 Run the PrimeNumberGenerator in the Visual Studio for the first time.
 Then, the bin folder will appear in the PrimeNumberGenerator folder.

Now, it is possible to run the [Link] inside the Debug folder whenever it is
needed to run.

Fig. PrimeNumberGenerator program in Visual Studio

After running the program in visual studio once, the ‘bin\debug’ folder will appear. There will
be [Link] inside the debug folder. Now, whenever needed, by double
clicking the [Link] the program would run by itself.

LDRP-ITR 29
Cloud Computing 1721BEIT30002

Fig. The PrimeNumberGenerator in the debug folder.

Alchemi Console
Alchemi console is opened by double clicking the [Link]. On making a grid
connection the console would look like as shown in figure below.

Fig. Alchemi Console

Executors Console

LDRP-ITR 30
Cloud Computing 1721BEIT30002

On clicking on the Executors, the console will show the number of executors connected to the
manager. Here, there are 3 executors connected to the manager, hence, the console will show as
in figure given below.

Fig. Console showing number of executors.


Executor Properties
On double clicking on any of the executor, will show the properties owned by that specific
executor.
It would show up with a popup box aas shown below in figure.

Fig. Executor Properties

Threads
Threads are the light weight processes made by the manager by dividing the application to be
run.
On clicking the application tab the threads would appear as show below in figure.
LDRP-ITR 31
Cloud Computing 1721BEIT30002

Fig. Threads
Thread Properties
On double clicking on any of the threads it would show up the properties of the thread as
shown in figure below.

Fig. Thread Properties

System Performance Monitor


On clicking the Performance Summary tab the console will display as below.

LDRP-ITR 32
Cloud Computing 1721BEIT30002

Fig. System Performance Monitor

These were the main parts of the Alchemi Console in brief.

Execute the program


As said earlier, the PrimeNumberGenerator application can be run by double clicking
[Link].
On doing so a popup console would show up as shown in figure below.

Fig. Console appeared.


Here, we have considered the value to be entered as the limit is ‘1000000000’. Now, we will run
it in different cases, such as,

 With 1 executor
 With 2 executor
 With 3 executor

With One Executor

LDRP-ITR 33
Cloud Computing 1721BEIT30002

In this case only ONE EXECUTOR is connected to the MANAGER. Now on running the
application, PrimeNumberGenerator application console and the Performance Monitor will be
displayed as follows.

Fig. Application Console – PrimeNumberGenerator


Here, on running the application using one executor the reading of the ‘Total Time Taken’
resulted as 21.8281250 seconds.
Hence, accordingly the system performance reading is also shown in System Performance
Monitor.
There you could see that the ‘No. of Executors’ show 2, even though the ‘Max. Power
Available’ shows power of one executor. This is so because, ‘No. of Executors’ shows the total
number of executers in the network than the active ones.

LDRP-ITR 34
Cloud Computing 1721BEIT30002

Fig. System Performance Monitor

With Two Executor


In this case TWO EXECUTORS are connected to the MANAGER. Now on running the
application, PrimeNumberGenerator application console and the Performance Monitor will be
displayed as follows. Here also we will use the value of ‘Limit’ as ‘1000000000’, for
consistency in the result.

Fig. Application Console – PrimeNumberGenerator

LDRP-ITR 35
Cloud Computing 1721BEIT30002

Fig. System Performance Monitoring

With Three Executor


In this case THREE EXECUTORS are connected to the MANAGER. Now on running the
application, PrimeNumberGenerator application console and the Performance Monitor will be
displayed as follows. Here also we will use the value of ‘Limit’ as ‘1000000000’, for
consistency in the result.

Fig. Application Console - PrimeNumberGenerator

LDRP-ITR 36
Cloud Computing 1721BEIT30002

Fig. System Performance Monitor

Resultant Readings
No. of Executors Max. Power Limit (Input) Time Taken
One 3.292 GHz 1000000000 21.8281250
Two 6.584 GHz 1000000000 14.8281250
Three 9.876 GHz 1000000000 12.0625000

LDRP-ITR 37
Cloud Computing 1721BEIT30002

Practical-5

Aim: Create an application (Ex: Word Count) using Hadoop Map/Reduce.

Running the WordCount Example in Hadoop MapReduce

Now, let‟s create the WordCount java project with eclipse IDE for Hadoop. Even if you are
working on Cloudera VM, creating the Java project can be applied to any environment.

Step 1 –

Let‟s create the java project with the name “Sample WordCount” as shown below

- File > New > Project > Java Project > Next.

"Sample WordCount" as our project name and click "Finish":

LDRP-ITR 38
Cloud Computing 1721BEIT30002

Step 2 -

The next step is to get references to hadoop libraries by clicking on Add JARS as follows –

LDRP-ITR 39
Cloud Computing 1721BEIT30002

Open inNew
Window Open Type
F4
b @NYSE Hierarchy Show In
Shift+Alt+W
PY }
@src
Copy qualified Ud+
b CARE System Name Paste
Library lb training C
Delete

Ctrl+V
Build Path Delete
Source
Refactor

lmpol...
Shift+Alt+ S }
Expos:.
Shift+Alt+T }
Refresh
Close
Project F5
Close Unrelated Projects
Assign Working Sets...

Run As
Debug As
Validate
Team
Compare

With

Restore fromLocal
History...

LDRP-ITR 40
Cloud Computing 1721BEIT30002

LDRP-ITR 41
Cloud Computing 1721BEIT30002

Step 3 -

Create a new package within the project with the name [Link]-

LDRP-ITR 42
Cloud Computing 1721BEIT30002

Step 4 –

LDRP-ITR 43
Cloud Computing 1721BEIT30002

Now let‟s implement the WordCount example program by creating a WordCount class
under the project [Link].

LDRP-ITR 44
Cloud Computing 1721BEIT30002

Step 5 -

Create a Mapper class within the WordCount class which extends MapReduceBase
Class to implement mapper interface. The mapper class will contain -

1. Code to implement "map" method.

` 2. Code for implementing the mapper-stage business logic should be written


within this method.

Mapper Class Code for WordCount Example in Hadoop MapReduce

public static class Map extends MapReduceBase implements Mapper


{ private final static IntWritable one = new
IntWritable(1); private Text word = new Text();
public void map(LongWritable key, Text value, OutputCollector output,
Reporter reporter)

LDRP-ITR 45
Cloud Computing 1721BEIT30002

throws IOException
{ String line =
[Link]();
StringTokenizer tokenizer = new
StringTokenizer(line); while
([Link]()) {
[Link]([Link]())
; [Link](word, one);
}
}
}

In the mapper class code, we have used the String Tokenizer class which takes the entire
line and breaks into small tokens (string/word).

Step 6 –

Create a Reducer class within the WordCount class extending MapReduceBase Class to
implement reducer interface. The reducer class for the wordcount example in hadoop
will contain the -

1. Code to implement "reduce" method

2. Code for implementing the reducer-stage business logic should be written


within this method

Reducer Class Code for WordCount Example in Hadoop MapReduce

public static class Reduce extends MapReduceBase implements Reducer

{ public void reduce(Text key, Iterator values,

OutputCollector
output, Reporter reporter) throws IOException {
int sum = 0;
while ([Link]()) {
sum += [Link]().get();
}
[Link](key, new IntWritable(sum));
}
}

Step 7 –

Create main() method within the WordCount class and set the following properties using
the JobConf class -

i. OutputKeyClass
ii. OutputValueClass

LDRP-ITR 46
Cloud Computing 1721BEIT30002
iii. Mapper Class
iv. Reducer Class
v. InputFormat

LDRP-ITR 47
Cloud Computing 1721BEIT30002

vi. OutputFormat
vii. InputFilePath
viii. OutputFolderPath

public static void main(String[] args) throws Exception


{ JobConf conf = new
JobConf([Link]);
[Link]("WordCount")
;

[Link]([Link]);
[Link]([Link])
;

[Link]([Link]);
//
[Link]([Link]);
[Link]([Link]);

[Link]([Link]);
[Link]([Link]
s);

[Link](conf, new
Path(args[0])); [Link](conf,
new Path(args[1]));

[Link](conf);
}
}

Step 8 –

Create the JAR file for the wordcount class –

LDRP-ITR 48
Cloud Computing 1721BEIT30002

New

€ PackaqR
Open in New Window
Open Type Hierarchy
§ @NYSE Show In
Shift4Alt4W }
E°PY
Copy Qualified Name

Paste
Delete
Remove
§ Shift + Curl+Alt+Down
Ref
e
Shift4Alt4 S }
Shift+Alt+T 7

LDRP-ITR 49
Cloud Computing 1721BEIT30002

Select
Export

resourcesintoaJARfileonthelocalfilesystem.

Select an ex [Link]:..

@ Runnable JARfile

, Finish,

LDRP-ITR 50
Cloud Computing 1721BEIT30002

{AR File Specification

x .project

Export generated class files and resources


ill Export all output foldersforcheckedprojects

Export java source files and resources

Options:
lit CompressthecontentsoftheJARfile
Add directory entries

Next >

LDRP-ITR 51
Cloud Computing 1721BEIT30002

{AR FileSpecification
Define whichresourcesshouldbeexported intotheJAR.

6 Export generated class files and resources @


Export all output folders for checked projects

0 Export java source files and resources


@ Export [Link]!e s

Select the ex rt destination:

Options:
@ Compress
thecontentsoftheJARfile @ Add
directory entries
@ Overwrite existingfileswithout warning

BlackNext jet

LDRP-ITR 52
Cloud Computing 1721BEIT30002

How to execute the Hadoop MapReduce WordCount program ?

>> hadoop jar (jar file name) (className_along_with_packageName) (input file)


(output folderpath)

hadoop jar dezyre_wordcount.jar [Link]


/user/cloudera/Input/war_and_peace /user/cloudera/Output

Important Note: war_and_peace(Download link) must be available in HDFS


at/user/cloudera/Input/war_and_peace.

If not, upload the file on HDFS using the following commands

- hadoop fs –mkdir /user/cloudera/Input

hadoop fs –put war_and_peace /user/cloudera/Input/war_and_peace

LDRP-ITR 53
Cloud Computing 1721BEIT30002

Output of Executing Hadoop WordCount Example –

LDRP-ITR 50
Cloud Computing 1721BEIT30002

Practical-6

AIM: To Study a Cloud Simulation Toolkit

Cloud Simulation Toolkit: An Introduction

Cloud computing is a pay as you use model, which delivers infrastructure (IaaS), platform
(PaaS) and software (SaaS) as services to users as per their requirements. Cloud computing
exposes data centers capabilities as network virtual services, which may include the set of
required hardware, application with support of the database as well as the user interface. This
allows the users to deploy and access applications across the internet which is based on
demand and QoS requirements.

As Cloud computing is a new concept and is still in a very early stage of its evolution, so
researchers and system developers are working on improving the technology to deliver
better on processing, quality & cost parameters. But most of the research is focused on
improving the performance of provisioning policies and to test such research on real cloud
environment like Amazon EC2, Microsoft Azure, Google App Engine for different
applications models under variable conditions is extremely challenging as:

1. Clouds exhibit varying demands, supply patterns, system sizes, and


resources (hardware, software, and network).
2. Users have heterogeneous, dynamic, and competing QoS requirements.
3. Applications have varying performance, workload, and dynamic application
scaling requirements.

Benchmarking the application performance on the real public cloud infrastructure


like google cloud, Microsoft Azure, etc., are not suitable due to their multi-tenant
nature as well as variable workload fulfillment.

Also, there are very few admin level configurations that a user/researcher could be able to
change. Hence, this makes the reproduction of results that can be relied upon, an extremely
difficult undertaking.

Further, even if we do, it is a tedious and time-consuming effort to re-configure benchmarking


parameters across a massive-scale Cloud computing infrastructure over multiple test runs.
Therefore, it is impossible on real-world public Cloud systems to undertake
benchmarking experimentations as repeatable, dependable, and scalable environments.

Thus the need to use simulation tool(s) arises, which may become a viable alternative to
evaluate/benchmark the test workloads in a controlled and fully configurable environment
that can repeatable over multiple iterations and reproduce the results for analysis.

This simulation-based approach can provide various benefits across the researcher’s
community as it allows them to:

1. Test services in a repeatable and controllable environment.


2. Tuning the system bottlenecks (performance issues) before deploying on real clouds.

LDRP-ITR 51
Cloud Computing 1721BEIT30002

3. Simulating the required infrastructure(small or large scale) to evaluate different sets


of workload as well as resource performance, which facilitates for developing, testing
and deployment of adaptive application provisioning techniques.

This article provides a beginners guide to cloud simulation toolkit and helps then to get an
insight into the role of its various components.

Features of Cloud Simulation Toolkit

1. Support for modeling and simulation of large-scale Cloud computing environments,


including data centers, on a single physical computing node(could be a desktop,
laptop, or server machine).
2. A self-contained platform for modeling Clouds, service brokers, provisioning,
and allocation policies.
3. Facilitates the simulation of network connections across the simulated
system elements.
4. Facility for simulation of federated Cloud environment that inter-networks resources
from both private and public domains, a feature critical for research studies related
to Cloudbursts and automatic application scaling.
5. Availability of a virtualization engine that facilitates the creation and management
of multiple, independent, and co-hosted virtualized services on a data center node.
6. Flexibility to switch between space-shared and time-shared allocation of
processing cores to virtualized services.

All these features would help in accelerating the development, testing and deployment of
potential resource/application provisioning policies/algorithms for Cloud Computing based
systems.

Functionalities of Cloud Simulation Toolkit

1. Infrastructure as a service (IaaS) and platform as a service (PaaS)

When it comes to IaaS, using an existing infrastructure on a pay-per-use scheme seems to be


an obvious choice for companies saving on the cost of investing to acquire, manage and
maintain an IT infrastructure. There are also instances where organizations turn to PaaS for
the same reasons while also seeking to increase the speed of development on a ready-to-use
platform to deploy applications.

2. Private cloud and hybrid cloud

Among the many incentives for using cloud, there are two situations where organizations are
looking into ways to assess some of the applications they intend to deploy into their
environment through the use of a cloud (specifically a public cloud). While in the case of test
and development it may be limited in time, adopting a hybrid cloud approach allows for

LDRP-ITR 52
Cloud Computing 1721BEIT30002

testing application workloads, therefore providing the comfort of an environment without the
initial investment that might have been rendered useless should the workload testing fail.

Another use of hybrid cloud is also the ability to expand during periods of limited peak usage,
which is often preferable to hosting a large infrastructure that might seldom be of use. An
organization would seek to have the additional capacity and availability of an environment
when needed on a pay-as-you-go basis.

3. Test and development

Probably the best scenario for the use of a cloud is a test and development environment. This
entails securing a budget, setting up your environment through physical assets, significant
manpower and time. Then comes the installation and configuration of your platform. All this
can often extend the time it takes for a project to be completed and stretch your milestones.

With cloud computing, there are now readily available environments tailored for your needs
at your fingertips. This often combines, but is not limited to, automated provisioning of
physical and virtualized resources.

4. Big data analytics

One of the aspects offered by leveraging cloud computing is the ability to tap into vast
quantities of both structured and unstructured data to harness the benefit of extracting
business value.

Retailers and suppliers are now extracting information derived from consumers’ buying
patterns to target their advertising and marketing campaigns to a particular segment of the
population. Social networking platforms are now providing the basis for analytics on
behavioral patterns that organizations are using to derive meaningful information.

5. File storage

Cloud can offer you the possibility of storing your files and accessing, storing and retrieving
them from any web-enabled interface. The web services interfaces are usually simple. At any
time and place you have high availability, speed, scalability and security for your
environment. In this scenario, organizations are only paying for the amount of cloud storage
they are actually consuming, and do so without the worries of overseeing the daily
maintenance of the storage infrastructure.

There is also the possibility to store the data either on- or off-premises depending on the
regulatory compliance requirements. Data is stored in virtualized pools of storage hosted by a
third party based on the customer specification requirements.

6. Disaster recovery

This is yet another benefit derived from using cloud based on the cost-effectiveness of a
disaster recovery (DR) solution that provides for faster recovery from a mesh of different
physical locations at a much lower cost that the traditional DR site with fixed assets, rigid
procedures and a much higher cost.

LDRP-ITR 53
Cloud Computing 1721BEIT30002

7. Backup

Backing up data has always been a complex and time-consuming operation. This included
maintaining a set of tapes or drives, manually collecting them and dispatching them to a
backup facility with all the inherent problems that might happen in between the originating
and the backup site. This way of ensuring a backup is performed is not immune to problems
such as running out of backup media, and there is also time to load the backup devices for a
restore operation, which takes time and is prone to malfunctions and human errors.

Cloud-based backup, while not being the panacea, is certainly a far cry from what it used to
be. You can now automatically dispatch data to any location across the wire with the
assurance that neither security, availability nor capacity are issues.

While the list of the above uses of cloud computing is not exhaustive, it certainly give an
incentive to use the cloud when comparing to more traditional alternatives to increase IT
infrastructure flexibility, as well as leverage on big data analytics and mobile
computing.

LDRP-ITR 54
Cloud Computing 1721BEIT30002

Practical – 7

Aim: To setup Aneka tools.

1. Introduction

Aneka is a Cloud Application Development Platform (CAP) for developing


and running compute and data intensive applications. As a platform it provides
users with both a runtime environment for executing applications developed using
any of the three supported programming models, and a set of APIs and tools that
allow you to build new applications or run existing legacy code. The purpose of
this document is to help you through the process of installing and setting up an
Aneka Cloud environment. This document will cover everything from helping you
to understand your existing infrastructure, different deployment options, installing
the Management Studio, configuring Aneka Daemons and Containers, and finally
running some of the samples to test your environment.

What is an Aneka Cloud composed of?


An Aneka Cloud is composed of a collection of services deployed on top of an
infrastructure. This infrastructure can include both physical and virtual machines
located in your local area network or Data Centre. Aneka services are hosted on
Aneka Containers which are managed by Aneka Daemons. An Aneka Daemon is a
background service that runs on a machine and helps you to install, start, stop, update
and reconfigure Containers.
A key component of the Aneka platform is the Aneka Management Studio, a portal
for managing your infrastructure and clouds. Administrators use the Aneka
Management Studio to define their infrastructure, deploy Aneka Daemons, and install
and configure Aneka Containers. The figure below shows a high-level representation
of an Aneka Cloud, composed of a Master Container that is responsible for scheduling
jobs to Workers, and a group of Worker Containers that execute the jobs. Each
machine is typically configured with a single instance of the Aneka Daemon and a
single instance of the Aneka Container.
LDRP-ITR 55
Cloud Computing 1721BEIT30002

2. Installation
This section assumes that you have a copy of the Aneka distribution with you. If
you do not have a copy already, you can download the latest version from Manjrasoft’s
Website.
Installing Aneka Cloud Management Studio
Aneka installation begins with installing Aneka Cloud Management Studio. The
Cloud Management Studio is your portal for creating, configuring and managing Aneka
Clouds. Installing Aneka using the distributed Microsoft Installer Package (MSI) is a
quick process involving three steps as described below.
Step 1 – Run the installer package to start the Setup Wizard

LDRP-ITR 56
Cloud Computing 1721BEIT30002

Figure 3 - Welcome Page


The Welcome Page is self-explanatory and you can proceed by clicking next.

Step 2 – Specifying the installation folder


In Step 2 you specify the installation folder. By default Aneka is installed in C:\
Program Files\Manjrasoft\Aneka.3.0.

Figure 4 - Specifying the installation folder

LDRP-ITR 57
Cloud Computing 1721BEIT30002

3.1.3 Step 3 – Confirm and start the installation

Figure 5 - Confirm Installation

At this point you are ready to begin the installation. Click “Next” to start the
installation or “Back” to change your installation folder.

Figure 6 - Installation Progress

LDRP-ITR 58
Cloud Computing 1721BEIT30002

Figure 7 - Installation Complete

Once the installation is complete, close the wizard and launch Aneka
Management Studio from the start menu.

Figure 8 - Start
Menu

LDRP-ITR 59
Cloud Computing 1721BEIT30002

Practical-8
Aim: Configure and run sample program using Openstack.

1. Install the packages:


2. # apt-get install openstack-dashboard

2. Edit the /etc/openstack-dashboard/local_settings.py file


and complete the following actions:
o Configure the dashboard to use OpenStack services on the controller
node:
o OPENSTACK_HOST = "controller"
o Allow all hosts to access the dashboard:
o ALLOWED_HOSTS = ['*', ]
o Configure the memcached session storage service:
o SESSION_ENGINE =
'[Link]'
o
o CACHES = {
o 'default': {
o 'BACKEND':
'[Link]
',
o 'LOCATION': 'controller:11211',
o }
o }

Note

Comment out any other session storage configuration.

o Enable the Identity API version 3:


o OPENSTACK_KEYSTONE_URL = "[Link] %
OPENSTACK_HOST
o Enable support for domains:
o OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
o Configure API versions:
o OPENSTACK_API_VERSIONS = {
o "identity": 3,
o "image": 2,
o "volume": 2,
o }
o Configure default as the default domain for users that you create via
the dashboard:
o OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
o Configure user as the default role for users that you create via the dashboard:
o OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"

LDRP-ITR 60
Cloud Computing 1721BEIT30002

o If you chose networking option 1, disable support for layer-3


networking services:
o OPENSTACK_NEUTRON_NETWORK = {
o ...
o 'enable_router': False,
o 'enable_quotas': False,
o 'enable_distributed_router': False,
o 'enable_ha_router': False,
o 'enable_lb': False,
o 'enable_firewall': False,
o 'enable_vpn': False,
o 'enable_fip_topology_check': False,
o }
o Optionally, configure the time zone:
o TIME_ZONE = "TIME_ZONE"

Replace TIME_ZONE with an appropriate time zone identifier. For more


information, see the list of time zones.

Finalize installation¶

 Reload the web server configuration:


 # service apache2 reload

In this demo basic operations in Rally are performed, such as adding OpenStack cloud
deployment, running task against it and generating report.

It’s assumed that you have gone through Step 0. Installation and have an already existing
OpenStack deployment with Keystone available at <KEYSTONE_AUTH_URL>.

Registering an OpenStack deployment in Rally

First, you have to provide Rally with an OpenStack deployment that should be tested.
This should be done either through OpenRC files or through deployment configuration
files. In case you already have an OpenRC, it is extremely simple to register a deployment
with the deployment create command:

$ . openrc admin admin


$ rally deployment create --fromenv --name=existing
+ + + + +
+
| uuid | created_at | name | status | active |
+ + + + +
+
| 28f90d74-d940-4874-a8ee-04fda59576da | 2015-01-18 00:11:38.059983 | existing |
deploy->finished | |

LDRP-ITR 61
Cloud Computing 1721BEIT30002

+ + + + +
+
Using deployment : <Deployment UUID>
...

Alternatively, you can put the information about your cloud credentials into a JSON
configuration file (let’s call it [Link]). The deployment create command has a slightly
different syntax in this case:

$ rally deployment create --file=[Link] --name=existing


+ + + + +
+
| uuid | created_at | name | status | active |
+ + + + +
+
| 28f90d74-d940-4874-a8ee-04fda59576da | 2015-01-18 00:11:38.059983 | existing |
deploy->finished | |
+ + + + +
+
Using deployment : <Deployment UUID>
...

Note the last line in the output. It says that the just created deployment is now used by Rally;
that means that all tasks or verify commands are going to be run against it. Later in tutorial is
described how to use multiple deployments.

Finally, the deployment check command enables you to verify that your current deployment
is healthy and ready to be tested:

$ rally deployment check


keystone endpoints are valid and following services are available:
+ + + +
| Service | Service Type | Status |
+ + + +
| cinder | volume | Available |
| cinderv2 | volumev2 | Available |
| ec2 | ec2 | Available |
| glance | image | Available |
| heat | orchestration | Available |
| heat-cfn | cloudformation | Available |
| keystone | identity | Available |
| nova | compute | Available |
| novav21 | computev21 | Available |
| s3 | s3 | Available |
+ + + +
Running Rally Tasks

Now that we have a working and registered deployment, we can start testing it. The sequence
of subtask to be launched by Rally should be specified in a task input file (either in JSON or
in YAML format). Let’s try one of the task sample available in samples/tasks/scenarios, say,

LDRP-ITR 62
Cloud Computing 1721BEIT30002

the one that boots and deletes multiple servers (samples/tasks/scenarios/nova/boot-


and- [Link]):

{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "[Link]"
},
"image": {
"name": "^cirros.*-disk$"
},
"force_delete": false
},
"runner": {
"type":
"constant",
"times": 10,
"concurrency": 2
},
"context": {
"users": {
"tenants": 3,
"users_per_tenant": 2
}
}
}
]
}

To start a task, run the task start command (you can also add the -v option to print more
logging information):

$ rally task start samples/tasks/scenarios/nova/[Link]


Preparing input task

Input task is:


<Your task config here>

Task 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996: started

Running Task... This can take a while...

To track task status use:

rally task status


or
rally task detailed

LDRP-ITR 63
Cloud Computing 1721BEIT30002

Task 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996: finished

test scenario NovaServers.boot_and_delete_server


args position 0
args values:
{u'args': {u'flavor': {u'name': u'[Link]'},
u'force_delete': False,
u'image': {u'name': u'^cirros.*-disk$'}},
u'context': {u'users': {u'project_domain': u'default',
u'resource_management_workers': 30,
u'tenants': 3,
u'user_domain': u'default',
u'users_per_tenant': 2}},
u'runner': {u'concurrency': 2, u'times': 10, u'type': u'constant'}}
+ + + + + + + +
+
| action | min (sec) | avg (sec) | max (sec) | 90 percentile | 95 percentile | success |
count |
+ + + + + + + +
+
| nova.boot_server | 7.99 | 9.047 | 11.862 | 9.747 | 10.805 | 100.0% | 10 |
| nova.delete_server | 4.427 | 4.574 | 4.772 | 4.677 | 4.725 | 100.0% | 10 |
| total | 12.556 | 13.621 | 16.37 | 14.252 | 15.311 | 100.0% | 10 |
+ + + + + + + +
+
Load duration: 70.1310448647
Full duration: 87.545541048

HINTS:
* To plot HTML graphics with this data, run:
rally task report 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996 --out [Link]

* To generate a JUnit report, run:


rally task export 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996 --type junit --to [Link]

* To get raw JSON output of task results, run:


rally task report 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996 --json --out [Link]

Using task: 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996

Note that the Rally input task above uses regular expressions to specify the image and flavor
name to be used for server creation, since concrete names might differ from installation to
installation. If this task fails, then the reason for that might a non-existing image/flavor
specified in the task. To check what images/flavors are available in the deployment, you
might use the the following commands:

LDRP-ITR 64
Cloud Computing 1721BEIT30002

$ . ~/.rally/openrc
$ openstack image list
+ + + +
| ID | Name | Status |
+ + + +
| 30dc3b46-4a4b-4fcc-932c-91fa87753902 | cirros-0.3.4-x86_64-uec | active |
| d687fc2a-75bd-4194-90c7-1619af255b04 | cirros-0.3.4-x86_64-uec-kernel | active |
| c764d543-027d-47a3-b46e-0c1c8a68635d | cirros-0.3.4-x86_64-uec-ramdisk | active |
+ + + +

$ openstack flavor list


+ + + + + + + +
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+ + + + + + + +
| 1 | [Link] | 512 | 1 | 0 | 1 | True |
| 2 | [Link] | 2048 | 20 | 0 | 1 | True |
| 3 | [Link] | 4096 | 40 | 0 | 2 | True |
| 4 | [Link] | 8192 | 80 | 0 | 4 | True |
| 42 | [Link] | 64 | 0 | 0 | 1 | True |
| 5 | [Link] | 16384 | 160 | 0 | 8 | True |
| 84 | [Link] | 128 | 0 | 0 | 1 | True |
+ + + + + + + +
Report generation

One of the most beautiful things in Rally is its task report generation mechanism. It enables
you to create illustrative and comprehensive HTML reports based on the task data. To create
and open at once such a report for the last task you have launched, call:

rally task report --out=[Link] --open

This is going produce an HTML page with the overview of all the scenarios that you’ve
included into the last task completed in Rally (in our case, this is just one scenario, and we
will cover the topic of multiple scenarios in one task in the next step of our tutorial):

This aggregating table shows the duration of the load produced by the corresponding scenario
(“Load duration”), the overall subtask execution time, including the duration of context
creation (“Full duration”), the number of iterations of each scenario (“Iterations”), the type
of the load used while running the scenario (“Runner”), the number of failed iterations
(“Errors”) and finally whether the scenario has passed certain Success Criteria (“SLA”) that
were set up by the user in the input configuration file (we will cover these criteria in one of
the next steps).

LDRP-ITR 65
Cloud Computing 1721BEIT30002

By navigating in the left panel, you can switch to the detailed view of the task results for the
only scenario we included into our task, namely NovaServers.boot_and_delete_server:

This page, along with the description of the success criteria used to check the outcome of this
scenario, shows more detailed information and statistics about the duration of its iterations.
Now, the “Total durations” table splits the duration of our scenario into the so-called
“atomic actions”: in our case, the “boot_and_delete_server” scenario consists of two
actions - “boot_server” and “delete_server”. You can also see how the scenario duration
changed throughout its iterations in the “Charts for the total duration” section. Similar
charts, but with atomic actions detailed are on the “Details” tab of this page:

LDRP-ITR 66
Cloud Computing 1721BEIT30002

Note that all the charts on the report pages are very dynamic: you can change their contents
by clicking the switches above the graph and see more information about its single points by
hovering the cursor over these points.

Take some time to play around with these graphs and then move on to the next step of our
tutorial

LDRP-ITR 67
Cloud Computing 1721BEIT30002

Practical-9
Aim: Create account in AWS and run sample service using AWS
Step 1: Set Up an AWS Account and Create a User
Step 1.1: Sign up for AWS

When you sign up for Amazon Web Services (AWS), your AWS account is automatically
signed up for all services in AWS, including Amazon Polly. You are charged only for the
services that you use.

With Amazon Polly, you pay only for the resources you use. If you are a new AWS customer,
you can get started with Amazon Polly for free. For more information, see AWS Free Usage
Tier

If you already have an AWS account, skip to the next step. If you don't have an AWS
account, perform the steps in the following procedure to create one.

To create an AWS account


1. Open [Link]
2. Follow the online instructions.

Part of the sign-up procedure involves receiving a phone call and entering a
verification code on the phone keypad.

Note your AWS account ID because you'll need it for the next step.

Step 1.2: Create an IAM User

Services in AWS, such as Amazon Polly, require that you provide credentials when you
access them so that the service can determine whether you have permissions to access the
resources owned by that service. The console requires your password. You can create access
keys for your AWS account to access the AWS CLI or API. However, we don't recommend
that you access AWS using the credentials for your AWS account. Instead, we recommend
that you use AWS Identity and Access Management (IAM). Create an IAM user, add the user
to an IAM group with administrative permissions, and then grant administrative permissions
to the IAM user that you created. You can then access AWS using a special URL and that
IAM user's credentials.

If you signed up for AWS, but you haven't created an IAM user for yourself, you can create
one using the IAM console.

LDRP-ITR 68
Cloud Computing 1721BEIT30002

The exercises in this guide assume that you have a user (adminuser) with administrator
privileges. Follow the procedure to create adminuser in your account.

To create an administrator user and sign in to the console


1. Create an administrator user called adminuser in your AWS account. For instructions,
see Creating Your First IAM User and Administrators Group in the IAM User Guide.
2. A user can sign in to the AWS Management Console using a special URL. For more
information, How Users Sign In to Your Account in the IAM User Guide.

Step 2: Run Sample Application On AWS

Step 1: Create a New Application

Now that you’re in the AWS Elastic Beanstalk dashboard, click on Create New Application
to create and configure your application.

Step 2: Configure your Application

Fill out the Application name with php-sample-app and Description field with Sample PHP
App. Click Next to continue.

LDRP-ITR 69
Cloud Computing 1721BEIT30002

Step 3: Configure your Environment

a. For this tutorial, we will be creating a web server environment for our sample PHP
application. Click on Create web server.

b. Click on Select a platform next to Predefined configuration, then select PHP. Next, click
on the drop-down menu next to Environment type, then select Single instance.

Note: an “instance” is referring to Amazon’s Elastic Compute Cloud (EC2) compute


service. A “single instance” means we will be using one virtual server to deploy our
application into.

We will discuss how to scale and load balance your application in a separate tutorial. Click
Next to continue.

c. Under Source, select the Upload your own option, then click Choose File to select the
sample [Link] file we downloaded earlier.

LDRP-ITR 70
Cloud Computing 1721BEIT30002

Before moving on, double click on the [Link] file that you downloaded to your local
machine to view the contents within. This will help you better understand what your zip file
should look like when working with your own PHP application. PHP does not enforce a strict
file structure for applications; flat file structure will work fine.

Click Next to continue.

d. Fill in the values for Environment name with phpSampleApp-env. For Environment URL,
fill in a globally unique value since this will be your public-facing URL; we will use
phpsampleapp-env in this tutorial, so please choose something different from this one.
Lastly, fill Description with Sample PHP App. For the Environment URL, make sure to
click Check availability to make sure that the URL is not taken. Click Next to continue.

e. Check the box next to Create this environment inside a VPC. Click Next to continue.

f. On the Configuration Details step, you can set configuration options for the instances in
your stack. For this tutorial, you don't need to change anything. Click Next.

On the Environment Tags step, you can tag all the resources in your stack. For this tutorial,
you don't need to tag any resources but can if you would like. Click Next.

LDRP-ITR 71
Cloud Computing 1721BEIT30002

On the VPC Configuration step, select the first AZ listed by checking the box under the
EC2 column. Your list of AZs may look different than the one shown as Regions can have
different number of AZs. Click Next.

g. At the Permissions step, leave everything to their default values, then click Next to
continue. Then review your environment configuration on the next screen and then
click Launch to deploy your application.

Note: Launching your application may take a few minutes.

Step 4: Accessing your Elastic Beanstalk Application

a. Go back to the main Elastic Beanstalk dashboard page by clicking on Elastic Beanstalk.
When your application successfully launched, your application’s environment,
phpSampleApp-env, will show up as a green box. Click on phpSample-App-env, which is
the green box.

b. At the top of the page, you should see a URL field, with a value that contains the
Environment URL you specified in step 3 part d. Click on this URL field, and you should
see a Congratulations page.

LDRP-ITR 72
Cloud Computing 1721BEIT30002

Congratulations! You have successfully launched a sample PHP application using AWS
Elastic Beanstalk.

LDRP-ITR 73
Cloud Computing 1721BEIT30002

Practical-10
Aim: Creating an Application in [Link] using Apex programming
Language.
Salesforce Apps

The primary function of a Salesforce app is to manage customer data. Salesforce apps
provide a simple UI to access customer records stored in objects (tables). Apps also help in
establishing relationship between objects by linking fields.

Apps contain a set of related tabs and objects which are visible to the end user. The below
screenshot shows, how the StudentForce app looks like.

The highlighted portion in the top right corner of the screenshot displays the app name:
StudentForce. The text highlighted next to the profile pic is my username: Vardhan NS.

Before you create an object and enter records, you need to set up the skeleton of the app. You
can follow the below instructions to set up the app.
Steps To Setup The App
1. Click on Setup button next to app name in top right corner.
2. In the bar which is on the left side, go to Build → select Create → select Apps from
the drop down menu.

LDRP-ITR 74
Cloud Computing 1721BEIT30002

3. Click on New as shown in the below screenshot.

4. Choose Custom App.


5. Enter the App Label. StudentForce is the label of my app. Click on Next.

6. Choose a profile picture for your app. Click Next.


7. Choose the tabs you deem necessary. Click Next.
8. Select the different profiles you want the app to be assigned to. Click Save.

LDRP-ITR 75
Cloud Computing 1721BEIT30002

In steps 7 and 8, you were asked to choose the relevant tabs and profiles. Tabs and profiles
are an integral part of Salesforce Apps because they help you to manage objects and records
in Salesforce.

In this salesforce tutorial, I will give you a detailed explanation of Tabs, Profiles and then
show you how to create objects and add records to it.

Creating an Application in [Link]


If you're new to custom apps, we recommend using Lightning Platform quick start to create
an app. With this tool, you can generate a basic working app in just one step.

If you’ve already created the objects, tabs, and fields you need for your app, follow these
steps. With this option, you create an app label and logo, add items to the app, and assign the
app to profiles.

1. From Setup, enter Apps in the Quick Find box, then select Apps.
2. Click New.
3. If the Salesforce console is available, select whether you want to define a custom
app or a Salesforce console.
4. Give the app a name and description. An app name can have a maximum of
40 characters, including spaces.
5. Optionally, brand your app by giving it a custom logo.
6. Select which items to include in the app.
7. Optionally, set the default landing tab for your new app using the Default Landing
Tab drop-down menu below the list of selected tabs. This determines the first tab a
user sees when logging into this app.
8. Choose which profiles the app will be visible to.
9. Check the Default box to set the app as that profile’s default app, meaning that
new users with the profile see this app the first time they log in. Profiles with limits
are excluded from this list.
10. Click Save.

Basic tests

Here is an example of poorly written code that only handles one record:

?
1 trigger accountTestTrggr on Account (before insert, before update) {
2
3 //This only handles the first record in the [Link] collection
4 //But if more than one Account initiated this trigger, those additional records

LDRP-ITR 76
Cloud Computing 1721BEIT30002

5 //will not be processed


6 Account acct = [Link][0];
7 List<Contact> contacts = [select id, salutation, firstname, lastname, email
8 from Contact where accountId = :[Link]];
9
10}

The issue is that only one Account record is handled because the code explicitly accesses
only the first record in the [Link] collection by using the syntax [Link][0]. Instead, the
trigger should properly handle the entire collection of Accounts in the [Link] collection.

Here is a sample of how to handle all incoming records:

?
1 trigger accountTestTrggr on Account (before insert, before update) {
2
3 List<String> accountNames = new List<String>{};
4
5 //Loop through all records in the [Link] collection
6 for(Account a: [Link]){
7 //Concatenate the Name and billingState into the Description field
8 [Link] = [Link] + ':' + [Link]
9 }
10
11}

Notice how this revised version of the code iterates across the entire [Link] collection
with a for loop. Now if this trigger is invoked with a single Account or up to 200 Accounts,
all records are properly processed.

LDRP-ITR 77

You might also like