0% found this document useful (0 votes)
7 views

DevOps Unit 1

Uploaded by

Charan Sunny
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

DevOps Unit 1

Uploaded by

Charan Sunny
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

DevOps

Presented by Edutech Innovations


TABLE OF
CONTENTS

• Introduction • Release Management

• Agile development model • Scrum

• DevOps and ITIL • Kanban

• DevOps process • Delivery Pipeline

• Continuous Delivery • Identifying Bottlenecks


INTRODUCTIO
N
DevOps is a set of practices that combines software
development (Dev) and IT operations (Ops) to
shorten the software development lifecycle and
deliver high-quality software at a faster pace.
Agile Development
The Agile development model is a software development
Model
methodology focused on iterative progress, flexibility,
collaboration, and customer feedback
Key Features of Agile Development Model

• Iterative Development

• Collaboration

• Continuous Feedback and Improvement

• Continuous Integration and Testing

• Flexibility and Adaptability

• 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.

 Enhanced Collaboration: Cross-functional teams improve communication, ensuring that everyone is


aligned with project goals and requirements.
Agile Methodologies in DevOps

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

Information Technology Infrastructure Library (ITIL)


ITIL is a set of best practices for IT Service Management (ITSM) that focuses on aligning IT services with the
needs of the business. It provides a systematic and professional approach to managing IT services and
processes, including areas like service design, delivery, and maintenance

1. Service Strategy: Aligning IT services with business objectives.

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.

5. Continual Service Improvement: Improving processes and services on an ongoing basis.


DevOps vs ITIL
Aspect DevOps ITIL
Focus IT service management, stability, and governance.
Fast delivery of software, collaboration between Dev and Ops.

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

• Developers who develops code.

• Developers in a Continuous Delivery pipeline contribute to the


entire software delivery lifecycle, ensuring that software is
always in a deployable state through frequent integrations,
automated testing, and collaboration with other teams in the
DevOps ecosystem
Continuous Delivery Pipeline

The Revision Control System

• It is used to manage and track changes to source code over time.

• In a CD pipeline, the revision control system allows multiple


developers to collaborate efficiently, maintain a history of code
changes, and ensure smooth integration, building, and deployment
of software and providing strong foundation for CI/CD.

• 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

• The Artifactory Repository

• 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).

Types of Tests Run in Test Environment:

•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.

Types of Tests Run in Staging Environment:

• End-to-End (E2E) Testing:


• Performance Testing:
• Load Testing:
• Security Testing:
• User Acceptance Testing (UAT)
Production Environment
• The production environment is the live environment where the application is deployed for end-users.
• It hosts the real data and is used by the actual customers or users of the software.
•Ensuring reliability, performance, and security is critical in production since any issues here directly impact
the end-users.

Monitoring and Maintenance in Production:

• 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.

Role of Tools in Release Management:

• Jira (for tracking releases, issues, and tasks).

• Azure DevOps (provides release management tools integrated with CI/CD).

• GitLab CI/CD (offers a built-in release pipeline for automated deployment).

• Jenkins (automates CI/CD processes).

• Octopus Deploy (automates the deployment process across environments).


Example of a Release Management
Workflow:
1.Feature Development: Developers complete new features in a feature branch, which is merged into the main
branch after passing unit tests and code review.

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 Operations team members provide input on infrastructure or deployment requirements.

2. Development and Testing:

o Developers write code for the selected features.

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.

o If it meets the Definition of Done, it’s ready for production deployment.


Workflow for Scrum in DevOps

7. Continuous Deployment:

Automated deployment pipelines (set up by DevOps) push the code to production after the sprint.

8. Monitoring and Feedback:

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.

3. Continuous Improvement: The retrospective meetings promote a culture of continuous


improvement, helping teams to refine their processes and practices over time.

4. Quality Focus: With iterative cycles, teams can integrate testing and deployment into each sprint,
ensuring that quality is maintained throughout development.

5. Flexibility: Scrum’s adaptability allows teams to respond to changing requirements or priorities, a


critical aspect of successful DevOps practices.
.
Kanban

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.

• Limit Work-in-Progress (WIP):

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.

5. Focus on Continuous Improvement:

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:

A typical Kanban board in DevOps might include the following columns:

1. Backlog: A list of all tasks, features, bugs, and improvements waiting to be worked on.

2. To Do: Tasks that are ready to be worked on in the current cycle.

3. In Progress: Tasks actively being developed.

4. In Review/Code Review: Completed tasks waiting for peer review or approval.

5. In Testing: Tasks undergoing automated or manual testing.

6. In Deployment: Tasks being deployed to staging or production environments.

7. Done: Tasks that are fully completed and deployed to production.


Delivery Pipeline
A Delivery Pipeline in DevOps is an automated process that takes code changes from
development to production, ensuring that software can be built, tested, and deployed
continuously and reliably. It is a core concept in the DevOps methodology, facilitating Continuous
Integration (CI), Continuous Delivery (CD), and in some cases, Continuous Deployment (CD).
Key Stages of a Delivery Pipeline

• Source Code Management

• Build

• Unit Testing

• Static Code Analysis

• Integration Testing

• Packaging

• Acceptance Testing

• Deployment

• Monitoring and Feedback


Key Tools in a DevOps Delivery Pipeline

 Version Control: Git, GitHub, Bitbucket, GitLab.

 CI/CD Tools: Jenkins, GitLab CI, CircleCI, Travis CI, Bamboo.

 Testing Frameworks: JUnit, Selenium, Cucumber, Postman.

 Build Tools: Maven, Gradle, Docker.

 Configuration Management: Ansible, Chef, Puppet, Terraform.

 Containerization: Docker, Kubernetes, OpenShift.

 Monitoring and Logging: Prometheus, Grafana, ELK Stack, Datadog.


Implementing a Delivery Pipeline
 Choose Tools
 Define Stages
 Automate
 Establish Monitoring
 Iterate

Example of a Simple Delivery Pipeline Flow:

1. Code Commit → Developer pushes code to the Git repository.

2. Automated Build → Jenkins detects the commit, triggers a build, and packages the software.

3. Unit Testing → The code is automatically tested with unit tests.

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.

6. Acceptance Testing → Automated or manual acceptance tests are conducted.

7. Production Deployment → Upon passing all tests, the application is deployed to production.

8. Monitoring and Logging → Real-time monitoring of application performance and logs.


Identifying Bottlenecks:
Identifying bottlenecks in a DevOps delivery pipeline is essential for ensuring smooth, efficient,
and fast software delivery. Bottlenecks can slow down the flow of work and reduce the
effectiveness of the entire pipeline, leading to delays in deployments and a lower quality of
software. Below are strategies and tools to help identify and resolve bottlenecks.

Steps to Identify Bottlenecks in a DevOps


Pipelines:
Visualize the Pipeline:

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.

Automated Monitoring and Logging:

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.

Monitor Work in Progress (WIP):

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).

Analyse Feedback Loops:

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.

Monitor Resource Utilization:

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:

• Code Merge and Review Delays

• Slow or Failing Tests

• Manual Testing

• Build Times

• Slow Deployments

• Insufficient Collaboration

• Manual Approval Processes


Tools for Identifying and Fixing Bottlenecks:

• CI/CD Platforms

• Monitoring and Logging

• Issue Tracking and Workflow Management

• Automated Testing and Feedback

How to Eliminate Bottlenecks:


• Automate Manual Steps

• Optimize Test Suites

• Increase Infrastructure Resources

• Shorter Feedback Loops

• Continuous Monitoring
THANK YOU

You might also like