什么是DevOps?
维基百科对DevOps的定义如下:DevOps是一套结合了软件开发(Dev)和信息技术操作(Ops)的实践,旨在缩短系统开发生命周期,提供高质量的持续交付。
DevOps计划试图解决的问题是,对于开发人员和质量检查工程师,一旦应用程序或新功能代码成功通过测试,该项目就完成了。传统的运维方法中,软件测试完成后,如何将其部署到生产环境,并保证其性能,是运维工程师最头疼的问题。而解决问题过程中,开发团队和运维团队的互相推诿,往往极大程度影响了客户感知。
为此,DevOps在软件交付方面做了最大程度的改变。其核心为以下三个方面:
- 基础架构即代码(IaC) -服务器环境以声明清单的形式进行描述,并以代码形式存储,任何团队成员均可对其进行调整并多次重复使用,以提供测试或构建代码以及维护代码所需的基础架构生产中的应用程序。
- 持续集成(CI) -根据最终用户的反馈将以规格和功能要求的形式不断集成到产品中,以进行下一次软件开发。
- 持续交付(CD) -在不中断最终工作用户体验的要求下,通过自动代码交付管道自动提供所有必需的资源,并在代码通过测试后立即将代码自动推送到生产中,而无需DevOps工程师采取额外的手动操作。
使用DevOps的方法中,在构建新的软件版本之前,将每一批新的代码推送到存储库中之后,都要进行各种测试。DevOps专家考虑了应用程序在创建之前将如何运行,他们编写了脚本来创建CI / CD管道,以确保产品更快地投放市场并获得积极的最终用户体验。可以说DevOps的核心转变是,团队的所有人都需要对客户的最终体验负责。
What is DevOps?
Wikipedia defines DevOps as follows: DevOps is a set of practices that combines software development (Dev) and information technology operations (Ops) aimed at shortening the systems development life cycle and providing high-quality continuous delivery.
The problem DevOps initiatives attempt to solve is that for developers and quality assurance engineers, once an application or new feature code successfully passes testing, the project is complete. In traditional operations approaches, after software testing is completed, how to deploy it to the production environment and ensure its performance is the most headache-inducing problem for operations engineers. During the problem-solving process, the finger-pointing between development teams and operations teams often significantly affects customer perception.
Therefore, DevOps has made the greatest changes in software delivery. Its core consists of the following three aspects:
- Infrastructure as Code (IaC) - Server environments are described in the form of declarative manifests and stored as code. Any team member can adjust and reuse them multiple times to provide the infrastructure needed for testing or building code and maintaining applications in production.
- Continuous Integration (CI) - Based on end-user feedback, requirements in the form of specifications and functional requirements are continuously integrated into the product for the next software development cycle.
- Continuous Delivery (CD) - Under the requirement of not interrupting the end-user experience, all necessary resources are automatically provided through automated code delivery pipelines. Code is automatically pushed to production immediately after passing tests, without requiring additional manual operations from DevOps engineers.
In DevOps methodology, before building a new software version, after each batch of new code is pushed to the repository, various tests are performed. DevOps experts consider how the application will run before it's created, and they write scripts to create CI/CD pipelines to ensure products reach the market faster and achieve positive end-user experiences. It can be said that the core transformation of DevOps is that everyone on the team needs to be responsible for the customer's ultimate experience.