PROJECT GUIDE · 02

Deploy Enterprise Cloud Infrastructure

Set up VirtualBox, install Ubuntu Linux, configure a web server, set up storage, and simulate cloud infrastructure — all on your local computer. This is your first real hands-on cloud engineering experience.

Environment
VirtualBox + Ubuntu 22.04
Local machine (no cloud billing)
Difficulty
⭐⭐ Beginner–Intermediate
First hands-on Linux project
Course Module
Chapter 3
Cloud Infrastructure Fundamentals
Duration
2–3 Days
VM + Web Server + Storage

1. System Architecture – Local Cloud Lab

In a real cloud environment, you would provision virtual machines on AWS, Azure, or Google Cloud. In this project, you will simulate that exact same architecture on your own computer using VirtualBox. VirtualBox is a free program that lets your computer run multiple virtual computers inside it — this is exactly how cloud providers work (they run millions of VMs on their physical servers).

YOUR PHYSICAL COMPUTER (HOST MACHINE) Windows / macOS / Linux · This is like the physical server rack in a data center VIRTUALBOX (HYPERVISOR TYPE 2) — Simulates hardware for VMs VIRTUAL MACHINE 1 Ubuntu 22.04 LTS 🌐 Nginx Web Server 📁 /var/www/html 🔒 UFW Firewall IP: 192.168.56.10 STORAGE SERVER Ubuntu 22.04 LTS 🗄 Block Storage (10GB) 📦 Object Storage Sim 📂 Shared Folders IP: 192.168.56.11 CONCEPTS (Phase 2) Cloud Simulation ⚖ Load Balancer (HAProxy) 📊 Monitoring (htop) 🌍 Public Access (Port 80) IP: 192.168.56.12
⚠ Hardware Requirements Your computer needs at least: 8 GB RAM (16 GB recommended), 50 GB free disk space, and a 64-bit processor with virtualization enabled. If your computer has only 4 GB RAM, use only one VM at a time.

2. Step-by-Step Action Items

You will complete this project in three major phases: (1) Install VirtualBox and set up Ubuntu, (2) Configure the web server and storage, and (3) Verify everything is working. Take screenshots at each major step — these are part of your deliverables.

PHASE 1 · STEP 1 Install VirtualBox on Your Computer

VirtualBox is the program that allows your computer to run Ubuntu Linux as a virtual machine. Think of it as a computer inside your computer. This is the same technology cloud providers use — just on a massive scale.

1
Open your web browser and go to https://www.virtualbox.org/wiki/Downloads
2
Under "VirtualBox [version] platform packages", click the link that matches your operating system:
• If your host machine runs Windows → click "Windows hosts"
• If your host machine runs macOS → click "macOS / Intel hosts" or "macOS / Arm hosts"
3
Save the installer file to your Downloads folder. The file will be named something like VirtualBox-7.x.x-Win.exe
4
Double-click the installer file in your Downloads folder to start the installation.
5
Click "Next" on the first screen (Welcome to the VirtualBox Setup Wizard).
6
Leave the default installation location as-is and click "Next".
7
On the "Warning: Network Interfaces" screen, click "Yes". This is normal — VirtualBox needs to briefly disconnect your internet to install a virtual network adapter.
8
Click "Install" to begin. If Windows asks "Do you want to allow this app to make changes?" click "Yes".
9
When installation is complete, make sure "Start Oracle VirtualBox after installation" is checked, then click "Finish". VirtualBox will open automatically.
VirtualBox acts as a Type 2 Hypervisor — software that runs on top of your existing operating system and manages virtual machines. This is different from cloud providers (which use Type 1 hypervisors running directly on bare metal), but the fundamental concept is identical: one physical machine divided into multiple isolated virtual machines.
✅ Verification VirtualBox is correctly installed when you see the VirtualBox Manager window open with a left panel showing "Tools" and buttons to "New", "Add", "Settings", "Discard", and "Start" VMs.
PHASE 1 · STEP 2 Download Ubuntu 22.04 LTS ISO File

Ubuntu is the Linux distribution we will use. LTS stands for "Long Term Support" — it receives security updates for 5 years. Ubuntu 22.04 is one of the most widely used Linux versions in cloud environments. The ISO file is like a digital DVD — it contains the complete operating system.

1
Open your browser and go to https://ubuntu.com/download/server
2
Click "Download Ubuntu Server 22.04 LTS". The file is approximately 1.5 GB. Wait for the download to complete — this may take 10–30 minutes depending on your internet speed.
3
Save the file to a location you can easily find, such as your Desktop or a folder called C:\VMs\ISOs\
4
The filename will be something like: ubuntu-22.04.x-live-server-amd64.iso — verify the download completed fully (the file size should be approximately 1.5–1.8 GB).
We use the Server version of Ubuntu rather than the Desktop version because cloud servers do not have a graphical user interface (GUI). Real cloud VMs are managed through the command line — this is exactly how cloud engineers interact with production servers. Learning to work without a GUI is a fundamental cloud engineering skill.
PHASE 1 · STEP 3 Create Your First Virtual Machine in VirtualBox

Now you will create the virtual machine. Think of this as purchasing and configuring a cloud VM — you are choosing the number of CPUs, amount of RAM, and disk size, just like selecting an instance type in AWS or Azure.

1
In VirtualBox Manager, click the blue "New" button in the toolbar at the top.
2
In the "Create Virtual Machine" dialog:
• Name: Type ABC-Retail-WebServer
• Machine Folder: Leave as default (or choose a folder with enough space)
• Type: Select Linux
• Version: Select Ubuntu (64-bit)
Then click "Next"
3
Memory size: Move the slider to set RAM. Use 2048 MB (2 GB) if you have 8 GB total, or 4096 MB (4 GB) if you have 16 GB or more. Then click "Next".
4
Hard disk: Select "Create a virtual hard disk now" then click "Create".
5
Hard disk file type: Leave "VDI (VirtualBox Disk Image)" selected. Click "Next".
6
Storage on physical hard disk: Select "Dynamically allocated". This means the virtual disk file only uses real disk space as data is added (efficient). Click "Next".
7
File location and size: Set size to 20 GB. Then click "Create".
You have just done the equivalent of launching a new EC2 instance on AWS or a VM on Azure — you configured the compute resources (CPU, RAM) and storage (virtual hard disk) for your virtual server. In a real cloud environment, this same process takes about 30 seconds via the web console or AWS CLI.
8
Your new VM now appears in the left panel of VirtualBox Manager. Right-click on it and select "Settings".
9
In Settings → Storage: Click on the "Empty" item under "Controller: IDE". Then click the small disc icon on the right side of the screen (next to "Optical Drive"). Select "Choose a disk file..." and navigate to your Ubuntu ISO file. Click "Open", then click "OK" to close Settings.
Attaching the ISO file to the virtual optical drive is equivalent to inserting an installation DVD into a physical computer. The VM will "boot from" this ISO file when it starts, just like a real server would boot from its installation media.
10
Configure the network (important for later): In Settings → Network → Adapter 1, make sure it's set to "NAT" (allows the VM to access the internet through your computer). Then enable Adapter 2, set it to "Host-only Adapter" (allows your computer to talk directly to the VM). Click "OK".
Having two network adapters mirrors real cloud infrastructure: one interface connects the VM to the internet (NAT = like a public IP), while the other connects VMs to each other privately (Host-only = like a private subnet in a VPC). This separation of public and private networks is fundamental to cloud network security.
PHASE 1 · STEP 4 Install Ubuntu Server on Your Virtual Machine

Now you will actually install the Ubuntu operating system. This process is similar to what happens automatically when a cloud provider provisions a VM — they install the OS from a pre-built image. You are doing it manually to understand exactly what's happening inside.

1
Select your VM in VirtualBox Manager (click on "ABC-Retail-WebServer"). Then click the green "Start" button in the toolbar.
2
A black window will open — this is your VM's screen. After a few seconds you will see the Ubuntu installer with the text "GNU GRUB" and a menu. Use the arrow keys to select "Try or Install Ubuntu Server" and press Enter.
3
Language selection: Select "English" and press Enter.
4
Keyboard layout: Keep the default (English US/US) and press Enter to select "Done".
5
Type of installation: Select "Ubuntu Server" (not minimized). Press Enter on "Done".
6
Network configuration: You should see two network interfaces (enp0s3 for NAT, enp0s8 for Host-only). Both should show "DHCPv4" and have IP addresses. Press Enter on "Done".
7
Proxy address: Leave blank. Press Enter on "Done".
8
Ubuntu archive mirror: Leave as default. Press Enter on "Done" (it will test connectivity — wait a moment).
9
Storage configuration: Select "Use an entire disk". The 20GB virtual disk you created will be selected automatically. Press Enter on "Done".
10
Storage configuration summary: Review the partition plan. Press Enter on "Done", then select "Continue" when asked "Confirm destructive action".
11
Profile setup — IMPORTANT: Fill in your details:
• Your name: cloudadmin
• Your server's name: abc-retail-web
• Username: cloudadmin
• Password: CloudPass@123 (or something you will remember — write it down!)
Then select "Done".
12
Ubuntu Pro: Select "Skip for now", then "Continue".
13
SSH Setup: Press Space to CHECK the box next to "Install OpenSSH server". This is important — it allows you to connect to the VM via terminal later. Then select "Done".
14
Featured Server Snaps: Do not select anything. Just select "Done".
15
Installation begins. Watch the progress bar. This will take approximately 10–20 minutes. You will see packages being downloaded and installed.
16
When complete, you will see "Installation complete!" at the top and a "Reboot Now" button at the bottom. Select "Reboot Now" and press Enter.
17
After reboot, when you see "Please remove the installation medium, then press ENTER" — just press Enter. The VM will restart.
18
Login prompt: After the VM boots, you will see a login prompt. Type your username cloudadmin and press Enter. Then type your password (it won't show on screen — this is normal for Linux) and press Enter.
OpenSSH Server enables Secure Shell (SSH) — a protocol that allows you to securely connect to and control the server remotely from a terminal. In cloud environments, you almost never interact directly with the server's console; instead, you SSH in from your workstation. By installing SSH during setup, you are replicating real-world cloud server management.
✅ Success! You should see a prompt like: cloudadmin@abc-retail-web:~$ — This means Ubuntu is installed and you are logged in as the system administrator. Congratulations — you have a running Linux server!
PHASE 2 · STEP 1 Run Your First Linux Commands – Understanding the Terminal

The Linux command line is how you control cloud servers. Every command you type here is the same type of command used by cloud engineers at Amazon, Google, and Microsoft to manage production servers. Take time to understand each command — don't just copy-paste without reading the explanation.

1
First, find out your VM's IP address. Type this command exactly and press Enter:
ip addr show
The ip addr show command displays all network interfaces and their IP addresses on this machine. You will see two interfaces: enp0s3 (your NAT connection to the internet) and enp0s8 (your Host-only adapter). Look for the IP address next to "inet" on the enp0s8 interface — it will look like 192.168.56.xxx. Write this IP down — you will need it to access the website later.
2
Update the package list to get the latest available software. This is like running Windows Update before installing programs:
sudo apt update
The sudo command means "Super User Do" — it runs the following command with administrator (root) privileges. In Linux, regular users cannot install software without administrator permission. The apt update command contacts Ubuntu's software repositories and downloads the latest list of available packages. It does NOT install anything yet — it just refreshes the list.
3
Upgrade installed packages to their latest versions (type "Y" and press Enter when asked):
sudo apt upgrade -y
The apt upgrade command downloads and installs all available updates for software already installed on the system. The -y flag automatically answers "Yes" to any confirmation prompts. Running updates before installing anything else is a security best practice — cloud servers should always be patched before being exposed to the network.
4
Check the server's hostname (its name on the network):
hostname
The hostname command displays the name assigned to this server. You should see abc-retail-web — the name you chose during installation. In cloud environments, hostnames are important for DNS resolution, monitoring systems, and log aggregation. Every server should have a meaningful, descriptive hostname.
5
Check disk space (how much storage the server has):
df -h
The df command stands for "disk free" — it shows disk usage for all file systems. The -h flag means "human readable" — instead of showing numbers in bytes, it shows them in MB and GB. You should see that the 20 GB virtual disk you created is mostly empty. This command is used daily by cloud engineers to monitor storage capacity before it runs out.
6
Check available memory (RAM):
free -h
The free command shows how much RAM is being used and how much is available. The -h flag makes it human-readable. You will see "total", "used", "free", "shared", "buff/cache", and "available" columns. The "available" number is what can be allocated to new processes. Cloud engineers monitor this metric to determine if a server needs more RAM or if the application is using too much memory.
PHASE 2 · STEP 2 Install and Configure Nginx Web Server

Nginx (pronounced "Engine-X") is one of the world's most popular web servers. It is used by Netflix, Cloudflare, and thousands of other companies. You will install it to serve the ABC Retail website from your virtual machine.

1
Install Nginx:
sudo apt install nginx -y
The apt install nginx command downloads and installs the Nginx web server package and all its dependencies. After installation, Ubuntu automatically starts the Nginx service. This single command replaces what used to require hours of manual configuration on physical servers — this is the power of package management in Linux.
2
Verify Nginx is running:
sudo systemctl status nginx
The systemctl status command checks the current status of a system service. For Nginx, you should see green text saying ● nginx.service - A high performance web server... with Active: active (running) below it. If it says "inactive" or "failed", something went wrong during installation — run sudo systemctl start nginx to try starting it manually. The systemctl tool is how Linux manages all background services (called daemons).
3
Configure the firewall to allow web traffic:
sudo ufw allow 'Nginx Full' sudo ufw allow OpenSSH sudo ufw enable
UFW (Uncomplicated Firewall) is Ubuntu's built-in firewall tool. The first command allows HTTP (port 80) and HTTPS (port 443) traffic to reach Nginx. The second command allows SSH (port 22) so you don't get locked out. The third command activates the firewall. Without these rules, no external connections can reach the server — this is exactly how Security Groups work in AWS: everything is blocked by default and you explicitly allow only what you need.
4
Check firewall status:
sudo ufw status verbose
This command shows which firewall rules are currently active. You should see entries for Nginx (port 80/443) and OpenSSH (port 22) both showing "ALLOW". All other ports are blocked by default. This output is what you would screenshot for your firewall configuration documentation.
5
Create the ABC Retail website files. First, create the project directory:
sudo mkdir -p /var/www/abc-retail/html
The mkdir command (make directory) creates a new folder. The -p flag creates all parent directories if they don't exist. /var/www/ is the standard Linux location for web content. In cloud environments, web content is often stored in this location or on attached storage volumes. We're creating a specific folder for ABC Retail to keep things organized.
6
Set the correct ownership of the web directory so Nginx can read the files:
sudo chown -R $USER:$USER /var/www/abc-retail/html
The chown command changes file ownership. The -R flag applies the change recursively (to all files inside the directory). $USER is an environment variable that automatically inserts your current username. This is important because Nginx needs permission to read website files. Incorrect file permissions are one of the most common causes of "403 Forbidden" errors in web servers.
7
Create the ABC Retail website (a simple but complete HTML page):
cat > /var/www/abc-retail/html/index.html << 'EOF' <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ABC Retail – Cloud Migration Complete</title> <style> body { font-family: Arial, sans-serif; background: #0f172a; color: #f8fafc; text-align: center; padding: 60px 20px; } h1 { color: #38bdf8; font-size: 36px; } p { color: #94a3b8; font-size: 18px; } .badge { display: inline-block; background: rgba(52,211,153,0.2); border: 1px solid #34d399; color: #34d399; padding: 8px 20px; border-radius: 8px; margin: 20px 0; } </style> </head> <body> <h1>🏪 ABC Retail Pvt. Ltd.</h1> <p>Welcome to our Cloud-Hosted Website</p> <div class="badge">✅ Cloud Migration Phase 2 – Infrastructure Deployed</div> <p>Served by: Nginx on Ubuntu 22.04 LTS | VirtualBox Cloud Lab</p> </body> </html> EOF
The cat > command combined with << 'EOF' is called a "here document" — it lets you write multiple lines of text directly into a file from the terminal without opening a text editor. Everything between the two EOF markers is written to the file. This is a technique used in cloud automation scripts to create configuration files programmatically.
8
Create the Nginx configuration to serve the ABC Retail website:
sudo nano /etc/nginx/sites-available/abc-retail
The nano text editor opens a simple in-terminal editor. The file you are opening is a new Nginx "server block" configuration file — this tells Nginx how to handle requests for the ABC Retail website. The /etc/nginx/sites-available/ directory is where Nginx configurations are stored. Using nano, type the configuration in the next step.
9
In the nano editor, type the following configuration exactly:
server { listen 80; server_name abc-retail.local; root /var/www/abc-retail/html; index index.html index.htm; location / { try_files $uri $uri/ =404; } }
This Nginx server block configuration tells Nginx: listen for HTTP connections on port 80, serve files from the /var/www/abc-retail/html directory, and use index.html as the default page. The location / block handles all URL paths. When a browser requests / (the homepage), Nginx tries to find a file matching that path, then a directory, and returns 404 if neither exists.
10
Save and exit nano: Press Ctrl+O then press Enter (to save), then press Ctrl+X (to exit nano).
11
Enable the new site by creating a symbolic link:
sudo ln -s /etc/nginx/sites-available/abc-retail /etc/nginx/sites-enabled/
The ln -s command creates a symbolic link (shortcut). Nginx has two directories: sites-available (where configurations are stored) and sites-enabled (what Nginx actually loads). By creating a link in sites-enabled pointing to our configuration in sites-available, we activate the site without duplicating the file. This design allows you to quickly enable/disable sites by creating or deleting links.
12
Test the Nginx configuration for syntax errors:
sudo nginx -t
The nginx -t command parses all configuration files and checks for syntax errors without actually restarting Nginx. This is critical — never reload Nginx without testing first. A syntax error in the configuration would cause Nginx to fail to restart, taking down the website. You should see "syntax is ok" and "test is successful".
13
Reload Nginx to apply the new configuration:
sudo systemctl reload nginx
The systemctl reload command sends a signal to Nginx to re-read its configuration files without stopping active connections. This is different from restart — a reload maintains existing connections, meaning website visitors don't experience any interruption. In production environments, reloads are always preferred over restarts for zero-downtime configuration changes.
14
Test the website is working from inside the VM:
curl http://localhost
The curl command sends an HTTP request to a URL and displays the response. When you run curl http://localhost, you are telling your VM to request its own website. You should see the HTML code of your ABC Retail page in the terminal output. This verifies that Nginx is serving the website correctly. If you see the HTML, the web server is working.
PHASE 2 · STEP 3 Access the Website from Your Host Computer

Now you will access the website you just deployed — from your main computer's web browser, just like a real user would access it from the internet.

1
First, find the VM's Host-only IP address. In your VM terminal, type:
ip addr show enp0s8 | grep "inet "
This command shows only the IPv4 address of the second network interface (enp0s8 — your Host-only adapter). The | symbol is called a "pipe" — it sends the output of ip addr show into the grep command, which filters for lines containing "inet " (the IPv4 address line). You should see something like inet 192.168.56.101/24 — the number before /24 is your VM's IP address.
2
Note the IP address — for example: 192.168.56.101. Write it down.
3
On your main computer (HOST), open a web browser (Chrome, Firefox, Edge, etc.).
4
In the browser address bar, type your VM's IP address (e.g., http://192.168.56.101) and press Enter.
5
You should see the ABC Retail webpage with the dark background and green badge. If you see it — congratulations! Your virtual cloud server is successfully serving a website! Take a screenshot of this browser window — it's a required deliverable.
✅ What This Proves Your computer is now simulating a complete cloud infrastructure: a virtual machine running a Linux OS with a web server, accessible via a network connection. This is functionally identical to what AWS EC2, Azure VM, or GCP Compute Engine provide — just on a smaller, local scale.
PHASE 2 · STEP 4 Configure Storage – Block Storage and File Organization

Cloud environments have multiple types of storage. In this step, you will simulate block storage (by adding a virtual disk) and practice Linux storage management commands that are essential for cloud engineers.

1
Back in VirtualBox Manager, make sure your VM is still running. Go to Settings → Storage → Add Hard Disk (the small + icon next to "Controller: SATA"). Select "Create a new disk", choose "VDI", "Dynamically allocated", set size to 5 GB, name it ABC-Retail-DataDisk, and click "Create".
2
Back in your VM terminal, check that the new disk appeared:
lsblk
The lsblk command lists all block devices (storage devices) attached to the system. You should now see two disks: sda (your original 20GB OS disk) and sdb (your new 5GB data disk). This is the equivalent of looking at what EBS volumes are attached to an EC2 instance in AWS. Note that sdb has no partitions or mount points yet — it's a raw disk.
3
Format the new disk with the ext4 filesystem:
sudo mkfs.ext4 /dev/sdb
The mkfs.ext4 command creates a filesystem on the disk. EXT4 is the standard Linux filesystem, equivalent to NTFS on Windows. Think of this as "initializing" a blank hard drive before you can use it. In AWS, when you create an EBS volume and attach it to an EC2 instance, you also need to format it before use. Type y and press Enter if asked to proceed.
4
Create a mount point (a directory that will represent the disk):
sudo mkdir -p /data/abc-retail
In Linux, disks must be "mounted" to a directory before they can be used. The mount point is just an empty directory that becomes the entry point to the disk's content. By convention, additional data storage is often placed in /data or /mnt. This mirrors how cloud block storage works — in AWS, you mount an EBS volume to a directory path on the EC2 instance.
5
Mount the new disk to the directory:
sudo mount /dev/sdb /data/abc-retail
The mount command attaches a storage device to the filesystem at a specified path. After this command, any files written to /data/abc-retail/ are physically stored on the /dev/sdb disk. This separation is important: if the OS disk (sda) fails, the data disk (sdb) and all its contents remain safe.
6
Verify the disk is mounted:
df -h /data/abc-retail
This command shows the disk usage and available space for specifically the /data/abc-retail mount point. You should see approximately 5 GB total with most of it available. This is exactly the information you would check after attaching and mounting a cloud block storage volume to verify it is correctly configured.
7
Make the mount permanent so it survives reboots:
echo "/dev/sdb /data/abc-retail ext4 defaults 0 2" | sudo tee -a /etc/fstab
The /etc/fstab file (filesystem table) tells Linux which disks to mount automatically when the system boots. Without adding an entry here, the disk would need to be manually re-mounted after every reboot. The tee -a command appends the text to the file. In cloud environments, auto-mounting persistent storage is essential — cloud VMs restart periodically for maintenance.
8
Create some test data on the new disk to verify it works:
sudo mkdir -p /data/abc-retail/{uploads,backups,logs} echo "ABC Retail product image placeholder" | sudo tee /data/abc-retail/uploads/product1.txt ls -la /data/abc-retail/
The first command creates three subdirectories (uploads, backups, logs) inside the data disk — using the "brace expansion" feature of bash which creates multiple directories at once. The second command writes a test file. The ls -la command lists all files with detailed information including permissions, ownership, and size. This directory structure simulates how an organization would organize files on cloud block storage.
PHASE 3 · VERIFY Monitor and Verify the Infrastructure

Cloud engineers constantly monitor their infrastructure. In this step, you will run monitoring commands and document the state of your server — an important professional habit.

1
Check running processes:
ps aux | grep nginx
The ps aux command lists all running processes on the system. The grep nginx filter shows only lines containing "nginx". You should see the Nginx master process and worker processes. In a real cloud environment, monitoring tools like AWS CloudWatch automatically track these processes — here you are doing it manually to understand what's happening.
2
View Nginx access logs (see who is visiting the website):
sudo tail -20 /var/log/nginx/access.log
The tail command shows the last lines of a file, and -20 shows the last 20 lines. The Nginx access log records every HTTP request received by the server — the time, the client IP, the requested URL, and the response code. When you accessed the website from your browser, that request was logged here. Log analysis is a critical cloud operations skill for troubleshooting and security monitoring.
3
Create an infrastructure status report:
echo "=== ABC Retail VM Status Report ===" echo "Date: $(date)" echo "" echo "=== Hostname ===" hostname echo "" echo "=== Network Interfaces ===" ip addr show | grep "inet " echo "" echo "=== Disk Usage ===" df -h echo "" echo "=== Memory Usage ===" free -h echo "" echo "=== Web Server Status ===" sudo systemctl status nginx | head -5 echo "" echo "=== Firewall Rules ===" sudo ufw status
This set of commands generates a status report showing the current state of the server across all key dimensions: networking, storage, memory, web server health, and security. Run these commands and copy the output into a text file — this becomes part of your documentation deliverable. Professional cloud engineers document their infrastructure state after every significant change.
4
Take a final screenshot of your VM terminal showing the running server status. This is a required deliverable.

3. Infrastructure Deployment Pipeline

This diagram shows the automated pipeline that cloud providers use to provision new virtual machines — which mirrors the manual steps you just completed.

🖥 PROVISION VM CPU + RAM + Disk VirtualBox / AWS EC2 🐧 INSTALL OS Ubuntu 22.04 LTS Configure network 🔒 SECURE UFW Firewall Allow 80/443/22 🌐 DEPLOY APP Nginx Web Server HTML Website 📊 MONITOR Logs + Status Disk + Memory ✓ COMPLETE: Web server running and accessible from host machine

4. Complete Deliverable Assets & Configuration Files

setup-webserver.sh — Automated Setup Script (Run this to redo setup instantly)
#!/bin/bash # ABC Retail - Web Server Setup Script # Run with: bash setup-webserver.sh # This automates all steps from Phase 2 set -e # Exit immediately if any command fails echo "=== ABC Retail Web Server Setup ===" # Step 1: Update system packages echo "[1/7] Updating system..." sudo apt update -y && sudo apt upgrade -y # Step 2: Install Nginx web server echo "[2/7] Installing Nginx..." sudo apt install nginx -y # Step 3: Configure firewall echo "[3/7] Configuring firewall..." sudo ufw allow 'Nginx Full' sudo ufw allow OpenSSH sudo ufw --force enable # Step 4: Create web directory structure echo "[4/7] Creating web directories..." sudo mkdir -p /var/www/abc-retail/html sudo chown -R $USER:$USER /var/www/abc-retail # Step 5: Create website content echo "[5/7] Deploying website..." cat > /var/www/abc-retail/html/index.html <<'EOF' <!DOCTYPE html> <html><head><title>ABC Retail</title></head> <body style="background:#0f172a;color:#f8fafc;text-align:center;padding:60px"> <h1 style="color:#38bdf8">ABC Retail - Cloud Infrastructure Live</h1> </body></html> EOF # Step 6: Configure Nginx server block echo "[6/7] Configuring Nginx..." sudo tee /etc/nginx/sites-available/abc-retail > /dev/null <<'EOF' server { listen 80 default_server; root /var/www/abc-retail/html; index index.html; location / { try_files $uri $uri/ =404; } } EOF sudo ln -sf /etc/nginx/sites-available/abc-retail /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx # Step 7: Verify and report echo "[7/7] Verification..." sudo systemctl status nginx --no-pager echo "" echo "Server IP: $(ip addr show enp0s8 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)" echo "=== Setup Complete! Access website at http://[above IP] ==="

5. Deliverables Summary

📋 Files to Submit

  • Screenshot: VirtualBox showing VM running
  • Screenshot: Ubuntu login prompt / terminal
  • Screenshot: Website open in host browser
  • Screenshot: df -h output showing storage
  • Screenshot: sudo systemctl status nginx
  • Screenshot: sudo ufw status verbose
  • setup-webserver.sh script
  • Project README.md file

✅ Verification Checklist

  • VirtualBox installed and running
  • Ubuntu 22.04 VM created and started
  • System updates applied
  • Nginx installed and running (active status)
  • UFW firewall enabled with correct rules
  • ABC Retail HTML website created
  • Website accessible from host browser
  • Second virtual disk attached and mounted
  • Disk mount permanent (added to /etc/fstab)
  • Nginx access log shows requests

6. Why We Did This & What It Accomplishes

Strategic Intent & Operational Impact

Why We Did This

What This Accomplishes