DevOps Unit 1
DevOps Unit 1
• Iterative Development
• Collaboration
• Frequent Releases
Benefits of Agile Development Model
Faster Delivery: Agile’s iterative approach allows for quicker releases, aligning with DevOps’ goal of
reducing time-to-market.
Higher Quality: Continuous testing and feedback loops help catch defects early, leading to improved
product quality.
Increased Flexibility: Agile teams can pivot quickly based on user feedback or market changes,
enhancing adaptability.
Scrum
A popular Agile framework that uses fixed-length iterations (sprints) to deliver increments of work. Scrum
roles (Scrum Master, Product Owner, and Development Team) facilitate collaboration and accountability.
Kanban
Focuses on visualizing the workflow and limiting work in progress (WIP). This helps teams identify
bottlenecks and optimize the flow of work, complementing the continuous delivery aspect of DevOps.
Agile vs DevOps
• Agile focuses on the development process, ensuring fast and adaptable delivery of working software.
• DevOps goes beyond development, integrating the operations side to automate and streamline the
entire software delivery lifecycle, from coding to deployment to maintenance.
DevOps and ITIL
As mentioned earlier, DevOps is a set of practices that integrates software development and IT operations. It
emphasizes collaboration between developers and operations teams, continuous integration, delivery, and
automated deployment
2. Service Design: Planning and designing IT services that meet business needs.
3. Service Transition: Ensuring that new or changed services are effectively transitioned into production.
4. Service Operation: Ensuring that services are delivered effectively and efficiently.
Approach Agile, iterative, and adaptive. Structured, process-driven, and focused on best practices.
Automation Heavy emphasis on automation (CI/CD, monitoring). Focus on manual governance and approval processes.
Change Continuous delivery with automated pipelines, frequent small Formal change approval process, controlled and scheduled
Management changes. changes.
Culture Cross-functional collaboration and shared ownership. Hierarchical, with roles and responsibilities clearly defined.
Tools CI/CD tools (Jenkins, GitLab CI), infrastructure as code ITSM tools (ServiceNow, BMC Remedy), configuration
(Terraform, Ansible), containerization (Docker, Kubernetes). management databases (CMDBs).
Objective Accelerate development and deployment cycles, improve Ensure stability, minimize risks, and provide reliable
collaboration. services to business.
DevOps Process
The key principles of DevOps include
• Collaboration: Developers, testers, and operations teams work together to ensure smooth and fast software
delivery.
• Automation: Automating manual tasks, such as testing, integration, and deployment, to reduce human error
and improve efficiency.
• Continuous Integration (CI): Developers regularly merge their code changes into a shared repository, followed
by automated testing to detect issues early.
• Continuous Delivery (CD): Ensuring that code is always in a deployable state and can be released to
production at any time.
• Monitoring and Feedback: Monitoring systems in production and gathering feedback to make improvements in
future releases.
• Infrastructure as Code (IaC): Managing infrastructure through machine-readable configuration files, allowing
consistent environments and faster provisioning.
Continuous Delivery Pipeline
Continuous Delivery (CD) focuses on making sure that code can be released at any point by automating the
process of software development, testing, and deployment. CD is an extension of Continuous Integration (CI).
Continuous Delivery Pipeline
Developers Team
• Git-based systems are the most widely used due to their flexibility,
support for branching, and seamless integration with modern CI/CD
tools.
Continuous Delivery Pipeline
• Build Server
• Package managers
Test Environment
•The test environment is used for automated testing and manual testing
of the application.
•It helps catch bugs, errors, and issues early in the development cycle,
typically through unit tests, integration tests, and sometimes user
acceptance tests (UAT).
•Unit Tests: Test individual units or functions of the code to ensure they work as expected.
•Integration Tests: Test the integration points between different modules or components to check if they interact
correctly.
•API Testing: Validate that API endpoints function as expected, often done using mock services or test APIs.
•Smoke Tests: Quick, basic tests to check that the major functions of the application work after a new build is
deployed.
Staging Environment
• The staging environment is a pre-production environment where the application is deployed for final testing
under conditions similar to production.
•It is used for performance testing, load testing, and end-to-end testing before pushing the code to the live
(production) environment.
•User Acceptance Testing (UAT) often occurs in staging, where stakeholders or customers may review the final
version before production release.
• Monitoring: The production environment is closely monitored using tools like Prometheus, Datadog,
Grafana, or New Relic to ensure system health and performance.
• Logging: Centralized logging systems are used to track system events and diagnose issues.
• Incident Management: Any issues in production are escalated quickly, and the team must be able to roll
back changes or apply fixes rapidly.
• Backup and Disaster Recovery: Automated backups and disaster recovery plans are crucial in case of
failures, allowing teams to restore data and services quickly.
Release Management
• Release management in DevOps is the process of planning, scheduling, and
controlling the development and deployment of software updates, features,
and bug fixes into different environments, culminating in the release to the
production environment.
2.Build and CI Pipeline: Once the feature is merged, a new build is automatically created, and the CI pipeline
runs automated tests (unit, integration, functional) to ensure the code is production-ready.
3.Deploy to Test Environment: The code is deployed to a test environment where further testing is conducted
4.Deploy to Staging Environment: After passing tests in the test environment, the release candidate is deployed
to a staging environment for final validation
5.Approval for Production: The release manager and stakeholders approve the release for production
deployment based on the results of the testing stages.
6.Deployment to Production: Using automated tools, the release is deployed to the production environment.
7.Post-release Monitoring: After deployment, the team monitors the system for any issues. If any critical issues
are detected, they can quickly rollback to the previous version or apply a hotfix.
Scrum
Scrum plays a vital role by providing the structure and processes for managing work and delivering
features in a continuous, reliable manner. Integrating Scrum into DevOps helps bridge the gap
between development and operations, facilitating rapid and continuous delivery of software.
Workflow for Scrum in DevOps
1. Sprint Planning:
o Scrum team selects items from the product backlog for the sprint.
o Continuous Integration (CI) tools automatically build and test the software as changes are made.
3. Daily Scrum:
o Development and operations team members discuss progress, and any impediments related to
development, deployment, or infrastructure.
4. Sprint Review:
o At the end of the sprint, the team demonstrates the working software.
7. Continuous Deployment:
Automated deployment pipelines (set up by DevOps) push the code to production after the sprint.
After deployment, the team monitors the system for any issues and gathers feedback from users.
This feedback is fed back into the product backlog for future sprints.
9. Sprint Retrospective:
The team reflects on the sprint to identify areas for improvement in both development and
operations processes.
Benefits of Integrating Scrum with DevOps:
1. Enhanced Collaboration: Scrum encourages teamwork and communication, which aligns well with
DevOps principles of collaboration between development and operations.
2. Faster Delivery: Regular sprints allow for frequent releases of small increments, enabling quicker
feedback and faster adjustments.
4. Quality Focus: With iterative cycles, teams can integrate testing and deployment into each sprint,
ensuring that quality is maintained throughout development.
Kanban helps teams maintain a smooth flow of work by visualizing the entire process of delivering
software, from development to operations. It ensures that both development and operational tasks are
transparent, and that work is completed efficiently with minimal bottlenecks .
Key Principles of Kanban in DevOps
• Visualize the Workflow:
o The core idea of Kanban is to visualize the entire workflow on a Kanban board. Each task, from
development to deployment, is represented as a card on the board, with columns representing stages
in the process (e.g., To Do, In Progress, In Testing, In Deployment, Done).
o In DevOps, this can include stages such as coding, testing, building, deploying, and monitoring. By
visualizing the workflow, the entire team, including developers and operations, can see the status of
every task and identify bottlenecks.
o One of Kanban’s core principles is to limit the number of tasks being worked on at any given time to
ensure focus and avoid overburdening team members. This ensures that the team completes tasks
efficiently before moving on to the next ones.
o In a DevOps setting, limiting WIP can ensure that developers and operations teams are not
overwhelmed, and tasks such as deployment or bug fixes are handled in an organized and controlled
manner.
Key Principles of Kanban in DevOps
3. Manage Flow:
o Kanban emphasizes optimizing the flow of tasks through the system. The goal is to ensure a smooth progression of tasks
from start to finish without bottlenecks or delays.
o DevOps automation plays a key role in managing flow, as CI/CD pipelines, automated testing, and automated deployments
can significantly improve the speed at which tasks move through the system. Continuous monitoring helps teams identify
slowdowns and take corrective actions to improve flow.
4. Continuous Delivery:
o While Scrum often works in time-boxed sprints, Kanban encourages continuous delivery, meaning that tasks can be
deployed as soon as they are completed. This aligns perfectly with the Continuous Integration (CI) and Continuous Delivery
(CD) principles in DevOps.
o Kanban encourages teams to continuously review their workflow and processes to improve efficiency and reduce waste. In
DevOps, this aligns with the concept of continuous improvement, where teams continuously monitor their systems in
production and refine their deployment processes.
o Regularly reviewing performance metrics, cycle times, and operational data helps teams identify areas for improvement
and fine-tune their DevOps practices.
Example of a Kanban Board in DevOps:
1. Backlog: A list of all tasks, features, bugs, and improvements waiting to be worked on.
• Build
• Unit Testing
• Integration Testing
• Packaging
• Acceptance Testing
• Deployment
2. Automated Build → Jenkins detects the commit, triggers a build, and packages the software.
4. Integration Testing → The application is deployed to a test environment and integration tests are run.
5. Package and Deploy → The application is packaged and deployed to a staging environment.
7. Production Deployment → Upon passing all tests, the application is deployed to production.
o The first step in identifying bottlenecks is to make the entire delivery pipeline visible. Tools
like Jenkins, GitLab CI, or Azure DevOps provide graphical representations of the stages in
your pipeline, such as code commit, build, test, and deploy.
o By visualizing the pipeline, teams can see where tasks are getting stuck, delayed, or taking
longer than expected.
Steps to Identify Bottlenecks in a DevOps
Pipelines:
Measure Lead and Cycle Time:
o Lead Time is the total time taken from when a task is created until it is completed.
o Cycle Time is the time taken to complete a task once work has started on it.
o Analysing lead and cycle times helps identify stages where tasks are delayed. If cycle times are
significantly longer in one stage (e.g., testing, deployment), this stage may be a bottleneck.
o Monitoring tools like Prometheus, Datadog, and Grafana can provide real-time insights into system
performance and workflow efficiency. These tools allow teams to track performance metrics, such as
the time taken to run builds, execute tests, and complete deployments.
o Logs from tools like ELK Stack (Elasticsearch, Logstash, Kibana) or Splunk can be analyzed to identify
patterns of delays or errors in specific stages of the pipeline.
Steps to Identify Bottlenecks in a DevOps
Pipelines:
Analyse Build and Test Times:
o If builds or tests are taking too long, it can slow down the entire pipeline. Build tools like Maven,
Gradle, and Docker can track how long it takes to compile code and package artifacts.
o Testing frameworks like JUnit, Selenium, or Cucumber should be monitored to see how long each test
suite takes to complete.
o Slow builds or tests may indicate issues such as unoptimized code, excessive dependencies, or
inadequate parallelization.
o Kanban boards are useful for visualizing WIP limits. If there are too many tasks in a specific stage (e.g.,
“In Progress” or “In Testing”), it’s a sign of a bottleneck.
o Limiting WIP ensures that work doesn’t pile up in one stage of the pipeline and helps identify where
teams need more resources or automation to speed up processes.
Steps to Identify Bottlenecks in a DevOps
Pipelines:
Track Deployment Frequency:
o Deployment frequency is a critical metric. If deployments are slow or infrequent, it could point to a bottleneck in the
staging or deployment process.
o Using tools like Spinnaker, Jenkins, or Ansible, teams can monitor deployment times and identify stages that need
optimization (e.g., slower deployment scripts or manual approval processes).
o Delays in receiving feedback, such as test results or user feedback from production, can also be bottlenecks. A slow
feedback loop delays the team’s ability to react to issues and make improvements.
o Continuous monitoring of applications in production using tools like New Relic or Dynatrace can help identify performance
bottlenecks after deployment.
o Bottlenecks can occur due to resource constraints like CPU, memory, or disk space during builds, tests, or deployments.
Infrastructure monitoring tools like Nagios, Prometheus, or CloudWatch can track resource utilization in real-time and alert
teams to under-provisioned environments.
o If resource limitations are slowing down the pipeline, consider scaling infrastructure or leveraging cloud-based resources.
Common Bottlenecks in a DevOps Pipelines:
• Manual Testing
• Build Times
• Slow Deployments
• Insufficient Collaboration
• CI/CD Platforms
• Continuous Monitoring
THANK YOU