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

cloud computing-update

The document outlines a series of experiments related to cloud computing, including the installation of VirtualBox, creating virtual machines, installing a C compiler, and deploying web applications using Google App Engine. It details step-by-step procedures for each experiment, including downloading necessary software, configuring settings, and executing simple programs. The results confirm successful installations and executions across various tasks, including setting up a Hadoop cluster and using Docker.

Uploaded by

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

cloud computing-update

The document outlines a series of experiments related to cloud computing, including the installation of VirtualBox, creating virtual machines, installing a C compiler, and deploying web applications using Google App Engine. It details step-by-step procedures for each experiment, including downloading necessary software, configuring settings, and executing simple programs. The results confirm successful installations and executions across various tasks, including setting up a Hadoop cluster and using Docker.

Uploaded by

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

EX.

NO:1(A INSTALL VIRTUALBOX/VMWARE/ EQUIVALENT OPEN- S O U R C E


) CLOUD WORKSTATION WITH DIFFERENT FLAVOURS OF LINUX
OR WINDOWS OS ON TOP OF WINDOWS 8 AND ABOVE.
AIM:
To Install VirtualBox/VMware/ Equivalent open- s o u r c e cloud Workstation with different
flavours of Linux or Windows OS on top of windows 8 and above.
PROCEDURE:
Steps to install Virtual Box:
1. Open your web browser and visit the official VirtualBox website: https://www.virtualbox.org.
2. Click on the "Downloads" link.
3. Under the "VirtualBox platform packages" section, choose the version compatible with your
operating system (Windows hosts for Windows).
4. Download the Virtual box exe and click the exe file…and select next button..
Step 2: Run the Installer

 Click the next button.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 Then click the Next Botton

 Click the next button

 Finally click the Finish button.


 VirtualBox to begin installing on your computer.

RESULT:
Thus, the oracle VM Virtual box is installed in windows.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


EX.NO:1(B INSTALLATION OF VIRTUAL MACHINE
)
AIM:
To create a virtual machine using VirtualBox/VMware Workstation on top of windows7 or 8.
PROCEDURE:
STEP 1: Click a new button open a dialog box

STEP 2: Give the name “Ubuntu” and Type is “Linux” and click next button.

STEP 3: The memory size depends on your host machine memory size.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


STEP 4: Accept the default 'Create a virtual hard drive now' and click 'Create' button.

STEP 5: Continue to accept the default 'VDI' drive file type and click 'Next' button.

STEP 6: Change the storage type from the default 'Dynamically allocated' to 'Fixed size' to increase
performance.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


STEP 7: Click 'Create' button and VirtualBox will generate Ubuntu virtual machine.

Download Ubuntu
 To install Ubuntu in this virtual machine. (https://releases.ubuntu.com/trusty/). Click ubuntu-
14.04.6-desktop-amd64.iso
 Select your new virtual machine and click 'Settings' button.

 Click on 'Storage' category and then 'Empty' under Controller: IDE. Click "CD/DVD" icon on
right hand side and select the ubuntu ISO file to mount.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 click on the new Ubuntu virtual machine and hit 'Start' button. Now you shall see a 'Welcome'
screen.
 Click 'Install Ubuntu' button.

 Click “install now” button.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 Click continue button

 Give Your name and Password and click continue button.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 The installation will continue until it is finished.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 Click the “Restart now” button.

 Enter the password you have chosen and press ‘Enter'.

 The Ubuntu OS open the VirtualBox.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:
Thus, the installation of a virtual machine using VirtualBox/VMware Workstation on top of
windows7 or 8 is done successfully.

EX.NO:2 INSTALL A C COMPILER IN THE VIRTUAL MACHINE CREATED USING


A VIRTUAL BOX AND EXECUTE SIMPLE PROGRAMS
AIM:
To install a C Compiler in a Virtual Machine Created Using VirtualBox and Executing Simple
Programs.
PROCEDURE:
STEP 1: Create and configure a virtual machine in VirtualBox.
STEP 2: Install an operating system (Linux or Windows) within the virtual machine.
STEP 3: Open the Ubuntu OS and go to search and type “Text Editor”.
STEP 4: Type any C-Program save the Desktop “Hello.c”.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


STEP 5: Again, go to search and type “Terminal”.

STEP 6: Compile the program.


Cd Desktop/
Sudo apt update
Sudo apt install build-essential
gcc hello.c
./a.out

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:
Thus, the C Compiler is installed successfully and executed a sample C program.

EX.NO:3 INSTALL GOOGLE APP ENGINE. CREATE A HELLO WORLD APP


AND OTHER SIMPLE WEB APPLICATIONS USING PYTHON/JAVA.
AIM:
To install Google App Engine and Create hello world app and other simple web applications
using python/java.
PROCEDURE:
STEP 1: Download GoogleAppEngine.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


 Click the “Next” button.

STEP 2: Download Python 2.5.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


STEP 3: Set the Python path in the Google App Engine launcher after downloading the SDK.
STEP 4: Go to Edit-> Preference and make sure set the path for where you installed python.

STEP 5: Create a new folder on Desktop.


STEP 6: Go to File->Create new web Application.

STEP 7: Run the Application

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


STEP 8: Automatically created python and yaml folder.

STEP 9: Go to browser and run the application. Type Localhost 8080.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:
Thus, the Google App Engine is installed successfully and a web application to display hello
world using python is developed and deployed in the GAE.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


EX.NO:4 USE THE GAE LAUNCHER TO LAUNCH THE WEB APPLICATIONS.
AIM:
To use the GAE Launcher to Launch the web applications.
ALGORITHM:
STEP 1: Download GAE.
STEP 2: Download Python new version.
STEP 3: Download Google Cloud SDK.
STEP 4: Add python.exe to Path and click install Now.

PROGRAM:
app.yaml
runtime: python313
threadsafe: true

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


handlers:
- url: /
script: main.app
main.py
import os
import json
import urllib
import webapp2
from google.appengine.ext.webapp import template
class MainPage(webapp2.RequestHandler):
def get(self):
template_values = {}
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))
def post(self):
pincode = self.request.get('zipCode')
if not pincode.isnumeric() or not len(pincode) == 6:
template_values = {
"error": "Incorrect Pin Code (String / False Code entered)"
}
path = os.path.join(os.path.dirname(__file__), 'index.html')
return self.response.out.write(template.render(path, template_values))
url = "https://api.postalpincode.in/pincode/" + pincode
data = urllib.urlopen(url).read()
data = json.loads(data)
if(data[0]['Status'] == 'Success'):
post_office = data[0]['PostOffice'][0]['State'
name = data[0]['PostOffice'][0]['Name']
block = data[0]['PostOffice'][0]['Block']
district = data[0]['PostOffice'][0]['District']
template_values = {
"post_office": post_office,
"name": name,
"block": block,
"district": district

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


}
path = os.path.join(os.path.dirname(__file__), 'results.html')
self.response.out.write(template.render(path, template_values))
else:
template_values = {}
path = os.path.join(os.path.dirname(__file__), 'error.html')
self.response.out.write(template.render(path, template_values))
app = webapp2.WSGIApplication([('/', MainPage)], debug=True)
index.html
<html>
<style>
.weatherText {
font-family: 'Lato', 'sans-serif';
font-size: 24px;
text-align: center;
}
#weatherForm {
padding: 20px;
}
#weatherSubmit {
color: white;
background-color: #083375;
padding: 5px 20px;
border-radius: 5px;
margin-top: 20px;
}
#weatherSubmit:hover {
cursor: pointer;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
.card {

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


border: 2px solid black;
width: 50%;
justify-content: center;
align-items: center;
}
</style>
<head>
<title class="alignct">Post Office Finder</title>
<link href=https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap
rel="stylesheet" />
</head>
<body>
<div class="card">
<h2 class="weatherText">Post Office Finder Using WebApp</h2>
<h1 id="error_head" style="display: none" value="{{error}}">{{error}}</h1>
<form class="weatherText" id="weatherForm" action="/" method="post">
Location Zip Code:
<input class="weatherText" id="weatherInput" type="text" name="zipCode"/><br />
<input class="weatherText" id="weatherSubmit" type="submit value="Submit"/>
<button id="weatherSubmit" class="weatherText"
onclick="document.getElementById('weatherInput').value = ''">
Clear</button>
</form>
</div>
<script>
let err = document.getElementById('error_head');
function myFunction() {
alert('Please Enter the Valid Pin Code!');
}
if (err) {
myFunction();
}
</script>
</body>
</html>

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


results.html
<!DOCTYPE html>
<html lang="en">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
}
#weatherResults {
background-color: #83e9c2;
font-family: 'Lato', sans-serif;
font-size: 24px;
padding: 30px;
display: inline-block;
text-align: center;
margin: 20px;
margin-top: 10%;
border: 2px solid black;
border-radius: 5px;
}
</style>
<head>
<meta charset="UTF-8" />
<title>Post Office Information</title>
<link href=https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap
rel="stylesheet"/>
</head>
<body>
<div id="weatherResults">
<table>
<tr>
<th>
<h3>State of Post Office :</h3>
</th>

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


<th>
<h3>{{ post_office }}</h3>
</th>
</tr>
<tr>
<th>
<h3>Name of Post Office :</h3>
</th>
<th>
<h3>{{ name }}</h3>
</th>
</tr>
<tr>
<th>
<h3>Block of Post Office:</h3>
</th>
<th>
<h3>{{ block }}</h3>
</th>
</tr>
<tr>
<th>
<h3>District of Post Office:</h3>
</th>
<th>
<h3>{{ district }}</h3>
</th>
</tr>
</table>
<a href="http://localhost:8080/"><h4>Back to the Home page</h4></a>
</div>
</body>
</html>
error.html
<!DOCTYPE html>

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Error page</title>
<link href=https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap
rel="stylesheet"/>
</head>
<body>
<div style="text-align: center">
<h2>No such pin exists</h2>
<a href="http://localhost:8080/"><h3>Back to the Home page</h3></a>
</div>
</body>
</html>
OUTPUT:

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


Thus, the Google App Engine is installed successfully and a web application to using python is
developed and deployed in the GAE.

EX.NO:5 SIMULATE A CLOUD SCENARIO USING CLOUDSIM AND RUN A


SCHEDULING ALGORITHM THAT IS NOT PRESENT IN CLOUDSIM.

AIM:
To simulate a cloud scenario using cloudsim and run a scheduling algorithm that is not
present in cloudsim.
PROCEDURE:
1. Java Installation
 Check Java in your system.
 Install java setup.
 Set path variable for java
2. Download CloudSim and Another jar file
(https://sourceforge.net/projects/cloudsim30/files/latest/download)
 Download cloudsim zip file
(https://github.com/Cloudslab/cloudsim/releases/tag/cloudsim-3.0.2)
 Create a new folder in E: and move the cloudsim zip file.
 Download common math file(https://downloads.apache.org/commons/math/binaries/)
 Create a new folder in E: and move the common math file.
 Copy the common math jar file
 Paste the that file in cloudsim jars folder.
3. Create a JAVA Project
4. Open Eclipse IDE

5. Create a new Java Project

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


6. File-> New-> java Project

7. Give Project name and use default location


8. Click Browse Cloudsim and then click “Next”.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


9. The cloudsim libraries installed.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


10. Click “Finish” button.
11. Go to Project and click Examples-> cloudsimExamples.Java.

12.Click Run Button.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:

Thus, the cloudsim is simulated using Eclipse Environment successfully.

EX.NO:6 FIND A PROCEDURE TO TRANSFER THE FILES FROM ONE VIRTUAL


MACHINE TO ANOTHER VIRTUAL MACHINE.

AIM:
To Find a procedure to transfer the files from one virtual machine to another virtual machine.
PROCEDURE:
1. Open Virtual Machine and Start the Ubuntu OS.
2. Create a one folder in windows OS.
3. Go-to setting and click.
4. Choose Shared Folder

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


5.Choose the windows folder and tick Auto-mount, Make permanent checkbox.

6. Download vboxguestaddition file.


7. Next Click Storage select Vboxguestadditiob.iso file.
8. Run the Vbox_GAS file.

9. The windows file move to the Ubuntu OS.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:
Thus, the find a procedure to transfer the files from one virtual machine to another virtual
machine was executed.

EX.NO: INSTALL HADOOP SINGLE NODE CLUSTER AND RUN SIMPLE


7 APPLICATIONS LIKE WORDCOUNT.
AIM:
To find procedure to set up the one node Hadoop cluster.
PROCEDURE:
1. Download Hadoop 2.8.0
2. Java JDK 1.8.0 download
3. Check either java 1.8.0 is already installed your system or not. Use “java -version”.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB
RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB
RESULT:
Thus, the to find procedure to set up the one node Hadoop cluster executed successfully.

EXP.NO: 8 CREATING AND EXECUTING YOUR FIRST CONTAINER USING


DOCKER
AIM:
To create and execute container using Docker.
ALGORITHM:
1. Download docker(https://www.docker.com/products/docker-desktop/)

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


2. Install Dockers various libraries

3. Click close and restart button.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


4. Click Accept button.

5. Click Finish button and install Dockers in your desktop.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


6. Enter your Email-id and click continue button.

7. Click continue button.

8. Install WSL for your Desktop.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


Step 1: Verify Docker Installation
To verify Docker was installed correctly, open your terminal and run:
docker –version

You should see the Docker version output. If you get an error, check if Docker is running.
Step 2: Pull a Docker Image
Docker containers are based on images. You need to pull an image from the Docker registry
(Docker Hub) to create a container.
docker pull ubuntu

This downloads the latest ubuntu image from Docker Hub.


Step 3: Run a Docker Container
Now that you have the ubuntu image, you can run a container from it. Use the following
command:
docker run -it ubuntu

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


This command will:
 run: Start a new container.
 -it: Run in interactive mode with a terminal, so you can interact with the container.
 ubuntu: Use the ubuntu image to create the container.
Step 4: Work Inside the Container
While in the container, you can install software, modify files, or do anything you need. For
example, install curl inside the container:
apt-get update

apt-get install curl

You can now use curl to fetch content from the web inside the container.
Step 5: Exit the Container
When you're done with your work inside the container, type exit to leave the container and
return to your host machine’s shell.
Exit

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


Step 6: View Running Containers
To see the list of running containers, use:
docker ps

If you want to view all containers (including stopped ones), use:


docker ps -a

Step 7: Stop and Remove Containers


If you have containers running that you want to stop, use:
docker stop <container_id>

To remove the container after stopping it, use:


docker rm <container_id>

You can find the container_id by running docker ps -a.


Step 9: List Docker Images
To list all the images you've pulled or created, use:
docker images

Step 10: Remove Unused Docker Images


Once you no longer need a specific image, you can remove it with:

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


docker rmi <image_id>

RESULT:
Thus, the create and execute container using Docker executed successfully.

EX.NO:9 RUN A CONTAINER FROM DOCKER HUB.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


AIM:
To run a container form Docker Hub.

ALGORITHM:
1. Ensure Docker is Installed: Make sure you have Docker installed on your machine. If it's not
installed, you can download it from Docker's official website.
2. Open a Terminal/Command Prompt: Launch a terminal or command prompt window.
3. Log in to Docker (if needed): If you have a Docker Hub account, log in using the command:

4. Pull the Desired Image: Find the image you want to run on Docker Hub (e.g., nginx, mysql,
alpine, etc.). To pull the image from Docker Hub, use the command:

5. Run the Container: Once the image is pulled, you can run it using the docker run command.
You can specify options such as port mapping and volume mounting, depending on your
requirements. Here's an example for running an nginx container:

Explanation of the flags:


 -d: Runs the container in detached mode (in the background).
 -p 8080:80: Maps port 8080 on your local machine to port 80 in the container.
6. Verify the Container is Running: Check if the container is running with:

7. Access the Running Container: If you're using the nginx image as in the example, you can
access the container by opening a browser and going to http://localhost:8080.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB


RESULT:
Thus, the exercise run the container using docker hub executed successfully.

RAMCO INSTITUTE OF TECHNOLOGY CCS335-CLOUD COMPUTING LAB

You might also like