In recent years, the microservice architecture and containerization technology have developed rapidly, and the concept of continuous integration and continuous delivery has been mentioned again and again. More and more companies have started to use continuous integration systems to solve the problems caused by frequent releases. Quality issues, using continuous delivery tools to automate code deployment.
Continuous delivery
Continuous Delivery (CD) is a software engineering method. The development team generates software releases from source code in a fast, automated, and repeatable manner, ensuring that software can be released reliably at any time. It pays more attention to providing applications to end users Ability.
With the widespread adoption of microservices and cloud-native architectures, there is a growing need for continuous delivery tools and practices. Microservices bring many advantages. For example, by dividing complex business into several small businesses, each business is written as a service, the services are sufficiently cohesive and small, the boundaries of the services are clear, the code will be easy to understand, and the development efficiency will be Improved; each microservice can be deployed independently, making continuous deployment possible; the fault tolerance of the system can be improved, and the entire system will not be paralyzed because of a certain service error ...
However, the number of microservices in the system is increasing, and a large amount of coordination work is required to integrate and deploy a group of microservices synchronously. This makes continuous delivery complicated, and the container technology, which was born out of the concept of microservice architecture, solves this problem Good medicine.
In simple terms, by packaging a microservice in a container, developers can develop in such an independent environment, and then test and operation and maintenance personnel can directly use this container to deploy, test, and release, greatly simplifying the software. Delivery process.
Continuous integration
When it comes to continuous delivery, continuous integration is inseparable. Continuous integration is continuous integration, CI. What is it related to continuous delivery?
Continuous delivery is based on continuous integration and releases the integrated code for users to use. It emphasizes "giving accountability to end users"; continuous integration means that members of the development team often integrate their work, each time Integrations are verified through automated builds, including processes such as compilation, release, and automated testing, so that integration errors are discovered as quickly as possible.
The basic idea of continuous integration is to use an automated process to monitor the source repository for changes. When changes are pushed to the repository, it will detect changes, download copies, build, deploy, run relevant unit tests, and release.
As the company's business traffic and number of users continue to grow, no matter how the traditional test team increases manpower, it can't solve the test requirements such as software reconfiguration and system addition of new functions. Continuous integration becomes difficult. As mentioned earlier, microservice architecture makes continuous delivery complicated. In fact, such complexity is also reflected in continuous integration. For example, it will bring some problems:
Shorter service delivery cycle, automated test development cannot keep up with delivery
Multiple services developed at the same time
Need to deploy and maintain multiple relying party services during self-test
As the number of services increases, the links become longer, and the call dependencies increase, the entire environment will be very difficult to build.
Multiple people share a set of environments, which affect each other and easily affect test results
Increased testing services at one time, testing multiple warehouses, making CI work explosively increase
...
However, the team can build a continuous integration platform for automation and process standardization based on the microservices framework and continuous integration system, which in turn allows continuous integration to be a strong infrastructure support for the microservices architecture, making full use of the advantages of microservices.
But how to go to the ground? At present, many teams in the industry have shared their practical solutions for building a microservices continuous integration tool chain. In general, according to different business nature and team characteristics, each has its own problems and designs different ones based on specific problems. Continuous integration solution.
Although the schemes are different, they have played a significant role in disseminating common experience. At the Open Source China Source Creation Conference this weekend, Yu Huitao, a background development expert and head of user center architecture from the Reading Group, will also share how to use the microservices framework Tars and CI / CD system Jenkins to create a continuous integration development test environment. Opportunity is rare, welcome to participate. For details, please read the original text.