CSB 4405 – CLOUD DEPLOYMENT
LAB OBSERVATION
Raaghav Bagri
21113098
Department of CSE
1
LIST OF EXPERIMENTS
S. No. Name of the Experiment Page No. Signature
1. Create & run Virtual Machines using VMWare 3
Workstation or Virtual Box
2. 5
Create Amazon EC2 Instance
3. 8
Host a static website on Amazon S3
4. Creation of VM Image of base Operating 11
System
5. Implement Infrastructure as a Service using 13
OpenStack
6. Implement Software as a Service using 15
OwnCloud
7. 21
Installation of Hadoop
8. 24
Usage of Hadoop for File Systems
9. Install & learn administrative features of 27
OwnCloud
10. Create & manage user and group of user 31
accounts by OwnCloud
2
EXERCISE - 1
CREATE AND RUN VIRTUAL MACHINES USING VM WARE
WORKSTATION/VIRTUAL BOX
AIM:
To Create and run virtual machines using VMWare Workstation/Virtual Box
REQUIREMENTS:
– CPU: Intel Core 2 Duo or AMD equivalent
– RAM: A minimum of 4 GB of RAM, but 8 GB or more is recommended
– Storage: virtual machine's files (at least 20 GB)
– Host Operating System: A 64-bit version of Windows, macOS, or Linux
– Internet Connection: An internet connection may be required to download the
virtualization software and the guest operating system
– ISO File: An ISO file of the guest operating system you want to install on the virtual
machine
PROCEDURE:
Section 1: Configuring Virtual Machine on VirtualBox of Linux
Step 1: Click on the New button on the VirtualBox of Linux.
Step 2: Upload the ISO File there & click Next.
Step 3: Change the Base Memory Size by at least 3000 MB to adjust any Virtual Machine
on Linux
Step 4: In the same way, increase the Disk Size by 30 GB for the same purpose.
Step 5: Click on Finish to continue in the process
Section 2: Setting Up Virtual Machine to Launch on VirtualBox of Linux
Step 1: When the Configuration of Virtual Machine is done, click on the Settings option.
Step 2: Under the General Settings, change to the Version Debian
3
Step 3: Change the Graphics Controller to VBoxVGA & click on the OK option.
Section 3: Executing Virtual Machine on VirtualBox in Linux
Step 1: To launch the Virtual Machine, click on the Start option.
Step 2: Click on the Install option to continue.
Step 3: After a long time & more configuration, it will ask to click on the Continue to
Reboot the Virtual Machine. And hence, we have completed our job.
RESULT:
Creation of run virtual machine using VM Ware Workstation/Virtual Box has been
successfully installed and created
4
EXERCISE - 2
CREATE AMAZON E2 INSTANCE
AIM:
The aim of the experiment to "Create an Amazon EC2 Instance" is to understand the
process of provisioning scalable virtual servers in the cloud using AWS (Amazon Web
Services).
REQUIREMENTS:
1. AWS Account: An active AWS account with proper billing information.
2. EC2 Dashboard Access: Permissions to access the EC2 service.
3. Key Pair: For secure SSH or RDP access to the instance.
4. Security Groups: Defined inbound and outbound rules to control instance
access.
5. Instance Type: Selection of an instance type (e.g., t2.micro for free-tier
users).
6. VPC and Subnet: A Virtual Private Cloud (VPC) with a subnet configuration
for networking.
7. Operating System Image (AMI): Choice of Linux, Windows, or other
Amazon Machine Images (AMIs).
PROCEDURE:
Step-1 : Search bar, search for ec2 and click on Instance
Step-2 : Click on launch instances
Step-3 : After clicking on launch, give it a name in name and tags
5
Step-4 : Keep the "Application and OS Images" and Instance Pair tab as it is,
click on create on new key pair
Step-5 : In this page enter the "Key pair name" and click on "Create Key Pair"
without changing other options
Step-6 : Keeping the "Network Settings", "Configure Storage" and "Advances
Details" as it is, click on "Launch Instance"
Step-7 : Then the launching page should occur
6
Step-8: After launched, the success page should occur
Step-9: After the success page, please go to the EC2 dashboard where your
launched instance should be in "running" state.
With this you instance is successfully launched
Step-10 : After showing the output please select the tickbox next to your instance
and click on instance state, then give stop instance (For Caution)
RESULT:
The result should confirm that you can create, configure, access, and manage an EC2
instance, demonstrating practical understanding of cloud infrastructure management.
7
EXERCISE – 3
CASE STUDY ON MICROSOFT AZURE
AIM:
The aim of hosting a static website on Amazon S3 is to learn how to deploy and
configure static web content in an S3 bucket for public access, and understand the
process of scalable, cost-effective website hosting using AWS cloud infrastructure.
REQUIREMENTS:
1. AWS Account: An active AWS account with S3 service enabled.
2. S3 Bucket: Create an S3 bucket with a unique name to host the website.
3. Static Website Content: HTML, CSS, and JavaScript files for the website.
4. Bucket Policies: Permissions to make the S3 bucket public for web access.
5. S3 Website Hosting Configuration: Enable static website hosting in the
bucket properties.
6. Domain (Optional): A custom domain (optional) with DNS configurations to
point to the S3 bucket URL.
PROCEDURE:
Step-1 : Search for s3 in the search bar on aws home page
Step-2: After taking S3 click on Create bucket
Step-3 : In "General Configuration" give a name to the bucket
Step-4 : Then leaving all the tabs as it is click on create bucket
Step-5 : After the success page please click on the bucket created now
8
Step-6 : Click on the properties section and scroll down to find the "Static website
hosting" and click on edit
Step-7 : Give enable
Step-8 : After giving enable, in the index document enter "index.html" in the
provided text tray
Step-9 : Then scroll down to click save changes
Step-10 : After which the Successful banner occurs
Step-11 : Then enter the permissions section in block public access
and click on edit
Step-12 : In the "edit block public access" un tick Block all public access and
click on Save Changes
Step-13 : In the confirm page type in "confirm" and click on "Confirm"
button once activated
Step-14 : Once the success banner occurs scroll down to Bucket Policy Tab
and click on Edit
Step-15 : In the "Bucket Policy " page please do paste the below code and change
the <Bucket name> alone, then click on save changes
9
CODE:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::Bucket-Name/*"
]
}
]
}
Then create a simple "Hello World" code in html and save it as index.html:
<!DOCTYPE html>
<head>
<title>
Static
</title>
</head>
<body>
<h1>Hello World</h1>
</body>
RESULT:
The static website was successfully hosted on Amazon S3 and is accessible via the
provided endpoint URL. All static content and configurations, including custom error
pages, functioned as expected.
1
0
EXERCISE – 4
CREATION OF VM IMAGE OF BASE OPERARTING SYSTEM
AIM:
To create a virtual machine (VM) image of a base operating system, providing a
standardized and isolated environment.
REQUIREMENTS:
– CPU: A dual-core processor (Intel Core 2 Duo or AMD equivalent)
– RAM: A minimum of 4 GB of RAM, but 8 GB or more is recommended
– Storage: Enough free disk space to store the virtual machine's files (at least 20
GB)
– Virtualization Software: VMware Workstation or VirtualBox
– Base Operating System: VM image of (e.g., Windows, Linux, macOS)
PROCEDURE:
Step 1: Go to File > New Virtual Machine.
Step 2: Select Typical (recommended), and then press Next.
Step 3: Pick how to install the operating system.
Select Installer disc if the operating system is in the disc drive. Otherwise, choose
Installer disc image file (ISO) if you have a file that contains the OS, like a
Windows 10 ISO or an ISO for macOS.
Step 4: Choose precisely where the OS files are located.
Step 5: Press Next to proceed to the screen where you name the new virtual machine
and pick where its files should be stored. Fill out that information and thenselect
Next again
11
Step 6: Define how storage should take place with this virtual machine, and thenpress Next
Step 7: Select Customize Hardware and make any necessary changes.
Step 8: Choose Close to exit the Hardware screen, and then press Finish.
Step 9: Follow any on-screen prompts to begin the OS installation. For example, ifyou see Press
any key to boot from CD or DVD, do that to start the OS setup.
Step 10: Follow the directions for your specific operating system install to add theOS to
VMware Workstation.
RESULT:
Creation of VM image of base operating system is executed and installed successfully.
12
EXERCISE – 5
IMPLEMENT INFRASTRUCTURE AS A SERVICE USING
OPENSTACK
AIM:
To create Infrastructure as a Service Offering using OpenStack platform
REQUIREMENTS:
– A virtual machine with the following configuration in Oracle VirtualBox
– Virtual machine running Ubuntu desktop 22.04 LTS a multi-core processor ideally
with 4+ cores
– A minimum of 8 GiB of RAM memory.
– 50 GiB of Hard disk storage available
PROCEDURE:
Step 1:
Bring up the Ubuntu VM in Oracle virtualBox
In Ubuntu, open a terminal
Install Git
$ sudo apt-get install git
Step 2:
Clone the DevStack repository and change the directory. The code will
set up the cloud infrastructure
$ git clone http://github.com/openstack-dev/devstack
$ cd devstack/
13
Step 3:
Execute the stack.sh script to setup openstack. Give details as
it prompts for (Make sure to note down the passwords you
provide at each step. You can use same password
everywhere)
/devstack$ ./stack.sh
Step 4:
Once the above steps are completed, you will receive
message with pointers to horizon and other details as shown
below
Step 5:
Open the horizon dashboard to view the various management
tools provided to manage the cloud resources
Step 6:
Login using the admin credentials provided during the setup process
Step 7:
Launch instance using the GUI Instance page or run the below
command
The launched instance can be accessed through its IP address and the
ssh key pair chosen during the launch instance step
RESULT:
Implement Infrastructure as a Service by using OpenStack is executed successfully
14
EXERCISE – 6
IMPLEMENT SOFTWARE AS A SERVICE USING OWNCLOUD
AIM:
To create Infrastructure as a Service Offering using OpenStack platform
REQUIREMENTS:
– A virtual machine with the following configuration in Oracle VirtualBox
– Virtual machine running Ubuntu desktop 22.04 LTS a multi-core processor ideally
with 4+ cores
– A minimum of 8 GiB of RAM memory.
– 50 GiB of Hard disk storage available
PROCEDURE:
Step 1:
Bring up the Ubuntu virtual machine in the Oracle VirtualBox
Open the terminal in Ubuntu VM
Setup Docker's apt repository by running the following commands in
the terminal one by one
Step 2:
Install the Docker packages by running the following command in the
terminal
Step 3: Verify that the Docker Engine installation is successful by running the
Hello-World image. Should be receiving the below message as shown in
the screenshot.
Step 4:
Install and run own cloud server using docker (will be setup using sqlite as
database)
15
Step 5:
Now the own cloud server could be accessed at http://localhost:8080
16
Step 6:
Login with the default username “admin” and password “admin”
Step 7:
Try creating a new user and sharing files with the new user
Explore internals of own cloud
RESULT:
Software as a Service with OwnCloud has been set up and executed successfully
17
EXERCISE – 7
INSTALLATION OF HADOOP
AIM:
To install and setup Hadoop
REQUIREMENTS:
– A virtual machine with the following configuration in Oracle VirtualBox
– Access to a terminal window/command line
– Sudo or root privileges on remote machine
– Ubuntu version 20.04, 22.04, or 24.04 installed
PROCEDURE:
Step 1:
Install JDK on Ubuntu
Type the following command in your terminal to install
OpenJDK 8:
sudo apt install openjdk-8-jdk -y
Once the installation process is complete, verify the current
Java version:
java -version; javac –version
Step 2:
Install the OpenSSH server and client using the following
command:
sudo apt install openssh-server openssh-client –y
21
Step 3:
Create Hadoop User
Utilize the adduser command to create a new Hadoop user:
sudo adduser hdoop
The username, in this example, is hdoop. You are free to use
any username and password you see fit.
Switch to the newly created user and enter the corresponding
password:
su – hdoop
Step 4:
Enable Passwordless SSH for Hadoop User
Generate an SSH key pair and define the location it is to be
stored in:
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
Use the cat command to store the public key as
authorized_keys in the ssh directory:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Set the file permissions for your user with the chmod
command:
chmod 0600 ~/.ssh/authorized_keys
Verify everything is set up correctly by using the hdoop user to SSH
to localhost:
ssh localhost
22
Step 5:
Verify everything is set up correctly by using the hdoop user to
SSH to localhost:
ssh localhost
RESULT:
Thus, Hadoop has been successfully installed
23
EXERCISE – 8
USAGE OF HADOOP FOR FILE SYSTEMS
AIM:
To explore the usage of the Hadoop Distributed File System (HDFS)
REQUIREMENTS:
– A virtual machine with the following configuration in Oracle VirtualBox
– Ubuntu version 20.04, 22.04, or 24.04 installed
– Hadoop (preferably version 3.x) installed on your system or cluster
– Java Development Kit (JDK 8 or above)
– SSH for remote access (if setting up a Hadoop cluster)
PROCEDURE:
Step 1:
Set up Hadoop Environment Variables: Add these lines to your .bashrc or
.bash_profile
export HADOOP_HOME=/path/to/Hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export JAVA_HOME=/path/to/jdk
Step 2:
Update configuration files located in the etc/hadoop directory
core-site.xml: Add the NameNode and default HDFS settings.
hdfs-site.xml: Add the replication factor and data directory
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
Format the NameNode:
hdfs namenode –format
24
Step 3:
Start Hadoop Services:
start-dfs.sh
start-yarn.sh
Step 4:
Verify the Hadoop Setup:
Access the HDFS NameNode web interface at http://localhost:9870/ to check if the cluster is
running properly
Step 5:
HDFS Basic Commands
Once Hadoop is set up and running, you can start interacting with the
HDFS file system.
Check the File System Status:
hdfs dfsadmin –report
Create a Directory in HDFS:
hdfs dfs -mkdir /user/yourname/input
Copy Files to HDFS:
hdfs dfs -put /path/to/local/file.txt /user/yourname/input/
List Files in HDFS:
hdfs dfs -ls /user/yourname/input
25
Read a File from HDFS:
hdfs dfs -cat /user/yourname/input/file.txt
Delete Files from HDFS:
hdfs dfs -rm /user/yourname/input/file.txt
Check the File System Usage:
hdfs dfs -du -h /user/yourname/input
Analyze HDFS Usage
Perform basic file operations, such as uploading a larger dataset, and
examine how the HDFS distributes it across DataNodes.
You can also explore fault tolerance by observing how files are replicated
across different DataNodes
RESULT:
Thus, Hadoop has been used to perform file operations successfully installed
26
EXERCISE – 9
INSTALLATION AND LEARN ADMINISTRATIVE FEATURES
OF OWNCLOUD
AIM:
To install ownCloud on a server and explore its administrative features for effective
file management and user administration
REQUIREMENTS:
– A virtual machine with the following configuration in Oracle VirtualBox
– Ubuntu version 20.04, 22.04, or 24.04 installed
– A server with at least 2GB RAM and 20GB storage
– Web Server: Apache or Nginx
– Database: MySQL or MariaDB
– PHP: Version 7.4 or higher
– PHP modules: php-gd, php-json, php-mysql, php-curl, php-mbstring, php-intl,
php-xml, php-zip
– Additional tools: wget, unzip
PROCEDURE:
Step 1:
Installing ownCloud
The first step in installing ownCloud is to make sure that your
machine has a Fully-Qualified Domain Name. This will allow the
server to properly redirect any requests towards it
Step 2:
Configure a domain (or subdomain) to point to your server’s IP
address. To do this, go to your registrar’s website and add an “A”
record with your machine’s IPv4 address
Step 3:
Once done, update your entire system
27
Step 4:
Installing Docker and Docker Compose
Install the Docker project’s third-party repository key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Step 5:
Create a new apt repository file for Docker in “/etc/apt/sources.list.d/:
Step 6:
Insert the following line of code inside your new “docker.list” file
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg]
https://download.docker.com/linux/ubuntu jammy stable
Step 7:
Save the file (using keyboard shortcut Ctrl + O) and exit the text editor
28
Step 8:
Refresh your system’s apt repository with the following command
Step 9:
Install Docker along with its necessary utilities with the following
command
sudo apt install wget openssl docker-ce docker-ce-cli
containerd.io docker-compose-plugin docker-buildx-plugin
30
Step 10:
Preparing the System for the ownCloud Container
Create a new directory for your server’s Docker files
Step 11:
Download the ownCloud Docker Compose template from the
developers’ website
wget https://raw.githubusercontent.com/owncloud/docs-
server/master/modules/admin_manual/examples/installation/docker
/docker-compose.yml
Step 12:
Create a Docker environment file inside your Docker container’s
folder
Step 13:
Add the basic environment variables that you want to use for your
ownCloud instance. The following is an example template
Save your “.env” file and exit.
Run Docker Compose on the container’s directory
RESULT:
Thus, the program to Install and learn the Administrative
Features of OwnCloud isexecuted successfully
30
EXERCISE – 10
CREATE & MANAGE USER AND GROUP OF USER
ACCOUNTS IN OWNCLOUD
AIM:
To create and manage user and group accounts in ownCloud, providing a collaborative
platform where users can share and manage files securely
REQUIREMENTS:
– OwnCloud Server
– Admin Access
– Internet Browser
– User list
– Group Specifications
PROCEDURE:
Step 1:
Each person needs their own account and this will be created and
managed by any user in the admin group
Once an administrator is logged in, they can click on the triangle to the
right of their username, in the top right-hand corner
The first user is in the admin group by default. It is possible to add
more administrators simply by adding more users to the admin group
Step 2:
After clicking the triangle, a menu unfolds with options to enter the
following sections: Personal, Users, Apps, Admin, Help and Log out.
Click on the Users item to get an overview of which accounts are
already installed
31
1
Step 3:
Groups are normally used for sharing files between users. One of the first
things to do after a new installation is to create groups based on how you
imagine people will be grouped on your server.
Only an admin group exists in the beginning
Step 4: Go to the Groups field and wait for the menu to open. Hover over the + add
group field, enter a name for the group and hit enter.
Now one can start adding users and adding them to specific groups. To
create other administrators add them to the admin group.
Simply enter the new user's name, a password, check a group and
press Create
RESULT:
Thus, a program to create & manage user and group of user accounts in OwnCloud
is executed successfully
31
2
41
3