cover photo

COURSEWORK

Prathamesh's CL-CY-001 course work. Lv 2

PrathameshAUTHORACTIVE
work cover photo
This Report is yet to be approved by a Coordinator.

13 / 10 / 2026


Marvel-CLCY-Level--1

Cloud Computing (CL)

Task 1: Git and GitHub Basics

What I Did

  • Configured Git with my identity using git config
  • Created a repository on GitHub called Marvel-CL-Level--1-
  • Cloned the repository to my local Ubuntu machine
  • Created a new branch called feature/git-practice to work safely without affecting the main code
  • Edited the README.md file using the nano text editor
  • Staged and committed the changes with a meaningful message
  • Pushed the branch to GitHub and opened a Pull Request
  • Merged the Pull Request into the main branch
  • Practiced git revert to safely undo a commit without deleting history
  • Practiced git cherry-pick to pick one specific commit from history

Commands Used

CommandWhat it does
git config --global user.nameSet my name so every commit is tagged with my identity
git clone [link]Download the repository from GitHub to my laptop
git checkout -b branchnameCreate a new branch to work safely
git statusCheck what files were changed
git add .Select all changed files to be saved
git commit -m "message"Save a snapshot of the changes with a label
git push origin branchnameUpload the branch to GitHub
git log --onelineSee all commits in short form
git revert HEADSafely undo the last commit without deleting history
git cherry-pick [id]Pick one specific commit from history and apply it

Key Concepts Learned

  • Branch: A parallel copy of the project to experiment without breaking the original
  • Commit: A saved snapshot of your work at a point in time
  • Pull Request (PR): A request to merge your branch changes into the main branch
  • Revert: Undoes a commit by creating a new commit — history stays intact
  • Cherry-pick: Takes one specific commit from history without taking everything else

Screenshot

Final Outcome

Successfully practiced the complete Git workflow — from cloning a repository to branching, committing, pushing, opening a pull request, merging, reverting, and cherry-picking. Understood the purpose of each command and when to use it.

Task 2: Docker Fundamentals

What is Docker?

Docker is a tool that lets you run applications inside isolated boxes called containers. The application and everything it needs to run is packaged together inside the container — so it works the same on any machine.

Containers vs Virtual Machines

FeatureVirtual Machine (VM)Container
What it isA full computer rented inside your computerJust a room inside a shared house
Has its own OS?YesNo — shares the host OS
SpeedSlower to startStarts in seconds
SizeHeavy (GBs)Lightweight (MBs)

Think of it this way:

  • VM = Renting an entire house (own kitchen, bedroom, everything)
  • Container = Renting just one room in a shared house

What I Did

  • Installed Docker on Ubuntu using sudo apt install docker.io
  • Started and enabled the Docker service
  • Ran docker run hello-world to verify Docker was working
  • Pulled the Nginx image from Docker Hub
  • Ran Nginx as a container and mapped port 8080 on my laptop to port 80 inside the container
  • Accessed the running website at http://localhost:8080 from the browser
  • Inspected running containers, viewed logs, stopped and removed the container

Commands Used

CommandWhat it does
sudo apt install docker.ioInstall Docker on Ubuntu
sudo systemctl start dockerStart the Docker service
docker run hello-worldTest if Docker is working
docker pull nginxDownload the Nginx image from Docker Hub
docker run -d -p 8080:80 --name my-nginx nginxRun Nginx container in background, map ports
docker psSee all running containers
docker logs my-nginxView the container's activity logs
docker stop my-nginxStop the running container
docker rm my-nginxRemove the container

Key Concepts Learned

  • Image: A recipe or blueprint for a container (like a cake recipe)
  • Container: The actual running instance created from an image (the actual cake)
  • Docker Hub: An online library of images — like an app store for containers
  • Port Mapping (-p 8080:80): Connects laptop's port 8080 to container's port 80 so the browser can reach it

Screenshot

Final Outcome

Successfully installed Docker, pulled the Nginx image, ran it as a container, accessed it from the browser, and managed the full container lifecycle — start, inspect, logs, stop.

Task 3: Dockerize a Simple Application

What is this task?

A Dockerfile describes how to package an application into an image. This task containerizes a static website from the starter code, runs it locally, and opens it in the browser through a mapped port.

Flow: Dockerfile → docker build → image → docker run -p 8080:80 → Browser (localhost:8080)

What I Did

  • Wrote a Dockerfile on top of nginx:alpine that copies the starter website into Nginx's web root
  • Built the image as my-app
  • Ran it as a container named my-app-container and mapped host port 8080 to container port 80
  • Opened http://localhost:8080 in the browser and saw the page
  • Checked the image layers with docker history

Source Code

FilePurposeLink
DockerfileBuilds the image from nginx:alpine and copies the website into itDockerfile

Commands Used

CommandWhat it does
docker build -t my-app .Build an image named my-app from the Dockerfile in this folder
docker run -d -p 8080:80 --name my-app-container my-appRun the image in the background and map port 8080 to port 80
docker psCheck the container is running and see the port mapping
docker history my-appList the layers of the image and their sizes
docker images my-appShow the image and its total size
docker stop my-app-container / docker rm my-app-containerStop and remove the container

Image Layers

InstructionLayerSize
FROM nginx:alpineBase image layers (8 pulled)about 26 MB
COPY . /usr/share/nginx/htmlWebsite files28.7 kB
EXPOSE 80Metadata only0 B

Key Concepts Learned

  • Dockerfile: A text file of instructions that Docker follows to build an image
  • Layer: Each instruction that changes files creates a read-only layer, and unchanged layers are cached on rebuild
  • Base image: FROM sets the starting image, and nginx:alpine is a small Nginx image
  • COPY: Puts the application files inside the image
  • EXPOSE: Documents the container's port but does not publish it
  • Port mapping (-p 8080:80): Publishes the container's port 80 on the host's port 8080

Screenshot

Container running and layer history:

Task 3 docker run, ps and history

App in the browser:

Final Outcome

Successfully wrote a Dockerfile for the starter website, built the image, ran it as a container with port 8080 mapped to port 80, opened it in the browser, and inspected the image layers.

Task 4: Launch and Manage an AWS EC2 Instance

What is AWS EC2?

EC2 (Elastic Compute Cloud) is Amazon's service that lets you rent a computer that lives in their data center. You can access it from anywhere using SSH — like remotely logging into another machine through the terminal.

What I Did

  • Created an AWS Free Tier account
  • Launched a t3.micro Ubuntu instance on EC2
  • Created a key pair (Marvel_CL_L1_T4.pem) for secure SSH access
  • Configured the security group to allow SSH (port 22) and HTTP (port 80)
  • Protected the key file using chmod 400
  • Connected to the EC2 instance remotely from my Ubuntu laptop using SSH
  • Installed and started Nginx web server on the EC2 instance
  • Accessed the Nginx welcome page from the browser using the EC2 public IP

Commands Used

CommandWhat it does
chmod 400 Marvel_CL_L1_T4.pemMake the key file read-only (required by AWS for security)
ssh -i [key.pem] ubuntu@[public-ip]Remotely log into the EC2 instance
sudo apt updateUpdate the package list
sudo apt install nginx -yInstall Nginx web server
sudo systemctl start nginxStart the Nginx service

Key Concepts Learned

  • EC2: Renting a computer from Amazon's data center
  • SSH: Secure way to remotely access another computer through terminal
  • Security Group: Firewall rules that control what traffic can enter/leave the instance
  • Key Pair (.pem): A secure key file used to authenticate SSH access — like a physical key to a door
  • Public IP: The address used to access the EC2 instance from the internet

EC2 Instance

  • Instance Type: t3.micro (Free Tier)
  • OS: Ubuntu 22.04 LTS
  • Public IP: 16.171.39.66
  • Web Server: Nginx

Screenshot

Final Outcome

Successfully launched an EC2 instance, connected to it remotely via SSH, installed Nginx, and accessed the web server from the browser using the instance's public IP address.

Task 5: Kubernetes Basics and Writing Pod Specs

What is this task?

Kubernetes runs and manages containers across machines. A Pod is the smallest unit it deploys, and it is described in a YAML manifest. This task writes a Pod spec for Nginx, applies it, and inspects it with kubectl.

Flow: pod.yaml → kubectl apply → Pod (nginx) → get / describe / logs

Core Concepts

ConceptMeaning
NodeA machine (physical or virtual) that runs Pods
PodThe smallest deployable unit: one or more containers sharing a network and storage
ClusterA set of nodes managed together by Kubernetes
Control PlaneThe components that manage the cluster: API server, scheduler, controller manager and etcd

What I Did

  • Used a Killercoda single-node Kubernetes playground (node controlplane, v1.36.1) in place of Minikube
  • Checked the cluster with kubectl get nodes and kubectl cluster-info
  • Wrote pod.yaml for an Nginx container
  • Applied it with kubectl apply -f pod.yaml and confirmed the Pod was 1/1 Running
  • Inspected the Pod with kubectl describe pod nginx-pod
  • Viewed the container output with kubectl logs nginx-pod

Source Code

FilePurposeLink
pod.yamlPod manifest running nginx:latest on port 80pod.yaml

Commands Used

CommandWhat it does
kubectl get nodesShow the cluster's nodes and whether they are Ready
kubectl cluster-infoShow the control plane and CoreDNS addresses
kubectl apply -f pod.yamlCreate the Pod from the manifest
kubectl get podsShow Pod status, restarts and age
kubectl get pods -o wideShow the Pod's IP and node
kubectl describe pod nginx-podShow full details: image, IP, conditions, events
kubectl logs nginx-podShow the container's logs

Key Concepts Learned

  • Manifest structure: apiVersion, kind, metadata and spec are the four top-level fields
  • Labels: Key-value tags (app: nginx) that other objects use to find the Pod
  • Declarative apply: Re-running kubectl apply on an unchanged file reports unchanged
  • Pod conditions: Initialized, Ready, ContainersReady and PodScheduled show how far startup got
  • Restart Count: 0 means the container has not crashed

Screenshot

Final Outcome

Successfully wrote a Pod manifest for Nginx, applied it to a Kubernetes cluster, confirmed it was Running, and inspected it with get, describe and logs.


To Access Level 1 Report [click here] (https://github.com/prathamesh-6326/Marvel-CL-Level--1-/blob/main/README.md)

UVCE,
K. R Circle,
Bengaluru 01