当前位置:网站首页>Are you ready to automate continuous deployment in ci/cd?
Are you ready to automate continuous deployment in ci/cd?
2022-07-07 00:21:00 【Software testing network】
Many companies are scrambling to implement continuous integration and continuous delivery (CI/CD) The Conduit , To simplify their software development workflow . Few people take additional steps to automate continuous deployment , It's a use CI/CD Pipeline continuously pushes changes into production . Understandable .
The idea of pushing code to the production environment frequently every day or hour makes me shudder .
However , Great changes have taken place in the past few years , More and more devops The team is adopting skills 、 Practices and tools come from the automation of high-quality and reliable deployment . This article explains the difference between continuous delivery and continuous deployment , And then put forward devops Team in CI/CD Five things you should do before automating continuous deployment in the pipeline .
Continuous delivery and continuous deployment
Capgemini Head of agile and development operations KulbirRaina Shared a definition that helps us distinguish between continuous delivery and continuous deployment . He said :“ Continuous delivery is an end-to-end automated process from software release to production , Continuous deployment is an automated process that pushes the software packages in the process to continuous integration after production through a pre-test process .”
Automated production deployment has more risks , Because the result will affect the business 、 Customers and end users . If devops The team decided to automate the deployment , Then the deployment process must include continuous testing and powerful error handling . otherwise , Deployment may cause performance problems in production 、 Unreliable system 、 Security vulnerabilities and flaws .
SPR Director of software engineering MikeSaccotelli Add :“ The main difference between organizations that run the continuous delivery model and the continuous deployment model lies in the maturity and complexity of their construction and deployment processes .”
Devops The team can use the following checklist to prepare for the upgrade CI/CD Pipeline for continuous deployment .
1. Evaluate business interests
As a principle , Continuous deployment can be applied to many applications , It can even be applied to the most regulated industries .Buildkite Co founder and co CEO of TimLucas say :“ Every project can adopt continuous deployment , The best organization sets goals , Move as many projects as possible to this model . Even in finance and regulated industries , Most projects can adopt this mode . We even see autonomous vehicle companies continue to deploy .”
although devops Teams can implement continuous deployment in many projects , But the problem is , Where does it provide a strong business case and significant technical advantages ? Frequently deploy functions and repair projects , As well as modern architecture to simplify automation projects , More promising transition to continuous deployment .
2. Prepare the development team
Lucas Shared some prerequisites that should be part of the software development process before migrating to the continuous deployment model . He said :“ Continuous deployment is true agility , Is the fastest way to change from code to production . It needs to always keep the main branch in a deliverable state 、 Automated testing and high-quality tools that you can trust and trust .”
Some of the development responsibilities and rules of developers who want to automate continuous deployment include :
- Use sufficient code coverage for continuous testing , To ensure that changes do not produce new defects .
- For testing security 、 Static and dynamic code analysis tools for performance and other code quality issues .
- Commitment to left shift safety practices , Including around API Security best practices .
- Observability standards around applications and microservices .
- Functional markers , So that new functions can be turned on and off , Or control to some users .
Saccotelli Add :“ The premise of continuous deployment is that the development team has a more mature understanding of quality code , Only in this way can this process succeed . If the code is poor or untested , That will create an unreliable system , And quickly push errors and vulnerabilities to the production environment .”
3. Prepare the operation team
therefore CI/CD Pipeline runs and deploys the new code to the production environment . Does this mean devops The team knows , Their work has been completed , Everyone can enter the next version ?
Not so fast . Although developers are trying to ensure that the build does not break 、 All the work of automating code testing and controlling which code is enabled in production , However, there are still some risks that deployment may lead to production problems . Monitor business services 、 Applications and systems are devops An operational responsibility in , Their ability to support continuous deployment began long before deployment automation was enabled . Best practices include the following :
- Use infrastructure that is, code and containers to ensure development 、 test 、 The infrastructure configuration between production and other environments is consistent .
- Use application and system level monitoring tools , These tools can also load and analyze observable data created by applications and microservices .
- Select a AIOps platform , The platform integrates monitoring throughout the stack, from applications to microservices and data storage 、 Alarms and observable data , And relate events to manageable events .
- Set the Canary version to control the switching and traffic of the new deployment , And reduce the risk of more difficult switching strategies .
- Have a set of powerful security tools , Include API gateway 、Web Application Firewall 、 Container safety 、 Threat monitoring and sensitive data monitoring , To reduce risks in highly dynamic application environments .
4. Integration across teams and tools ITSM And workflow
Even if all development and operation capabilities have been established , We haven't finished . hypothesis devops The team submits the code , Continuous deployment moves changes to production , And the application performance monitoring tool is running . Correct devops How often do team members receive alerts , So that they can classify events 、 Investigate the root cause and quickly resolve any problems ?
Lucas Sharing theory , When turning to continuous deployment ,“ Unstable testing is the first risk ”. He listed unreliable CI/CD Tools 、 Poor production monitoring and on call practice , And engineering and IT There is a lack of real partnership between them as a further risk .
If there's no monitoring 、AIOps、IT Service management (ITSM)、 Workflow and integration between agile and communication tools ,devops The time for the team to respond and solve problems may lag behind its deployment . This gap can cause stress , And weaken the partnership between development and operation . The best practice is to ensure integration IT Tools and workflow , So that the development and operation team can keep up with any problems arising from continuous deployment .
5. Define risk-based decision gates and KPI
Copado Product marketing director KristinBaskett Provides a key element for continuous deployment . She said :“ Although reckless automation may hinder the system , But proper automation can help organizations realize the real transformation from devops The flexibility and consistency needed to benefit . When developers can integrate code automatically , Collaboration will be improved . By investing in test automation and quality gating , Organizations can innovate faster , And reduce the risk .”
In addition to test automation ,Baskett It is also mentioned that the implementation should be extended to other quality gates of risk assessment . When build triggers continuous deployment , The quality department will implement the business rules , To determine which deployments can be put into production , Which may require compliance review or management signature .
Other best management practices that support continuous deployment include development devops Key Performance Indicators (KPI)、 Formalize feedback loops and develop communication strategies .
Continuous deployment can generate many business and technical advantages , But the discipline is strict DevOps Team and IT Organizations should ensure that they have best practices and tools before using automation to increase the frequency of deployment .
边栏推荐
- Leecode brush question record sword finger offer 58 - ii Rotate string left
- 2022 latest blind box mall complete open source operation source code / docking visa free payment interface / building tutorial
- Why should a complete knapsack be traversed in sequence? Briefly explain
- Typescript incremental compilation
- Automatic test tool katalon (WEB) test operation instructions
- openresty ngx_ Lua subrequest
- 1000字精选 —— 接口测试基础
- Devops can help reduce technology debt in ten ways
- After leaving a foreign company, I know what respect and compliance are
- On February 19, 2021ccf award ceremony will be held, "why in Hengdian?"
猜你喜欢
Close unregistering application XXX with Eureka with status down after Eureka client starts
MySQL learning notes (mind map)
Pytest multi process / multi thread execution test case
uniapp实现从本地上传头像并显示,同时将头像转化为base64格式存储在mysql数据库中
Liuyongxin report | microbiome data analysis and science communication (7:30 p.m.)
2022/2/10 summary
2022/2/12 summary
Business process testing based on functional testing
DAY THREE
量子时代计算机怎么保证数据安全?美国公布四项备选加密算法
随机推荐
@TableId can‘t more than one in Class: “com.example.CloseContactSearcher.entity.Activity“.
VTK volume rendering program design of 3D scanned volume data
Pinia module division
Pdf document signature Guide
vector的使用方法_vector指针如何使用
Testers, how to prepare test data
openresty ngx_ Lua subrequest
PXE server configuration
DAY ONE
TypeScript中使用类型别名
Sword finger offer 26 Substructure of tree
TypeScript增量编译
Leecode brush questions record sword finger offer 44 A digit in a sequence of numbers
【vulnhub】presidential1
Interesting wine culture
uniapp实现从本地上传头像并显示,同时将头像转化为base64格式存储在mysql数据库中
48 page digital government smart government all in one solution
Random类的那些事
GEO数据挖掘(三)使用DAVID数据库进行GO、KEGG富集分析
Jenkins' user credentials plug-in installation