Orientation to Computing — II

Unit 4: DevOps & Software Engineering

From code commits to zero-downtime deployments — master Git, Docker, CI/CD pipelines, and start building production-grade software the way India's top tech companies do.

⏱️ Time to Complete: 10–12 hours  |  💰 Earning Potential: ₹5,000–₹20,000/month  |  📝 30 MCQs (Bloom's Mapped)

💼 Jobs this unlocks: Jr DevOps Engineer (₹5–8 LPA)  |  QA Tester (₹3–6 LPA)  |  Build Engineer (₹4–7 LPA)

Section A

Opening Hook — The Invisible Engine Behind Flipkart Big Billion Days

🛒 15,000 Orders Per Second. Zero Downtime. How?

October 2024. Flipkart's Big Billion Days sale goes live. Within the first 60 seconds, 15,000 orders per second flood the servers. Millions of users are browsing, carting, paying — simultaneously. One crashed server = ₹10 crore revenue lost per minute. But nothing crashes. Not a single page goes down.

Behind this miracle is a massive DevOps infrastructure. Flipkart's engineering team spent months building automated CI/CD pipelines that test and deploy code 500+ times per day. They use Docker containers to package every microservice, Kubernetes to auto-scale from 100 to 10,000 servers in minutes, Selenium for automated testing, and Nagios to monitor every heartbeat of every server in real-time.

The payment gateway alone handles 3 million transactions per hour — routed through load balancers, tested via automated pipelines, and monitored by AI-driven alerting systems. If a server in Hyderabad goes down, traffic is re-routed to Mumbai in under 200 milliseconds — automatically, without any human intervention.

What if YOU had built this? What if you could set up the automated pipelines, write the test scripts, containerise the applications, and monitor the infrastructure? That's exactly what DevOps engineers do — and that's exactly what this chapter teaches you.

🇮🇳 Flipkart🇮🇳 Zoho🇮🇳 Freshworks🇮🇳 IRCTC🇮🇳 Razorpay🇮🇳 Infosys
India is the world's second-largest DevOps talent market. Over 75% of Indian IT companies (TCS, Infosys, Wipro, HCL) have adopted DevOps practices. The average DevOps engineer salary in India is ₹8.5 LPA, with senior roles crossing ₹25 LPA. NASSCOM reports that India needs 2 million+ DevOps-skilled professionals by 2027.
Section B

Learning Outcomes — Bloom's Taxonomy Mapped

Bloom's LevelLearning Outcome
🔵 RememberDefine DevOps, list its core tools (Git, Docker, Jenkins, Kubernetes), and recall the CALMS framework
🔵 UnderstandExplain how CI/CD pipelines automate software delivery and differentiate DevOps from Waterfall and Agile methodologies
🟢 ApplyCreate a GitHub repository, write a Dockerfile, and set up a basic CI/CD pipeline using GitHub Actions
🟢 AnalyzeCompare containerisation (Docker) vs virtualisation, and analyse why Indian companies like Flipkart and Zoho adopted DevOps
🟠 EvaluateAssess the trade-offs between different deployment strategies (blue-green, canary, rolling) for an Indian e-commerce scenario
🟠 CreateDesign a complete CI/CD pipeline for a web application including automated testing, containerisation, and monitoring
Section C

Concept Explanation — DevOps & Software Engineering from Scratch

1. What is DevOps? The CALMS Framework

Imagine you're running a restaurant. The chefs (developers) cook amazing dishes, but the waiters (operations) struggle to serve them fast enough. Dishes pile up, customers complain, orders get mixed up. DevOps is like making chefs and waiters work as one team — the chef plates the dish exactly how the waiter needs it, the waiter gives real-time feedback on what customers want, and together they serve 10× faster.

🔄 DevOps = Development + Operations

Definition: DevOps is a set of practices, tools, and cultural philosophies that automate and integrate the processes between software development (Dev) and IT operations (Ops) teams. The goal: deliver software faster, more reliably, and with continuous feedback.

The CALMS Framework

DevOps culture is built on five pillars, remembered as CALMS:

LetterPrincipleWhat It MeansIndian Example
CCultureBreak silos between Dev and Ops teams. Everyone owns the product.Zoho's "one team" philosophy — developers deploy their own code
AAutomationAutomate testing, deployment, monitoring — no manual stepsFlipkart deploys 500+ times/day via automated pipelines
LLeanEliminate waste. Small batches. Fast feedback loops.Freshworks uses 2-week sprint cycles with daily deployments
MMeasurementTrack everything — deployment frequency, failure rate, recovery timeRazorpay monitors mean-time-to-recovery (MTTR) < 5 minutes
SSharingShare knowledge, tools, and responsibility across teamsInfosys uses internal wikis and blameless post-mortems
TCS has trained 400,000+ employees in DevOps practices. Their internal platform "TCS BaNCS" (used by 40+ global banks) is deployed using fully automated CI/CD pipelines. When State Bank of India needs a software update, TCS pushes it through automated testing and deployment — reaching 22,000+ SBI branches without manual intervention.

2. DevOps vs Waterfall vs Agile — Comparison

Before DevOps, software was built using older methodologies. Understanding their differences is crucial for interviews and real-world decisions.

AspectWaterfallAgileDevOps
ApproachSequential (one phase after another)Iterative (small sprints of 2–4 weeks)Continuous (code → test → deploy → monitor, non-stop)
SpeedSlow (months to release)Faster (every 2–4 weeks)Fastest (multiple times per day)
TestingAt the end (after coding is "done")During each sprintAutomated, continuous testing at every commit
Team StructureSeparate Dev, QA, Ops teamsCross-functional Dev teamsDev + Ops as one team
FeedbackAfter full product deliveryAfter each sprintReal-time, continuous monitoring
RiskHigh (bugs found late)Medium (bugs found each sprint)Low (bugs caught instantly via automation)
Best ForFixed-requirement projects (govt contracts)Evolving products (startups)High-availability systems (e-commerce, banking)
Indian ExampleNIC building govt portalsOla developing ride-sharing featuresFlipkart handling Big Billion Days
DevOps is NOT a replacement for Agile. DevOps extends Agile. Agile focuses on development practices (sprints, standups, backlogs). DevOps adds operations — deployment, monitoring, infrastructure automation. You can do Agile without DevOps, but modern DevOps always includes Agile principles.

3. CI/CD Pipeline — The Assembly Line of Software

Analogy: Think of a Maruti Suzuki car factory. Raw materials enter one end, and finished cars roll out the other end — automatically. Every step (welding, painting, quality check) is automated and quality-checked. A CI/CD pipeline does the same for software.

⚙️ CI/CD Explained

CI — Continuous Integration: Every time a developer pushes code, it is automatically built and tested. If tests fail, the team is alerted immediately. No more "it works on my machine" problems.

CD — Continuous Delivery: After passing all tests, the code is automatically packaged and ready for deployment. A human clicks "Deploy" to push to production.

CD — Continuous Deployment: Fully automated — code that passes all tests is automatically deployed to production. No human approval needed. Flipkart uses this for non-critical microservices.

CI/CD Pipeline — Visual Flow (ASCII Diagram)

Pipeline
┌─────────┐    ┌─────────┐    ┌──────────┐    ┌──────────┐    ┌───────────┐    ┌────────────┐
│  CODE   │───▶│  BUILD  │───▶│   TEST   │───▶│ PACKAGE  │───▶│  DEPLOY   │───▶│  MONITOR   │
│ (Git)   │    │(Compile)│    │(Selenium)│    │ (Docker) │    │(K8s/Cloud)│    │ (Nagios)   │
└─────────┘    └─────────┘    └──────────┘    └──────────┘    └───────────┘    └────────────┘
     │              │               │               │               │               │
  Developer      Maven/         Unit Tests      Docker           Kubernetes     Dashboards
  pushes to     Gradle          Integration     Image            Pods scale     Alerts on
  GitHub        builds JAR      Selenium        Registry         up/down        failure
Popular CI/CD Tools in Indian companies: Jenkins (open-source, used by TCS, Infosys), GitHub Actions (free for public repos), GitLab CI, CircleCI, Azure DevOps (used by HCL, Cognizant). For your portfolio, start with GitHub Actions — it's free, powerful, and most recruiters check GitHub profiles.

4. Git — Version Control That Every Developer Must Know

Analogy: Imagine writing an essay in Google Docs. You can see every version, undo changes, and multiple people can edit simultaneously without overwriting each other's work. Git does this for code — but with superpowers. It's the backbone of every software project on the planet.

Core Git Commands — With Examples

Bash
# 1. Initialize a new Git repository
git init my-project
cd my-project

# 2. Check status — see what's changed
git status

# 3. Create a file and stage it
echo "# My First Project" > README.md
git add README.md          # Stage single file
git add .                  # Stage ALL changes

# 4. Commit with a meaningful message
git commit -m "feat: add project README with description"

# 5. Connect to GitHub and push
git remote add origin https://github.com/yourusername/my-project.git
git push -u origin main

# 6. Pull latest changes from team
git pull origin main

Branching & Merging — The Power of Git

Bash
# Create a new branch for a feature
git branch feature/login-page
git checkout feature/login-page
# Or shortcut: git checkout -b feature/login-page

# Make changes, commit them
git add .
git commit -m "feat: add login page UI with validation"

# Switch back to main and merge
git checkout main
git merge feature/login-page

# Rebase (alternative to merge — cleaner history)
git checkout feature/login-page
git rebase main
# Rebase replays your commits ON TOP of main — linear history
Never force-push to main/master in a team project. Running git push --force on the main branch can overwrite your teammates' work permanently. Always use feature branches and merge via Pull Requests. Indian IT companies like Infosys and Wipro have strict branch protection rules — you'll get a serious warning if you break this rule.

Git Terminology Quick Reference

TermMeaningAnalogy
repositoryThe project folder tracked by GitYour entire project notebook
commitA snapshot of your code at a point in timeA saved checkpoint in a video game
branchA parallel copy of the code for isolated changesA rough draft of your essay while the main copy stays clean
mergeCombining changes from one branch into anotherCopying your rough draft edits into the final essay
rebaseReplaying commits on top of another branchRewriting your rough draft as if you started from the latest version
pull request (PR)A request to review and merge your changesAsking your teacher to check your work before final submission
cloneDownload a copy of a remote repositoryPhotocopying someone's notes
forkCreate your own copy of someone else's repoTaking someone's recipe and making your own version

5. GitHub — The Social Network for Developers

Git is the version control tool. GitHub is the platform that hosts Git repositories online, adds collaboration features, and acts as your developer portfolio. Think of Git as the engine and GitHub as the car.

Key GitHub Features

FeatureWhat It DoesWhy It Matters
RepositoriesHost your code projects onlineYour code is backed up and accessible from anywhere
README.mdProject description in Markdown formatFirst thing recruiters see — must be professional
IssuesTrack bugs, feature requests, tasksShows you follow professional project management
Pull RequestsPropose, review, and discuss code changesCore of team collaboration — used in every company
GitHub ActionsBuilt-in CI/CD — automate testing & deploymentFree CI/CD for your projects — no Jenkins needed
GitHub PagesFree hosting for static websitesDeploy your portfolio site for ₹0

Professional README.md Template

Markdown
# 🚀 Project Name

## 📋 About
A brief description of what this project does and who it's for.

## ✨ Features
- Feature 1: User authentication with JWT
- Feature 2: Dashboard with real-time charts
- Feature 3: REST API with Express.js

## 🛠️ Tech Stack
- **Frontend:** React, Tailwind CSS
- **Backend:** Node.js, Express
- **Database:** MongoDB
- **CI/CD:** GitHub Actions
- **Deployment:** Docker + AWS

## 🚀 Getting Started
```bash
git clone https://github.com/yourusername/project.git
cd project
npm install
npm run dev
```

## 📸 Screenshots
![Dashboard](screenshots/dashboard.png)

## 👤 Author
**Your Name** — [LinkedIn](https://linkedin.com/in/yourname)

## 📄 License
MIT License
Your GitHub profile IS your resume in tech. Indian recruiters at product companies (Flipkart, Razorpay, Zoho, Freshworks) check GitHub profiles before calling candidates for interviews. A well-maintained GitHub with 5+ projects, professional READMEs, and green contribution graph can get you interview calls even without applying.

6. Docker — Containerisation for Consistent Deployments

The Problem: "It works on my machine!" — the most dreaded phrase in software development. Your code runs perfectly on your laptop but crashes on the server because of different OS versions, library versions, or configurations.

The Solution: Docker packages your application along with ALL its dependencies (libraries, OS, config files) into a container — a lightweight, portable box that runs the same everywhere.

📦 Docker Key Concepts

ConceptWhat It IsAnalogy
ImageA blueprint/recipe for creating containersA recipe for biryani — same recipe always produces the same dish
ContainerA running instance of an imageThe actual biryani cooked from the recipe — you can cook multiple biryanis from one recipe
DockerfileA text file with instructions to build an imageThe step-by-step recipe card
Docker HubOnline registry to share imagesA cookbook library where anyone can share and download recipes
docker-composeTool to run multi-container applicationsA menu card that lists all dishes for a full meal — biryani + raita + dessert running together

Dockerfile Example — Python Flask App

Dockerfile
# Step 1: Start from a Python base image
FROM python:3.11-slim

# Step 2: Set working directory inside container
WORKDIR /app

# Step 3: Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Step 4: Copy application code
COPY . .

# Step 5: Expose the port Flask runs on
EXPOSE 5000

# Step 6: Command to run the application
CMD ["python", "app.py"]

Docker Commands Cheat Sheet

Bash
# Build an image from Dockerfile
docker build -t my-flask-app .

# Run a container from the image
docker run -d -p 5000:5000 my-flask-app

# List running containers
docker ps

# Stop a container
docker stop <container_id>

# Push image to Docker Hub
docker tag my-flask-app yourusername/my-flask-app:v1
docker push yourusername/my-flask-app:v1

docker-compose.yml — Multi-Container Example

YAML
# Run a Flask app + PostgreSQL database together
version: "3.8"
services:
  web:
    build: .
    ports:
      - "5000:5000"
    depends_on:
      - db
    environment:
      - DATABASE_URL=postgresql://user:pass@db:5432/mydb

  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=mydb
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
# Start all services $ docker-compose up -d Creating network "myapp_default" with the default driver Creating myapp_db_1 ... done Creating myapp_web_1 ... done # Check running services $ docker-compose ps Name Command State Ports --------------------------------------------------------------- myapp_db_1 docker-entrypoint.sh Up 5432/tcp myapp_web_1 python app.py Up 0.0.0.0:5000->5000/tcp
Razorpay runs 200+ microservices, all containerised with Docker. Each payment flow — UPI, card, net banking — is a separate container. During peak Diwali transactions, Docker + Kubernetes auto-scales containers to handle 5× normal load. Their engineers push code via CI/CD, and Docker ensures the exact same code runs in development, testing, and production.

7. Selenium — Automated Web Testing

Analogy: Imagine hiring 100 people to click every button on your website, fill every form, and check every page — every single day. That's what Selenium does, but with code instead of people, running in seconds instead of hours.

Definition: Selenium is an open-source framework for automating web browser interactions. It's used for testing web applications — verifying that buttons work, forms submit correctly, pages load properly, and data displays accurately.

Selenium with Python — Test Cases

Python
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

# Initialize Chrome browser
driver = webdriver.Chrome()

# TEST 1: Open a website and verify title
driver.get("https://www.flipkart.com")
assert "Flipkart" in driver.title, "Title verification FAILED!"
print("✅ Test 1 PASSED: Flipkart homepage loaded")

# TEST 2: Search for a product
search_box = driver.find_element(By.NAME, "q")
search_box.send_keys("laptop")
search_box.send_keys(Keys.RETURN)
time.sleep(3)
assert "laptop" in driver.page_source.lower(), "Search FAILED!"
print("✅ Test 2 PASSED: Search results displayed")

# TEST 3: Check if search results contain product cards
products = driver.find_elements(By.CLASS_NAME, "_1fQZEK")
assert len(products) > 0, "No products found!"
print(f"✅ Test 3 PASSED: Found {len(products)} products")

# TEST 4: Verify a specific element exists
try:
    logo = driver.find_element(By.CSS_SELECTOR, "img[title='Flipkart']")
    print("✅ Test 4 PASSED: Flipkart logo found")
except:
    print("❌ Test 4 FAILED: Logo not found")

# TEST 5: Check page loads within acceptable time
start = time.time()
driver.get("https://www.flipkart.com")
load_time = time.time() - start
assert load_time < 10, f"Page took {load_time}s — too slow!"
print(f"✅ Test 5 PASSED: Page loaded in {load_time:.2f}s")

driver.quit()
✅ Test 1 PASSED: Flipkart homepage loaded ✅ Test 2 PASSED: Search results displayed ✅ Test 3 PASSED: Found 24 products ✅ Test 4 PASSED: Flipkart logo found ✅ Test 5 PASSED: Page loaded in 2.34s
Selenium is the #1 automation testing tool in India. Over 60% of QA job postings on Naukri.com mention Selenium. Companies like TCS, Infosys, Wipro, Cognizant, and Accenture have dedicated Selenium testing teams. Learning Selenium + Python can land you a QA Tester role at ₹3–6 LPA as a fresher.

8. Maven — Build Automation for Java Projects

Analogy: Building a Java project manually is like cooking without a recipe — you have to remember every ingredient (library), every step (compile, test, package), and every dependency. Maven is your automated recipe manager — it downloads libraries, compiles code, runs tests, and packages everything into a deployable file, all with one command.

🔨 Maven Core Concepts

POM.xml (Project Object Model): The heart of every Maven project. It defines project metadata, dependencies (libraries), plugins, and build instructions.

Build Lifecycle: Maven follows a standard lifecycle:

PhaseWhat Happens
validateCheck project structure is correct
compileCompile source code (.java → .class)
testRun unit tests using JUnit/TestNG
packagePackage compiled code into JAR/WAR file
verifyRun integration tests
installInstall package to local Maven repository
deployUpload package to remote repository/server

Sample POM.xml

XML
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.eduartha</groupId>
  <artifactId>student-portal</artifactId>
  <version>1.0.0</version>

  <dependencies>
    <!-- JUnit 5 for testing -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.10.0</version>
      <scope>test</scope>
    </dependency>

    <!-- Spring Boot for web app -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>3.2.0</version>
    </dependency>
  </dependencies>
</project>
Bash
# Build with Maven — one command does everything
mvn clean package

# Output:
# [INFO] Compiling 15 source files...
# [INFO] Running 42 test cases...
# [INFO] Tests passed: 42, Failed: 0
# [INFO] Building JAR: target/student-portal-1.0.0.jar
# [INFO] BUILD SUCCESS

9. Infrastructure as Code — Puppet & Ansible

The Problem: You have 500 servers to manage. Each needs the same software installed, same configurations, same security patches. Doing this manually would take weeks and be error-prone. Infrastructure as Code (IaC) treats your server setup as code — version-controlled, repeatable, and automated.

FeaturePuppetAnsible
LanguageRuby-based DSL (Puppet Language)YAML (human-readable playbooks)
ArchitectureAgent-based (Puppet agent on each server)Agentless (connects via SSH — no installation needed)
Learning CurveSteeper — custom DSLEasier — YAML is simple to read/write
Best ForLarge enterprises with 1000s of serversCloud deployments, smaller teams, quick automation
Used By (India)TCS, Infosys (legacy enterprise clients)Flipkart, Razorpay, Freshworks (modern cloud-native)

Ansible Playbook Example

YAML
# Install Nginx web server on 50 servers simultaneously
- name: Setup Web Servers
  hosts: webservers
  become: yes

  tasks:
    - name: Install Nginx
      apt:
        name: nginx
        state: present

    - name: Start Nginx service
      service:
        name: nginx
        state: started
        enabled: yes

    - name: Copy website files
      copy:
        src: ./website/
        dest: /var/www/html/
Bash
# Run the playbook — configures ALL 50 servers
ansible-playbook -i inventory.ini setup-web.yml

# Output:
# PLAY [Setup Web Servers] ****
# TASK [Install Nginx] ****
# ok: [server01] => changed
# ok: [server02] => changed
# ... (50 servers configured in 2 minutes)

10. Kubernetes (K8s) — Container Orchestration at Scale

Analogy: Docker creates containers (individual dabbas/tiffin boxes). But during Flipkart's Big Billion Days, you need to manage 10,000 dabbas — deciding which ones to send where, replacing broken ones, adding more during rush hour, and removing extras when demand drops. Kubernetes is the dabba distribution manager.

☸️ Kubernetes Core Concepts

ConceptWhat It DoesAnalogy
PodSmallest deployable unit — wraps one or more containersA single tiffin box containing your app
ServiceExposes pods to the network with a stable addressThe delivery counter where customers pick up their tiffin
DeploymentManages pod replicas — ensures desired count is always runningThe manager ensuring 50 tiffin boxes are always ready
NodeA physical/virtual machine that runs podsA kitchen that can hold multiple tiffin boxes
ClusterA group of nodes managed by KubernetesThe entire network of kitchens across the city

Kubernetes Deployment YAML

YAML
# Deploy 3 replicas of a Flask app
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flask-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: flask-app
  template:
    metadata:
      labels:
        app: flask-app
    spec:
      containers:
        - name: flask
          image: yourusername/flask-app:v1
          ports:
            - containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
  name: flask-service
spec:
  type: LoadBalancer
  selector:
    app: flask-app
  ports:
    - port: 80
      targetPort: 5000
Flipkart's Kubernetes cluster scales from 1,000 to 10,000+ pods during Big Billion Days. Their auto-scaling rules trigger when CPU usage exceeds 70%. In 2024, they processed ₹25,000 crore in sales over 5 days — all managed by Kubernetes orchestrating Docker containers across multiple data centres.

11. Nagios — Monitoring & Alerting

Analogy: Nagios is like a 24/7 security guard for your servers. It constantly checks: Is the website up? Is the CPU overloaded? Is disk space running out? Is the database responding? If anything goes wrong, it immediately sends alerts via email, SMS, or Slack.

What Nagios MonitorsExample Alert
Server uptime⚠️ "Server Mumbai-03 has been DOWN for 5 minutes"
CPU usage⚠️ "CPU usage on Payment-Server at 95% — investigate NOW"
Disk space⚠️ "Database server has only 2GB free disk space"
Network latency⚠️ "Response time from API gateway > 500ms"
Application errors⚠️ "500 Internal Server Errors spiked to 150/minute"
Database connections⚠️ "PostgreSQL connection pool exhausted"
Modern alternatives to Nagios: While Nagios is foundational, most Indian startups now use Prometheus + Grafana (open-source), Datadog, or New Relic. However, Nagios is still used in 40% of enterprise environments (TCS, Infosys managed services) and is important for interviews. Learn the concept — the tool names change, but the principles remain.

12. Software Testing — Types, Levels & Objectives

Testing ensures software works correctly before reaching users. Without testing, Flipkart's app might crash during payment, IRCTC might book wrong tickets, and Paytm might transfer money to wrong accounts.

Objectives of Software Testing

  • Find defects before users do — cheaper to fix bugs early
  • Ensure quality — software meets requirements and specifications
  • Build confidence — stakeholders trust the software works
  • Prevent regression — new changes don't break existing features
  • Validate performance — software handles expected load

Types of Testing — Comprehensive Table

TypeWhat It TestsExampleTool
Unit TestingIndividual functions/methodsTesting if calculate_gst(1000) returns 180JUnit, pytest
Integration TestingHow modules work togetherTesting if login → dashboard flow works end-to-endTestNG, pytest
System TestingEntire application as a wholeTesting the complete e-commerce checkout flowSelenium, Cypress
Acceptance TestingWhether software meets business requirementsClient verifying "Can a user book a Tatkal ticket in under 2 minutes?"Manual, Cucumber
Regression TestingEnsuring new code doesn't break old featuresAfter adding UPI payments, verifying card payments still workSelenium, Jenkins
Performance TestingSpeed, scalability, stability under loadSimulating 1 million users on IRCTC during TatkalJMeter, Locust
Security TestingVulnerabilities, data protectionTesting if Paytm passwords are stored encryptedOWASP ZAP, Burp Suite

Testing Levels (V-Model)

Diagram
   Requirements ─────────────────────── Acceptance Testing
        │                                        │
   System Design ──────────────────── System Testing
        │                                        │
   Module Design ──────────────────── Integration Testing
        │                                        │
   Coding ─────────────────────────── Unit Testing
"We'll test later" is the most expensive sentence in software. Fixing a bug found during unit testing costs ₹100. The same bug found in production costs ₹10,000+. Indian IT companies lose an estimated ₹15,000 crore annually due to software defects that could have been caught by automated testing.

13. DevOps in Indian Companies

CompanyDevOps PracticeKey ToolsScale
TCSEnterprise DevOps for global banking clientsJenkins, Puppet, Docker, Azure DevOps400,000+ employees trained in DevOps
InfosysDevOps platform "Infosys Nia"Jenkins, Ansible, Kubernetes, AWS1,000+ DevOps projects globally
WiproDevOps-as-a-Service modelGitLab CI, Docker, TerraformDevOps practice serves 200+ clients
ZohoIn-house DevOps for 55+ productsCustom CI/CD, Docker, Kubernetes15,000+ employees, 100M+ users
FreshworksCloud-native DevOps cultureGitHub Actions, Docker, AWS EKS50,000+ customers, 13 products
RazorpayMicroservices + DevOps for paymentsKubernetes, Prometheus, TerraformProcesses ₹7 lakh crore annually
Zoho builds ALL its products in-house in Chennai — no cloud dependency. Their DevOps team manages private data centres in Chennai and Dallas. Every Zoho product (CRM, Mail, Books) is deployed through automated pipelines. Zoho's philosophy: "We don't want to depend on AWS or Google. We own our stack." This gives them 99.99% uptime — better than many cloud-hosted products.

14. Career Paths in DevOps & Software Engineering

RoleWhat They DoKey SkillsEntry Salary (India)
DevOps EngineerBuild and maintain CI/CD pipelines, manage infrastructureLinux, Docker, K8s, Jenkins, AWS/Azure, Git₹5–8 LPA
Site Reliability Engineer (SRE)Ensure services are available 99.99% of the timePython, Monitoring (Prometheus), On-call rotation₹8–15 LPA
Release EngineerManage software releases, versioning, deploymentsGit, Jenkins, Maven, Release processes₹5–8 LPA
QA Engineer / SDETWrite automated tests, ensure software qualitySelenium, Python/Java, TestNG, CI/CD₹3–6 LPA
Build EngineerMaintain build systems, compile and package codeMaven/Gradle, Jenkins, Docker₹4–7 LPA
Platform EngineerBuild internal developer tools and platformsK8s, Terraform, Go/Python, Cloud₹10–18 LPA
The fastest DevOps career path for Indian freshers: Learn Linux basics + Git + Docker + one CI/CD tool (GitHub Actions or Jenkins). Build 3 projects on GitHub with automated pipelines. Apply to DevOps/QA roles at TCS Digital, Infosys, Wipro, or Indian startups. This path can land you ₹5–8 LPA within 6 months of graduation.
Section D

Learn by Doing — 3-Tier Lab Structure

🟢 Tier 1 — GUIDED TASK: Create a Professional GitHub Repository

⏱️ 60–90 minutesBeginnerZero prior knowledge assumed

Step 1: Create a GitHub Account

Go to github.com → Click "Sign up" → Use your college email for free Student Developer Pack (includes GitHub Pro features, free domains, cloud credits).

Step 2: Install Git on Your Computer

Windows: Download from git-scm.com → Install with default settings.

Verify installation:

Bash
git --version
# Output: git version 2.43.0.windows.1

# Configure your identity (one-time setup)
git config --global user.name "Your Name"
git config --global user.email "your.email@college.ac.in"

Step 3: Create Your First Project

Bash
# Create project folder
mkdir my-portfolio
cd my-portfolio

# Initialize Git
git init
# Output: Initialized empty Git repository in /my-portfolio/.git/

Step 4: Create a Professional README.md

Open your favourite text editor (VS Code recommended) and create README.md:

Markdown
# 🎓 My Developer Portfolio

## About Me
I am a BCA student passionate about DevOps and Software Engineering.
Currently learning Git, Docker, and CI/CD pipelines.

## 🛠️ Skills
- **Version Control:** Git, GitHub
- **Containerisation:** Docker (learning)
- **CI/CD:** GitHub Actions
- **Languages:** Python, JavaScript

## 📂 Projects
| # | Project | Tech Stack | Status |
|---|---------|------------|--------|
| 1 | Portfolio Website | HTML, CSS, JS | ✅ Complete |
| 2 | Todo API | Python, Flask | 🔄 In Progress |
| 3 | CI/CD Pipeline Demo | GitHub Actions | 📋 Planned |

## 📫 Contact
- Email: yourname@college.ac.in
- LinkedIn: [Your Profile](https://linkedin.com/in/yourname)

## 📊 GitHub Stats
![GitHub Stats](https://github-readme-stats.vercel.app/api?username=yourusername)

Step 5: Stage, Commit, and Push

Bash
# Stage all files
git add .

# Commit with a meaningful message
git commit -m "feat: initial commit with professional README"

# Create repository on GitHub (via browser):
# Go to github.com → "+" → "New repository"
# Name: my-portfolio | Public | Don't add README (we already have one)

# Connect local repo to GitHub
git remote add origin https://github.com/yourusername/my-portfolio.git
git branch -M main
git push -u origin main

Step 6: Verify on GitHub

Go to github.com/yourusername/my-portfolio → You should see your beautifully formatted README with the table, badges, and sections.

Step 7: Add a .gitignore File

gitignore
# Python
__pycache__/
*.pyc
.env
venv/

# IDE
.vscode/
.idea/

# OS
.DS_Store
Thumbs.db

# Dependencies
node_modules/
Bash
git add .gitignore
git commit -m "chore: add .gitignore for Python and IDE files"
git push

🎉 Congratulations! You now have a professional GitHub repository. This is your first portfolio piece — share the link on LinkedIn!

🟡 Tier 2 — SEMI-GUIDED TASK: Write 5 Selenium Test Cases for a Website

⏱️ 90–120 minutesIntermediateHints provided, you fill the gaps

Your Mission:

Write 5 automated Selenium test cases for any popular Indian website (Wikipedia India, Flipkart, or your college website).

Setup:

Bash
# Install Selenium
pip install selenium webdriver-manager

Hints for Your 5 Test Cases:

  1. Test 1 — Page Title Verification: Open the website and assert the title contains expected text. Hint: Use driver.title
  2. Test 2 — Search Functionality: Find the search box, type a query, submit, and verify results appear. Hint: Use find_element(By.NAME, "...")
  3. Test 3 — Navigation Links: Click a navigation link and verify the URL changes to expected page. Hint: Use driver.current_url
  4. Test 4 — Form Validation: Submit an empty form and check if error messages appear. Hint: Use find_element(By.CLASS_NAME, "error")
  5. Test 5 — Responsive Element Check: Verify a critical element (logo, footer, CTA button) exists on the page. Hint: Use find_element(By.CSS_SELECTOR, "...")
Stretch Goal: Create a test report using pytest-html. Run pip install pytest-html and then pytest --html=report.html test_website.py. This generates a professional test report you can add to your portfolio.

🔴 Tier 3 — OPEN CHALLENGE: Set Up a GitHub Actions CI/CD Pipeline

⏱️ 2–3 hoursAdvancedReal-world project — build your own pipeline

The Brief:

Create a Python project with automated CI/CD using GitHub Actions. Every time you push code, it should automatically:

  1. Install dependencies
  2. Run linting (code quality check)
  3. Run unit tests
  4. Generate a test coverage report

File Structure:

Text
my-cicd-project/
├── .github/
│   └── workflows/
│       └── ci.yml          ← GitHub Actions workflow
├── app/
│   ├── __init__.py
│   └── calculator.py       ← Simple app with functions
├── tests/
│   ├── __init__.py
│   └── test_calculator.py  ← Unit tests
├── requirements.txt
├── README.md
└── .gitignore

GitHub Actions Workflow Template:

YAML
# .github/workflows/ci.yml
name: CI Pipeline

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Run linting
        run: |
          pip install flake8
          flake8 app/ --max-line-length=120

      - name: Run tests with coverage
        run: |
          pip install pytest pytest-cov
          pytest tests/ --cov=app --cov-report=term-missing

Deliverable: A GitHub repository with a green ✅ badge showing "CI Pipeline: Passing". Share this repo link on your resume — it instantly shows recruiters you understand CI/CD.

A GitHub profile with CI/CD pipelines stands out to recruiters. Less than 5% of Indian CS graduates have automated pipelines in their GitHub repos. Adding this gives you a massive competitive advantage for DevOps and SDE roles.
Section E

Industry Spotlight — A Day in the Life

👨‍💻 Rahul Deshpande, 29 — DevOps Engineer at Zoho, Chennai

Background: B.Tech (CSE) from VIT Vellore. Started as a junior developer. Self-taught Docker and Kubernetes in his first year. Transitioned to DevOps after building automated deployment pipelines for his team's projects. Now leads a team of 6 DevOps engineers managing infrastructure for Zoho CRM (10M+ users worldwide).

A Typical Day:

8:30 AM — Check monitoring dashboards (Prometheus + Grafana). Verify all 200+ microservices are healthy. Review overnight alerts — one service in the invoicing module had a memory spike at 3 AM, auto-healed by Kubernetes.

9:30 AM — Morning standup with the platform team. Discuss the rollout plan for Zoho Books v4.2. Decision: use canary deployment — push to 5% of users first, monitor for 2 hours, then roll out to 100%.

10:30 AM — Write a Terraform script to provision 10 new servers in Zoho's Chennai data centre for the upcoming Zoho One launch. Infrastructure as code — no manual server setup.

12:00 PM — Lunch at Zoho's Estancia campus cafeteria. Discuss with SRE team about improving deployment rollback time from 5 minutes to 2 minutes.

1:30 PM — Code review for a junior engineer's GitHub Actions pipeline. Suggest adding a security scanning step (Trivy for Docker image vulnerabilities).

3:00 PM — Debug a CI pipeline failure — a Selenium test was flaky due to network timeout. Fix: add retry logic and increase timeout from 10s to 30s.

4:30 PM — Document the new deployment process in the team wiki. Create runbook for handling database migration during deployments.

5:30 PM — Personal learning time — studying for CKA (Certified Kubernetes Administrator) exam. Zoho sponsors certification costs.

DetailInfo
Tools Used DailyDocker, Kubernetes, Terraform, Prometheus, Grafana, Git, GitHub Actions, Ansible
Entry Salary (2024)₹5–8 LPA + benefits
Mid-Level (3–5 yrs)₹12–20 LPA
Senior (7+ yrs)₹22–40 LPA
Companies HiringZoho, Freshworks, Razorpay, Flipkart, Swiggy, TCS Digital, Infosys, Wipro, HCL, Hasura, Postman
Section F

Earn With It — Freelance & Income Roadmap

💰 Your Earning Path After This Chapter

Portfolio Piece: "GitHub Portfolio — 3 Projects with CI/CD Pipelines" — a professional GitHub profile with automated testing, Docker containers, and green CI badges.

Beginner Gig Ideas:

• GitHub repository setup & README creation for startups/students — ₹1,000–₹3,000

• Basic Selenium test automation for small web apps — ₹3,000–₹8,000

• Docker containerisation of existing applications — ₹5,000–₹15,000

• CI/CD pipeline setup (GitHub Actions) for student/startup projects — ₹3,000–₹10,000

PlatformBest ForTypical Rate
UpworkQA testing gigs, automation scripts$15–$50/hour
FiverrGitHub setup, Docker help, CI/CD$20–$100/gig (₹1,600–₹8,000)
ToptalPremium DevOps freelance projects$40–$100/hour
InternshalaIndian student DevOps internships₹5,000–₹15,000/month
LinkedInDirect outreach to Indian startups needing DevOps₹5,000–₹20,000/project

⏱️ Time to First Earning: 3–4 weeks (if you complete all 3 labs and offer GitHub setup services to 10 classmates/startups)

Start with GitHub setup services. Many Indian BCA/B.Tech students and small startups don't know how to properly set up Git, write READMEs, or configure CI/CD. Offer a "Professional GitHub Setup" service — create repo, write README, add .gitignore, set up GitHub Actions. Charge ₹1,000–₹3,000. It takes you 30 minutes once you're skilled.
Section G

MCQ Assessment Bank — 30 Questions (Bloom's Mapped)

Remember / Identify (Q1–Q5)

Q1

DevOps is a combination of which two disciplines?

  1. Design and Marketing
  2. Development and Operations
  3. Database and Networking
  4. Documentation and Optimization
Remember
✅ Answer: (B) — DevOps = Development + Operations. It bridges the gap between software developers who write code and operations teams who deploy and manage it.
Q2

What does CI in CI/CD stand for?

  1. Complete Integration
  2. Continuous Integration
  3. Code Inspection
  4. Central Infrastructure
Remember
✅ Answer: (B) — CI = Continuous Integration. It means automatically building and testing code every time a developer pushes changes.
Q3

Which command initialises a new Git repository?

  1. git start
  2. git create
  3. git init
  4. git new
Remember
✅ Answer: (C) — git init creates a new .git directory in the current folder, initialising version control tracking.
Q4

In Docker, what is a "container"?

  1. A virtual machine with its own OS
  2. A running instance of a Docker image
  3. A type of cloud server
  4. A database management tool
Remember
✅ Answer: (B) — A container is a lightweight, running instance of a Docker image. Multiple containers can run from the same image, each isolated from the others.
Q5

What does CALMS stand for in DevOps?

  1. Code, Automation, Logging, Monitoring, Security
  2. Culture, Automation, Lean, Measurement, Sharing
  3. Continuous, Agile, Linux, Maven, Selenium
  4. Cloud, API, Libraries, Modules, Services
Remember
✅ Answer: (B) — CALMS = Culture, Automation, Lean, Measurement, Sharing — the five pillars of DevOps culture.

Understand / Explain (Q6–Q10)

Q6

Why is Docker preferred over traditional virtual machines for microservices?

  1. Docker provides better security than VMs
  2. Docker containers share the host OS kernel, making them lighter and faster to start
  3. Docker can only run on Linux servers
  4. Docker replaces the need for any operating system
Understand
✅ Answer: (B) — Containers share the host OS kernel, so they start in seconds (vs minutes for VMs) and use much less RAM. A server can run 50 containers but only 5–10 VMs. This is why Flipkart uses Docker for its 200+ microservices.
Q7

Infosys wants to deploy updates to a banking application without downtime. Which DevOps practice enables this?

  1. Waterfall development
  2. Manual testing before deployment
  3. CI/CD pipeline with blue-green deployment
  4. Deploying only on weekends
Understand
✅ Answer: (C) — CI/CD with blue-green deployment runs two identical environments. Traffic is switched from "blue" (old) to "green" (new) instantly, enabling zero-downtime updates. If something fails, switch back to blue.
Q8

What is the difference between git merge and git rebase?

  1. They are the same command with different names
  2. Merge creates a merge commit preserving branch history; rebase replays commits for a linear history
  3. Merge deletes the branch; rebase keeps it
  4. Rebase can only be done on the main branch
Understand
✅ Answer: (B) — Merge preserves the complete branching history with a merge commit. Rebase replays your branch's commits on top of the target branch, creating a cleaner, linear history. Both combine changes, but the history looks different.
Q9

Why does Selenium use "assertions" in test scripts?

  1. To make the browser load faster
  2. To verify that actual results match expected results, catching bugs automatically
  3. To install software dependencies
  4. To encrypt test data
Understand
✅ Answer: (B) — Assertions compare actual vs expected results. If assert "Flipkart" in driver.title fails, it means the page didn't load correctly — catching the bug before it reaches users.
Q10

What role does Kubernetes play when Razorpay processes 10× more transactions during Diwali?

  1. It writes the payment processing code
  2. It automatically scales containers up/down based on traffic demand
  3. It replaces the payment gateway
  4. It compresses transaction data
Understand
✅ Answer: (B) — Kubernetes auto-scaling (Horizontal Pod Autoscaler) detects increased CPU/memory usage and automatically creates more pod replicas. When traffic drops, it scales down — saving infrastructure costs.

Apply / Implement (Q11–Q15)

Q11

You need to create a new feature branch called "payment-gateway" in Git. Which command is correct?

  1. git new branch payment-gateway
  2. git checkout -b payment-gateway
  3. git create payment-gateway
  4. git push payment-gateway
Apply
✅ Answer: (B) — git checkout -b payment-gateway creates a new branch AND switches to it in one command. This is the most common way to start working on a new feature.
Q12

A Zoho developer writes a Dockerfile that starts with FROM python:3.11-slim. What does this line do?

  1. Installs Python 3.11 on the developer's laptop
  2. Uses the official Python 3.11 slim image as the base for the container
  3. Deletes the existing Python installation
  4. Creates a new Python virtual environment
Apply
✅ Answer: (B) — The FROM instruction specifies the base image. python:3.11-slim is a lightweight Python image from Docker Hub that includes Python 3.11 with minimal OS packages, reducing container size.
Q13

You want to run a Flask app on port 5000 using Docker. Which command is correct?

  1. docker build -p 5000:5000 my-app
  2. docker run -d -p 5000:5000 my-flask-app
  3. docker start -port 5000 my-flask-app
  4. docker deploy -p 5000 my-flask-app
Apply
✅ Answer: (B) — docker run -d -p 5000:5000 runs the container in detached mode (-d) and maps host port 5000 to container port 5000 (-p). You can then access the app at localhost:5000.
Q14

A TCS team wants to install Nginx on 200 servers simultaneously. Which tool should they use?

  1. Selenium
  2. Ansible
  3. Git
  4. Docker Hub
Apply
✅ Answer: (B) — Ansible is agentless (connects via SSH) and can configure hundreds of servers simultaneously using YAML playbooks. One playbook, one command, all 200 servers configured identically.
Q15

In a GitHub Actions workflow, what does on: push: branches: [main] specify?

  1. The workflow runs every hour
  2. The workflow runs only when code is pushed to the main branch
  3. The workflow runs on all branches
  4. The workflow sends push notifications
Apply
✅ Answer: (B) — This trigger configuration means the CI/CD pipeline runs automatically whenever new commits are pushed to the main branch. Push to a feature branch won't trigger this workflow.

Analyze / Compare (Q16–Q20)

Q16

Flipkart uses microservices architecture with Docker. Their payment service has 50 containers. A Wipro project uses a single monolithic application. Which statement best compares these approaches?

  1. Monolithic is always better because it's simpler
  2. Microservices allow independent scaling and deployment of each service, but add complexity in networking and monitoring
  3. Docker containers can only run microservices
  4. Monolithic architecture doesn't need testing
Analyze
✅ Answer: (B) — Microservices allow Flipkart to scale just the payment service during sales (without scaling the entire app), but require tools like Kubernetes, service mesh, and distributed tracing to manage. Monoliths are simpler but harder to scale independently.
Q17

An IRCTC developer compares Waterfall vs DevOps for the Tatkal booking system. Why would DevOps be more suitable?

  1. Waterfall has no testing phase
  2. DevOps enables continuous updates, automated testing, and rapid bug fixes — critical for a high-traffic, time-sensitive system
  3. DevOps doesn't need servers
  4. Waterfall is too expensive for government projects
Analyze
✅ Answer: (B) — IRCTC's Tatkal system handles extreme traffic spikes (10 AM rush). DevOps enables rapid deployment of fixes, automated performance testing, and auto-scaling — all critical for a system where a 2-second delay means 50,000 lost bookings.
Q18

Compare Puppet and Ansible for configuring 1000 servers. Which analysis is correct?

  1. Puppet is agentless; Ansible requires agents on every server
  2. Ansible uses simpler YAML; Puppet uses a custom DSL — Ansible is easier to learn but Puppet handles complex enterprise state better
  3. Both tools are identical in functionality
  4. Puppet can only configure Windows servers
Analyze
✅ Answer: (B) — Ansible's YAML playbooks are easier for beginners (lower learning curve). Puppet's custom DSL and agent-based model provide better state management for large enterprises. That's why Flipkart prefers Ansible (agile, cloud) while TCS legacy clients often use Puppet (enterprise, compliance).
Q19

A Freshworks QA team runs both unit tests and integration tests. A bug is caught by integration tests but not unit tests. What does this indicate?

  1. Unit tests are useless
  2. The bug exists in how two modules interact, not in individual functions — highlighting the value of multi-level testing
  3. Integration tests should replace unit tests
  4. The developers didn't write any code
Analyze
✅ Answer: (B) — Unit tests verify individual functions work correctly in isolation. Integration tests verify that modules work together correctly. A bug in the interaction between the login module and the dashboard module would only be caught by integration tests. Both levels are essential.
Q20

Zoho builds all infrastructure in-house (private data centres) while Razorpay uses AWS cloud. Analyse the trade-offs.

  1. Cloud is always cheaper than private data centres
  2. Zoho has full control and no cloud vendor lock-in, but higher upfront costs; Razorpay gets elastic scaling and faster setup, but depends on AWS
  3. Private data centres have better uptime
  4. There are no trade-offs — both approaches are identical
Analyze
✅ Answer: (B) — Zoho's approach avoids cloud vendor lock-in and gives complete data sovereignty (important for Indian data privacy laws), but requires massive capital investment. Razorpay's cloud approach enables rapid scaling during Diwali traffic spikes without owning hardware, but creates dependency on AWS's pricing and availability.

Evaluate / Judge (Q21–Q25)

Q21

A Bangalore startup is launching an e-commerce app. They can either deploy directly to production or set up a CI/CD pipeline first (which takes 2 weeks). Which approach would you recommend?

  1. Deploy directly — speed to market is everything
  2. Set up CI/CD first — the 2-week investment prevents weeks of debugging production issues later
  3. Don't deploy at all — wait until the app is perfect
  4. Deploy manually and add CI/CD after 2 years
Evaluate
✅ Answer: (B) — The 2-week CI/CD investment pays for itself within the first month. Without automated testing, a production bug during a sale could crash the app, losing lakhs in revenue and user trust. Every Indian unicorn (Flipkart, Swiggy, Razorpay) invested in CI/CD from early stages.
Q22

IRCTC is considering canary deployment vs big-bang deployment for a Tatkal booking system update. Evaluate which is safer.

  1. Big-bang — update all servers at once for consistency
  2. Canary — roll out to 5% of users first, monitor, then expand — minimises blast radius of bugs
  3. Neither — deploy only after 6 months of testing
  4. Deploy on a festival day to test under real load
Evaluate
✅ Answer: (B) — Canary deployment limits risk. If the new version has a bug, only 5% of users are affected (instead of 100%). IRCTC handles 25 million daily users — a big-bang failure could prevent millions of Indians from booking train tickets.
Q23

A QA team at TCS uses 100% manual testing. Their manager proposes switching to 80% automation + 20% manual. Evaluate this decision.

  1. Bad idea — manual testing is always more thorough
  2. Good idea — automation handles repetitive tests faster and consistently; manual testing focuses on exploratory and usability testing
  3. They should use 100% automation
  4. Testing is unnecessary if developers are skilled
Evaluate
✅ Answer: (B) — Automation is perfect for regression tests (run the same 500 tests after every code change). Manual testing excels at exploratory testing ("does this UX feel intuitive?") and edge cases that are hard to automate. The 80/20 split is industry standard.
Q24

A developer argues: "We don't need Docker. We can just deploy directly on the server." Evaluate this claim for a team of 20 developers.

  1. Correct — Docker adds unnecessary complexity
  2. Incorrect — without Docker, environment differences across 20 developers' machines and servers will cause "works on my machine" bugs, inconsistent deployments, and wasted debugging time
  3. Correct — Docker is only for large companies
  4. Incorrect — Docker is a mandatory government regulation
Evaluate
✅ Answer: (B) — With 20 developers, each having different OS versions, Python versions, and library versions, the "works on my machine" problem becomes a daily nightmare. Docker ensures identical environments everywhere — development, testing, staging, and production.
Q25

Evaluate: "Git is only useful for large teams. Solo developers don't need version control."

  1. True — solo developers can use file backups instead
  2. False — Git provides history tracking, undo capability, branching for experiments, and GitHub portfolio visibility — essential even for solo developers
  3. True — version control is only for enterprise projects
  4. False — but only if the project has more than 1000 lines of code
Evaluate
✅ Answer: (B) — Even solo developers benefit: track all changes (time-travel through code history), experiment safely with branches, undo mistakes with git revert, and showcase work on GitHub. Every professional developer, solo or team, uses Git.

Create / Design (Q26–Q30)

Q26

You're designing a CI/CD pipeline for a college placement portal. Which sequence is correct?

  1. Deploy → Test → Build → Code
  2. Code → Build → Test → Deploy → Monitor
  3. Monitor → Code → Deploy → Test
  4. Test → Build → Code → Monitor → Deploy
Create
✅ Answer: (B) — The correct CI/CD pipeline flow: Developer writes Code → Build system compiles → Automated Tests run → Successful builds get Deployed → Monitoring tracks production health. This is the industry-standard pipeline used at every tech company.
Q27

Design a monitoring alert for Razorpay's payment system. Which metric should trigger an URGENT alert?

  1. A developer commits code at 3 AM
  2. Payment failure rate exceeding 5% for more than 2 minutes
  3. Website colour scheme changes
  4. Number of GitHub stars increasing
Create
✅ Answer: (B) — A 5% payment failure rate for 2+ minutes means thousands of transactions are failing. For Razorpay processing ₹7 lakh crore annually, even 2 minutes of 5% failures = crores in lost revenue. This metric directly impacts business and customer trust.
Q28

Create a branching strategy for a Flipkart team working on Big Billion Days features. Which approach is best?

  1. Everyone pushes directly to the main branch
  2. Use feature branches (feature/bbd-banner, feature/bbd-pricing), merge via pull requests with code reviews, and use a release branch for BBD deployment
  3. Create one branch per developer, never merge
  4. Use a single branch and deploy every commit immediately
Create
✅ Answer: (B) — Feature branching isolates changes, PRs ensure code quality through reviews, and a dedicated release branch allows final integration testing before the critical BBD launch. This is the Git Flow strategy used by most Indian product companies.
Q29

You're creating a Dockerfile for an Indian railway ticket booking app (Node.js + MongoDB). Which base image strategy minimises security vulnerabilities?

  1. Use FROM ubuntu:latest — it has everything
  2. Use FROM node:20-alpine — Alpine is minimal, reducing attack surface
  3. Don't use any base image — write everything from scratch
  4. Use FROM windows:latest
Create
✅ Answer: (B) — Alpine-based images are ~50MB vs ~900MB for Ubuntu. Fewer packages = fewer potential vulnerabilities. The Node.js Alpine image includes only what's needed to run Node.js. This is a security best practice followed by Razorpay, Flipkart, and Freshworks.
Q30

Design a complete DevOps toolchain for a new Indian EdTech startup. Which combination covers all stages?

  1. Git + GitHub Actions + Docker + Kubernetes + Prometheus
  2. Microsoft Word + Email + USB drives
  3. Only Jenkins — it does everything
  4. WhatsApp for deployment coordination
Create
✅ Answer: (A) — Git (version control) → GitHub Actions (CI/CD) → Docker (containerisation) → Kubernetes (orchestration & scaling) → Prometheus (monitoring). This covers the complete Code → Build → Test → Deploy → Monitor pipeline. Most modern Indian startups use exactly this stack.
Section H

Short Answer Questions (5 Questions)

SA-1: Explain the CALMS framework in DevOps with Indian examples.

Answer: CALMS stands for Culture, Automation, Lean, Measurement, and Sharing — the five pillars of DevOps:

Culture: Breaking silos between Dev and Ops teams. At Zoho, developers deploy their own code — no separate operations team for deployment. Everyone is responsible for the product end-to-end.

Automation: Automating repetitive tasks — testing, deployment, monitoring. Flipkart deploys 500+ times daily through automated CI/CD pipelines. No manual SSH into servers.

Lean: Eliminating waste and working in small batches. Freshworks uses 2-week sprints with daily deployments, releasing small features frequently rather than big releases quarterly.

Measurement: Tracking key metrics — deployment frequency, lead time, failure rate, MTTR. Razorpay monitors mean-time-to-recovery (MTTR) which is under 5 minutes.

Sharing: Knowledge sharing across teams through wikis, blameless post-mortems, and shared tooling. Infosys uses internal knowledge bases where any engineer can document and share solutions.

SA-2: What is the difference between a Docker image and a Docker container? Give an analogy.

Answer: A Docker image is a read-only blueprint (recipe) that contains the application code, libraries, dependencies, and OS files needed to run an application. A Docker container is a running instance of an image — a live, isolated process executing the application.

Analogy: An image is like a recipe for biryani — it defines all ingredients and steps. A container is the actual cooked biryani. You can cook multiple biryanis (containers) from the same recipe (image). Each biryani is independent — adding extra spice to one doesn't affect the others.

Technical Example: docker build -t my-app . creates an image. docker run my-app creates a container from that image. You can run 50 containers from the same image — each serving different users.

SA-3: Why is Continuous Integration important? What problems does it solve?

Answer: Continuous Integration (CI) automatically builds and tests code every time a developer pushes changes. It solves several critical problems:

1. Integration Hell: Without CI, 10 developers work separately for weeks. When they try to merge, conflicts and bugs pile up — "integration hell." CI forces frequent integration, catching conflicts early.

2. "Works on My Machine": CI builds code on a clean server environment, catching bugs that only appear outside the developer's laptop. If it passes CI, it works everywhere.

3. Delayed Bug Detection: Without CI, bugs are found during manual testing weeks later. CI catches bugs within minutes of introduction — when the developer still remembers what they changed.

4. Quality Assurance: Every push runs automated tests. Code quality is maintained continuously, not checked once before release.

Indian Example: Flipkart's CI system runs 50,000+ automated tests on every commit. A developer pushing buggy code gets instant feedback in their pull request — "3 tests failed" — and fixes it before merging.

SA-4: Compare unit testing and integration testing. When is each appropriate?

Answer:

Unit Testing tests individual functions/methods in isolation. Example: Testing if calculate_total(price=100, qty=3, gst=18) returns ₹354. It doesn't depend on databases, APIs, or other modules. Fast to run (milliseconds), easy to debug.

Integration Testing tests how multiple modules work together. Example: Testing if the login module correctly passes user data to the dashboard module, which then fetches orders from the database. It verifies the "wiring" between components.

When to use each:

Use unit tests for: individual functions, utility methods, data transformations, business logic calculations. They should be 70–80% of your test suite.

Use integration tests for: API endpoints, database operations, module interactions, end-to-end user flows. They should be 20–30% of your test suite.

Indian Example: At Razorpay, unit tests verify that the GST calculation function works correctly. Integration tests verify that the payment → GST calculation → invoice generation → email notification flow works end-to-end.

SA-5: What is Infrastructure as Code (IaC)? Why is it important for DevOps?

Answer: Infrastructure as Code (IaC) means managing and provisioning servers, networks, and configurations through code files (YAML, JSON, HCL) instead of manual setup via GUI or CLI.

Why it's important:

1. Reproducibility: The same code creates identical environments every time. No "we configured this server 2 years ago and nobody remembers how."

2. Version Control: Infrastructure changes are tracked in Git — you can see who changed what, when, and why. You can roll back infrastructure changes just like code.

3. Speed: Provisioning 100 servers manually takes days. With Ansible/Terraform, it takes minutes.

4. Consistency: All servers are configured identically — no "snowflake servers" with unique, undocumented configurations.

Tools: Ansible (agentless, YAML playbooks), Puppet (agent-based, custom DSL), Terraform (cloud infrastructure — AWS, GCP, Azure), Chef (Ruby-based).

Indian Example: Flipkart uses Terraform to provision cloud infrastructure and Ansible to configure 5,000+ servers. When Big Billion Days approaches, they can spin up 2,000 additional servers in 30 minutes using IaC scripts that are version-controlled and tested.

Section I

Case Studies

📋 Case Study 1: Flipkart Big Billion Days — DevOps at Extreme Scale

Background:

Flipkart's Big Billion Days (BBD) is India's largest online sale, generating over ₹25,000 crore in GMV across 5 days. During the sale, traffic spikes to 15,000 orders per second — 100× normal load. In 2016, the site crashed during the first hour of BBD, causing massive PR damage and estimated ₹500 crore in lost sales.

The DevOps Transformation:

After the 2016 disaster, Flipkart invested heavily in DevOps infrastructure:

  • Microservices Architecture: Decomposed the monolithic application into 200+ microservices (cart, payment, inventory, search, recommendations) — each independently deployable.
  • Containerisation: Every microservice runs in Docker containers, ensuring consistency from developer laptops to production servers.
  • Kubernetes Orchestration: Auto-scaling from 1,000 to 10,000+ pods. CPU-based HPA triggers at 70% usage.
  • CI/CD Pipelines: 500+ deployments per day through Jenkins pipelines. Every code push triggers automated builds, 50,000+ unit tests, integration tests, and canary deployments.
  • Chaos Engineering: Teams intentionally break services in staging environments (Netflix's "Chaos Monkey" approach) to verify recovery mechanisms work.
  • Monitoring: Real-time dashboards tracking every API's response time, error rate, and throughput. PagerDuty alerts on-call engineers within 30 seconds of anomaly detection.

Results:

MetricBefore DevOps (2016)After DevOps (2024)
Uptime during BBD~95% (crashes in first hour)99.99% (zero downtime)
Deployment frequencyWeekly releases500+ per day
Mean Time to Recovery2–4 hours< 5 minutes
Order processing capacity~2,000 orders/sec15,000+ orders/sec

Discussion Questions:

  1. Why did Flipkart choose microservices over a monolithic architecture for BBD?
  2. How does Kubernetes auto-scaling prevent server crashes during traffic spikes?
  3. What role does chaos engineering play in building reliable systems?
  4. If you were designing the monitoring system, what 5 metrics would you track as critical?

📋 Case Study 2: IRCTC Tatkal Booking System — When Every Second Counts

Background:

IRCTC (Indian Railway Catering and Tourism Corporation) processes 25 million+ booking requests daily. During Tatkal booking (10:00 AM for AC, 11:00 AM for non-AC), the system handles extreme traffic — over 15 lakh concurrent users attempting to book tickets in a 30-second window. A 2-second delay means 50,000+ users fail to get tickets.

Technical Challenges:

  • Traffic Spike: Normal traffic = 50,000 requests/minute. Tatkal window = 5,000,000 requests/minute (100× spike in 1 second).
  • Consistency: Each seat must be booked exactly once — no double bookings, no phantom tickets.
  • Latency: Entire booking flow (search → select → passenger details → payment → confirmation) must complete in under 60 seconds.
  • Payment Integration: Multiple payment gateways (UPI, cards, net banking) must handle concurrent transactions without timeouts.

DevOps Solutions Implemented:

  • Load Balancing: CDN (Content Delivery Network) and multiple load balancers distribute traffic across data centres in Hyderabad and Mumbai.
  • Caching: Train schedules and fare data cached using Redis — reducing database queries by 90%.
  • Queue Management: Virtual waiting room system queues users instead of crashing servers. Users see "You are #15,234 in queue. Estimated wait: 3 minutes."
  • Auto-Scaling: AWS-based infrastructure auto-scales to 10× capacity during Tatkal windows.
  • Performance Testing: JMeter simulations of 1 million concurrent users before every Tatkal season update.
  • Database Optimization: Sharded PostgreSQL database with read replicas — write operations go to master, read operations distributed across replicas.

Results:

MetricBefore OptimizationAfter Optimization
System crashes during TatkalFrequent (2–3 times/week)Rare (< 1 per quarter)
Avg. booking time5–10 minutes30–60 seconds
Concurrent user capacity2 lakh15+ lakh
Payment success rate~70%~95%

Discussion Questions:

  1. Why is a virtual waiting room better than simply letting all users hit the server simultaneously?
  2. How does caching with Redis reduce the load on the database? What data should be cached vs fetched live?
  3. Design a monitoring dashboard for IRCTC Tatkal. What metrics and alerts would you include?
  4. If you were the DevOps lead at IRCTC, what testing strategy would you implement before a peak booking season?
Section J

Chapter Summary

📝 Key Takeaways — Unit 4: DevOps & Software Engineering

  • DevOps = Dev + Ops — a culture and set of practices that unifies software development and IT operations for faster, reliable delivery.
  • CALMS Framework — Culture, Automation, Lean, Measurement, Sharing — the five pillars of DevOps culture.
  • CI/CD Pipelines automate the Code → Build → Test → Deploy → Monitor flow, enabling 500+ deployments/day at companies like Flipkart.
  • Git is the universal version control system. Commands: init, add, commit, push, pull, branch, merge, rebase.
  • GitHub hosts repos, enables collaboration (PRs, Issues), and provides free CI/CD (GitHub Actions) and hosting (GitHub Pages).
  • Docker packages apps with all dependencies into containers — eliminating "works on my machine" problems. Key: Images, Containers, Dockerfile, docker-compose.
  • Selenium automates web browser testing — verify buttons, forms, search, and page elements work correctly.
  • Maven automates Java build lifecycle: compile → test → package → deploy. Configured via POM.xml.
  • Ansible (agentless, YAML) and Puppet (agent-based, DSL) enable Infrastructure as Code — configure 1000s of servers automatically.
  • Kubernetes orchestrates Docker containers at scale — auto-scaling, load balancing, self-healing. Flipkart scales to 10,000+ pods during BBD.
  • Nagios monitors servers, CPUs, disks, and applications — alerting teams before issues impact users.
  • Software Testing has multiple levels: Unit → Integration → System → Acceptance. "Test early, test often" saves ₹ crores.
  • Indian DevOps is booming — TCS, Infosys, Wipro, Zoho, Freshworks, Razorpay all run DevOps-driven engineering.
  • Career paths: DevOps Engineer (₹5–8 LPA), SRE (₹8–15 LPA), QA Engineer (₹3–6 LPA), Build Engineer (₹4–7 LPA).
Section K

Earning Checkpoint — Are You Portfolio-Ready?

SkillTool PracticedPortfolio EvidenceEarning Ready?
Git Version ControlGit CLIGitHub profile with commit history✅ Yes — essential for every tech role
Professional READMEMarkdown, GitHubPolished project READMEs✅ Yes — GitHub setup gig ₹1K–₹3K
Docker BasicsDocker CLI, DockerfileContainerised application✅ Yes — Docker setup gig ₹5K–₹15K
CI/CD PipelineGitHub ActionsGreen ✅ CI badge on repo✅ Yes — pipeline setup ₹3K–₹10K
Selenium TestingPython + Selenium5 automated test cases with report✅ Yes — QA testing on Upwork $15–$50/hr
DevOps ConceptsConceptual✅ Yes — interview-ready for Jr DevOps
Kubernetes ConceptsConceptual (no hands-on yet)⬜ Not yet — need Minikube practice
Monitoring ConceptsConceptual⬜ Not yet — need Prometheus/Grafana hands-on
Minimum Viable Earning Setup after this chapter: A GitHub profile with 3+ projects (professional READMEs + CI/CD pipelines) + Selenium test automation skills + Upwork/Fiverr/Internshala profile = you can earn ₹5,000–₹20,000/month from GitHub setup, QA testing, and Docker containerisation gigs while still in college.

✅ Unit 4 complete. Ready for Unit 5: Cloud Computing!

[QR: Link to EduArtha video tutorial — DevOps & Software Engineering]