Architecture design: Service Automation deployment and management process

Time:2021-2-26

Source code:GitHub. Click here || Gitee. Click here

1、 Distributed services

From the perspective of conventional distributed architecture system, it is very common to divide more than ten independent microservice modules, and then different developers divide several service blocks to be responsible for daily development and maintenance. It is natural that there will be version differences between microservices. For example, user services need to be developed at version 7.0, and other services may be higher or lower than this version. Therefore, it is necessary to make continuous achievements in service publishing.

Now there are more common technology stacks for automatic service publishing and management: Jenkins continuous integration tool, docker container and k8s container management.

2、 Jenkins integration

Jenkins can easily integrate common code warehouses, such as GitHub, SVN, etc., and provide continuous integration capability. It can package and deploy the whole code into an automatic management process. Once submitted, the code will be automatically released to the specified environment, greatly reducing unnecessary workload.

Architecture design: Service Automation deployment and management process

  • Developers submit local code;
  • The code warehouse notifies Jenkins through hook mechanism;
  • Jenkins gets the latest code compilation package;
  • Generate docker image file and upload it to central warehouse;
  • Finally, the publishing mechanism such as scrolling or grayscale is triggered;

If there is a problem in the whole code release process, you can quickly roll back to the previous version. There are very few processes that need to be handled manually. As a programmer, the longer the working time, the better the use of automated processes. The more complex the system architecture is, the more automatic management is needed for service deployment, data and environment isolation, disaster recovery, grayscale and dynamic expansion. The above technical system can easily solve these problems.

3、 Docker container

As an open source application container engine, docker has three core concepts: image image, container and repository. Developers can package applications and rely on packages to a portable container. Containers use sandbox mechanism completely, and there is no interface between them. Then they can be published to any popular server, and virtualization can also be realized.

As the micro service modules become more and more, continuous integration tool management is needed; similarly, when docker containers become more and more complex, management and scheduling is also a problem.

4、 K8s container management

Kubernetes, referred to as k8s, is used as a flexible and convenient management and scheduling docker container. It provides a mechanism for application deployment, planning, updating and maintenance. It makes the deployment of containerized applications simple and efficient, and supports automatic deployment, large-scale scalability and application containerization management.

Architecture design: Service Automation deployment and management process

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 service release and environmental management technology system is now very common. From the perspective of development, it is best to be familiar with the basic use process, and the principle logic is not responsible, but the actual operation is complex. It is usually managed by professional operation and maintenance, and it is also a common problem in the interview to be able to explain the idea of building the environment clearly.

5、 Source code address

GitHub address: cicada smile
https://github.com/cicadasmile/spring-cloud-base
Gitee address: cicada smile
https://gitee.com/cicadasmile/spring-cloud-base

Recommended reading: programming system arrangement

Serial number entry name GitHub address Gitee address Recommended index
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 Spring cloud microservice basic component case explanation GitHub. Click here Gitee. Click here ☆☆☆
04 A case study of springcloud microservice architecture GitHub. Click here Gitee. Click here ☆☆☆☆☆
05 Basic application of springboot framework GitHub. Click here Gitee. Click here ☆☆☆☆
06 Integration and development of common middleware based on springboot framework GitHub. Click here Gitee. Click here ☆☆☆☆☆
07 Basic cases of data management, distributed and architecture design GitHub. Click here Gitee. Click here ☆☆☆☆☆
08 Big data series, storage, components, computing and other frameworks GitHub. Click here Gitee. Click here ☆☆☆☆☆

Recommended Today

Third party calls wechat payment interface

Step one: preparation 1. Wechat payment interface can only be called if the developer qualification has been authenticated on wechat open platform, so the first thing is to authenticate. It’s very simple, but wechat will charge 300 yuan for audit 2. Set payment directory Login wechat payment merchant platform( pay.weixin.qq . com) — > Product […]