The application scenarios of Docker are finally understood

Docker use tutorial related series catalog


table of Contents

Scenario 1: Save project environment deployment time

Scenario 2: Environmental consistency

Scenario 3: Continuous Integration

Scenario 4: Microservices

Scenario Five: Elastic Scaling

summary


Scenario 1: Save project environment deployment time

1. Single project packaging

Every time a project is deployed to testing, production and other environments, a lot of dependent software and tools have to be deployed, and there is a high probability of problems during deployment, and it takes a long time inadvertently.

The main idea of ​​Docker is to package and deploy the environment, which can be run on any Docker Engine. In the early stage, we only need to package each project environment into a mirror and push to the mirror warehouse. When there is a need to deploy this project, directly pull the mirror to start the container, and the project can be accessed! Build once and deploy many times, once and for all.

2. Package the whole project

The company has such a business: There is a product that can be deployed to the customer as a whole. In the past, an implementation engineer was sent to the customer for deployment. If Docker is used, we can package this set of projects in the early stage, realize one-click deployment, and get it done in minutes, and there is no need to send someone over. Such as the official Docker Compose orchestration tool.

3. Trial of new open source technology

Sometimes, if we want to investigate some open source projects, we can start the container directly from the official pull project of the public mirror repository.

 

Scenario 2: Environmental consistency

The development engineer develops the project on the Windows system, and the test and production environment operating systems are all Linux systems, which creates a situation of inconsistency in the environment: the project runs on the development computer locally without any problem, and it cannot run in the test or production environment. Solve this The best way to solve the problem is to keep the three environments consistent. Software version, operating system, physical machine, cloud host... Just imagine, can it be done?

Docker packages the project environment into a mirror, which can be used on any Docker Engine. At this time Docker is the cornerstone of our projects. Docker's portability and consistency of running state can be imagined, is it easier to solve the problem?

 

Scenario 3: Continuous Integration

A test scenario for rapid iteration of the project version requires a reasonable CI (continuous integration)/CD (continuous deployment) environment support. CI/CD is a periodic automated project testing process, including construction, deployment, testing, release, etc., with very little manual intervention.

Scenario 4: Microservices

Microservice is a term that has been talked more about in IT circles in recent years, and its meaning is very simple: split the business program architecture as finely as possible, and make up a business system from multiple independent services.

Docker's container design principle: one container has one service, and the containers are isolated from each other. Just think about it. If the container is used as the deployment unit of these independent services, is it a bit just right?

 

Scenario Five: Elastic Scaling

When it comes to elastic scaling, it usually exists in cluster mode. Like AWS AutoScaling, you can customize resource thresholds, and SLB automatically adds EC2 cloud hosts to deal with unexpected business visits.

When Docker technology is applied, this elastic scaling unit is the container on the cloud host.

There are mature solutions for container cluster management, such as the official Swarm, Google’s K8S

Due to the fast-start feature of Docker containers, dozens or hundreds of containers can be quickly started to provide more concurrency and resource utilization (if the host machine resources are not enough, you need to add the host to the cluster).

 

summary:

Summarize the characteristics of Docker based on the above application scenarios: out of the box, rapid deployment, strong portability, environmental isolation, etc.

These features of Docker have indeed solved many problems of enterprise IT infrastructure. Reasonable use of these features will make your IT infrastructure more robust and powerful. This is why more and more companies embrace it!

You may think that this model does not bring any obvious benefits, but in the long run, a careful taste can still increase greater productivity!

 

The characteristics of the above scenarios correspond to each other, and there is only one common goal: simplify the deployment process and increase productivity!

Reference: https://blog.csdn.net/zhenliang8/article/details/78449017

Guess you like

Origin blog.csdn.net/shi_hong_fei_hei/article/details/114677853