Architecture design: service automation deployment and management process

Source code of this article: GitHub·click here || GitEE·click here

1. Distributed service

From a conventional distributed architecture system, it is very common to divide ten independent microservice modules, and then different developers divide the work into several service blocks, responsible for daily development and maintenance, and there will be version differences between microservices. Nature. For example, the development version of the user service needs to be 7.0, and other services may be higher or lower than this version, so continuous integration is necessary for service release.

Now the more common service automatic release and management technology stack: Jenkins continuous integration tool, Docker container, K8S container management.

Two, Jenkins integration

Jenkins can easily integrate commonly used code repositories, such as GitHub, SVN, etc., and provide continuous integration capabilities. The entire code can be built and packaged and deployed into an automatic management process. Once the code is submitted, it will be automatically released to the specified environment. Greatly reduce unnecessary workload.

  • Developers submit local code;
  • The code repository notifies Jenkins through the Hook mechanism;
  • Jenkins obtains the latest code compilation and packaging;
  • Generate a Docker image file and upload it to the central warehouse;
  • Eventually trigger publishing mechanisms such as scrolling or grayscale;

If there is a problem in the entire code release process, you can quickly roll back to the previous version. There are very few manual processes. As a programmer, the longer the working time, the better the automated process. The more complex the system architecture is, the more automatic management is required for service deployment, data and environment isolation, disaster tolerance, grayscale, and dynamic expansion. The above-mentioned technical system can easily solve these problems.

Three, Docker container

Docker is an open source application container engine with three core concepts: Image-mirror, Container-container, and Repository-warehouse; developers can package applications and dependent packages into a portable container. The container completely uses the sandbox mechanism. , There will not be any interface between each other, and then publish to any popular server, it can also realize virtualization.

The increase in the number of microservice modules mentioned above requires continuous integration tool management; for the same reason, when Docker containers become more and more complex, management and scheduling are also a problem.

Four, K8S container management

Kubernetes is abbreviated as K8S, used for flexible and convenient management and scheduling of Docker containers, providing a mechanism for application deployment, planning, updating, and maintenance, making the deployment of containerized applications simple and efficient, supporting automated deployment, large-scale scalability, and application containers Management.

Under the above deployment environment architecture, Docker can be understood as a component on Kubernetes, which is managed uniformly through K8S.

Such a set of technical systems for service release and environmental management are now very commonly used. From a development perspective, it is best to be familiar with the basic use process, and the principle and logic are not responsible, but the actual operation is complicated, usually by professional operation and maintenance management, who can explain the environment The idea of ​​building is also a common problem in interviews.

Five, source code address

GitHub地址:知了一笑
https://github.com/cicadasmile/spring-cloud-base
GitEE地址:知了一笑
https://gitee.com/cicadasmile/spring-cloud-base

Recommended reading: finishing programming system

Serial number project name GitHub address GitEE address Recommended
01 Java describes design patterns, algorithms, and data structures GitHub·click here GitEE·Click here ☆☆☆☆☆
02 Java foundation, concurrency, object-oriented, web development GitHub·click here GitEE·Click here ☆☆☆☆
03 Detailed explanation of SpringCloud microservice basic component case GitHub·click here GitEE·Click here ☆☆☆
04 SpringCloud microservice architecture actual combat comprehensive case GitHub·click here GitEE·Click here ☆☆☆☆☆
05 Getting started with SpringBoot framework basic application to advanced GitHub·click here GitEE·Click here ☆☆☆☆
06 SpringBoot framework integrates and develops common middleware GitHub·click here GitEE·Click here ☆☆☆☆☆
07 Basic case of data management, distribution, architecture design GitHub·click here GitEE·Click here ☆☆☆☆☆
08 Big data series, storage, components, computing and other frameworks GitHub·click here GitEE·Click here ☆☆☆☆☆

Guess you like

Origin blog.csdn.net/cicada_smile/article/details/110150448