[DOCKER] I tried to compare the infrastructure technology of engineers these days with cooking.


The intended target audience for this article is

――I am not an engineer (developer) ――But I am involved with engineers. (Planning and management) ――Therefore, if you don't have at least knowledge of the engineer's infrastructure, the engineers will get angry, saying, "Don't you know that? Study and start again." ――But I googled a little, but I don't understand anything.


No matter what kind of person there is, no one will not eat it, so I tried to compare it with cooking.

So, the engineers who usually touch the server are not so targeted Maybe it helps people who can program but don't know anything about the infrastructure. It may not be.

About specific technology

--Cloud (so-called public cloud. AWS / Azure / GCP ...) --Container (Docker)

I will touch about We aim to convey the atmosphere. So, strictly speaking, it may be a little different. Please note

I'm not telling a lie. It's different here! I would appreciate it if you could comment if there is something like that.

Main subject

Then, it is the main subject.

1. Conventional

You are a ** cook ** (engineer) ** Cooking ** (coding / programming) However, it cannot be provided to customers (cannot be deployed). First, prepare a ** table (physical server) **, prepare a ** plate (library, etc.) **, and serve it for the first time by serving ** food (code) ** (deploy). )

So you have to prepare ** table ** and ** plate ** every time. Especially, it is troublesome to prepare ** table ** every time. It's heavy and expensive.

2. Cloud

That's where ** Cloud ** was born. ** Cloud ** is a set of more than 1000 ** tables (physical servers) ** lined up with a huge white tablecloth. So the contents are a set of ** tables **, but when viewed from above, it is just a white ** huge table **.

Make a partition on the ** huge table ** and divide it into individual spaces. Hereafter, this one space will be referred to as ** table (provisional) . ( Virtual server ** / EC2 instance). It may be a little hard to imagine, but think of ** table (provisional) ** as a normal ** table **. Provide it to the ** cook **. "How many ** tables (temporary) ** do you need?" "This is your ** table (temporary) **" "Please use as you like" "Rental fee is ** 1 table (temporary) ** It is ** cloud operator ** (AWS / Azure / GCP…) that rents out "How much is it per month?"

However, after all, you have to prepare ** plates (library etc.) ** on the ** table (temporary) **. If you want to serve multiple ** tables (temporary) **, you will have to buy and place ** plates ** for each, and then arrange ** dishes ** on each. You also need a beautiful presentation. Tedious.

3. Container

That's where the ** container ** was born. Think of a ** container ** as a ** delivery box **. This is ** Okamochi **. Fill the box with ** plates ** and ** dishes **. The beautiful presentation ends here. So once you have made ** Okamochi **, all you have to do is place it on the ** table **.

(The container itself works on both physical and virtual servers. See the extra edition at the bottom for why we explain in this order.)

And, from here on, it's different from reality, but this ** Okamochi ** can duplicate exactly the same thing. I couldn't think of a good analogy here. If you enter this ** Okamochi **, please think that you can use a 3d printer with super science.

So, if you want to provide it to multiple ** tables **, you can solve it all by putting the duplicated ** Okamochi ** together. You don't have to buy ** plates (libraries, etc.) ** every time.

The most famous of these ** container ** technologies is the container called ** Docker **.

But there is a problem here as well. That is, if the ** table ** breaks (breaks or breaks in the legs), the ** okamochi (container) ** on it will naturally fall together. For example, it's important if it's a buffet / buffet. You always have to serve ** food ** to your customers, but if it breaks, ** food ** until you put another ** okamochi (container) ** on another ** table ** Will not be available.

(You may think that it doesn't break easily, but it's really important when it breaks, so it's the infrastructure engineers who definitely want to avoid it.)

  1. Kubernetes That's where ** Kubernetes ** was born. (K8s for short) ** Kubernetes ** is something like a ** waiter **. ** Super waiter **. The ** waiter ** is constantly looking at all ** tables (physical / virtual servers) ** in his store. Then, the ** chef (engineer) ** gives the ** okamochi (container) ** containing the ** food ** that he wants to put on the ** waiter **. For example, "I want you to put this ** stir-fried vegetable Okamochi **". The ** waiter ** says "smart" and puts ** stir-fried okamochi ** on one ** table **.

So let's say that ** table ** is corrupted. Naturally, ** stir-fried vegetables ** will fall. I can not eat. In the past, the ** chef ** noticed with a time lag and hurriedly placed a new "** stir-fried okamochi **" on another empty ** table ** and offered it to customers. .. (From this break until you put Okamochi on a new table = the time when you can not serve food to customers is downtime. It is a so-called system failure, which means that you can not connect to Web services etc. Engineer It's scary. I absolutely hate it.)

But ** super waiters (kubernetes) ** don't bother you. The ** waiter ** immediately notices and automatically looks for an empty ** table ** and puts a new "** stir-fried vegetable okamochi **" there. Therefore, it will be possible to continue to provide it to customers as it is. By doing so, the ** cook ** can focus on ** cooking **.

Extra: Autoscale

By the way, the "auto scale" that you may hear from time to time is the ** table (provisional) ** that came out in 2 when the amount prepared in advance is not enough, the new ** table (provisional) is arbitrarily available. It is a mechanism that prepares **. This is one of the greatest strengths of the ** cloud **, which is a huge table **.

So, for example, I noticed that the ** table (virtual server) ** with 4 ** waiters ** is broken, and changed "** stir-fried vegetables Okamochi (container) **" to another. I want to put it on the ** table **, but there is no free ** table ! dangerous! What should I do! When it happened. If you add the auto scale function, you will be surprised. A new ** table (provisional) ** will be available automatically. So, on a sunny day, the ** waiter ** can put " stir-fried okamochi **" on the new ** table (provisional) **.

That's why kubernetes and the cloud are often used at the same time (I think).

At the end

How was that. This article is often called ** Kubernetes! Kubernetes! ** at our company recently, and the section that big seniors who are not developers think "What is ** Kubernetes ** ..." I wrote it with the hope that it would be easier for those people to imagine it.

I wrote it with a lot of momentum. I'm honestly drinking So, if there are too many criticisms, I may erase it because I was calm

Thank you for reading this far, both in the rabbit and in the corner.

Recommended Posts

I tried to compare the infrastructure technology of engineers these days with cooking.
I tried to measure and compare the speed of GraalVM with JMH
I tried to solve the problem of "multi-stage selection" with Ruby
I tried to build the environment of PlantUML Server with Docker
I tried to check the operation of gRPC server with grpcurl
I tried to visualize the access of Lambda → Athena with AWS X-Ray
I tried to summarize the state transition of docker
05. I tried to stub the source of Spring Boot
I tried to reduce the capacity of Spring Boot
I tried to check the operation of http request (Put) with Talented API Tester
[Beginner's point of view] I tried to solve the FizzBuzz problem "easily" with Ruby!
I tried to investigate the mechanism of Emscripten by using it with the Sudoku solver
I tried to increase the processing speed with spiritual engineering
I tried to summarize the basics of kotlin and java
[Swift] I tried to implement the function of the vending machine
I tried to summarize the basic grammar of Ruby briefly
I tried to build the environment of WSL2 + Docker + VSCode
Be sure to compare the result of Java compareTo with 0
I tried upgrading from CentOS 6.5 to CentOS 7 with the upgrade tool
I tried to interact with Java
I tried to explain the method
I tried to implement the image preview function with Rails / jQuery
I tried to summarize the methods of Java String and StringBuilder
I tried to solve the problem of Google Tech Dev Guide
I tried to express the result of before and after of Date class with a number line
I tried to take a look at the flow of Android development environment construction with Android Studio
I tried to summarize the methods used
I tried to get started with WebAssembly
I tried to summarize the key points of gRPC design and development
[Ruby] I tried to diet the if statement code with the ternary operator
I tried to implement the Iterator pattern
I tried to solve the tribonacci sequence problem in Ruby, with recursion.
I tried to summarize the Stream API
I tried to make full use of the CPU core in Ruby
I tried to implement ModanShogi with Kinx
After all I wanted to preview the contents of mysql with Docker ...
Java engineers now compare to learn the basic grammar of Ruby Part 1 (Basic, Variables)
I want to control the start / stop of servers and databases with Alexa
I tried to implement a function equivalent to Felica Lite with HCE-F of Android
What I tried when I wanted to get all the fields of a bean
I tried to get the distance from the address string to the nearest station with ruby
I tried to clone a web application full of bugs with Spring Boot
[Beginner] I tried to decorate the bar after displaying the details of the hamburger menu
I want to output the day of the week
I tried to verify AdoptOpenJDK 11 (11.0.2) with Docker image
I tried to make Basic authentication with Java
I tried to manage struts configuration with Coggle
[Rails] I tried to raise the Rails version from 5.0 to 5.2
I tried to manage login information with JMX
I tried to chew C # (basic of encapsulation)
I want to var_dump the contents of the intent
I tried to set tomcat to run the Servlet.
I tried using the profiler of IntelliJ IDEA
I tried to break a block with java (1)
I checked the number of taxis with Ruby
Sazae-san's rock-paper-scissors I tried to verify the theoretical value and the measured value of the probability of the same hand 5 consecutive times with Ruby
I tried to make a product price comparison tool of Amazon around the world with Java, Amazon Product Advertising API, Currency API (2017/01/29)
Java engineers now compare to learn the basic grammar of Ruby Part 2 (classes, methods)
I tried to summarize the points to consider when acquiring location information with the iOS application ③
I tried to summarize the points to consider when acquiring location information with the iOS application ①
I tried to summarize the points to consider when acquiring location information with the iOS application ②