Overview of Cloud Computing Tools
Overview of Cloud Computing Tools
Practical – 1
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.
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
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.
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.
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
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.
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
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.
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.
LDRP-ITR 7
Cloud Computing 1721BEIT30002
Architecture:
Application:
Amazon Web services are widely used for various computing purposes like:
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.
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:
Architecture:
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
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).
4. Click Next.
5. Select your guest operating system (OS), then click Next. You can install the
OS using:
LDRP-ITR 14
Cloud Computing 1721BEIT30002
6. Click Next.
7. Enter your Product Key.
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:
LDRP-ITR 16
Cloud Computing 1721BEIT30002
LDRP-ITR 17
Cloud Computing 1721BEIT30002
PRACTICAL - 3
AIM:- Installation and Configuration of Hadoop.
Command: cd Downloads
Command: vi ./.bashrc
ExportHADOOP_HOME=/home/luck/hadoop export
PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbi
n
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.
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
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
• 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.
LDRP-ITR 22
Cloud Computing 1721BEIT30002
LDRP-ITR 23
Cloud Computing 1721BEIT30002
LDRP-ITR 24
Cloud Computing 1721BEIT30002
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
• 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
LDRP-ITR 28
Cloud Computing 1721BEIT30002
PRACTICAL 4
AIM: Running a sample application on Alchemi Grid and analysing it.
Configure
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.
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
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.
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.
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.
LDRP-ITR 32
Cloud Computing 1721BEIT30002
With 1 executor
With 2 executor
With 3 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.
LDRP-ITR 34
Cloud Computing 1721BEIT30002
LDRP-ITR 35
Cloud Computing 1721BEIT30002
LDRP-ITR 36
Cloud Computing 1721BEIT30002
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
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.
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 -
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 -
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
[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 –
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
x .project
Options:
lit CompressthecontentsoftheJARfile
Add directory entries
Next >
LDRP-ITR 51
Cloud Computing 1721BEIT30002
{AR FileSpecification
Define whichresourcesshouldbeexported intotheJAR.
Options:
@ Compress
thecontentsoftheJARfile @ Add
directory entries
@ Overwrite existingfileswithout warning
BlackNext jet
LDRP-ITR 52
Cloud Computing 1721BEIT30002
LDRP-ITR 53
Cloud Computing 1721BEIT30002
LDRP-ITR 50
Cloud Computing 1721BEIT30002
Practical-6
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:
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.
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:
LDRP-ITR 51
Cloud Computing 1721BEIT30002
This article provides a beginners guide to cloud simulation toolkit and helps then to get an
insight into the role of its various components.
All these features would help in accelerating the development, testing and deployment of
potential resource/application provisioning policies/algorithms for Cloud Computing based
systems.
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.
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.
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
1. Introduction
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
LDRP-ITR 57
Cloud Computing 1721BEIT30002
At this point you are ready to begin the installation. Click “Next” to start the
installation or “Back” to change your installation folder.
LDRP-ITR 58
Cloud Computing 1721BEIT30002
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.
Note
LDRP-ITR 60
Cloud Computing 1721BEIT30002
Finalize installation¶
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>.
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:
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:
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:
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
{
"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):
LDRP-ITR 63
Cloud Computing 1721BEIT30002
HINTS:
* To plot HTML graphics with this data, run:
rally task report 6fd9a19f-5cf8-4f76-ab72-2e34bb1d4996 --out [Link]
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 |
+ + + +
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:
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.
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.
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.
Now that you’re in the AWS Elastic Beanstalk dashboard, click on Create New Application
to create and 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
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.
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.
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.
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
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.
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
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.
?
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