What is DevOps?
DevOps is a modern software development approach where the Development team (writes code), Operations team (deploys & manages servers), and Testing team (checks quality) work together as a single team instead of separately.
Why DevOps is Needed
Modern applications require faster updates, fewer bugs, quick bug fixing, stable performance, and zero downtime. The traditional Waterfall method was slow and error-prone. DevOps solves these problems.
With DevOps: All teams sit together and prepare simultaneously โ faster, fewer mistakes, better coordination.
Why DevOps Emerged
Modern companies like Google, Amazon, and Netflix release updates daily, serve millions of users, and cannot afford downtime. Old methods failed because:
- Code was tested only at the end
- Deployment took hours or days
- Developers and operations teams never communicated
- Fixing issues took a long time
- Bugs appeared in production frequently
Real-World Examples
| Example | Without DevOps | With DevOps |
|---|---|---|
| Instagram Feature Update | Slow manual release | Jenkins โ Docker โ Kubernetes โ fast automated pipeline |
| Online Exam Portal Slowdown | Server crashes under traffic | Monitoring detects high CPU โ auto-scales servers |
Core Principles
1. Collaboration
All teams share tools, processes, and knowledge. When developers and operations work separately, communication gaps create delays and errors. With collaboration, problems are solved faster with no blame and common goals.
2. Automation
Automation removes manual mistakes and applies to code build, testing, deployment, monitoring, and environment setup.
| Without Automation | With Automation |
|---|---|
| Tester manually tests login page daily | Selenium tests login page automatically |
| Ops manually deploys .war file each release | Jenkins deploys .war file automatically |
3. Continuous Integration (CI)
Developers integrate (merge) their code frequently โ often many times a day. If 10 developers work for 10 days without merging, code conflicts occur, bugs remain hidden, and integration becomes painful. CI catches errors early.
4. Continuous Delivery (CD)
CD ensures that every successful build can be deployed at any time. After CI, Jenkins automatically builds the project, packages .jar/.war, and sends it to the testing environment โ the app is always ready for deployment.
5. Continuous Deployment
Every change that passes all tests is deployed to production automatically. Amazon deploys new features thousands of times per day using this approach.
6. Continuous Monitoring
Monitoring tools track server health, performance, errors, and crashes so issues are detected before users complain.
DevOps Culture
DevOps is not only tools โ it is behaviour, mindset, and culture.
1. Shared Responsibility
Everyone owns the product outcome. If an app crashes: Developer checks code, Ops checks servers, Tester checks functionality โ together they fix it quickly.
2. Fail Fast, Learn Fast
Failures are used for improvement, not blame. Example: A deployment failed due to wrong config. Instead of blaming, the team creates an automated config checker.
3. Transparency
Everyone knows what others are doing. All changes visible in GitHub, all builds visible in Jenkins, all deployments visible in logs. This avoids confusion.
Key Elements of DevOps
| Element | Description | Examples |
|---|---|---|
| Continuous Integration | Frequent code merging with automated builds | Jenkins detects missing semicolon; unit tests fail โ pipeline stops |
| Continuous Delivery | Always-deployable build artifacts | Maven packages .jar after CI; CD pipeline deploys to testing server daily |
| Continuous Deployment | Automatic production release after all tests pass | Bug fix in login module goes live immediately; new banner auto-deployed |
| Infrastructure as Code (IaC) | Infrastructure managed via code | Terraform creates 10 servers; Ansible configures 50 servers identically |
| Continuous Monitoring | Real-time tracking of health & performance | Grafana shows CPU spikes โ auto-scales; Prometheus detects memory leak |
DevOps Tools
| Tool | Category | Example Use |
|---|---|---|
| Git | Code Versioning | Storing attendance management system code |
| Jenkins | Automation / CI-CD | Auto-building student portal |
| Docker | Containerization | Packaging Java app with all dependencies |
| Ansible | Configuration Management | Installing Java on 50 servers at once |
| Chef | Configuration Management | Writing recipes to automate server setup |
| Puppet | Configuration Management | Managing multiple nodes via master-agent model |
| SaltStack | Remote Execution / IaC | Fast configuration of 100+ servers |
| Grafana | Monitoring & Visualization | Tracking CPU, RAM during exam peak time |
DevOps Fundamentals โ Notes PDF
Week 1 & 2 ยท DevOps Introduction, Core Principles & Culture