The DevOps Lifecycle
Table of contents
- Overview of the cycle
- Plan phase
- Code phase
- Build phase
- Test phase
- Release phase
- Deploy phase
- Operate phase
- Monitor phase
1 - Overview of the cycle
The DevOps lifecycle is an infinite loop made up of 8 interconnected phases.
The infinity symbol
┌────────────────────────────────────┐
│ │
│ ┌──────┐ ┌──────┐ │
│ / DEV \ / OPS \ │
│ │ Plan │ │ Release │ │
│ │ Code ├────┤ Deploy │ │
│ │ Build │ │ Operate │ │
│ \ Test / \ Monitor/ │
│ └──────┘ └──────┘ │
│ │
└────────────────────────────────────┘
Characteristics of the cycle
| Characteristic | Description |
|---|---|
| Continuous | No end, permanent improvement |
| Iterative | Small, frequent increments |
| Automated | Minimal manual intervention |
| Measured | Metrics at every stage |
| Collaborative | Shared responsibility |
🔝 Back to table of contents
2 - Plan phase
Goal
Define features, prioritize the backlog, plan sprints.
Main activities
| Activity | Description |
|---|---|
| Requirements gathering | Understand what the customer wants |
| Prioritization | Backlog grooming, MoSCoW |
| Estimation | Story points, planning poker |
| Sprint planning | Define the sprint scope |
| Definition of "Done" | Acceptance criteria |
Typical tools
- Project management: Jira, Azure DevOps, Trello
- Documentation: Confluence, Notion
- Communication: Slack, Microsoft Teams
The Plan phase benefits from feedback from the Monitor phase. Production metrics inform product decisions.
🔝 Back to table of contents
3 - Code phase
Goal
Write quality code, collaborate effectively, manage versions.
Essential practices
| Practice | Benefit |
|---|---|
| Version control | History, collaboration |
| Branching strategy | Isolation, parallelism |
| Code review | Quality, knowledge sharing |
| Pair programming | Fewer bugs, training |
| Coding standards | Consistency, maintainability |
Branching strategies
Typical tools
- VCS: Git (GitHub, GitLab, Bitbucket)
- IDE: VS Code, IntelliJ, Eclipse
- Linting: ESLint, Prettier, SonarLint
🔝 Back to table of contents
4 - Build phase
Goal
Compile the code, manage dependencies, create artifacts.
Artifact types
| Type | Format | Usage |
|---|---|---|
| Application | JAR, WAR, DLL | Executables |
| Container | Docker Image | Containerized deployment |
| Package | npm, pip, nuget | Libraries |
| Infrastructure | Terraform plan | IaC |
Reproducible build
A build must be reproducible: the same source code must produce the same artifact, no matter when or where it is built.
Key elements:
- Pinned dependency versions
- Controlled build environment
- Build inside a container
Typical tools
- Build tools: Maven, Gradle, npm, Make
- CI servers: Jenkins, GitLab CI, GitHub Actions
- Artifact repos: Nexus, Artifactory, Docker Registry
🔝 Back to table of contents
5 - Test phase
Goal
Validate code quality through different levels of testing.
Types of tests
| Type | Scope | Speed | Cost |
|---|---|---|---|
| Unit | Function/Class | Very fast | Low |
| Integration | Components | Fast | Medium |
| E2E | Full system | Slow | High |
| Performance | Load/Stress | Variable | High |
| Security | Vulnerabilities | Variable | High |
Testing pipeline
Code coverage
Code coverage is not a goal in itself. 80% coverage on critical code is worth more than 100% on trivial code.
Typical tools
- Unit tests: JUnit, Jest, pytest
- Integration: Testcontainers, WireMock
- E2E: Selenium, Cypress, Playwright
- Performance: JMeter, k6, Gatling
- Security: OWASP ZAP, SonarQube
🔝 Back to table of contents
6 - Release phase
Goal
Prepare and validate the deployment to production.
Release strategies
| Strategy | Description | Risk |
|---|---|---|
| Big Bang | Everything at once | High |
| Rolling | Gradual | Medium |
| Blue-Green | Two environments | Low |
| Canary | Small percentage first | Very low |
| Feature Flags | On-demand activation | Very low |
Feature Flags
Feature flags let you deploy code without activating the feature. This decouples deployment from release.
Typical tools
- Release management: Jenkins, GitLab, Azure DevOps
- Feature flags: LaunchDarkly, Unleash, Flagsmith
- Approval: ServiceNow, Jira
🔝 Back to table of contents
7 - Deploy phase
Goal
Deploy the application to production reliably and reproducibly.
Blue-Green Deployment
Canary Deployment
Deployment principles
| Principle | Description |
|---|---|
| Immutable | Do not modify, replace |
| Automated | No manual intervention |
| Reversible | Rollback possible |
| Incremental | Bit by bit |
| Observable | Logs and metrics |
Typical tools
- Orchestration: Kubernetes, Docker Swarm
- Deployment: Argo CD, Spinnaker, Flux
- Cloud: AWS CodeDeploy, Azure DevOps
🔝 Back to table of contents
8 - Operate phase
Goal
Keep the application running optimally.
Main activities
| Activity | Description |
|---|---|
| Scaling | Adjust resources to demand |
| Configuration | Manage runtime settings |
| Incident response | React to problems |
| Backup | Regular backups |
| DR | Disaster recovery plan |
SRE Practices
- SLO (Service Level Objectives): Availability targets
- SLI (Service Level Indicators): Measured metrics
- Error Budget: Acceptable margin of error
"Hope is not a strategy." - SRE Proverb
Reliability must be designed and measured, not hoped for.
Typical tools
- Container orchestration: Kubernetes
- Configuration: Consul, etcd, Vault
- Incident: PagerDuty, OpsGenie
🔝 Back to table of contents
9 - Monitor phase
Goal
Observe, alert, and understand the system's behavior.
The 3 pillars of observability
| Pillar | Description | Example |
|---|---|---|
| Logs | Text events | "User login failed" |
| Metrics | Numeric measurements | CPU: 85%, Latency: 200ms |
| Traces | Request journeys | Request path through services |
Sample dashboard
┌─────────────────────────────────────────────┐
│ Dashboard │
├───────────────┬──────────────┬──────────────┤
│ Requests/s │ Latency │ Error Rate │
│ 12,450 │ 45ms │ 0.02% │
├───────────────┴──────────────┴──────────────┤
│ [═══════════════════════════════════] CPU │
│ [═══════════════════ ] MEM │
├─────────────────────────────────────────────┤
│ Alert: High latency on /api/users │
└─────────────────────────────────────────────┘
Feedback to Plan
The cycle closes: monitoring data feeds the decisions of the Plan phase.
Typical tools
- Logs: ELK Stack, Loki, Splunk
- Metrics: Prometheus, Datadog, New Relic
- Traces: Jaeger, Zipkin, X-Ray
- Dashboards: Grafana, Kibana
🔝 Back to table of contents
Key takeaways
- The DevOps cycle includes 8 interconnected phases
- Each phase feeds the next in a continuous loop
- Automation is present at every phase
- Monitoring closes the loop by informing planning
- Tools vary, but the principles stay constant