1. What is DevOps?
- Definition:
Dev (Developers) + Ops (Operations) → A culture, practice, and toolset that enables faster, reliable software delivery through collaboration, automation, and continuous improvement. - Simple Analogy:
- Old Way: Developers “build the car,” throw the keys to Operations → chaos, delays.
- DevOps Way: Developers and Operators work together from the start → smooth, automated, faster delivery.
2. Key Principles
| Principle | Simple Idea | Explanation |
|---|---|---|
| Collaboration | Break silos | Dev, Ops, QA, and Security work together throughout the lifecycle. |
| Automation | Automate repetitive tasks | Builds, testing, deployment, infra setup → faster, error-free. |
| CI (Continuous Integration) | Frequent merges | Code integrated and tested frequently → avoids “integration hell.” |
| CD (Continuous Delivery/Deployment) | Always ready to release | Delivery → human approval; Deployment → automatic production release. |
| Monitoring & Feedback | Watch and learn | Real-time performance, logs, metrics → continuous improvement. |
| Customer Value | Deliver value fast | Focus on customer needs, shorten idea-to-release time. |
| Shared Responsibility | Own the product end-to-end | Teams are accountable from build to operations. |
3. DevOps Tool Categories
| Category | Purpose | Examples |
|---|---|---|
| Version Control (VCS) | Track and manage code changes | Git, GitHub, GitLab, Bitbucket |
| CI/CD | Automate build, test, deployment | Jenkins, GitLab CI, GitHub Actions, CircleCI, Travis |
| Containerization | Package apps with dependencies | Docker, Podman |
| Orchestration | Manage containers at scale | Kubernetes, Docker Swarm |
| Infrastructure as Code (IaC) | Automate infra setup | Ansible, Terraform, Chef, Puppet |
| Monitoring & Logging | System health and insights | Prometheus, Grafana, ELK Stack, Nagios, Zabbix |
| Testing | Automate testing | Selenium, JUnit, TestNG |
| Cloud Services | Scalable infra platforms | AWS, Azure, GCP |
4. Core DevOps Concepts
| Concept | Key Idea | Mnemonic |
|---|---|---|
| CI | Frequent merges, automated builds & tests | “Frequent merges = smooth releases” |
| CD (Delivery) | Always ready for release | “Deployable anytime” |
| CD (Deployment) | Automatic production release | “Zero human click deploys” |
| IaC | Infra managed via code for consistency | “Infra = Code” |
| Observability | Real-time logs, metrics, traces | “Know what’s running” |
| Shift-Left Security | Add security early in the process | “Security is everyone’s job” |
| Automation | Remove manual work | “If it’s repeatable, script it” |
| Feedback Loops | Monitor, learn, adapt | “Fast feedback = fast fixes” |
5. DevOps Pipeline (Stages)
| Stage | Purpose | Tools |
|---|---|---|
| Plan | Define features & goals | Jira, Trello, Azure Boards |
| Code | Write and review code | Git, GitHub, GitLab, VS Code |
| Build | Compile and package | Jenkins, GitLab CI, Docker |
| Test | Automated & manual testing | Selenium, JUnit, SonarQube |
| Release | Stage for production | Nexus, Artifactory |
| Deploy | Push to production | Kubernetes, Terraform, Ansible |
| Operate | Manage live systems | AWS, Azure, GCP consoles |
| Monitor | Track health, metrics, logs | Prometheus, Grafana, ELK, Splunk |
Infinite Loop: Plan → Code → Build → Test → Release → Deploy → Operate → Monitor → Feedback → Repeat.
6. Common DevOps Practices
- Version Control (Git)
- Automated Testing (Selenium, JUnit)
- Infrastructure Automation (Ansible, Terraform)
- Monitoring & Logging (ELK, Prometheus)
- CI/CD Pipelines (Jenkins, GitHub Actions)
7. Benefits of DevOps
- Faster delivery
- Higher quality software
- Better collaboration
- Early bug detection
- Reduced manual effort
8. Challenges
- Resistance to cultural change
- Shortage of skilled professionals
- Complex tool integration
- Security risks in pipelines
9. Cloud and DevOps
| Cloud Service | AWS | Azure | GCP |
|---|---|---|---|
| Storage | S3 | Blob Storage | GCS |
| Processing | EMR | Azure DevOps, Databricks | DataProc |
| Container Services | EKS | AKS | GKE |
Cloud enables scalability, flexibility, and cost-efficiency for DevOps workflows.
10. Key Terms
| Term | Definition |
|---|---|
| Blue-Green Deployment | Two environments → zero downtime switch. |
| Canary Deployment | Release to a small % of users first. |
| Rolling Deployment | Gradual update rollout. |
| GitOps | Managing infra using Git as the single source of truth. |
11. Popular Exam Topics
- CI/CD lifecycle
- Tools and their purposes
- Infrastructure as Code concepts
- Docker vs VMs (containers are lightweight, VMs are heavy)
- Git basic commands
12. Command Cheat Sheet
Git
| Command | Purpose |
|---|---|
git init | Start repo |
git clone URL | Copy remote repo |
git add . | Stage changes |
git commit -m "msg" | Commit changes |
git push | Upload commits |
git pull | Sync local with remote |
git branch / git checkout | Branch management |
Docker
| Command | Purpose |
|---|---|
docker build -t name . | Build image |
docker run -p 80:80 name | Run container |
docker ps | List running containers |
docker stop id | Stop container |
docker exec -it id /bin/bash | Access container shell |
Kubernetes
| Command | Purpose |
|---|---|
kubectl get pods | List pods |
kubectl apply -f file.yaml | Deploy/update resources |
kubectl delete -f file.yaml | Delete resources |
kubectl logs pod-name | View pod logs |
kubectl exec -it pod-name -- /bin/bash | Access pod shell |
kubectl scale deployment name --replicas=n | Scale pods |
13. Last-Minute Tips
- Remember core pipeline stages and tools.
- Understand IaC and Automation concepts.
- Know Docker and Kubernetes basics.
- Practice basic commands for Git, Docker, and Kubernetes.
- Focus on feedback loops and continuous improvement.
MCQ
1. What does DevOps stand for?
- a) Development Optimization Services
- b) Development and Operations
- c) Developer Options
- d) Deployment Operations
2. Which of the following is NOT a DevOps principle?
- a) Automation
- b) Continuous Feedback
- c) Isolated Teams
- d) Collaboration
3. Which tool is primarily used for continuous integration?
- a) Jenkins
- b) Kubernetes
- c) Docker
- d) Ansible
4. What is the main purpose of containerization in DevOps?
- a) To automate code testing
- b) To manage infrastructure as code
- c) To create lightweight and portable application environments
- d) To provide version control for code
5. Which tool is used for container orchestration?
- a) Docker
- b) Kubernetes
- c) Terraform
- d) Git
6. What does CI/CD stand for?
- a) Continuous Integration/Continuous Deployment
- b) Continuous Infrastructure/Continuous Delivery
- c) Cloud Integration/Cloud Deployment
- d) Code Integration/Code Development
7. Which DevOps tool is used for infrastructure automation?
- a) Nagios
- b) Terraform
- c) Selenium
- d) Prometheus
8. Which of the following is NOT a DevOps practice?
- a) Continuous Monitoring
- b) Continuous Integration
- c) Manual Testing
- d) Infrastructure as Code
9. What is the primary role of version control systems like Git in DevOps?
- a) Automating deployments
- b) Monitoring performance
- c) Tracking changes in code
- d) Orchestrating containers
10. Which of the following tools is used for monitoring in DevOps?
- a) Jenkins
- b) Nagios
- c) Ansible
- d) Docker
11. What is the purpose of the docker-compose tool?
- a) To build Docker images
- b) To manage multiple containers as a single application
- c) To monitor container performance
- d) To deploy containers on Kubernetes
12. What is the main benefit of using Infrastructure as Code (IaC)?
- a) Reduces collaboration effort
- b) Ensures manual configuration of servers
- c) Enables consistent and repeatable infrastructure setup
- d) Increase code compilation speed
13. What does the kubectl command do?
- a) Manages Docker images
- b) Deploys and manages Kubernetes clusters
- c) Monitors system logs
- d) Configures CI/CD pipelines
14. Which of the following is a Continuous Monitoring tool?
- a) Jenkins
- b) Prometheus
- c) Docker
- d) Git
15. Which deployment strategy involves two environments, one active and one idle?
- a) Rolling Deployment
- b) Blue-Green Deployment
- c) Canary Deployment
- d) Recreate Deployment
16. What is the main purpose of a CI/CD pipeline?
- a) To manage virtual machines
- b) To integrate and deliver code changes automatically
- c) To replace manual code development
- d) To design container images
17. Which of the following is NOT a feature of Kubernetes?
- a) Automatic scaling
- b) Service discovery
- c) Continuous Integration
- d) Load balancing
18. What is the command to initialize a Git repository?
- a)
git start - b)
git init - c)
git clone - d)
git push
19. What is Ansible primarily used for?
- a) Container orchestration
- b) Infrastructure automation
- c) Application monitoring
- d) Code testing
20. What is a “Canary Deployment”?
- a) Gradual rollout of new features to a subset of users
- b) Deploying a new application version to all users immediately
- c) Using containers for deployment
- d) Deploying applications without downtime
21. Which of the following commands lists running Docker containers?
- a)
docker list - b)
docker ps - c)
docker show - d)
docker run
22. What does the git pull command do?
- a) Pushes local changes to the remote repository
- b) Pulls changes from the remote repository to the local repository
- c) Deletes files from the repository
- d) Clones a repository
23. Which tool is best suited for container security scanning?
- a) Prometheus
- b) Jenkins
- c) Docker Bench
- d) Nagios
24. What is the purpose of the Helm tool in Kubernetes?
- a) To automate CI/CD pipelines
- b) To monitor Kubernetes nodes
- c) To manage Kubernetes applications using charts
- d) To create Docker images
25. Which of the following is a benefit of using DevOps?
- a) Increased software delivery speed
- b) Isolated team silos
- c) Reduced need for collaboration
- d) Longer development cycles
