Cloud Computing Print
Cloud Computing Print
No:1
DATE:
Aim:
Select the folder in which you would like to install the application. There is no harm in leaving the
defaults as it is. Also select Enhanced Keyboard Driver check box.
VMware Workstation 15 Pro installatio–nselect installation folder
At some point of time if you decide to buy the License key, you can enter the License key by
going to Help->Enter a License Key You can enter the 25 character license key in the dialog
box shown below and click OK. Now you have the license version of the software.
[Link]
DATE:
INSTALL A C COMPILER IN THE VIRTUAL MACHINE CREATED USING
VIRTUALBOX AND EXECUTE SIMPLE PROGRAMS.
Install VirtualBox
[Link] [Link]
[Link] VirtualBox platform packages for your OS
[Link] the Installation Package by double clicking
4. Click continue and finish installing VirtualBox
Download Linux
1. Visit the page [Link]
2. Choose the Latest version of Ubuntu and 32-bit and click Start download
Install Linux using Virtual Box
[Link] VirtualBox by double-clicking the icon
[Link] New button on the top left corner
[Link] Continue on the pop-up window
4. Type VM name, select Linux for the OS and choose Ubuntu for the version.
5. Choose the amount of memory to allocate (I suggest choosing between 512 MB to 1024 MB)
12. Click the folder icon and choose the ubuntu file you downloaded.
13. Select the size of the Virtual Disk (I recommend choosing 8 GB) and click continue
14. Click and Create
Running Linux
1. Choose Ubuntu from left column and click Start
6. Choose Erase disk and install Ubuntu and click Forward (it won’t
wipe your computer)
7. Click Install Now and wait. Maybe grab a snack.
[Link] finished, click Restart and press Enter.
C Programming on Linux
#include<stdio.h>
main(){
printf("Hello World\n");
}
4. Save this file as helloworld.c
7. Type “gcc helloworld.c” to compile, and type “ls” to confirm that a new executable file
'[Link]’ iscreated
[Link]: 3
DATE:
INSTALL GOOGLE APP [Link] HELLO WORLD APP AND OTHER SIMPLE
WEB APPLICATIONS USING PYTHON/JAVA.
This document describes the installation of the Google App Engine Software
Development Kit (SDK) on a Microsoft Window and running a simple“hello world application.
The App Engine SDK allows you to run Google App Engine Applications on your local computer.
It simulates the run-‐time environment of the Google App Engine infrastructure.
If you don't already have Python 2.5.4 installed in your computer, download and
Install Python 2.5.4 from:
[Link]
You can download the Google App Engine SDK by going to:
[Link]
Once the install is complete you can discard the downloaded installer
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 of what is going
on.
Make a folder for your Google App Engine applications. I am going to make the
Folder on my Desktop called “apps” – the path to this folder is:
C:\Documents and Settings\csev\Desktop\apps
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 ([Link]), create a file called [Link] in the ae-•01-
•trivial folder with the following contents:
application: ae-01-trivial
version: 1 runtime: python api_version: 1
handlers: - url: /.*
script: [Link]
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 [Link] 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 you can control
the application using the launcher.
Once you have selected your application and press Run. After a few moments your application
will start and the launcher will show a little green icon next to your application. Then press
Browse to open a browser pointing at your application which is running at
[Link]
Paste [Link] into your browser and you should see your application as follows:
Just for fun, edit the [Link] to change the name “Chuck” to your own name and press Refresh
in the browser to verify your updates.
Watching the Log
You can watch the internal log of the actions that the web server 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 Refresh in your browser – you can see it retrieving the output with a GET
request.
Dealing With Errors
With two files to edit, there are two general categories of errors that you may encounter. If
you make a mistake on the [Link] file, the App Engine will not start and your launcher will
showa 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 [Link] (line 8).
If you make a syntax error in the [Link] file, a Python trace back error will appear in your
browser.
The error you need to see is likely to be the last few lines of the output – in this case
I made a Python syntax error on line one of our one--line application.
Reference: [Link]
When you make a mistake in the [Link] file – you must the fix the mistake and attempt to
start the application again. If you make a mistake in a file like [Link], you can simply fix the
file and press 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 the
Stop button.
[Link]
DATE:
LIST OF EXPERIMENTS:
OBJECTIVE:
When you start Globus toolkit container, there will be number of services
starts up. The service for this task will be a simple Math service that can
perform basic arithmetic for a client.
It is possible to start with this interface and create the necessary WSDL file
using the standard Web service tool called Java2WSDL. However, the WSDL
file for GT 4 has to include details of resource properties that are not given explicitly
in the interface above. Hence, we will provide the WSDL file.
GT4services\org\globus\examples\services\core\first\impl\M
[Link].
Deployment Descriptor -- The deployment descriptor gives several different
important sets of information about the service once it is deployed. It is
located within the GT4services folder at:
GT4services\org\globus\examples\services\core\first\deploy-
[Link].
Package [Link].Mathservice_instance;
Import [Link];
Import [Link];
Import [Link].Mathservice_instance.MathportType;
Import [Link].Mathservice_instance.GetValueRP;
Import
[Link].Mathservice_instance.MathserviceAddressing
Locator;
MathserviceAddressingLocator locator=new
MathServiceAddressingLocator()
Try{
String serviceURI=args[0];
EndpointReferenceType endpoint=new
EndpointReferenceType();
[Link](new address(serviceURL));
MathPortType math;
Math=[Link](endpoint);
[Link](10);
[Link](5);
[Link](“current value:”+[Link](new
getvalueRP()));
[Link](5);
[Link](“current value:”+[Link](new
getvalueRP()));
}catch(Exception e){
[Link]();
}}}
When the client is run from the command line, you pass it one argument. Theargument
is the URL that specifies where the service resides. The client willcreate the end point
rerference and incorporate this URL as the address. The end point reference is then
used with the getMathPortTypePort method of a MathServiceAdressingLocator
object to obtain a reference to the Math interface (portType). Then, we can apply the
methods available in the service as though they were local methods Notice that the call
to the service (add and subtract method calls) must be in a “try {} catch(){}” block
because a “RemoteException” may be thrown. The code for the
“MathServiceAddressingLocator” is created during the build process. (Thus you
don’t have to write it!)
current value: 10
Step 7 – Undeploy the Math Service and Kill a Container
Before we can add functionality to the Math Service (Section 5), we must
undeploy the service. In the Container Window, kill the container with a
Control-C. Then to undeploy the service, type in the following command:
Undeploy successful
6 Adding Functionality to the Math Service
In this final task, you are asked to modify the Math service and associated
files so the srvice supports the multiplication operation. To do this task, you
will need to modify:
[Link])
[Link])
The exact changes that are necessary are not given. You are to work them
out yourself. You will need to fully understand the contents of service code
and WSDL files and then modify them accordingly. Appendix A gives an
explanation of the important parts of these files. Keep all file names the same
and simply redeploy the service afterwards. You will also need to add a code
to the client code ([Link]) to test the modified service to include
multiplication.
Result:
Thus the Develop a new Web Service for Calculator was executed successfully.
2. DEVELOP NEW OGSA-COMPLIANT WEB SERVICE
OBJECTIVE:
PROCEDURE:
Writing and deploying a WSRF Web Service is easier than you might think. You just
have to follow five simple steps
3. Define the deployment parameters. This is done with WSDD and JNDI
4. Compile everything and generate a GAR file. This is done with Ant
5. Deploy service. This is also done with a GT4 tool
a. Download the latest Axis2 runtime from the above link and extract it. Now we
point Eclipse WTP to downloaded Axis2 Runtime. Open Window -> Preferences
-> Web Services -> Axis2 Emitter
Select the Axis2 Runtime tab and point to the correct Axis2
runtime location. Alternatively at the Axis2 Preference tab, you
can set the default setting that will come up on the Web
Services Creation wizards. For the moment we will accept the
default settings.
b. Click OK.
c. Next we need to create a project with the support of Axis2 features. Open File -
> New -> Other... -> Web -> Dynamic Web Project
Click next
d. Select the name Axis2WSTest as the Dynamic Web project name (you can
specify any name you prefer), and select the configured Tomcat runtime as the
target runtime.
Click next.
e. Select the Axis2 Web service facet
Click Finish.
f. This will create a dynamic Web project in the workbench
Click next.
i. The Web service wizard would be brought up with Web service type set to
Bottom up Java bean Web Service with the service implementation
automatically filled in. Move the service scale to Start service.
j. Click on the Web Service runtime link to select the Axis2 runtime.
Click OK.
k. Ensure that the correct server and service project are selected as displayed
below.
Click next
l. This page is the [Link] selection page. if you have a custom [Link], you can include
that by clicking the Browse button. For the moment, just leave it at the default.
Click next.
m. This page is the Start Server page. It will be displayed if the server has not
been started. Click on the Start Server button. This will start the server runtime.
Click next.
n. This page is the Web services publication page, accept the defaults.
Click Finish.
o. Now, select the Axis2WSTest dynamic Web project, right-click and select Run
-> Run As -> Run on Server to bring up the Axis2 servlet.
Click Next.
p. Make sure you have the Axis2WSTest dynamic Web project on the right-hand
side under the Configured project.
Click Finish.
q. This will deploy the Axis2 server webapp on the configured servlet container
and will display the Axis2 home page. Note that the servlet container will start up
according to the Server configuration files on your workspace.
r. Click on the Services link to view the available services. The newly created
converter Web service will be shown there.
s. Click on the Converter Service link to display the wsdl URL of the newly
created Web service. Copy the URL.
t. Now we'll generate the client for the newly created service by referring the
?wsdl generated by the Axis2 Server. Open File -> New -> Other... -> Web
Services -> Web ServiceClient
u. Paste the URL that was copied earlier into the service definition field.
Another way to test and invoke the service is to select Generate test case to test the service
check box on the Axis2 Client Web Service Configuration Page when going through the Web
Service Client wizard.
If that option is selected, the Axis2 emitter will generate JUnit testcases matching
the WSDL we provide to the client. These JUnit testcases will be generated to a
newly added source directory to the Axis2WSTestClient project called test.
Next thing we need to do is to insert the test case with the valid inputs as the Web
service method arguments. In this case, let's test the
ConverterConverterSOAP11Port_httpTest.java by provide values for Celsius and
Farenheit for the temperature conversion. As an example, replace the generated
TODO statement in each test method to fill in the data with values as:
testfarenheitToCelsius() -> [Link](212);
testStartfarenheitToCelsius() >[Link](212);
testcelsiusToFarenheit() -> [Link](100);
testStartcelsiusToFarenheit() -> [Link](100);
Here the testcases were generated to test both the synchronous and asynchronous
clients.
w. After that, select the testcase, right-click, select Run As -> JUnit Test. You
will be able to run the unit test successfully invoking the Web service.
The Web Service wizard orchestrates the end-to-end generation, assembly,
deployment, installation and execution of the Web service and Web service client.
Now that your Web service is running, there are a few interesting things you can
do with this WSDL file. Examples:
• You can choose Web Services -> Test with Web Services
Explorer to test the service.
• You can choose Web Services -> Publish WSDL file to publish
the service to a public UDDI registry.
RESULT:
Thus the development of a new OGSA-compliant web service was executed successfully.
[Link] APACHE AXIS DEVELOP A GRID SERVICE
OBJECTIVE:
PROCEDURE:
1. Java 2 SDK
• Run the downloaded executable (j2sdk-1_4_1-[Link])
which will install the
• SDK in C:\j2sdk1.4.1. Set the JAVA_HOME environment variable
to point to this directory as follows:
• Click on START->CONTROL PANEL->SYSTEM
• Click on the Advanced tab
• Click on the Environment Variables button
• Click on the New… button in the user variable section and enter
the details
• Add the Java binaries to your PATH variable in the same way by
setting a user variable called PATH with the value
“%PATH%;C:\j2sdk1.4.1\bin”
2. Apache Tomcat
3. XML Security
• Download and unzip
[Link]
bin 1_0_4.zip •
4. Apache Axis
• Unzip the downloaded Axis archive to C: (this will create a
directory C:\axis-1_1).
java [Link]
[Link]
[Link] This should return the following:
.- Processing file samples/stock/[Link]
.- <Admin>Done processing</Admin>
RESULT:
Thus the development of a Grid Service using Apache Axis is executed successfully.
4. DEVELOP APPLICATIONS USING JAVA OR C/C++ GRID APIS
OBJECTIVE:
SAMPLE CODE:
Import
[Link]
m.*; import MPJ.*;
public class UserProgAteam extends
AteamProg { private int phase;
public UserProgAteam( Ateam o )
{}
public
UserPro
gAteam(
) {}
// real const
public
UserProgAteam(
String[] args ) {
phase = 0; }
// phase
recovery
private void
userRecover
y( ) { phase =
[Link]
apshotId( );
}
private void compute( ) {
for ( phase = 0; phase <
10; phase++ ) { try {
[Link]( ).sleep( 1000 );
}
catch(InterruptedException e ) {
}
[Link]( phase );
[Link]( "UserProgAteam at rank " +
MPJ.COMM_WORLD.Rank( ) + " : took a snapshot " + phase );
}
}
public static void main( String[] args ) {
[Link]( "UserProgAteam: got started" );
[Link]( args, ateam);
UserProgAteam program = null;
// Timer timer =
new Timer( ); if (
[Link](
) ) { program = (
UserProgAteam )
[Link]
alVar( "program"
);
[Link]
very( );
}
e
l
s
e
{
program = new UserProgAteam( args );
[Link]( "program", program
);
}
[Link]( );
[Link]( );
}
public class UserProgAteam extends AteamProg {
// application body
private void compute( ) {
for ( phase = 0; phase <
10; phase++ ) { try {
[Link]( ).sleep( 1000 );
}
catch(InterruptedException e ) {
}
[Link]( phase );
[Link] ( "UserProgAteam at rank " + MPJ.COMM_WORLD.Rank( )
+ " : took a snapshot " + phase );
}}
MPI sample
code import
AgentTeamwo
[Link].*;
import MPI.*;
public class UserProgAteam extends AteamProg {
// application body private void compute( ) {
}
public static void main(
String[] args ) { [Link](
args, ateam );
[Link]( ); [Link]( );
}
}
Thus the development of applications using Java or C/C++ Grid APIs is executed
successfully
[Link]
DATE:
2. Open Eclipse
3. Create a new Java Project: File -> New
4. Import an unpacked CloudSim project into the new Java Project
5. The first step is to initialise the CloudSim package by initialising the
CloudSim library, as follows:
[Link](num_user, calendar, trace_flag)
6. Data centres are the resource providers in CloudSim; hence, creation of
data centres is a second step. To create Datacenter, you need the
DatacenterCharacteristics object that stores the properties of a data centre
such as architecture, OS, list of machines, allocation policy that covers
the time or spaceshared, the time zone and its price:
Datacenter datacenter9883 = new Datacenter(name, characteristics, new
VmAllocationPolicySimple(hostList), st 7.
8. The fourth step is to create one virtual machine unique ID of the VM,
userId ID 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:
Vm vm = new Vm(vmid, brokerId, mips, pesNumber, ram, bw, size, vmm,
newCloudletSchedulerTimeShared())
3 35.6
CloudsimExample1 finished.
[Link]
DATE:
FIND A PROCEDURE TO TRANSFER THE FILES FROM ONE VIRTUALMACHINE
1. You can copy few (or more) lines with copy & paste mechanism.
For this you need to share clipboard between host OS and guest OS,
installing Guest 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.
2. You can enable drag and drop too with the same method (Click on the
machine, settings, general, advanced, drag and drop: set to bidirectional )
3. You can have common Shared Folders on both virtual machines and use
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
problems for 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 files
directly copying them in this folder.
4. 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 on
the 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 if it is running with pgrep sshd from a shell. You can install with
sudo apt-get install openssh-server.
5. You can mount part of the file system of a virtual machine via NFS or
SSHFS 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 machines
with different operative systems, and in particular:
• Each virtual machine has its own operative system running on and acts as
a physical machine.
RESULT:
[Link]
DATE:
[Link] 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:
OpenStack Compute
Dashboard Overview:
What we will do?
In this post, I will show you how to run an OpenStack instance. The instance
will be 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 local
network and the local network will be connected to internet.
Network? Yes, the network in here is our own local network. So, your
instances will be not mixed up with the others. You can imagine this as your
own LAN (Local Area Network) in the cloud.
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.
3. Click on your router name link, for example router1, Router Details page.
Now, you can SSH your instances to the floating IP address that you got in the
step 4. If you are using Ubuntu image, the SSH user will be ubuntu.
RESULT:
[Link]: 08
DATE:
Install Hadoop
Step 1: Click here to download the Java 8 Package. Save this file in your home
directory.
Step 5: Add the Hadoop and Java paths in the bash file (.bashrc).
Open. bashrc file. Now, add Hadoop and Java Path as shown below.
Command: vi .bashrc
For applying all these changes to the current Terminal, execute the source
command.
Command: cd hadoop-2.7.3/etc/hadoop/
Command: ls
All the Hadoop configuration files are located in hadoop-2.7.3/etc/hadoop
directory as you can see in the snapshot below:
Step 7: Open [Link] and edit the property mentioned below inside
configuration tag:
Command: vi [Link]
3 <configuration>
4 <property>
5 <name>[Link]</name>
6 <value>hdfs://localhost:9000</value>
7 </property>
8 </configuration>
Step 8: Edit [Link] and edit the property mentioned below inside
configuration tag:
Command: vi [Link]
4 <configuration<property> >
5 <name>[Link]</name>
6 <value>1</value>
7 </property> 8 <property>
9 <name>[Link]</name<value>false</value>
>
10 </property>
11 </configuration>
12
Step 9: Edit the [Link] file and edit the property mentioned below inside
configuration tag:
In some cases, [Link] file is not available. So, we have to create the
[Link] file using [Link] template.
Command: vi [Link].
Fig: Hadoop Installation – Configuring [Link]
3 <configuration>
4 <property>
5 <name>[Link]</name>
6 <value>yarn</value>
7 </property>
8 </configuration>
Step 10: Edit [Link] and edit the property mentioned below inside
configuration tag:
Command: vi [Link]
Fig: Hadoop Installation – Configuring [Link]
2
<?xml version="1.0"> <configuration>
3
<property>
4
<name>[Link]-services</name>
5
<value>mapreduce_shuffle</value>
6
</property>
7
<property>
8
<name>[Link]</ name>
9
<value>[Link]</value>
1
</property>
0
</configuration>
1
Step 11: Edit [Link] and add the Java Path as mentioned below:
[Link] contains the environment variables that are used in the script to
run Hadoop like Java home path, etc.
Command: vi hadoop–[Link]
Command: cd
Command: cd hadoop-2.7.3
This formats the HDFS via NameNode. This command is only executed for
the first time. Formatting the file system means initializing the directory
specified by the [Link] variable.
Never format, up and running Hadoop filesystem. You will lose all your data
stored in the HDFS.
Step 13: Once the NameNode is formatted, go to hadoop-2.7.3/sbin directory and
start all the daemons.
Command: cd hadoop-2.7.3/sbin
Either you can start all daemons with a single command or do it individually.
Command: ./[Link]
Start NameNode:
The NameNode is the centerpiece of an HDFS file system. It keeps the directory
tree of all files stored in the HDFS and tracks all the file stored across the cluster.
ResourceManager is the master that arbitrates all the available cluster resources
and thus helps in managing the distributed applications running on the YARN
system.
Start JobHistoryServer:
Step 14: To check that all the Hadoop services are up and running, run the below
command.
Command: jps
Fig: Hadoop Installation – Checking
Daemons
RESULT: