preface
Microservices and docker container technology are the mainstream technologies commonly used in distributed architecture. Combined with kubemeters’ powerful container service scheduling and scheduling capabilities, small and medium-sized enterprises can simply and quickly build their own distributed Internet architecture system. This article introduces in detail the architecture reconfiguration process and experience of actual production projectsTransition from single architecture to microservice containerized distributed architectureAll aspects of, mainly includingThe selection of microservice development and operation and maintenance technology shuttle, spring cloud microservice development, installation and deployment of rancher and kubemetes production offline environment, containerization and service arrangement of microservices, collection and display of log call chain, system monitoring based on prometheu, and continuous integration of microservices.Based on spring boot, spring cloud, docker, Rachel, kubemeters and other technologies, it mainly provides an overall solution for the micro service containerized production environment from design, development, deployment to operation and maintenance.
Each chapter is explained in combination with actual production projects. It is especially suitable for technical managers, architects and developers who apply spring cloud, docker and kubemetes technologies to production. It is also suitable for beginners of microservices and containerization. It can also be used as a reference for microservices and containerization operation and maintenance personnel, as well as those who are interested in related technologies.
Due to the length of the article, you need a small partner with a complete PDF document. After you like it and forward it【Stamp here】Get it for free
Chapter 1: monomer architecture and microservice architecture
From quantitative change to qualitative change, the evolution from single architecture to microservice architecture is not only the change of software architecture, but also the significant improvement of methodology and productivity. This chapter mainly introduces the advantages and disadvantages of single architecture and microservice architecture, as well as the design principles and splitting principles of microservices
1.1 background
1.2 single structure
- 1.2.1 characteristics of single architecture
- 1.2.2 advantages of single architecture
- 1.2.3 disadvantages of single architecture
1.3 microservice architecture
- 1.3.1 characteristics of microservice architecture
- 1.3.2 advantages of microservice architecture
- 1.3.3 disadvantages of microservice architecture
1.4 microservice splitting
- 1.4.1 microservice design principles
- 1.4.2 micro service splitting principle
1.5 microservice development principles
- 1.5.1 microservice naming
- 1.5.2 project dependency configuration
- 1.5.3 configuration file
- 1.5.4 code naming
1.6 summary of this chapter
Chapter 2: spring boot microservice development
This chapter mainly introduces the concepts, frameworks, development, packaging and testing related to microservices. Firstly, it introduces the Dubbo service framework and spring cloud microservice framework in detail, and introduces and compares the concepts, characteristics and technical branches of the two frameworks in detail. Then it gives a panoramic view of the technical core of microservice development and operation, and lists the current mainstream technologies related to microservices.
2.1 microservice framework
- 2.1.1 Dubbo Service Framework
- 2.1.2 spring cloud microservice framework
- 2.1.3 comparison between Dubbo service framework and spring cloud microservice framework
2.2 technology stack selection
2.3 build development environment
- 2.3.1 installing development software
- 2.3.2 Maven configuration
- 2.3.3 ide configuration
2.4 writing framework code
- 2.4.1 create Maven project
- 2.4.2 create a microservice module
- 2.4.3 microservice code structure
2.5 writing business code
- 2.5.1 controller file
- 2.5.2 mapper file
- 2.5.3 service file and serviceimpl file
2.6 packaging and testing
- 2.6.1 compilation and packaging
- 2.6.2 operation test
2.7 summary of this chapter
Chapter 3: build a microservice operating environment
This chapter mainly introduces the construction of several common environments for microservices, including development environment, test environment and production environment. The configuration files corresponding to spring boot are divided into dev, test and prod. the main difference between them lies in the IP address, database address, middleware address and log configuration of third-party services
3.1 overview of operating environment
3.2 build development environment
- 3.2.1 ide environment
- 3.2.2 non ide environment
3.3 setting up test environment
- 3.3.1 non containerized environment
- 3.3.2 container environment
3.4 build production environment
3.5 switching operation environment
3.6 summary of this chapter
Chapter 4: offline deployment of rancher and kubernetes
This chapter mainly introduces how to download the installation files of the microservice running environment and how to install docker, kubemetes and rancher offline. Because docker image warehouse harbor involves CA certificates, this chapter also introduces the creation and generation process of Ca certificates.
Chapter V: log collection
This chapter introduces the end-to-end log collection of the microservice system as a whole, including log output, log collection, log collection and processing, log storage and log display. Firstly, it introduces the log collection model based on fi lebeat and elk, making full use of elasticsearch’s full-text search ability and kibana’s rich graphical display ability. Secondly, it introduces the microservice’s log output configuration based on spring boot, It is divided into development environment, test environment and production environment. Finally, according to the log collection model, the log collection, log collection and log display are introduced respectively
Chapter 6: call chain tracing
This chapter first introduces the concept of call chain tracing, expounds the connotation of trace span for service invocation, then introduces sleuth component and Zipkin component in spring cloud call chain tracing model, and introduces springcloud call chain tracing model; Finally, it introduces sleuth + Zipkin call chain tracing technology, its configuration in development environment, test environment and production environment, and the storage of call chain data in elasticsearch component. It also introduces how to graphically display and retrieve call chain information in Zipkin and kibana
Chapter VII: fuse
This chapter first introduces the concept of fuse in microservices, and then introduces the characteristics of fuse hystrix in spring cloud. Finally, the Maven dependent configuration related to fuses, the coding of fuses and the graphical display and monitoring of fuses are introduced.
Chapter 8: containerization and service arrangement
This chapter introduces the contents of containerization, virtual machine and service orchestration, and focuses on the construction process of the application image of the production environment, including the parent image, the basic image and the application image, as well as the basic construction method of the application image.
Chapter 9: system monitoring
This chapter first gives an overview of system monitoring, including host monitoring, security monitoring, middleware monitoring, business monitoring, container monitoring, etc., and then introduces the common monitoring schemes of kubemetes cluster. Generally, the monitoring system based on node exporter and Prometheus grafana is selected.
Chapter 10: continuous integration deployment
This chapter briefly introduces the concepts of continuous production and continuous deployment, as well as the model of continuous integration deployment, and focuses on the production practice of cicd based on kubemetes container platform, rancher container orchestration platform, and Jenkins pipeline.
Due to the length of the article, you need a small partner with a complete PDF document. After you like it and forward it【Stamp here】Get it for free