KEMBAR78
Cloud Computing and Web Services Practical Journal | PDF | Virtual Machine | Java (Programming Language)
0% found this document useful (0 votes)
11 views32 pages

Cloud Computing and Web Services Practical Journal

The document outlines a series of practical exercises focused on web services and application development using various technologies. It includes creating a currency conversion service, a SOAP service for basic arithmetic operations, a Spring Boot web application, and utilizing Google Maps REST services. Additionally, it covers the installation and configuration of KVM virtualization and developing a file upload/download application using MTOM techniques.

Uploaded by

pandeydimple422
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views32 pages

Cloud Computing and Web Services Practical Journal

The document outlines a series of practical exercises focused on web services and application development using various technologies. It includes creating a currency conversion service, a SOAP service for basic arithmetic operations, a Spring Boot web application, and utilizing Google Maps REST services. Additionally, it covers the installation and configuration of KVM virtualization and developing a file upload/download application using MTOM techniques.

Uploaded by

pandeydimple422
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

PRACTICAL NO.

1
Aim: Define a simple service like converting Rs
into Dollar using Web API.
Code:
Execute:

Output:
PRACTICAL NO. 2
Aim: Creating a Simple SOAP Service.
Code:
Execute:

Output:
1. Addition

2. Subtraction

3. Multiplication

4. Division
PRACTICAL NO. 3
Aim: Create a Web Application using Spring
Boot Initializr.
Step 1:
Search for ‘Spring Boot Initializr’ and Click on first link

Step 2:
In the main page, Select ‘Java’ as Language and ‘Maven’ for
Project
Next, Select Spring Boot version or leave as Default
Now, Enter the Project Application Metadata
Group: com.springboot
Artifact: springboot
Name: springboot
Description: Demo project for Spring Boot
Package name: com.springboot.app
Select Packaging as ‘Jar’
Use Java Version 17

Step 3:
Click on ‘ADD DEPENDENCIES’ and search for ‘Web’ and
Select ‘Spring Web’
Step 4:
Click on ‘GENERATE’ and a zip file ‘springboot.zip’ will
download
Step 5:
Locate the zip file and extract it into a safe directory location

Step 6:
Open up a Java IDE like ‘Intellij IDEA’
Step 7:
Click on ‘Open’ and locate the extracted folder

Step 8:
Now the Spring Boot application is open in an IDE
Step 9:
Locate the ‘com.springboot.app’ folder which is located as
‘src > main > java > com.springboot.app’

Step 10:
Right-click on the folder and Select ‘New’ and ‘Java Class’
Step 11:
Give it the name ‘Welcome Controller’ and Select ‘Class’

Step 12:
A file named ‘WelcomeController.java’ is created
Add this code in the file
package com.springboot.app;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class WelcomeController {
@GetMapping("/welcome")
public String welcome() {
return "Welcome to spring boot application";
}
}
Step 13:
Now open the ‘SpringbootApplication’ file and click on run

Step 14:
Now, Goto any Web Browser and type
‘http://localhost:8080/welcome’
PRACTICAL NO. 4
Aim: Create a application using Google map’s
REST web service.
Step 1:
Search for ‘LocationIQ’ and Click on first link

Step 2:
We need to Sign Up to use this service
Click on ‘SIGN UP’ on the top-right corner
Step 3:
Enter your details and Click on ‘SIGN UP’

Step 4:
Next you need to Verify your email address

Goto ‘Gmail’ and search for the email from ‘LocationIQ’ and
Click on the link inside the email
Step 5:
After you Click on the link, you will be redirected
Select the APIs you will use and Click ‘GET STARTED’
Step 6:
You are now in the ‘Playground’
Select ‘Access Tokens’

Step 7:
Click on ‘Show Token’ this will reveal the API Token that will be
used by the Python Program
Copy the Token Key
Step 8:
Now in your Python program find the variable
‘api_key = 'pk.2ef786d9ade193b7bb86ab450d731458'’
And Replace the value with the copied Token Key

Code:

Output:
PRACTICAL NO. 5
Aim: Installation and Configuration of
Virtualization using KVM.
Step 1: Update Ubuntu
Before installing KVM, update your system's package
repository information. Refreshing the package repository
ensures you install the latest available program version
available for your system.
Run the command below:
sudo apt update
Provide the root password and wait for the apt package
manager to complete the process.

Step 2: Check Virtualization Support on Ubuntu


The next step is to make sure your system supports
virtualization. Follow the steps below:
1. Use the egrep command to check if your CPU supports
hardware virtualization. Run the following command:
egrep -c '(vmx|svm)' /proc/cpuinfo

If the command returns a value of 0, your processor is not


capable of running KVM. On the other hand, any other
number means you can proceed with the installation.
2. Next, check if your system can use KVM acceleration:
sudo kvm-ok
The output should look like this:

If kvm-ok returns an error, install cpu-checker to resolve the


issue.
3. To install cpu-checker, run the following command:
sudo apt install cpu-checker

4. When the installation completes, rerun the command to


check KVM acceleration availability, and if everything is
ok, you are ready to start installing KVM.

Step 3: Install KVM Packages


Install the essential KVM packages with the following
command:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients
bridge-utils -y
Wait until the system installs all the packages.

Step 4: Authorize Users


Only members of the libvirt and kvm user groups can run virtual
machines. If you want specific users to run VMs, add them to
those user groups. Follow the steps below:
1. Add the user you want to run the virtual machines to the
libvirt group:
sudo adduser [username] libvirt
Replace [username] with the actual username.
2. Next, do the same for the kvm group:
sudo adduser [username] kvm
For example:

Step 4: Verify the Installation


Confirm that the KVM installation was successful with the virsh
command. The virsh command is a command-line tool for
managing virtual machines on Linux systems. Run the
command below:
sudo virsh list --all
The command lists all active and inactive virtual machines on
the system. You can expect an output similar to the one below
if you have not yet created any VMs:

Alternatively, use the systemctl command to check the status of


libvirtd, the daemon that provides the backend services for the
libvirt virtualization management system:
sudo systemctl status libvirtd
If everything is functioning properly, the output returns an active
(running) status.
If the virtualization daemon is not active, activate it with the
following command:
sudo systemctl enable --now libvirtd

Step 5: Create Virtual Machine on Ubuntu


Before you choose one of the two methods below for creating a
VM, install virt-manager, a tool for creating and managing VMs:
sudo apt install virt-manager -y
Wait for the installation to finish.
Download the ISO with the OS you wish to install on a VM and
proceed to pick an installation method below.
wget https://releases.ubuntu.com/noble/ubuntu-24.04.2-
desktop-amd64.iso

Step 6: Virt Manager GUI


Virt-manager is a graphical user interface tool for managing
virtual machines, allowing users to create, configure, and
control VMs using libvirt. Follow the steps below:
1. Start virt-manager by running the command below:
sudo virt-manager
2. In the Virtual Machine Manager window, click the
computer icon in the upper-left corner to create a new VM.
3. Select the option to install the VM using an ISO image and
click Forward.

4. In the next dialogue, click Browse... and navigate to the


path where you stored the ISO you wish to install. Select
the ISO and click Forward to continue.
5. Enter the amount of RAM and the number of CPUs you
wish to allocate to the VM and click Forward to proceed to
the next step.

6. Allocate sufficient hard disk space to the VM. Click


Forward to go to the last step.
7. Specify the name for your VM and click Finish to complete
the setup.

The VM starts automatically, prompting you to start installing


the OS that's on the ISO file.
PRACTICAL NO. 6
Aim: Develop an application to download and
upload files to server using MTOM
Techniques.
Code:

Execute:
Step 1:
Search for ‘Postman’ and Click on first link

Step 2:
To use this service, we need to sign up for it
Click on ‘Sign Up for Free’ on the top-right corner

Enter your details and


Click on ‘Create Free Account’

Click on Continue after filling the details


Step 3:
Download the ‘Postman Desktop App’ and Sign In

Step 4:
Click on the ‘+’ or ‘HTTP’ to create a new ‘Request’
Step 5:
From the list Select ‘Post’ and Enter the URL
‘http://localhost:3000/upload’
Select ‘Body’ and then Select ‘form-data’
Under ‘Key’ Type ‘file’ and Change from ‘text’ to ‘file’
Under ‘Value’ add a file from your device
Click on ‘Send’
Step 6:
This will be the response and a folder named ‘uploads’
containing your file will be created in the directory of the
program

Step 7:
To download a file from the server
Select the ‘GET’ option and Enter the URL
‘http://localhost:3000/download/Senku.jpg’
And Select ‘none’
Click on ‘Send’
Step 8:
This will be the response and you can download the file from
here

You might also like