This is the 27th day of my participation in the August More Text Challenge

People will believe in the existence of “predestined relationship” only after they have experienced a lot of pain. And all the “fate”, is only the inevitable result of the development of things.

preface

In today’s increasingly complex configuration of production environment, a unified and portable environment may be the dream of many practitioners. The so-called “demand leads the market”, driven by demand, the emergence of a solution is just a matter of time.

The bitterness of development testing

    1. Take the environment
    1. In the computer
    1. Written document
    1. To get fit

All program code execution needs to rely on the specific system environment, so, at the beginning of the project development, building the corresponding development environment is an essential step. Any code development that is not based on the environment is rogue.

If it is to follow the project from the beginning, that is ok, at least the environment is gradually improved. But if you join in the middle of a complex project, don’t mention it. If you talk about it too much, you will cry. Just building an environment can give you back pain and leg cramps.

Personally: I was seconded to support other projects for about three months when the project was more than half completed. After coming back, the situation can be summarized in a word — a meal operation fierce as tiger, a look at the results of 250! What? ! Single sign-on? When did you add it? PG library, how come…… Match! Match! Match! When the project was finally running properly, I had only one thought in mind: the project is not march, do not meet each other!

Hey, I heard that recently there is a kind of new technology quite popular…… Can you resist the temptation? I only believe that there is no program ape who does not like “cheating”, it is strange to endure (manual eye roll). It’s time to build the environment again, left hand NPM, right hand BREW, and what can’t be done, “fishy” the sense of success that is quite overflowing ah!

Wait, wait, wait, wait, wait, wait, wait! Let me ask you two questions:

- 1. How many packages do you have in your console right now? - 2. A colleague wants to cooperate with you in development, how can you set up a similar environment for him?Copy the code

Hey, I have more packages and services than I can count! As for collaborative development, it is not simple, I write a document, as long as the document step by step, to ensure that it can be configured! Or, I configure a virtual machine, who needs a development environment, I just copy him a virtual machine image is not done.

Well, I don’t doubt your persistence in always keeping your documents up to date, and I don’t doubt that some companies’ computer configurations, after running virtual machines, don’t know what else to do…… I just want to ask you this: don’t you think your console’s current state is a bit of a hodgepodge? What about the order of the programmer? With organization, we can at least be zebras. Without it, we’d be a mess!

Fatigue of operation and maintenance management

  1. error-prone
  2. Don’t agree
  3. Start the miscellaneous
  4. Low efficiency

As an operations person, what is the most common sentence you hear? For me, it’s definitely “Fine with me, but not with you.” What is the most common sentence? I think that’s probably probably the same thing.

After all the hard work and overtime to get the deployment out of the way, a new patch arrived. Well, I have to fight like hell!

The true portrayal of many operation and maintenance personnel is probably: either in the adjustment environment, or on the way to adjust the environment.

A way out

For a variety of reasons, we often turn a mental task into a physical one. Not to mention the sense of joy and accomplishment, you have to wear dark circles under your eyes and “Mediterranean”.

Until then, we may say: or “CV method” good!

As the old saying goes: poverty leads to change, and change leads to success. Only when people are forced to a certain point, they will think about changing and find a way out. It is almost impossible for a comfortable environment to nurture the ambition and desire of “thinking about change”. Seeing this physical strength can not keep up, the head of the light more dazzling, know that it is time to seek a change.

Is there a “once configured, for life” solution?

The virtual machine

First of all, the easiest to think of and most accessible is the virtual machine.

A virtual machine is one solution with an environment installation. It can run one operating system inside another, such as Linux inside Windows. The application has no sense of this because the virtual machine looks exactly like the real system, whereas to the underlying system, the virtual machine is just a normal file that can be deleted when no longer needed, with no impact on the rest of the system.

Although users can restore the original software environment through virtual machines. However, this scheme has several drawbacks.

(1) More resources are occupied

The virtual machine occupies some memory and hard disk space. While it is running, other programs cannot use these resources. Even if the applications in the virtual machine actually use only 1MB of memory, the virtual machine still needs several hundred MB of memory to run.

(2) Many redundant steps

A VM is a complete operating system. Some system-level operations, such as user login, cannot be skipped.

(3) Slow start

The virtual machine takes as long as it takes to start the operating system. It may take a few minutes for the application to actually run.

With all the drawbacks of virtual machines, is there a better solution? Indeed, it is Docker technology.

The story of Docker and I began from then on…

I met Docker

Just because of this idea, I entered the world of Docker unsuspectedly.

What is a Docker?

Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image that can then be distributed to any popular Linux or Windows machine, as well as virtualization. Containers are completely sandboxed and have no interface with each other. To sum up:

  • Docker is an open source software deployment solution;
  • Docker is also a lightweight application container framework;
  • Docker can package, publish, and run any application.

The composition of the Docker

A complete Docker consists of the following parts:

  1. DockerClient client
  2. Docker Daemon Daemon
  3. Docker Image mirror
  4. DockerContainer container

The role of the Docker

The main uses of Docker currently fall into three categories.

** (1) Provide a disposable environment. ** For example, testing other people’s software locally, providing unit testing and building environments for continuous integration.

** (2) Provide flexible cloud services. ** Because Docker containers can be opened and closed at any time, it is very suitable for dynamic expansion and shrinkage.

** (3) Set up the micro-service architecture. ** With multiple containers, a single machine can run multiple services, so the microservice architecture can be simulated locally.

conclusion

The above is the process of “getting to know” Docker and my simple cognition of Docker. You are also welcome to share the process of getting to know Docker.

~

Thanks for reading!

~

Learn interesting knowledge, meet interesting friends, shape interesting soul!

Hello everyone, I am the author of “programming Samadhi”, I am king Yi, my public account is “programming Samadhi”, welcome to pay attention, I hope you can give me more advice!

You come, with expectations, I have ink to welcome! You return, no matter gain or loss, only to yu Yun give each other!

Knowledge and skills should be paid equal attention to, internal force and external power should be repaired simultaneously, theory and practice should grasp both hands, both hands should be hard!