0% found this document useful (0 votes)
10 views

Cloud Computing Lab Manual

The document outlines a list of experiments related to cloud computing and development tools, including Google Drive, Justcloud, Cloud9, and Codenvy. Each experiment includes objectives, requirements, and theoretical explanations of the tools and processes involved. The document serves as a guide for users to understand and implement various cloud-based applications and services.

Uploaded by

thisismyrealmail
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Cloud Computing Lab Manual

The document outlines a list of experiments related to cloud computing and development tools, including Google Drive, Justcloud, Cloud9, and Codenvy. Each experiment includes objectives, requirements, and theoretical explanations of the tools and processes involved. The document serves as a guide for users to understand and implement various cloud-based applications and services.

Uploaded by

thisismyrealmail
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

List of Experiments

S.No. Name of Experiment Date of Date of Signature


Experimen Submission
t
1. Working of Goggle Drive to
make spreadsheet and notes.
2. Installation and Configuration
of Justcloud.
3. Working in Cloud9 to
demonstrate different language.
4. Working in Codenvy to
demonstrate Provisioning and
Scaling of a website.
5. Installation and Configuration
of Hadoop/Eucalyptus
6. Working and installation of
Google App Engine
7. Working and installation of
Microsoft Azure
8. Working with Mangrasoft
Aneka Software
Experiment No. 1
Objective: Working of Goggle Drive to make spreadsheet and notes.

Requirement: Google account, Internet Connection.

THEORY:

Google Docs is a free cloud-based suite of tools for creating documents, spreadsheets, presentations, and
more. This tutorial will cover the Spreadsheets application in Google Docs, in addition to showing you how
to access and store your Docs from Google Drive.

Google Docs, Sheets, and Slides are productivity apps that let you create different kinds of online documents,
work on them in real time with other people, and store them in your Google Drive online — all for free. You
can access the documents, spreadsheets, and presentations you create from any computer, anywhere in the
world. (There's even some work you can do without an Internet connection!) This guide will give you a quick
overview of the many things that you can do with Google Docs, Sheets, and Slides.

Google Docs

Google Docs is an online word processor that lets you create and format text documents and collaborate with
other people in real time. Here's what you can do with Google Docs:

● Upload a Word document and convert it to a Google document


● Add flair and formatting to your documents by adjusting margins, spacing, fonts, and colors — all that
fun stuff
● Invite other people to collaborate on a document with you, giving them edit, comment or view access
● Collaborate online in real time and chat with other collaborators — right from inside the document
● View your document's revision history and roll back to any previous version
● Download a Google document to your desktop as a Word, OpenOffice, RTF, PDF, HTML or zip file
● Translate a document to a different language
● Email your documents to other people as attachments

Google Sheets

Google Sheets is an online spreadsheet app that lets you create and format spreadsheets and simultaneously
work with other people. Here's what you can do with Google Sheets:

● Import and convert Excel, .csv, .txt and .ods formatted data to a Google spreadsheet
● Export Excel, .csv, .txt and .ods formatted data, as well as PDF and HTML files
● Use formula editing to perform calculations on your data, and use formatting make it look the way
you'd like
● Chat in real time with others who are editing your spreadsheet
● Create charts with your data
● Embed a spreadsheet — or individual sheets of your spreadsheet — on your blog or website

Google Slides

Google Slides is an online presentations app that allows you to show off your work in a visual way. Here's
what you can do with Google Slides:

● Create and edit presentations


● Edit a presentation with friends or coworkers, and share it with others effortlessly
● Import .pptx and .pps files and convert them to Google presentations
● Download your presentations as a PDF, a PPT, or a .txt file
● Insert images and videos into your presentation
● Publish and embed your presentations in a website

Create, name or delete a Google document


Create a Google document

To create a new document, go to your Drive, click the Create button, and select Document.

A window with a new Google document will open, and you'll be able to edit the document, share it with other
people, and collaborate on it in real-time. Google Docs saves your document automatically, and you can
always access it from your Drive.

Name a document

When you create a new document, Google Docs will name it Untitled by default.

To choose a name other than Untitled, click the File menu, and select Rename. From here you can choose
and confirm your document's title. You can also edit the name by clicking the title displayed at the top of the
page, and making your changes in the dialog that appears. Titles can be up to 255 characters long.
Delete a document

Delete an item that you own from your Drive

1. From your Drive, select the item(s) you want to delete.


2. From the More menu, choose Move to trash.
3. If you're deleting a shared document that you own, you'll see an option to change the ownership of the
document.
4. The item will be moved to the Trash.
5. To purge individual items from Trash, select them and choose Delete forever. To purge all your items
click Empty Trash in the upper left.

Create and save a document


There are different ways of getting started using Google documents: you can create a new online document,
you can upload an existing one, or you can use a template from our templates gallery.

To create a new document, go to your Drive, click the red Create button, and select Document from the
drop-down menu.

As soon as you name the document or start typing, Google Docs will automatically save your work every few
seconds. At the top of the document, you'll see text that indicates when your document was last saved. You
can access your document at any time by opening your Drive at http://drive.google.com.

To save a copy of a document to your computer, you can download it. In your document, go to the File menu
and point your mouse to the Download as option. Select one of the following file types: HTML (zipped),
RTF, Word, Open Office, PDF, and plain text. Your document will download to your computer.

Upload a document
You can upload existing documents to Google documents at any time. When you're uploading, you can either
keep your document in its original file type or convert it to Google Docs format. Converting your document to
Google Docs format allows you to edit and collaborate online from any computer.

Note: When uploaded, images within a document are left as images (rather than being converted to text by
Optical Character Recognition technology).

You can upload the following file types:

● .html
● .txt
● .odt
● .rtf
● .doc and .docx
● .pdf
Follow these steps to upload a document:

1. Click the Upload icon in the top left of your Documents List.
2. Click Files..., and select the document you'd like to upload.
3. Click Open.
4. Check the box next to 'Convert documents, presentations, spreadsheets, and drawings to the
corresponding Google Docs format' if you'd like to be able to edit and collaborate on the document
online. Uploaded document files that are converted to Google documents format can't be larger than 1
MB.
5. Click Start upload. The uploaded file will appear in your Documents List.

Experiment No. 2
Objective: Installation and Configuration of Justcloud.

Requirement: Justcloud exe File

THEORY:

Professional Cloud Storage from JustCloud is Simple, Fast and Secure.


Just Cloud will automatically backup the documents, photos, music and videos
stored on your computer, to the cloud so you are never without files again.

Installation :

1. Download Software this link


http://www.justcloud.com/download/
2. By following these steps you will download and install the JustCloud software application on this
computer. This software will automatically start backing up files from your computer and saving them
securely in an online cloud user account. Your free account gives you 15MB storage space or 50 files
for 14 days. Once installed a sync folder will be added to your desktop for you to easily drag and drop
files you wish to backup.

Experiment No. 3

Objective: Working in Cloud9 to demonstrate different language.

Requirement: Login account in Cloud9

THEORY:

Cloud9 IDE is an online development environment for JavaScript and Node.js applications as well as HTML,
CSS, PHP, Java, Ruby and 23 other languages. Anyone looking for a modern and secure IDE. With your code
online and accessible from anywhere, you can work more efficiently than before.

Creating a new account

Creating an account for the Cloud 9 IDE can be done in a few simple steps:
1. First, sign up for an account on the Cloud9 homepage, by filling in your desired username and email
address and pressing the Sign me up button:

You will then see a message indicating that we have sent you an email to the address you provided with
activation instructions:
2. Check your email now. You will receive an email from us with a link to activate the account. Click on the
link. You will now be asked to set a password for your new Cloud9 account:

3. Click on Activate.
Congratulations! You are now the proud owner of a Cloud9 account. Now, go ahead and create your first
project.

Create a new project


The first step for creating a new project is to click on the "+" next to My Projects in the Projects tab:

At this point, you will encounter two choices: Create a new project and Clone from url. We will explore
both paths.

After clicking on Create a new project, you will be presented with the screen shown below:

Enter a project name. You will now have three choices for the type of project you wish to create:

● Git project: will allow you to run git commands from the console and push your changes to Github
● Mercurial: will allow you to run hg commands form the console and push your changes to Bitbucket.
● FTP: will allow you to upload your files directly to an FTP server you have access to.
Make a choice for the type of project and press Create. That is all! You will now see your new project in the
dashboard:

Now, just click Start Editing to get started!

Let's start with a simple "Hello Cloud9" example.

1. From your dashboard, click 'create new workspace' and then select 'create new workspace'.
2. Enter a catchy workspace name, visibility: open (proud to share your creations), hosting: hosted and
choose a 'custom' workspace type. Click 'create'.
3. The workspace is being prepared and when done, select the project in the dashboard and click 'start
editing'.
4. The workspace is opened, right click the project tree and select 'new file'. Name it 'helloCloud9.cc'.
5. Open the file by double clicking it in the file tree. Copy / paste the following code in the file:

int main() {

cout << "Hello world\n";

6. Compile the code using:

g++ helloCloud9.cc -o helloCloud9

7. Run the file by typing:

./helloWorld

Experiment No. 4
Objective: Working in Codenvy to demonstrate Provisioning and Scaling of a website.

Requirement: Login account in Codenvy, Cloud Bees.

THEORY:
PaaS Overview

One of the advantages of coding in the cloud with Codenvy is deploying to a PaaS of choice once the app has
been built, run and tested in Codenvy. Users do not need to install any plugins or administer their workspaces
in any way. Codenvy talks to API of most popular PaaS providers. Currently, the following PaaS are
supported:

● AppFog
● CloudBees
● AWS Elastic Beanstalk
● Google App Engine
● Heroku
● Openshift
● ManyMo (to run Android apps)

The mechanism of deploying, updating and configuring apps slightly differs depending on the chosen PaaS
provider. To be able to deploy to a PaaS authentication is required (Login or Switch Account in PaaS
menus). Codenvy will handle connection to a PaaS account, retrieving information on existing apps and
providing tools to manage them.

Some providers will require deploy of SSH keys and git operations to update the apps (Heroku, OpenShift),
while others (GAE, AWS) make it possible to update apps in one click.

When deploying an application, it is created in Codenvy and then deployed to a PaaS. OpenShift is an
exception from this rule – the application is created there and then pulled to a Codenvy workspace.
It is possible to import existing apps deployed to some PaaS (Heroku) or overwrite existing applications
(Google App Engine).

You can find detailed how-to guides on how to get started with PaaS in Codenvy in a PaaS menu on the left
sidebar. Check out PaaS support chart:

Cloud SDK
PaaS Languages Features
Run
Application management
Java Yes
EC2 and S3 console

Java, PHP, Python, Ruby Manage applications No

Yes - Micro
Java, Ruby Manage applications
Cloud Foundry

Java Manage applications No


Java
Python Application management, Logs, Indexes, Pagespeed,
Yes
PHP (app IDs need to be Queues, DoS, Resource Limits, Crons, Backends
whitelisted at GAE)
Ruby Manage applications No

Java, PHP, Ruby,


Manage applications No
Python, Node.js

Java, Ruby Manage applications

Registration and Login


There are several registration options available in Codenvy:

● The fastest and the easiest way is to register using your Google or GitHub account. Click Sign in with
Google or GitHub and follow the registration process. Your Codenvy workspace name will be
identical to your Google or GitHub ID. Note that you will need a verified email associated with your
GitHub account.

● If you do not have accounts with Gmail or GitHub or just want to choose a domain name by yourself,
enter your email and the desired domain name, and press Go.
Getting Started Using Codenvy Factories
You can find Codenvy Factorybuttons at his site, Сodenvy.com or anywhere on the net. If you click on a
Factory button, we will create a temporary workspace for you with the project of your choice. After a fruitful
coding session in a temporary workspace you can create a permanent account with Codenvy by pressing
Create Account button in the top right corner of a temporary workspace.

Create a Project from Scratch


Once logged in to Codenvy, the Welcome Screen and Get Started Wizard will help you make your first
steps. If this is your first visit to Codenvy and you do not have any created projects, you will see the below
window. Creation of a new project will barely take 1-2 minutes, and the wizard will guide your through each
step (entering project name, choosing a technology and PaaS).

You can also create a new project from the Welcome Screen - Create a New Project From Scratch
A Smart Wizard will guide you through the process of creating your project. You need to choose
a Technology and the supported PaaS in case you want to deploy your application. Each technology is tied up
with the supported PaaS, thus, making your choice error-free.

● To complete a project creation procedure, choose a Template (there are several templates to choose
from, depending on the chosen technology and PaaS).
The next stages depend on whether or not you want to deploy your application to PaaS right way, and what
PaaS you have chosen.

Please, have a quick look at the video demonstrating a new user friendly Create a Project Wizard.

Import GitHub Projects


Importing a project from GitHub will create a new project and by clone the content of a GitHub repository.
You will find a GitHub import option on the Welcome Screen

● Click OK to go to a GitHub authorization page.

● authorize the app

● Choose the repository you want to import (check Git Read-Only if necessary) and click Finish
Device Support
Codenvy currently supports all desktop and laptop devices. We currently provide touch device support
through the use of the Puffin Web Browser which virtualizes double clicks and right clicks. We have not yet
created a native touch UI design.

Browser Support
Browser Version
Chrome
21+

Firefox
15+

Safari
5.1+

Puffin Browser
2.4+

Web Server Support


Versi
Web Server
on
Apache
Tomcat
7.0.39

Build Environment Support


Build Versi
System on

3.0.4
Version Control System Support
Version Control Versi
System on
1.6

Git Hosting Provider Support


Tutorial
Provider Homepage
Link
Assembla https://www.assembla.com/ Assembla
Beanstalk http://beanstalkapp.com/ Beanstalk

BitBucket https://bitbucket.org/ BitBucket


CloudForge http://www.cloudforge.com/ CloudForge
http://
Codebase Codebase
www.codebasehq.com/
Codeplane https://codeplane.com/ Codeplane
http://
Codespaces Codespaces
www.codespaces.com/
Deveo https://deveo.com/ Deveo
GitEnterpris http:// GitEnterpris
e www.gitenterprise.com/ e
GitHub https://github.com/ GitHub
GitLab http://gitlab.com/ GitLab
Gitorious https://gitorious.org/ Gitorious
PHPCloud http://www.phpcloud.com/ PHPCloud
PikaCode https://pikacode.com/ PikaCode
Planio https://plan.io/ Planio
ProjectLock ProjectLock
http://projectlocker.com/
er er
Unfuddle https://unfuddle.com/ Unfuddle

Language Support
Synta Deb
Code Code Error Cloud
Languag x ug
Version outli assista detecti local
e colori mod
ne nt on run
ng e
Previe
2.0 Yes No Yes No -----
w
Previe
4.1 Yes Yes Yes Yes -----
w
1.6 (runner and
Yes Yes Yes Yes Yes Yes
autocomplete)
Synta Deb
Code Code Error Cloud
Languag x ug
Version outli assista detecti local
e colori mod
ne nt on run
ng e
JavaScri
pt Standard ECMA-262 Yes Yes Yes Yes No No

5.3 Yes Yes No No Yes No

2.7 (for runner only) Yes No No No Yes No

1.9.2 Yes Yes Yes No No No

1.0 Yes Yes Yes Yes ----- -----

Framework Support
Framewo Versi Acce
Templates
rk on ss
Proje
1) Simple Android application
ct
1) Google App Engine Java project that uses the Search API
Proje 2) Java Web project
2.1
ct 3) A demonstration of accessing Amazon S3 buckets and objects using the
AWS Java SDK
Proje
0.4.12 1) Simple Node.js project
ct
Proje 1) Simple Ruby on Rails application. v1.9
1.8
ct 2) Simple Ruby on Rails application. v1.8 (Heroku compatible)
All
Proje 1) Simple Spring application
versio
ct 2) Spring MVC application with AJAX usage
ns

PaaS Support
Cloud SDK
PaaS Languages Features
Run
Application management
Java Yes
EC2 and S3 console

Java, PHP, Python, Ruby Manage applications No


Cloud SDK
PaaS Languages Features
Run
Yes - Micro
Java, Ruby Manage applications
Cloud Foundry

Java Manage applications No


Java
Python Application management, Logs, Indexes, Pagespeed,
Yes
PHP (app IDs need to be Queues, DoS, Resource Limits, Crons, Backends
whitelisted at GAE)
Ruby Manage applications No

Java, PHP, Ruby,


Manage applications No
Python, Node.js

Java, Ruby Manage applications

URL Format for Workspaces, Projects and Files


Every Codenvy user has a domain, also called a workspace.

https://codenvy.com/ide/[workspace
name]

Each workspace contains projects that also have their urls:

https://codenvy.com/ide/[workspace name]/[project
name]

While projects have their files:

https://codenvy.com/ide/[workspace name]/[project name]/[file


name]

However, these URL are not displayed in a browser’s address bar. In other words, even if you go to

codenvy.com/ide/workspace/project/
file
codenvy.com/ide/workspace/

although the target file will be opened. The same concerns project URL.

Before July 9, 2013, domain names were added as subdomains to codenvy.com, e.g.

https://
johnsmith.codenvy.com

Such an address will be automatically redirected to

https://codenvy.com/ide/
johnsmith

Architecture

Ind
Explanation
ex
The client’s browser loads Codenvy site and makes a request. There are two basic types of client
a
requests: regular (business logic) and meta
b The request is recognized as a regular and load balancer (HAProxy) routes it accordingly
Request is recognized as meta, so Cloud Admin performs some special actions like tenant
c
creating/removing
Ind
Explanation
ex
d While performing meta request Cloud Admin may change the configuration of HAProxy
Business request is routed to the IDE Application dynamically deployed on one of the Application
e
Servers
While performing meta request Cloud Admin may use internal REST request to the Cloud Agent
f located on one of the Application Servers with IDE Application or create/remove AS according to
scalability rules
Some kinds of meta requests, such as Authentication, call Organization DB located on LDAP server
g
and containing information about Users, Workspaces and other business entities
h IDE calls Organization DB
i IDE calls internal services - Builder (for Java apps)
j IDE calls internal services - Testers (Debuggers) (for Java apps)
k IDE uses a Distributed Storage (GlusterFS) via Virtual File System interface
l IDE calls external PaaSes/Storages and VCSes REST API
m Statistics storage retrieves logs from the applications for further analysis
n Request to the Cloud Admin impacts service’s statistical information stored in Hadoop Cluster
o Administrative client manages Cloud Admin
p Manager requests Statistical storage for service metrics through a dedicated Administrative client
q IDE calls internal services - Code Assistants
Experiment No. 5

Objective: Installation and Configuration of Hadoop/Eucalyptus.

Requirement: . Java 1.6, Eclipse Europa 3.3.2, Cygwin.

THEORY:

Hadoop is a powerful framework for automatic parallelization of computing tasks. Unfortunately


programming for it poses certain challenges. It is really hard to understand and debug Hadoop programs. One
way to make it a little easier is to have a simplified version of the Hadoop cluster that runs locally on the
developer's machine. This tutorial describes how to set up such a cluster on a computer running Microsoft
Windows. It also describes how to integrate this cluster with Eclipse, a prime Java development environment.

Prerequisites
Before we begin, make sure the following components are installed on your workstation:

● Java 1.6
● Eclipse Europa 3.3.2

This tutorial has been written for and tested with Hadoop version 0.19.1. If you are using another version,
some things may not work.

Make sure you have exactly the same versions of the software as shown above. Hadoop will not work with
versions of Java earlier than 1.6 and versions of Eclipse later than 3.3.2 due to plug-in API incompatibility.

Installing Cygwin

After installing the prerequisite software, the next step is to install the Cygwin environment. Cygwin is a set
of Unix packages ported to Microsoft Windows. It is needed to run the scripts supplied with Hadoop because
they are all written for the Unix platform.

To install the cygwin environment follow these steps:

1. Download cygwin installer from http://www.cygwin.com.


2. Run the downloaded file. You will see the window shown on the screenshots below.
Cygwin Installer

3. When you see the above screenshot, keep pressing the 'Next' button until you see the package selection
screen shown below. Make sure you select 'openssh'. This package is required for the correct
functioning of the Hadoop cluster and Eclipse plug-in.

4. After you selected these packages press the 'Next' button to complete the installation.
Set Environment Variables
The next step is to set up the PATH environment variable so that Eclipse IDE can access Cygwin commands
here

To set environment variables follow these steps:

1. Find "My Computer" icon either on the desktop or in the start menu, right-click on it and select
Properties item from the menu.
2. When you see the Properties dialog box, click on the Environment Variables button as shown below

3. When Environment Variables dialog shows up, click on the Path variable located in the System
Variables box and then click the Edit button.
4. When Edit dialog appears append the following text to the end of the Variable value field:

;c:\cygwin\bin;c:\cygwin\usr\bin
Note: If you installed cygwin in the non-standard location, correct the above value accordingly.

5. Close all three dialog boxes by pressing OK button of each dialog box.

Setup SSH daemon


Both Hadoop scripts and Eclipse plug-in need password-less SSH to operate. This section describes how to set
it up in the Cygwin environment.

Configure ssh daemon

1. Open the Cygwin command prompt.


2. Execute the following command:

ssh-host-config

3. When asked if privilege separation should be used, answer no.


4. When asked if sshd should be installed as a service, answer yes.
5. When asked about the value of CYGWIN environment variable, enter ntsec.
6. Here is an example session of this command. Note that the input typed by the user is shown in pink
and output from the system is shown in gray.
Example of using ssh-host-config

Start SSH daemon

1. Find My Computer icon either on your desktop or in the start-up menu, right-click on it and select
Manage from the context menu.
2. Open Services and Applications in the left-hand panel then select the Services item.
3. Find the CYGWIN sshd item in the main section and right-click on it.
4. Select Start from the context menu.
Start SSHD service

 A small window should pop-up indicating the progress of the service start-up. After that window
disappears the status of CYGWIN sshd service should change to Started.

Setup authorization keys

Eclipse plug-in and Hadoop scripts require ssh authentication to be performed through authorization keys
rather than passwords. The following steps describe how authorization keys are set up.

1. Open cygwin command prompt


2. Execute the following command to generate keys

ssh-keygen

3. When prompted for filenames and pass phrases press ENTER to accept default values.
4. After the command has finished generating keys, enter the following command to change into
your .ssh directory:

cd ~/.ssh

5. Check if the keys were indeed generated by executing the following command:

ls -l
You should see two files id_rsa.pub and id_rsa with recent creation dates. These files contain
authorization keys.

6. To register the new authorization keys enter the following command (note the sharply-angled double
brackets -- they are very important):

cat id_rsa.pub >> authorized_keys

Setting up authorization keys

7. Now check if the keys were set up correctly by executing the following command:

ssh localhost

Since it is a new ssh installation, you will be warned that authenticity of the host could not be
established and will be asked whether you really want to connect. Answer yes and press ENTER. You
should see the Cygwin prompt again, which means that you have successfully connected.

8. Now execute the command again:

ssh localhost

This time you should not be prompted for anything.


Download, Copy and Unpack Hadoop
The next step is to download and copy the Hadoop distribution.

1. Download hadoop 0.19.1 and place in some folder on your computer such as C:\Java.
2. Open Cygwin command prompt.
3. Execute the following command:

cd

4. Execute the following command to enable your home directory folder to be shown in the Windows
Explorer window:

explorer .

5. Open another Explorer window and navigate to the folder that contains the downloaded Hadoop
archive.
6. Copy the Hadoop archive into your home directory folder.

Unpack Hadoop Installation


The next step is to unpack the downloaded and copied package.
To unpack the package follow these steps:

1. Open a new Cygwin window.


2. After the new Cygwin window appears, execute the following command:

tar -xzf hadoop-0.19.1.tar.gz

This will start unpacking the Hadoop distribution. After several minutes you should see a new Cygwin
prompt again as shown in the screenshot below:

3. When you see the new prompt, execute the following command:

ls -l

This command will list the contents of your home directory. You should see a newly created directory
called hadoop-0.19.1

4. Next execute the following commands:

cd hadoop-0.19.1
ls -l
If you get output similar to the following, everything was unpacked correctly and you can go to the
next step.

total 4145

-rw-r--r-- 1 vlad None 295315 Feb 19 19:13 CHANGES.txt

-rw-r--r-- 1 vlad None 11358 Feb 19 19:13 LICENSE.txt

-rw-r--r-- 1 vlad None 101 Feb 19 19:13 NOTICE.txt

-rw-r--r-- 1 vlad None 1366 Feb 19 19:13 README.txt

drwxr-xr-x+ 2 vlad None 0 Feb 26 05:41 bin

-rw-r--r-- 1 vlad None 58440 Feb 19 19:13 build.xml

drwxr-xr-x+ 4 vlad None 0 Feb 19 19:18 c++

drwxr-xr-x+ 2 vlad None 0 Mar 10 13:46 conf

drwxr-xr-x+ 12 vlad None 0 Feb 19 19:12 contrib

drwxr-xr-x+ 7 vlad None 0 Feb 26 05:41 docs

-rw-r--r-- 1 vlad None 6839 Feb 19 19:12 hadoop-0.19.1-ant.jar

-rw-r--r-- 1 vlad None 2384306 Feb 19 19:18 hadoop-0.19.1-core.jar

-rw-r--r-- 1 vlad None 134119 Feb 19 19:12 hadoop-0.19.1-examples.jar

-rw-r--r-- 1 vlad None 1276792 Feb 19 19:18 hadoop-0.19.1-test.jar

-rw-r--r-- 1 vlad None 52295 Feb 19 19:12 hadoop-0.19.1-tools.jar

drwxr-xr-x+ 4 vlad None 0 Feb 26 05:41 lib

drwxr-xr-x+ 3 vlad None 0 Feb 26 05:41 libhdfs

drwxr-xr-x+ 2 vlad None 0 Feb 26 05:41 librecordio

drwxr-xr-x+ 4 vlad None 0 Mar 10 13:46 logs

drwxr-xr-x+ 15 vlad None 0 Feb 26 05:41 src

-rwxr-xr-x 1 vlad None 1079 Mar 1 16:41 testProj.jar

drwxr-xr-x+ 8 vlad None 0 Feb 19 19:12 webapps


Configure Hadoop
Now that Hadoop has been unpacked, we are ready to configure it.

1. Open a new Cygwin window and execute the following commands:

cd hadoop-0.19.1
cd conf
explorer .

Bringing up explorer window

1. The last command will cause the Explorer window for the 'conf' directory to pop up. Minimize it for
now or move it to the side.
2. Launch Eclipse.
3. Bring up the 'conf' Explorer window opened in Step 2 and drag the file hadoop-site to the Eclipse
main window.
4. Insert the following lines between <configuration> and </configuration> tags.
5. <property>

6. <name>fs.default.name</name>

7. <value>hdfs://localhost:9100</value>

8. </property>

9. <property>
10. <name>mapred.job.tracker</name>

11. <value>localhost:9101</value>

12. </property>

13. <property>

14. <name>dfs.replication</name>

15. <value>1</value>

16. </property>

Editing site configuration file

17. Close the Eclipse, Cygwin command and Explorer windows.

Format the namenode


Next step is to format the Namenode to create a Hadoop Distributed File System (HDFS).

1. Open a new Cygwin window.


2. Execute the following commands:
cd hadoop-0.19.1
mkdir logs
bin/hadoop namenode -format

Format the namenode

3. The last command will run for some time and produce output similar to that shown below:
Hadoop Distributed File System created.

Now that the filesystem has been created you can proceed to the next step.

Install Hadoop plug-in


The next step is to install and check the Hadoop plug-in for Eclipse.

1. Open a new Cygwin window and execute the following commands:

cd hadoop-0.19.1
cd contrib
cd eclipse-plugin
explorer .
Navigate to Hadoop eclipse plugin folder

2. Shrink the newly popped window and move it to the right of the screen.
3. Open another Explorer window either through "My Computer" icon or by using the "Start -> Run"
menu. Navigate to the Eclipse installation and open the "plugins" folder.
4. Copy the file "hadoop-0.19.1-eclipse-plugin.jar" from the Hadoop eclipse-plugin folder to the Eclipse
plugins folder as shown in the figure below.
Copy Hadoop Eclipse Plugin

5. Close both explorer windows


6. Start Eclipse
7. Click on the open perspective icon, which is usually located in the upper-right corner the eclipse
application. Then select Other from the menu.
8. Select Map/Reduce from the list of perspectives and press "OK" button.
9. As a result your IDE should open a new perspective that looks similar to the image below.
Eclipse Map/Reduce Perspective

Now that the we installed and configured hadoop cluster and eclipse plugin i's a time to test the setup by
running a simple project.

Start the local hadoop cluster


Next step is to launch the newly configured cluster.

1. Close all the windows on the desktop, open five Cygwin windows and arrange them as shown below.
2. Start the namenode in the first window by executing:

cd hadoop-0.19.1
bin/hadoop namenode

3. Start the secondary namenode in the second window by executing:

cd hadoop-0.19.1
bin/hadoop secondarynamenode

4. Start the job tracker the third window by executing:

cd hadoop-0.19.1
bin/haoop jobtracker

5. Start the data node the fourth window by executing:

cd hadoop-0.19.1
bin/haoop datanode

6. Start the task tracker the fifth window by executing:

cd hadoop-0.19.1
bin/haoop tasktracker
7. Now you should have an operational hadoop cluster. If everthing went fine your screen should look
like the image below:

At this point the cluster is running and you can proceed to the next step.

Setup Hadoop Location in Eclipse


Next step is to configure Hadoop location in the Eclipse environment.

1. Launch the Eclipse environment.


2. Open Map/Reduce perspective by clicking on the open perspective icon ( ), select "Other" from the
menu, and then select "Map/Reduce" from the list of perspectives.
3. After switching to the Map/Reduce perspective, select the Map/Reduce Locations tab located at the
bottom of the Eclipse environment. Then right click on the blank space in that tab and select "New
Hadoop location...." from the context menu. You should see a dialog box similar to the one shown
below.
Setting up new Map/Reduce location

4. Fill in the following items, as shown on the figure above.


o Location Name -- localhost
o Map/Reduce Master
▪ Host -- localhost
▪ Port -- 9101
o DFS Master
▪ Check "Use M/R Master Host"
▪ Port -- 9100
o User name -- User

Then press the Finish button.

5. After closing the Hadoop location settings dialog you should see a new location in the "Map/Reduce
Locations" tab.
6. In the Project Explorer tab on the left hand side of the Eclipse window, find the DFS Locations item.
Open it using the "+" icon on its left. Inside, you should see the localhost location reference with the
blue elephant icon. Keep opening the items below it until you see something like the image below.
7. Browsing HDFS location

You can now move on to the next step.

Upload data to HDFS


We are now ready to run the first Map/Reduce project but data is still missing. This section explains how to
upload data to the Hadoop Distributed File System (HDFS).

Upload Files To HDFS

1. Open a new CYGWIN command window.


2. Execute the following commands in the new CYGWIN window as shown on the image above.

cd hadoop-0.19.1
bin/hadoop fs -mkdir In
bin/hadoop fs -put *.txt In

When the last of the above commands starts executing, you should see some activity in other Hadoop
windows as shown in the image below.
The result of these commands is a newly created directory -- named In -- in the HDFS which contains
a set of text files that comes with the Hadoop distribution.

3. Close the Cygwin Window.

Verify if the files were uploaded correctly

In this section we will check if the files were uploaded correctly.

1. Open the Eclipse environment.


2. Open DFS locations folder which is located in the Project Explorer tab of Map/Reduce perspective.
3. Open localhost folder in DFS locations folder.
4. Keep opening HDFS folders until you navigate to the newly created In directory, as shown in the
image below.
Verifying that the data was uploaded correctly

5. When you get to the In directory, double-click on the file LICENCE.txt to open it.
6. If you see something similar to the image above then the data was uploaded correctly and you can
proceed to your first Hadoop project.

Now move on to the next step.

Create and run Hadoop project


Now we are ready to create and run out first Hadoop project.

Creating and configuring Hadoop eclipse project.

1. Launch Eclipse.
2. Right-click on the blank space in the Project Explorer window and select New -> Project.. to create
a new project.
3. Select Map/Reduce Project from the list of project types as shown in the image below.

4. Press the Next button.


5. You will see the project properties window similar to the one shown below

6. Fill in the project name and click on Configure Hadoop Installation link on the right hand side of the
project configuration window. This will bring up the project Preferences window shown in the image
below.

7. In the project Preferences window enter the location of the Hadoop directory in the Hadoop
installation directory field as shown above.

If you are not sure of the location of the Hadoop home directory, refer to Step 1 of this section.
Hadoop home directory is one level up from the conf directory.
8. After entering the location close the Preferences window by pressing the OK button. Then close the
Project window with the Finish button.
9. You have now created your first Hadoop Eclipse project. You should see its name in the Project
Explorer tab.

Creating Map/Reduce driver class

1. Right-click on the newly created Hadoop project in the Project Explorer tab and select New -> Other
from the context menu.
2. Go to the Map/Reduce folder, select MapReduceDriver, then press the Next button as shown in the
image below.

3. When the MapReduce Driver wizard appears, enter TestDriver in the Name field and press the
Finish button. This will create the skeleton code for the MapReduce Driver.
4. Unfortunately the Hadoop plug-in for Eclipse is slightly out of step with the recent Hadoop API, so we
need to edit the driver code a bit.

Find the following two lines in the source code and comment them out:

conf.setInputPath(new Path("src"));
conf.setOutputPath(new Path("out"));

Enter the following code immediatly after the two lines you just commented out (see image below):

conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);

FileInputFormat.setInputPaths(conf, new Path("In"));


FileOutputFormat.setOutputPath(conf, new Path("Out"));
5. After you have changed the code, you will see the new lines marked as incorrect by Eclipse. Click on
the error icon for each line and select Eclipse's suggestion to import the missing class.

You need to import the following classes: TextInputFormat, TextOutputFormat, FileInputFormat,


FileOutputFormat.
6. After the missing classes are imported you are ready to run the project.

Running Hadoop Project

1. Right-click on the TestDriver class in the Project Explorer tab and select Run As --> Run on
Hadoop. This will bring up a window like the one shown below.
2. In the window shown above select "Choose existing Hadoop location" , then select localhost from the
list below. After that click Finish button to start your project.
3. If you see console output similar to the one shown below, Congratulations! You have started the
project successfully!
Experiment No. 6

Objective: Working and installation of Google App Engine.

Requirement: Login account codenvy.

THEORY:

Deploying a New Application GAE


With Codenvy you can deploy Java, Python and PHP apps to Google App Engine.

● create a new project from scratch and choose either Java web application or Python and Google App
Engine as PaaS (if you have already created a project, then open it and go to PaaS > Google App
Engine > Create Application)
● enter project name and choose a Template
● check Use existing GAE ID if you want to overwrite an existing app
● click Create button
● if you deploy your first app to GAE from Codenvy you need to authenticate
● allow access to proceed
● enter required information at the GAE webpage (Application Title is optional)

Click to see a full sized image

● once you click Create Application, the browser’s tab will be automatically closed in a few seconds
● when you are back to your Codenvy workspace, click Deploy to push the app to GAE

The process may take several minutes, and you will see a confirmation message in the Output panel with the
application url - yourappname.appspot.com
Make sure you use the same Google ID to log in to Codenvy and Google App Engine. Using different
accounts may cause 401 or 404 errors. 401 error can be fixed by logging out, and then logging in Google App
Engine at PaaS > Google App Engine > Logout/Login

Watch the entire process of deploying an app to GAE in the below video

Updating an Existing Application GAE


Having deployed your application to GAE, you can make some changes to the code and easily update it.

● The application is updated at Project > PaaS > Google App Engine
● The project is re-built and re-deployed once you press Application Update button. An alternative way
to update your GAE app is to go to PaaS > Google App Engine > Update Application.

Three messages (project build, start and end of deployment) appear in the Output panel one by on. Once done,
changes are implemented in the application hosted on appspot.com.

Have a look at this short video demonstrating how you can update your GAE apps directly from Codenvy:

Managing GAE Applications


You can manage your GAE application at Project >PaaS > Google App Engine.

It’s possible to modify and vacuum Indexes, PageSpeed, Queues, DoS as well as have a look at recourse
limits, cron jobs and backends.
Import an Existing GAE Application
If you have a GAE application which you need to import to Codenvy, here’s a workaround (this is not a direct
import of source code, so it will take a few minutes or so):

● download source code of your app (of course, this step can be omitted if you have in on GitHub and
sync it regularly). You can download source code of your Java and Python apps using SDK command
line (check out GAE documentation).
● push this code to GitHub or whatever remote repository you use
● clone your GitHub project to Codenvy
● open appengine-web.xml file and edit application ID, if necessary, for
example <application>javagae112</application> (enter the app ID you need to update on GAE)
● if you want to create a new version of the same app, you can change it as well, for
example <version>2</version>

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>java112</application>
<version>1</version>

● update application at Project > PaaS > Google App Engine.

Once the app is updated, you can change and update it anytime directly from Codenvy.

Since Codenvy uses Maven as a build manager, the projects you clone should also be built with Maven, i.e.
contain pom.xml file in the root project folder.
You may have a look at this short video demonstrating the procedure of importing an existing GAE app to
Codenvy using GitHub.

Device Support
Codenvy currently supports all desktop and laptop devices. We currently provide touch device support
through the use of the Puffin Web Browser which virtualizes double clicks and right clicks. We have not yet
created a native touch UI design. Vote for this feature at our Uservoice page.
Experiment No. 7

Objective: Working and installation of Microsoft Azure.

Requirement: Account on Microsoft Azure


THEORY:
Introduction:

In this article we are going to see how to create a new database stored procedure using the new Azure portal
instead of using the SQL Server Management Studio.

Overview:

Stored procedures are created normally using the SQL Serve management studio, with the latest version of
SQL Azure we have option to create a user stored procedure directly online without need to have a local
interface. This way we have some control of using it anywhere anytime to do some updates regularly.

Let us see how to create the Stored procedure in Azure portal step by step.

Steps:

Log in to the Azure portal using the below link. You can see the screen look similar to below

http://www.microsoft.com/windowsazure/

Login to the portal using your Microsoft Windows Live credentials with Azure credentials to the management
portal and you will see the screen as shown in the screen below
Now we can see the Database Menu at the bottom left, Click on that will go to the Database Subscription
window as shown in the screen below

Clicking on the subscription name will provide the complete details of the server created and the new database
created as shown in the screen below
Now we have a database created(LearnAzure) with a Max size of 1GB and ready to use it for the application
based on the requirement. To create a new Stored Procedure click on Manage at the top menu tool bar as
shown in the screen below

Check my previous article on how to connect to the manage portal using the credentials and the firewall using
the link. Once logged in you screen will look like below
To create a new stored procedure click on New Stored procedure menu at the top and we will see a script
window as shown in the screen below
Now we will write our customized stored procedure for the EmpDetails table which we created in our earlier
tutorial(Check my previous article for table creation) as shown in the screen below

Once we create the structure for the stored procedure as shown in the above screen we need to save it. Once
save we can use the stored procedure to execute the same as shown in the screen below. We need to navigate
to the new query window in the Database section and write a execute command as shown below.

We can create n Number of stored procedure as per the requirement and use it across the process which we
normally do with the traditional SQL Server locally.

Experiment No. 8
Objective: Working with Mangrasoft Aneka Software.

Requirement: ECMA Runtime Environment, Database


THEORY:

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.

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.

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


Figure - 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 - Specifying the installation folder


Step 3 – Confirm and start the 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 - Confirm Installation


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

Figure - Installation Progress


Figure - Installation Complete

Figure - Start Menu

Aneka Cloud Management Studio


The Aneka Cloud Management Studio is your portal for managing your infrastructure and clouds. It provides
facilities for defining your underlying cloud infrastructure and creating one or more Aneka Clouds on top.
It lets you create and manage Aneka user accounts, monitor the overall performance of your Cloud,
obtain detailed reporting information on resource usage, data transfers, billing and application (job)
execution. It also provides facilities for troubleshooting your deployments by allowing you to access and
examine remote logs.

Starting up Management Studio

Figure - Starting Aneka Cloud Management Studio for the first time.

When Aneka Cloud Management Studio is started up for the first time you’ll be asked to create a Remote
Repository for performing remote installations. Setting up a Remote Repository requires selecting a
suitable repository type and supplying valid credentials which remote machines can use to connect and
download required files. You may however choose to create this repository at a late time before making
remote installations. If no repository is defined, you will be restricted to making local installations only.
Figure - Creating a repository for remote installations

Shutting down Aneka Management Studio


When attempting to shut down Aneka Management Studio, you will be given the choice of saving all
configuration data from the current session. It is highly recommended that you save this information and
restore it the next time you start using the Management Studio.
The Configuration File
The configuration file, ManagementStudio.config, contains all information that describes your
infrastructure, your Clouds, the machine credentials, repositories and authentication keys (see section on
installing the Master Container) that you defined when using Aneka Management Studio. It is
recommended that you save this information when you exit Management Studio so that you can restore it
at a later session, and get up-to-speed with your Cloud management without having to redefine all settings
again. Some configuration information, such as authentication keys, must be maintained safely if you are to
add new Containers to your existing Cloud. Losing an authentication key however, is not detrimental as
you will be able to reconfigure your clouds with a new key.

Figure - Request to save configuration data when closing Management Studio


The configuration file is always encrypted before being written to disk for security reasons. When
saving configuration data you will be required to specify a password as show in Figure.

Figure - Password to encrypt configuration data

When starting up Aneka Management Studio at a later session, you will be given the choice of restoring your
configuration data. If you choose to do so, you must re-enter the same password you used when saving.

Figure - Request to restore configuration data

You might also like