The idea is to show them an entire deployment pipeline exactly like a real company, just simplified.
Production Story
"You joined ABC Bank as a Junior DevOps Engineer.
The developers created a website.
Your responsibility is NOT to write code.
Your responsibility is to deploy it into production."
Production Flow
Developer
│
▼
GitHub Repository
│
▼
Clone Repository
│
▼
Docker Image
│
▼
Docker Container
│
▼
AWS EC2
│
▼
Application Running
│
▼
Application Load Balancer
│
▼
Users
Company Architecture
Internet
│
▼
Application Load Balancer
│
┌───────────────┴───────────────┐
│ │
▼ ▼
EC2 Server 1 EC2 Server 2
Docker Container Docker Container
│ │
└───────────────┬───────────────┘
│
GitHub Code
Explain:
Developer pushes code.
DevOps pulls code.
DevOps builds Docker image.
Docker runs application.
ALB distributes traffic.
Exactly what happens in production.
Lab Objective
Students will
✅ Create GitHub repository
✅ Push application
✅ Launch EC2
✅ Install Docker
✅ Clone GitHub
✅ Build Docker image
✅ Run container
✅ Access application
✅ Create Load Balancer
Part 1 — Create GitHub Repository
Why?
Production companies never deploy files manually.
Everything is stored in GitHub.
Students create repository
bank-website
Upload
index.html
Dockerfile
Repository
bank-website
│
├── Dockerfile
├── index.html
└── README.md
Explain
Developer writes code.
Git stores versions.
GitHub stores project online.
DevOps downloads latest version.
Part 2 — Create Dockerfile
Explain
Docker packages application with everything needed.
Dockerfile
FROM nginx
COPY . /usr/share/nginx/html
Explain each line.
FROM nginx
↓
Use official nginx image.
COPY
↓
Copy website into nginx folder.
Build Docker Image
Command
docker build -t bank-app .
Explain
Docker reads Dockerfile
↓
Creates Image
Image is template
Container runs from image
Diagram
Dockerfile
│
docker build
│
▼
Docker Image
│
docker run
▼
Container
Verify
docker images
Students see
bank-app
Run Container
docker run -d -p 80:80 bank-app
Explain
-d
Run in background.
-p
Map port.
80:80
Computer Port
↓
Container Port
Diagram
Browser
↓
EC2 Port 80
↓
Docker Port 80
↓
Website
Verify
docker ps
Explain
Production engineers constantly check running containers.
Stop
docker stop containerID
Remove
docker rm containerID
Part 3 — AWS EC2
Create Ubuntu instance.
Explain
EC2 is just a virtual Linux server.
Instead of
Dell Computer
Company rents
AWS EC2
Security Group
Open
22 SSH
80 HTTP
Explain
SSH
Developers log in.
HTTP
Customers access website.
Connect
ssh ubuntu@IP
Explain
Now you are inside production server.
Update Server
sudo apt update
Why?
Install latest package information.
Install Docker
sudo apt install docker.io -y
Start
sudo systemctl start docker
Enable
sudo systemctl enable docker
Check
docker --version
Clone Repository
git clone https://github.com/student/bank-website.git
Explain
Production servers pull code from GitHub.
Not email.
Not USB.
GitHub.
Move
cd bank-website
Build Docker
docker build -t bank-app .
Run
docker run -d -p 80:80 bank-app
Test
Browser
http://EC2-IP
Website appears.
Production Explanation
Developer
↓
Git Push
↓
GitHub
↓
DevOps SSH
↓
Git Pull
↓
Docker Build
↓
Docker Run
↓
Website
Part 4 — Application Load Balancer
Now explain production.
One server is dangerous.
If EC2 crashes
↓
Website dies.
Need
ALB
Architecture
Users
│
▼
Application Load Balancer
│ │
▼ ▼
EC2 Server EC2 Server
│ │
Docker App Docker App
Create
Target Group
Add EC2
Create ALB
Listener
HTTP 80
Choose Target Group
Finish
Copy DNS
http://xxxxx.us-east-1.elb.amazonaws.com
Students access website.
Explain
Instead of users visiting EC2
54.xx.xx.xx
Users visit
company.com
↓
ALB decides
↓
Which server receives request.
Production Request Flow
Browser
↓
DNS
↓
Application Load Balancer
↓
Target Group
↓
Healthy EC2
↓
Docker Container
↓
Nginx
↓
Website
Show Failure Scenario
Stop Docker
docker stop containerID
Refresh
Website down.
Explain
In production
ALB health check detects failure.
Traffic automatically moves to healthy server.
Students understand why companies use multiple EC2 instances.
Explain Every Technology Like a DevOps Engineer
GitHub
Stores source code.
Single source of truth.
Version control.
Collaboration.
Docker
Packages application.
Runs same everywhere.
Developer laptop.
Testing.
Production.
Cloud.
EC2
Virtual Linux server.
Runs Docker containers.
Hosted in AWS.
ALB
Traffic manager.
Receives all user requests.
Routes traffic.
Performs health checks.
Improves availability.
Nginx
Web server.
Serves HTML.
Receives HTTP requests.
Returns web pages.
Real Production Workflow
Developer
│
git commit
│
git push
▼
GitHub Repository
│
DevOps Engineer
│
git pull
▼
Docker Build
│
Docker Image
│
Docker Container
▼
AWS EC2
│
Health Check
▼
Application Load Balancer
│
Internet
▼
Users
What students learn by the end
By completing this lab, beginners can confidently explain a common DevOps deployment workflow:
- How developers use Git and GitHub to manage application code.
- How Docker packages an application into a portable image.
- How a Docker container runs the application on an AWS EC2 instance.
- Why security groups must allow SSH (22) for administrators and HTTP (80) for users.
- How an Application Load Balancer distributes incoming traffic and performs health checks.
- Why production environments use multiple EC2 instances behind an ALB for high availability.
- The complete request flow from a user's browser to the application running inside a Docker container.
This mirrors a simplified version of the deployment process used by many organizations and gives students a strong foundation before introducing CI/CD pipelines, container registries (ECR), ECS/EKS, Terraform, and Kubernetes.
Top comments (0)