The goal of DevOps is to close the gap between Dev and Ops teams, and shorten the software development lifecycle and improve the quality and reliability of software releases.
================================
目录:
一、What is DevOps?
二、Why DevOps?
三、The lifecycles of DevOps - 7Cs
四、How DevOps?
五、Reference
================================
一、What is DevOps?
1.“DevOps is the streamlining of the activities surrounding IT solution development (Dev) and IT operations (Ops).” - Project Management Institute
2.“DevOps is a software development approach that emphasizes collaboration and communication between development (Dev) and operations (Ops) teams.” - geeksforgeeks.org
3. DevOps is the union of people, processes, and products to enable continuous delivery of value to our customers. - Microsoft
================================
二、Why DevOps?
1. pain point: How to close the gap between Dev and Ops team?
1.1 Agile or Waterfall approaches primarily focus on the development process and seldom address deployment or operational issues.
1.2 Dev and Ops teams often work in silos, resulting in limited collaboration.
1.3 The gap between Dev and Ops teams can lead to deployment delays, increased costs, and slower feedback loops
2.Benifits of DevOps?
2.1. Decreased Time to Market
a) Automated build, testing, and deployment accelerates the delivery pipeline.
b) Continuous integration and continuous delivery (CI/CD) enable quick and frequent releases of updates.
2.2 Decreased Cost to Deploy
a) Streamlined release management minimized overall deployment costs.
b) Automated testing and deployment reduce the need for manual intervention.
2.3 Improved Quality
a)Integrating automated testing throughout the development process helps catch bugs earlier in the cycle, ensuring higher quality releases.
b)Continuous monitoring and feedback allow for early detection and resolution of issues
2.4 Improved decision-making
a)Real-time insights from development and operational metrics provide valuable data for making informed decisions.
b)Rapid iterations and continuous stakeholder feedback enable the team to get the real requirements.
================================
三、The lifecycles of DevOps - 7Cs
1. Continuous Development: Code is developed in small, continuous increments rather than being written all at once
2. Continuous Integration:Uses automated tests to validate the functionality and performance of code continuously
3. Continuous Testing:Uses automated tests to validate the functionality and performance of code continuously
4.Continuous Delivery: Automatically deploys code changes into production environment, maintaining a steady release cycle.
5. Continuous Monitoring: Automatically collects and analyzes data from the production environment to identify issues
6. Continuous Feedback:Gathers feedback from users and stakeholders to guide improvements and new feature development
7 .Continuous Operations: Ensures the system remains operational and resilient, using automation for tasks like scaling, backups, and failovers.
================================
四、How DevOps?
1. Commercial product example
Azure DevOps of Microsft is a SaaS platform that provides its own set of DevOps tools, Such as CI/CD, project management, and various development and monitoring tools.Developer can use a number of services to deploy the application or complete the Software Development Life Cycle (SDLC) in a fast and efficient manner.
2. Open source
2.1 Open source tools for Continuous Integration
a) GitHub for Source Code Management (SCM): Developers write code on their local machines and push it to a remote repository on GitHub, which serves as a centralized platform for version control, collaboration, and code review.
b) Maven: A build automation tool that compiles the source code and packages it into deployable artifacts like WAR, JAR, or EAR files, managing dependencies and build configurations.
c) SonarQube: Analyzes the quality of source code, performing code reviews to detect bugs, vulnerabilities, and code smells, and generates detailed reports in formats like HTML or PDF.
d) Sonatype Nexus: Acts as a repository manager to store and manage the artifacts built by tools like Maven, allowing teams to store, retrieve, and manage dependencies and build outputs.
e) Jenkins: An open-source automation server used to automate building, testing, and deploying code, integrating with tools like GitHub, Maven, SonarQube, and Nexus to streamline the CI/CD pipeline
2.2 Open source tools for Continuous Monitoring
Continuous Monitoring can be achieved with the help of Prometheus to gather many performance measures, including CPU and memory utilization, network traffic, application response times, error rates, and others. Prometheus is a tool created to monitor highly dynamic container environments like Kubernetes, Docker Swarm etc. however, it can also be used in a traditional non-container infrastructure.
2.2.1 Prometheus Architecture:
a) Time Series Database stores all the metrics data like current CPU usage or number of exceptions in an application per second.
b) Data Retrieval Worker is responsible for getting or pulling those metrics from applications services, servers and other target resources and storing them or pushing them into that database.
c) Web Server accepts queries for that stored data and that web server component, or the Server API that is used to display the data in a dashboard or UI either through Prometheus Dashboard or some other data visualization tool like Grafana.
================================
五、Reference
1.What is DevOps?
https://www.geeksforgeeks.org/introduction-to-devops/
2. Defining DevOps
https://www.pmi.org/disciplined-agile/process/disciplined-devops/defining-devops