cloud computing
cloud computing
Assignment No.1 : Install Google App Engine. Create hello world app and other
simple webapplications using python/java.
Theory:
Introduction
Google App Engine is a web application hosting service. By “web application,” we mean an
application or service accessed over the Web, usually with a web browser: storefronts with
shopping carts, social networking sites, multiplayer games, mobile applications, survey applications,
project management, collaboration, publishing, and all the other things we’re discovering are good uses
for the Web. App Engine can serve traditional website content too,such as documents and images,
but the environment is especially designed for real-time dynamic applications. Of course, a web
browser is merely one kind of client: web application infrastructure is well suited to mobile applications,
as well.
In particular, Google App Engine is designed to host applications with many simultaneous users. When
an application can serve many simultaneous users without degrading performance, we say it scales.
Applications written for App Engine scale automatically. Asmore people use the application, App
Engine allocates more resources for the application and manages the use of those resources. The
application itself does not need to know anything about the resources it is using.
Procedure:
Read this guide – how to install Google Plugin for Eclipse. If you install the Google App Engine Java SDK
together with “Google Plugin for Eclipse“, then go to step 2, Otherwise, get the GoogleApp Engine Java
SDK and extract it.
In Eclipse toolbar, click on the Google icon, and select “New Web Application Project…”
Figure – Deselect the “Google Web ToolKit“, and link your GAE Java SDK via the “configureSDK” link.
Click finished, Google Plugin for Eclipse will generate a sample project automatically.
Hello World
Review the generated project directory Nothing special, a standard Java web project structure.
HelloWorld/ src/
...other configuration...war/
...app configuration...lib/
...compiled classes...The extra is this file “appengine-web.xml“, Google App Engine need this to run and
deploy theapplication.
File : appengine-web.xml
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application></application>
<version>1</version>
<system-properties>
</system-properties>
Run it local
Eclipse console :
//...
Copy
In this demonstration, I created an application ID, named “mkyong123”, and put it in appengine-
web.xml.
File : appengine-web.xml
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>mkyong123</application >
<version>1</version>
<system-properties>
</system-properties>
Sign in with your Google account and click on the Deploy button.
– If everything is fine, the hello world web application will be deployed to this URL –
http://mkyong123.appspot.com/
Result:
Thus the simple application was created successfully.
Now you need to create a simple application. We could use the “+”option to have the launcher make us
an application – but instead we will do it by hand to get a better sense ofwhat is going on.
Make a folder for your Google App Engine applications. I am going to make the Folderon my Desktop
called “apps” – the path to this folder is:
And then make a sub-•‐folder in within apps called “ae-•01-•trivial” – the path to this folder would be:
Using a text editor such as JEdit (www.jedit.org), create a file called app.yaml in theae-•01-•trivial folder
with the following contents:
application: ae-01-trivialversion: 1
script: index.py
Note: Please do not copy and paste these lines into your text editor– you might end up with strange
characters – simply type them into your editor.
Then create a file in the ae-•01-•trivial folder called index.py with three lines in it:
Then start the GoogleAppEngineLauncher program that can be found under Applications. Use the File -
•> Add Existing Application command and navigate into the apps directory and select the ae-•01-•trivial
folder. Once you have added the application, select it so that youcancontrolthe application
usingthelauncher.
Once youhave selected yourapplicationand press Run. Aftera few moments your application willstart and the
launcher willshow a little green icon next to your application. Then press Browse to open a browser
pointing at your application which is running at http://localhost:8080/
Paste http://localhost:8080 into your browser and you should see yourapplication as follows:
You can watch the internal log of the actions that the webserver is performing when you are interacting
with your application in the browser. Select your application in the Launcher and press the Logs button to
bring up a log window:
Each time you press Refreshing yourbrowser–you can see it retrieving the output with a GET request.
With two files to edit, there are two general categories of errors that you mayencounter. If youmake a
mistake onthe app.yamlfile, the App Engine willnotstart and your launcher will show a yellow icon near your
application:
To get more detail on what is going wrong, take a look at the log for the application:
In this instance – the mistake is mis-‐‐indenting the last line in the app.yaml (line 8).
If you make a syntax error in the index.pyfile, a Python trace back error will appear inyour browser.
The error you need to see is likely to be the last few lines of the output – in thiscase I made a Python syntax
error on line one of our one-•‐line application.
Reference: http://en.wikipedia.org/wiki/Stack_trace
When you make a mistake in the app.yaml file – you must the fix the mistakeand attempt to start the
application again.
If you make a mistake in a file like index.py, you can simply fix the file andpress refresh in your browser –
there is no need to restart the server.
To shut down the server, use the Launcher, select your application and press theStop button.
Result:
Thus the GAE web applications were created.
CloudSim is written in Java. The knowledge you need to use CloudSim is basic Java programmingand
some basics about cloud computing. Knowledge of programming IDEs such as Eclipse or NetBeans is also
helpful. It is a library and, hence, CloudSim does not have to be installed. Normally, you can unpack the
downloaded package in any directory, add it to the Java classpath andit is ready to be used. Please verify
whether Java is available on your system.
Open Eclipse
The first step is to initialise the CloudSim package by initialising the CloudSim library, asfollows
Data centres are the resource providers in CloudSim; hence, creation of data centres is a second step. To
create Datacenter, you need the Datacenter Characteristics object that stores the properties of a data
centre such asarchitecture, OS, list of machines, allocation policy that covers the time or space shared,
the time zone and its price:
The fourth step is to create one virtual machine unique ID of the VM, userIdID of the VM’s owner, mips,
number Of Pes amount of CPUs, amount of RAM,amount of bandwidth, amount of storage, virtual
machine monitor, and cloudletScheduler policy for cloudlets:
Create a cloudlet with length, file size, output size, and utilisation model:
Submit the cloudlet list to the broker: broker.submitCloudletList(cloudletList) Sample Output from the
Existing Example:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>null
: Broker: Cloud Resource List received with 1 resource(s) 0.0: Broker: Trying to Create VM #0in
Datacenter_0
: Broker: VM #0 has been created in Datacenter #2, Host #00.1: Broker: Sending cloudlet 0 to VM #0
VM #0
CloudInformationService: Notify all CloudSim entities forshutting down. Datacenter_0 is shutting down...
Debt
3 35.6
CloudSimExample1 finished!
RESULT:
The simulation was successfully executed.
Steps:
You can copy few (or more) lines with copy & paste mechanism.
For this you need to share clipboard between host OS and guest OS, installingGuest Addition on both the
virtual machines (probably setting bidirectional and restarting them). You copy from guest OS in the
clipboard that is shared with the host OS.
Then you paste from the host OS to the second guest OS.
You can enable drag and drop too with the same method (Click on the machine, settings, general,
advanced, drag and drop: set to bidirectional )
You can have common Shared Folders on both virtual machines anduse one of the directory shared as
buffer to copy.
Installing Guest Additions you have the possibility to set Shared Folders too.As you put a file in a shared
folder from host OS or from guest OS, is immediately visible to the other. (Keep in mind that can arise
some problemsfor date/time of the files when there are different clock settings on the different virtual
machines).
If you use the same folder shared on more machines you can exchange filesdirectly copying them in this
folder.
You can use usual method to copy files between 2 different computer with client-server application.
(e.g. scp with sshd active for linux, winscp... you can get some info about SSH servers e.g. here)
You need an active server (sshd) on the receiving machine and a client onthe sending machine. Of course
you need to have the authorization setted(via password or, better, via an automatic authentication
method).
Note: many Linux/Ubuntu distribution install sshd by default: you can see ifit is running with pgrep sshd
from a shell. You can install with sudo apt-get install openssh-server.
You can mount part of the file system of a virtual machine via NFS orSSHFS on the other, or you can
share file and directory with Samba. You may find interesting the article Sharing files between guest and
host without VirtualBox shared folders with detailed step by step instructions.
You should remember that you are dialling with a little network of machineswith different operative
systems, and in particular:
Each virtual machine has its own operative system running on and actsas a physical machine.
Each virtual machine is an instance of a program owned by an user in the hosting operative system and
should undergo the restrictions of the user in thehosting OS.
E.g Let we say that Hastur and Meow are users of the hosting machine, but they did not allow each
other to see their directories (no read/write/execute authorization). When each of them run a virtual
machine, for the hosting OS those virtual machine are two normal programs owned by Hastur and
Meow and cannot see the private directory of the other user. This is a restriction due to the hosting OS.
It's easy to over came it: it's enough to give authorization to read/write/execute to a directory or to
chose a different directory in which bothusers can read/write/execute.
I mean I suggest you to enable Drag & drop to be cosy with the Windowsmachines and the Shared
folders or to be cosy with Linux.
When you will need to be fast with Linux you will feel the need of ssh-keygen and
to Generate once SSH Keys to copy files on/from a remote machine without writingpassword anymore.
In this way it functions bash auto-completion remotely too!
PROCEDURE:
Steps:
Click on infrastructure
Click on + symbol to add new host, name the host then click on create.
On that select the target host to migrate then click on migrate.Before migrationHost:SACET
Host:one-sandbox
After Migration:
Host:one-sandbox
Host:SACET
APPLICATIONS:
Result:
Thus the file transfer between VM was successfully completed…..
Steps:
OpenStack is primarily used for deploying an infrastructure as a service (IaaS) solution like Amazon Web
Service (AWS). In other words, you can make your own AWS by using OpenStack. If you want to try out
OpenStack, TryStack is theeasiest and free way to do it.
In order to try OpenStack in TryStack, you must register yourself by joining TryStack Facebook Group.
The acceptance of group needs a couple days because it’s approved manually. After you have been
accepted in the TryStack Group, youcan log in TryStack.
TryStack.org Homepage
I assume that you already join to the Facebook Group and login to the dashboard. After you log in to the
TryStack, you will see the Compute Dashboard like:
In this post, I will show you how to run an OpenStack instance. The instance willbe accessible through
the internet (have a public IP address). The final topology will like:
Network topology
As you see from the image above, the instance will be connected to a localnetwork and the local
network will be connected to internet.
Network? Yes, the network in here is our own local network. So, your instanceswill be not mixed up with
the others. You can imagine this as your own LAN (Local Area Network) in the cloud.
In Network tab, fill Network Name for example internal and then click Next.
In Subnet tab,
Fill Network Address with appropriate CIDR, for example 192.168.1.0/24. Use private network CIDR
block as the best practice.
Click Next.
In Subnet Details tab, fill DNS Name Servers with 8.8.8.8 (GoogleDNS) and then click Create.
Now, we will create an instance. The instance is a virtual machine in the cloud,like AWS EC2. You need
the instance to connect to the network that we just created in the previous step.
In Details tab,
Select Image Name with Ubuntu 14.04 amd64 (243.7 MB) if you want install Ubuntu
Click [+] button of Key Pair to import key pair. This key pair is a public andprivate key that we will use to
connect to the instance from our machine.
Fill Key Pair Name with your machine name (for example Edward-Key).
~/.ssh/id_rsa.pub). See description in Import Key Pair dialog box formore information. If you are using
Windows, you can use Puttygen to generate key pair.
In Selected Networks, select network that have been created in Step 1, for example internal.
Click Launch.
If you want to create multiple instances, you can repeat step 1-5. I created onemore instance with
instance name Ubuntu 2.
I guess you already know what router is. In the step 1, we created our network, but it is isolated. It
doesn’t connect to the internet. To make our network has an internet connection, we need a router that
running as the gateway to the internet.
Fill Router Name for example router1 and then click Create router.
Click on your router name link, for example router1, Router Details page.
Then OK.
Select Subnet with the network that you have been created in Step 1.
Go to Network > Network Topology. You will see the network topology. In theexample, there are two
network, i.e. external and internal, those are bridged by a router. There are
Floating IP address is public IP address. It makes your instance is accessible fromthe internet. When you
launch your instance, the instance will have a private network IP, but no public IP. In OpenStack, the
public Ips is collected in a pool and managed by admin (in our case is TryStack). You need to request a
public (floating) IP address to be assigned to your instance.
Click Associate.
Now you will get a public IP, e.g. 8.21.28.120, for your instance.
OpenStack has a feature like a firewall. It can whitelist/blacklist your in/outconnection. It is called
Security Group.
Go to Compute > Access & Security and then open Security Groups tab.
Click Add Rule, choose ALL ICMP rule to enable ping into your instance, and then click
Add.
Click Add Rule, choose HTTP rule to open HTTP port (port 80), and then click Add.
Click Add Rule, choose SSH rule to open SSH port (port 22), and then click Add.
Now, you can SSH your instances to the floating IP address that you got in thestep 4. If you are using
Ubuntu image, the SSH user will be ubuntu.
Result:
Thus the openstack demo worked successfully.
Introduction
Salesforce is the primary enterprise offering within the Salesforce platform. It provides companies with
an interface for case management andtask management, and a system for automatically routing and
escalating important events. The Salesforce customer portal provides customers the ability to track their
own cases, includes a social networking plug-in thatenables the user to join the conversation about their
company on social
Lightning Platform
Lightning Platform (also known as Force.com) is a platform as a service (PaaS) that allows developers
to create add-on applications that integrateinto the main Salesforce.com application. These third-
party applications are hosted on Salesforce.com's infrastructure. Force.com applications are built using
declarative tools, backed by Lightning and Apex (a proprietary Java- like programming language for
Force.com) and Lightning and Visual force(a framework that includes an XML syntax typically used to
generate HTML). The Force.com platform typically receives three complete releases a year. As the
platform is provided as a service to its developers, every single development instance also receives all
these updates.
Community Cloud
Community Cloud provides Salesforce customers the ability to create online web properties for external
collaboration, customer service, channel sales, and other custom portals I their instance of Salesforce.
Tightly integrated to Sales Cloud, Service Cloud, and App Cloud, Community Cloud can bequickly
customized to provide a wide variety of web properties Salesforce Sales Cloud Salesforce Sales Cloud is a
customer relationship management (CRM) platform designed to support sales, marketing and customer
support in both business-to-business (B2B) and business-to-customer (B2C) contexts. Sales Cloud is a
fully customizable product that brings all the customer information together in an integrated platform
that incorporates marketing, lead generation, sales, customer service and business analyticsand
provides access to thousands of applications through the AppExchange. The platform is provided as
Software as a Service (SaaS) for browser-based access; a mobile app is also available. A realtime
social feed for collaboration allows users to share information or ask questions of the user
community.Salesforce.com offers five versions of Sales Cloud on a per-user,per month basis, from
lowest to highest: Group, Professional, Enterprise, Unlimited and Performance. The company offers
three levels of support contracts: Standard Success Plan, Premier Success Plan and Premier+ Success
Plan.
Create custom apps to give your Salesforce Classic users’ access to everything they need all in one place.
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.
From Setup, enter Apps in the Quick Find box, then select Apps.
Click New.
If the Salesforce console is available, select whether you want to define a custom app or a Salesforce
console.
1. 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 logginginto this app.
2. 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 timethey log in. Profiles with limits
are excluded
1. Click Save
What is the difference between custom application and console application in sales force? A custom
application is a collection of tabs,objects etc that function together to solve a particular problem.
A console application uses a specific Salesforce UI - the console. Console applications are intended to
enhance productivity by allowing everything to be done from a single, tabbed, screen.
Result:
Thus, We have designed and developed custom application using salesforce cloud.