January 20, 2018 21:14:57 A sharing about docker Prepare the draft for the Sunday evening party

January 20, 2018 21:14:57 A sharing about docker Prepare a draft for the Sunday evening party
Why should I learn docker?
Thinking back carefully, there are actually nothing more than two points:
the first is work-related: during the interview before, I saw that the skills required for the position and the docker will be hired first, indicating that this is a work skill, which may be used in the future and can be used as a technical reserve. !
The second is related to interests: playing routers, browsing forums, and found that someone said that for example, Synology nas supports docker. Before because of version updates, Xunlei could not be used offline. Now docker can be restored to use, and docker can install ××× software, etc.

I think the learning of docker can be divided into three steps, because it is currently undergoing rapid development and iteration, and there may be changes!
The first step: some basic commands and concepts of docker. After learning this, you can use docker as a "virtual machine".
When it comes to virtual machines, let’s talk about the difference between the two:
January 20, 2018 21:14:57 A sharing about docker Prepare the draft for the Sunday evening party
However, using docker as a virtual machine is actually contrary to the principle of docker. Docker is ready to use out of the box. Its advantage is that it can quickly enable rapid deployment. One word quick! ! !
At the same time, one of its characteristics is that each container generally starts with one and only one process!

Summary of the difference between kvm and docker:
1. Startup time: docker starts in seconds and kvm starts
in minutes. 2. Lightweight: container M is the unit, virtual machine is G
, and the level is G. 3. Security: container process-level virtual machine isolation is better4
. , Performance: Container performance is better, less hypervisor layer overhead; virtual machine needs a virtual complete GuestOS, and the virtualization overhead is high.
5. Requirements for use: Virtualization requires CPU VT support; containers can run on mainstream linux distributions (above 3.1kernel)
6. Deployment difficulty: containers are easy to kvm
and complex 7. Manageability: containers are not recommended for a full set of ssh virtual machines System Management

Hahaha, let's go a little further, come and come, come back, let's talk about the second learning step, start to contact the cluster, the easiest is that the cluster is the swarm that comes with docker. It belongs to the official cluster that comes with docker. I won't say how to use it. It's relatively simple anyway. I'm currently in a state where I'm almost finished. I found one of the most interesting things when it comes to clusters, and perhaps this is the most attractive part of docker. Docker swarm is divided into manager and node nodes. To draw an analogy, that is, a boss and a group of employees, the boss manager can publish tasks and assign them to the employees (node ​​nodes) to work. If an employee fails unfortunately, the boss will automatically assign the service to other employees, and at the same time If the business is not good, you can fire some redundant employees at will. If the business is good, recruit employees to assign tasks. And other cluster orchestration tools such as swarm and k8s do these similar things. Not to mention seconds, it only takes a few minutes to orchestrate a service (similar to assigning tasks), and it will give you 100 tomcats in minutes to provide services to customers.
January 20, 2018 21:14:57 A sharing about docker Prepare the draft for the Sunday evening party
The third learning step is the famous kubenets, or k8s for short. It is an open and open source product of Google after using containers for more than 10 years. It has a very mature environment. At present, k8s is basically used in the real test production environment. It has many components, complex deployment, and difficult to learn! But once you have learned how to act, you can basically pretend, and changing jobs is a specialty. At present, I am only deploying the experimental stage according to the document, and I have not yet reached the stage of daily use. I have to study hard and share with you!

Today, basically, I would like to tell you a little bit of the concept of docker and my understanding. Thank you for listening to me.
Finally, let’s talk about the purpose of sharing, which was also discussed with Yanzhao last time. There must be input and output to make more progress. Come on!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326484178&siteId=291194637