Cloud - Record MohanR
Cloud - Record MohanR
Cloud - Record MohanR
LABORATORY
EX.NO:
DATE:
DEVELOP A NEW WEB SERVICE FOR CALCULATOR
AIM:
To develop a new web service for a calculator using the SOAP Protocol.
PROCEDURE:
1. Open the NetBeans IDE 8.1
2. Click File New Project
3. Give the project name as calcwsapplication and click next.
4. In the new web application dialogue box, ensure that the glassfish v2 server and Java EE
5 are selected and click next and then finish.
5. Right-click calcwsapplication and select New → web service. Give the web service name
as calwebservice and the package name as a calculator and click Finish.
6. Expand the web service folder. Right-click calwebservice and click Add
Operation, Give the operation name as add and return type as int
7. Click the add button and give the parameter as a and the data type as int. Again Click the
add button and give the parameter name as b and its data type as b and Click OK.
9. Similarly, add operations for subtraction (sub), multiplication (mul), and division (div).
10. Right Click calwsapplication and click clean and build. It will show BUILD
SUCCESSFUL.
11. Again right click calwsapplication and click deploy. It will show BUILD
Roll Number:090 Page No:
SUCCESSFUL.
12. Select calwsapplication → web services → calculators. Right-click and select Test
WebService.
13. Give the input values and click add button to check the output. Go back and click WSDL
to open it. Now the server is running.
OUTPUT:
4. Select Project and click browse. Browse the web service that we did in the previous
step. Ensure that the client style is JAX- WS style.
5. Click Finish. Code will appear and it will show some error
6. Click on error. At end of the line add: xendorsed="true" and save it.
7. Right Click calcwsclient -> web pages and select new -> JSP
8. Give the file name as the client and click finish.
9. In client.jsp page, inside the body tag, remove the h1 tag and drag and drop the add
operation from web_service_references from calcwsclient
10. In the code that appeared, change the values.(For instance, a=5,b=13)
11. Right Click calcwsclient and click Clean and build.
12. Again Right click calcwsclient and click deploy. It will show BUILD SUCCESSFUL.
13. Right Client Client.jsp and click Run file
15. Similarly, create the jsp files for subtraction, multiplication and division.
RESULT:
Thus, the calculator is implemented as a web service using a SOAP Protocol.
EX.NO:
DATE:
DEVELOP A CLOUD ENVIRONMENT USING CLOUDSIM SIMULATOR
AIM:
To install CloudSim and to implement the java code to create cloudlets and execute
the cloudlets in data centres.
PROCEDURE:
3. Give the name of the project (for instance, cloud1) and click on Next Button.
RESULT:
Thus, cloud is simulated in CloudSim Environment and the program is executed.
EX.NO:
DATE:
PROCEDURE TO RUN A VIRTUAL MACHINE WITH DIFFERENT
CONFIGURATIONS AND TO CHECK HOW MANY VIRTUAL MACHINES CAN
BE UTILIZED AT A PARTICULAR TIME
AIM:
Use Eucalyptus to demonstrate the following and Find the procedure to run the virtual
machine of different configurations. Check how many virtual machines can be utilized at a
particular time.
PROCEDURE:
STEP 1:
• Install the virtual machine (VMWare workstation 12) Click to create the new virtual
machine.
• A new virtual machine wizard dialogue box appears, check the installer disk image file
(iso).
• Browse the faststat1.3.4.2.iso file from the path E:\Cloud Grid\ faststat1.3.4.2.iso.
• Click next
STEP 2:
• Select the LINUX operating system.
• Version: CENTOS 64-bit
• Click next
STEP 4:
• Set maximum disk size as 40 GB.
• Select the “Store virtual disk as single file” option.
• Click next
STEP 7:
Click on "Skip" on the screen which asks for a media test.
STEP 9:
Click on "Skip" on the screen which asks for a media test.
STEP 10:
• Click On "Next" in the previous screens till you arrive at a Storage Device Warning.
• Click on "Yes, Discard any data".
STEP 11:
• Select hostname as "root".
• Select Network Interface as "eth0" and mode as "Static".
• Enter the IP Address as "192.168.12.201" and Netmask "255.255.255.0".
• Enter Default Gateway as "192.168.12.1" and DNS as "8.8.8.8".
• Click Next.
• Select the city as "Kolkata/Asia".
• Click Next.
STEP 14:
Select Replace Existing Linux Systems and click on Next.
STEP 15:
• Click on Write Changes to Disk.
• Wait for the installation to complete
STEP 16:
Roll Number:090 Page No:
• Click on Reboot.
• Wait for CentOS to boot up.
STEP 17:
Click on Forward.
STEP 18:
• Type your Username: user, FullName: user, Password: user and Confirm Password:
user.
• Click on Forward when you are done.
• Select "Yes" if the dialogue box appears.
• Click Forward and Finish when the Configuration Complete Window appears.
STEP 19:
• Enter your password and Login into the system.
• User name: user Password: user
STEP 20:
• Open Firefox and go to the URL - "192.168.12.201:8888" ( Or) click the eucalyptus
user console
• Click on "I Understand the Risks" and then click on "Add Exception".
• Click on "Confirm Security Exception".
STEP 21:
• Log into the Eucalyptus
• Account name: demo, username: admin, password: 123456
• Click on "Launch new Instance"
STEP 23:
Select the "Select Type".
STEP 26:
• Select "Create new Security Group".
• Enter name as svce and description as "Hello".
• Select Rules Tab and create a rule for the SSH protocol
• Enter IP address as "192.168.12.202/32" (or)click use my IP and click on "Create
Group".
STEP 27:
Click on Launch Instance and wait for the instance for launching.
RESULT:
Thus the Eucalyptus is installed and used to run the virtual machine of different
configurations and instance creation has been executed successfully.
Roll Number:090 Page No:
CS18712 – CLOUD COMPUTING AND VIRTUALIZATION TECHNIQUES
LABORATORY
EX.NO:
DATE:
PROCEDURE TO ATTACH A VIRTUAL BLOCK TO THE VIRTUAL MACHINE
AND CHECK WHETHER IT HOLDS DATA EVEN AFTER THE RELEASE OF
THE VIRTUAL MACHINE
AIM:
To attach a virtual block to the virtual machine and check whether it holds the data
even after the release of the virtual machine.
PROCEDURE:
STEP 1:
• Create the virtual machine installed with centos.
• Create an instance (follow the previous exercise step).
STEP 2:
• Click Storage and select volume.
• Click create a new volume.
STEP 3:
• Create a new volume dialogue box will appear
• Click General tab
• Enter name: any name
• Create from snapshot: none
• Volume size : 1GB
• Availability zone: cluster 01
• Click create volume
• Ensure value is Entered for a volume name, Instance(select from the dropdown the
instance which was created), attach as volume (/dev/sda).
• Click attach.
STEP 5:
Ensure the status is “in use”.
RESULT:
Thus the volume has been successfully attached to the instance created and verified
whether it holds the data even after the release of the virtual machine.
EX.NO:
DATE:
USE EUCALYPTUS AND CREATE AN IMAGE AND EXECUTE THE INSTANCE
WITH A STORAGE CONTROLLER AND INTERACT WITH IT
AIM:
To create a virtual image execute the instance with a storage controller and interact with
it.
PROCEDURE:
STEP 1:
• Open new terminal
• Type the following
source credentials/admin/eucarc
euca-bundle-image –i ~/Desktop/Eucaimage/ vmlinuz-2.6.32 642.3.1.el6.x86_64 -r x86_64
--kernel true
After this step the following will be created /var/tmp/bundle-hfWXvk/vmlinuz-2.6.32-
642.3.1.el6.x86_64.manifest.xml
STEP 4:
1. This EMI image can be accessed only by the ADMIN.
2. This access privilege can be extended to all user by the following steps.
3. euca-modify-image-attribute -l –a all emi- 3E633FB3 (launch permission will be given
to all groups)
4. euca-modify-image-attribute - -description GCC emi-3E633FB3 (description name is
assigned to emi image. GCC is user defined name Refer the screenshot)
STEP 6:
1. Give instance name, instance size.
2. Next select security type where you will click.
3. create new pair(create and download it)
4. create new security group(create group and assign rules to it) 7 Click launch
instance.
5. Instance will be created.
EX.NO:
DATE:
INSTALL A C COMPILER IN THE VIRTUAL MACHINE AND EXECUTE A
SAMPLE PROGRAM
AIM:
To install a C compiler in the virtual machine and execute a sample program
PROCEDURE:
OUTPUT:
EX.NO:
DATE:
FIND PROCEDURE TO SET UP THE ONE NODE HADOOP CLUSTER
AIM:
To find the procedure to set up the one-node Hadoop cluster.
PROCEDURE:
STEP 1:
This software should be prepared to install Hadoop 2.8.0 on window 10 64bit
• Download Hadoop 2.8.0
(Link: http://wwweu.apache.org/dist/Hadoop/common/Hadoop-2.8.0/Hadoop-2.8.0.tar.gz
OR
http://archive.apache.org/dist/Hadoop/core//Hadoop-2.8.0/Hadoop- 2.8.0.tar.gz)
• Java JDK 1.8.0.zip
(Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html)
STEP 2:
• Check whether Java 1.8.0 is already installed on your system or not, use "Javac -
version" to check. java version
• If Java is not installed on your system then first install java under "C:\JAVA" Java setup
Extract file Hadoop 2.8.0.tar.gz or Hadoop-2.8.0.zip and place under "C:\Hadoop-
2.8.0"
• Set the path JAVA_HOME Environment variable on windows 10(see Steps 1,2,3 and
4 below).
• Next, we set the Hadoop bin directory path and the JAVA bin directory path.
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
Rename "mapred-site.XML.template" to "mapred-site.XML" and edit this file C:/Hadoop-
2.8.0/etc/Hadoop/mapred-site.XML, paste the below XML paragraph and save this file.
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/Hadoop-2.8.0/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/Hadoop-2.8.0/data/datanode</value>
</property>
</configuration>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.Hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
Edit file C:/Hadoop-2.8.0/etc/Hadoop/Hadoop-env.cmd by closing the command
Roll Number:090 Page No:
line "JAVA_HOME=%JAVA_HOME%" instead of set "JAVA_HOME=C:\Java"
(On C:\java this is a path to file jdk.18.0)
STEP 5: Testing
• Open cmd and change directory to "C:\Hadoop-2.8.0\sbin".
• Type "start- all.cmd" to start apache.
Open: http://localhost:8088
Open: http://localhost:50070
EX.NO:
DATE:
WRITE A PROGRAM TO USE THE API’S OF HADOOP TO INTERACT WITH IT
AIM:
To write a program to use the API's oh hadoop to interact with it
PROCEDURE:
STEP 1: Prepare
• Download Input_file.txt
(Link: https://github.com/MuhammadBilalYar/HADOOP- INSTALLATION-ON-
WINDOW-10/blob/master/input_file.txt)
• Place both files in "C:/"
RESULT:
Thus the program to use the apis of hadoop to interact with it are executed successfully
EX.NO:
DATE:
WRITE A WORDCOUNT PROGRAM TO DEMONSTRATE THE USE OF MAP
AND REDUCE TASKS
AIM:
To write a program to use the API's of Hadoop to interact with it and write a wordcount
program to demonstrate the use of map and reduce task.
PROCEDURE:
STEP 1: Prepare
1. Download MapReduceClient.jar
(Link: https://github.com/MuhammadBilalYar/HADOOP-INSTALLATION-ON-
WINDOW10/blob/master/MapReduceClient.jar)
2. Download Input_file.txt
(Link: https://github.com/MuhammadBilalYar/HADOOPINSTALLATION-ON-
WINDOW-10/blob/master/input_file.txt)
3. Place both files in "C:/"
RESULT:
Thus the map and reduce tasks to implement word count in hadoop is executed
EX.NO:
DATE:
WRITE A GREP PROGRAM TO DEMONSTRATE THE USE OF MAP AND
REDUCE TASKS
AIM:
To write a program to use the API's of Hadoop to interact with it and write a grep
program to demonstrate the use of map and reduce task.
PROCEDURE:
STEP 1: Prepare
1. Download MapReduceClient.jar
(Link: https://github.com/MuhammadBilalYar/HADOOP-INSTALLATION-ON-
WINDOW10/blob/master/MapReduceClient.jar)
2. Download Input_file.txt
(Link: https://github.com/MuhammadBilalYar/HADOOPINSTALLATION-ON-
WINDOW-10/blob/master/input_file.txt)
3. Place both files in "C:/"
RESULT:
Thus the map and reduce tasks to implement grep in hadoop is executed successfully.