Devops learning record

(https://www.bilibili.com/video/BV1A7411M76m?from=search&seid=14855796811647434253)
From a development point of view, I will finish writing the code. The rest can be executed automatically.

Combination of conceptual tools and processes

It is mainly a solution for communication and cooperation between developers and testers.
Build, test, release, deploy, operation and maintenance monitoring.

Tool diagram
Insert picture description here

Others’ devops workflow is not necessarily suitable for you
Insert picture description here

Purpose of devops

Time and quality

Insert picture description here

Devops error case

Insert picture description here

Correct case

Insert picture description here

devops: traditional application delivery
Insert picture description here
devops: standard container delivery
Insert picture description here
classic container delivery process
Insert picture description here

Summary of devops concept
Insert picture description here
Why is there more and more attention to devops recently?
Mainly because of microservices and containers.

Let's talk about microservice characteristics first

Insert picture description here

Advantages of microservices

Insert picture description here
Microservices perfectly match Devops conceptually
Insert picture description here

Disadvantages of microservices

Insert picture description here

The difference between Docker and traditional virtualization lies in the loss of virtualization.

Understand docker in three minutes

Insert picture description here

How docker solves the shortcomings of microservices

Insert picture description here

Difficulties and problems of container delivery

Insert picture description here

How to solve the shortcomings of containers

Insert picture description here

The relationship between microservices, containers, and devops
complement each other
Insert picture description here
Insert picture description here

Reduce personnel involvement and improve delivery quality assurance
Insert picture description here

How to form a fast and high-quality delivery

How to quickly carry out quality application container migration

Division of the container delivery process

Insert picture description here

First understand the dockerfile in the container

Insert picture description here

The origin of dockerfile, theoretical basis

Insert picture description here
Insert picture description here

Look at the dockerfile syntax again

Insert picture description here

How to generate image from dockerfile

Insert picture description here

From the above layered structure, the process of optimizing the dockerfile is derived

Insert picture description here

Optimized

The first optimization merges multiple RUN commands into one RUN command. The
second optimization The
Insert picture description here
third optimization The
Insert picture description here
fourth optimization
Insert picture description here
Another optimization method: multi-stage construction
Insert picture description here

Dockerfile optimization summary

Insert picture description here

Orchestration template kubernetes

Insert picture description here

Look at kubernetes from design ideas

Insert picture description here

The most important abstraction of k8s, abstracting out some delivery essentials

What does each abstraction defined here do?
Insert picture description here

k8s yaml file example

Insert picture description here

k8s summary

Among them, kompose is used to solve the migration from swarm to k8s

Insert picture description here

Other k8s migration tools

Alibaba Cloud migration tool Derrick

Insert picture description here

3. What is CI\CD Build CI\CD from scratch

Insert picture description here

Commonly used jenkins architecture, master slave

Insert picture description here

Build jenkins system-install docker -ce

Insert picture description here

Second step
Insert picture description here

jenkins summary
Insert picture description here

Comparison of Alibaba Cloud's software CodePipeline and jenkins

Insert picture description here

Fourth, cloud-native container application delivery practices

1. How to get started using kubernetes,
use: minikube
https://minikube.sigs.k8s.io/docs/start/
or visit Alibaba Cloud's cloud kubernetes
Insert picture description here

Five, release mode

First understand the network model,
container network model one
Insert picture description here

Simple routing service in Swarm

Insert picture description here

Implementation of the network model in kubernetes (2) L3 Flat

Insert picture description here

Implementation of the network model in kubernetes (three)-LoadBalancer and NodePort

Insert picture description here
Network model (four)-ClusterIP
Insert picture description here

Network model (5) Ingress
Insert picture description here

service mesh

Insert picture description here

After the network model is over, let’s look at common publishing strategies.

Common publishing strategies

Insert picture description here

Blue-green release, advantage: zero downtime update, disadvantage: high resource consumption during release

Insert picture description here

The difference between blue and green releases of different nodes

Insert picture description here

Canary release, advantages: to achieve functional verification with minimal cost, disadvantages: relatively single-oriented scenario, high requirements for developers

The difference with gray release is canary release if there is no distinction between access layer traffic. If the traffic of node A must go to the newly released instance, and node B must not be able to access the new instance, it is a gray release.

Insert picture description here

Canary release example

Insert picture description here

Grayscale release, gradually long and smooth switching from one version to another

Insert picture description here

A/B Test is very similar to Grayscale release, but A/B Test uses online feedback from [different versions] to decide which version to prefer.

Insert picture description here

Make these releases through k8s

Insert picture description here

Release in batches, unlike gray release, there is no resource consumption problem of gray release. (Batch release is a strategy)

To release in batches, the nodes are divided into small batches, and then the first batch is released for quick verification. If the verification is ok, continue to release the second batch and the third batch. It can save resources.

Insert picture description here
If the above is implemented using k8s, it will be more complicated. Need to judge whether to apply or roll back. K8s cannot realize a process.

CRD may be another answer.

CRD

https://www.kubernetes.org.cn/tags/crd
CRD topological relationship diagram
Insert picture description here
Relevant information addresses (... The screenshots were released at the end of a long time)
Insert picture description here

Six, open source frameworks and container cloud services

Tool chain

Insert picture description here

Derrick 生成dockerfile,jenkins file

https://github.com/alibaba/derrick

kompose generates kubernetes files

Kubernetes + Compose

https://github.com/kubernetes/kompose

helm [kubernetes 的 package manager]

https://github.com/helm/helm

The basic architecture of helm
Insert picture description here

Introduction to microservices

No language restrictions.
Insert picture description here
Combine services like unix applications, with high cohesion and low coupling.

service mesh

lst

Sidecar mode (I don’t actually understand what this is)

Insert picture description here
Insert picture description here

7. Testing and tuning of containerized applications

It is difficult to have some standardized models for tuning. Tuning is basically to analyze the problem for the problem.

The following are some representative scenarios and problems for tuning.

c10k problem

Insert picture description here

Performance test method

Insert picture description here
Insert picture description here
After using the container, the performance will be very different from before. Under normal circumstances, there will be a 5% loss.
Insert picture description here

Surprising comparison of virtualization technology performance

Virtualization in the hyper mode will result in a loss of 20% in performance, while the loss of container technology will be within 5%.
Insert picture description here

Understanding the container kernel

Insert picture description here

Ten performance tuning tools

Insert picture description here
Pressure measurement tool
Insert picture description here

.

Alibaba Cloud University[https://www.bilibili.com/video/BV1A7411M76m?from=search&seid=14855796811647434253]

Guess you like

Origin blog.csdn.net/csd_nuser/article/details/114216721