Containers for non-techies (part 1)

and how we got here…

Some time ago I was required to make presentation about containers to some people in my organisation and included in the audience were some who were not tech oriented, so I decided that to make things less dull I would write a story about what containers are and how we got here.

Analogies are used throughout the presentation as they allow people from very different domains to understand complex topics, and also… I just love analogies.

The Restaurant (a Hardware server)

A few years ago a very talented Chef created a Restaurant, he bought a big empty building and installed by himself everything the building needed for his business: piping, bathrooms, heating, gas. He also customized a lot of the furnishings: the floor was just the right color, so was everything else… decorated just the way the Chef wanted.

Just perfect!

In a different location another Restaurant was installed and the same procedure was followed, manually installing everything trying to make the new one exactly like the one they installed before. It was tricky, but they were able to do it.

3 years old and out of warranty?

This country, you see… it has very strange laws, every few years you must change to a new building, as if one stays for too long it might just collapse. So for your own safety (and that of your customers), you must move.

But every year, the Chef noticed that the buildings available just kept growing in size, and customers still arrived in same numbers, but a lot of the area in the new buildings was unused now.

Bigger and bigger buildings!

The Multi-Restaurant (Analogy for Virtual Machines)

Now this Chef was a really smart guy and he decided that since the buildings had more space, he could install new kinds of Restaurants inside the same building, so they would make division walls inside, make entry doors, install new furniture, new piping, new heating, new kitchen, etc.

These Restaurants had their own entry door, neon sign, welcome mat, everything you would find in a real Restaurant, even though they were not outside the building. But if you were inside one, you would not be able to tell that this was a Restaurant inside a Restaurant.

Is this real life?

This was fine, they could now make better use of the space, but it was getting harder and harder to get all Restaurants to be exactly alike.

Expansion

The Restaurants were a huge success, So the Chef began to create a franchise. He would give the new franchise owners a list of exactly the things each Restaurants must have, the furniture, the size of the kitchen, etc. And when done, the cooks of the franchise would execute the very detailed recipes and serve them to the customers.

At first it was simple to verify the quality of the dishes and inspect the general facilities but as the franchise grew it became exponentially more difficult for the Chef to know exactly what was being served in all locations.

Configuration Management (puppet, salt, chef, etc)

For the task of making sure that all Restaurants in the franchise were exactly the same, the Chef hired a group of people he nicknamed the puppets although their official position position was that of Configuration Managers so that appeared on their business cards. The job of these guys was visiting reach Restaurant regularly, go through their checklists of how things should be and if anything was different, they would return it right back to the way it was supposed to be.

Configuration manager at work

But as the number buildings grew, complications appeared: One Restaurant was in a very hot and humid area of the country… then the checklist would need to include an A/C setup for this Restaurant and maybe no carpeting… Oh and the ones in the Mountains would need wool seat covers and a chimney. All of these little differences grew into a huge list.

Making a single change in that list was really scary, as it could potentially change everything in every single Restaurant, sometimes chimneys would end up at the beach.

A delicious Lasagne

mmm…..

Ingredients

Ragu Bolognese:

5 tablespoons extra-virgin olive oil 3 tablespoons butter 1 carrot, finely, diced 1 medium onion, diced 1 rib celery, finely diced 1 clove garlic, sliced 1 pound veal, ground 1 pound pork, ground 1/4 pound pancetta or slab bacon, ground 1/2 tube tomato paste 1 cup milk 1 cup dry white wine Kosher salt and freshly ground black pepper Parmigiano-Reggiano, for grating

Lasagna al Forno:

4 extra-large eggs 6 ounces frozen chopped spinach, defrosted and squeezed very dry and chopped very fine 3 1/2 to 4 cups unbleached all-purpose flour, plus 1/2 cup for dusting the work surface 1/2 teaspoon extra-virgin olive oil

Besciamella:

5 tablespoons butter 4 tablespoons flour 3 cups milk 2 teaspoons salt 1/2 teaspoon freshly grated nutmeg 8 ounces Parmigiano-Reggiano, for grating

Read more at: Recipe

The Perfectionist Chef

A Chef’s greatest ambition is to receive (and keep) Michelin stars, to achieve such an honour, every single part of every dish served must be perfect, not only that it must be improved upon constantly as the competition is fierce and the stars scarce. In the case of the Lasagne, that would mean things like trying out new kinds of minced meat, new types of butter, adding wines from different regions, etc.

Monolithic? Microservices?

Up until now Recipes traditionally had been treated as a whole, you would take all the ingredients, cook them and taste the final product at the very end. This made tracking undesired flavours very difficult, and also whenever new cooks arrived at the Chefs Kitchen it would take them much longer to fully understand, master and improve the recipes. These big recipes were called Monolithic Recipes.

The Chef this idea of breaking down the recipes into smaller, more manageable and possibly reusable elements.

In the case of the Lasagne:

Ragu Bolognese

Lasagna al Forno

Besciamella

With this method incremental improvements can be done to one specific part of the recipe, tracking problems is much simpler as they taste each component invidually and new cooks can master the recipe faster. We call this recipes Micro Recipes (services).

The problem with Micro Recipes lies in the fact that some dishes are made up of dozens of these Micro Recipes and managing that in a running kitchen at peak hours was very hard. It seemed like the idea of Micro Recipes would have to wait.

Disaster strikes

One day disaster hits, there is one bad review in the Gourmet magazine about the Lasagne. The review reads:

The tomato sauce used in the Bolognese was just too sweet for my taste

Now the Chef needs to go to every single restaurant (Gourmet magazine restaurant inspectors don’t really tell you where they ate) to try the Lasagne and find the source of the problem.

After much research he finds that one Restaurant has been using Campari tomatoes and as everyone knows those are extremely sweet. The Chef had used Roma tomatoes in his kitchen while developing the recipe.

Roma tomatoes

Problem is that Campari tomatoes work perfectly for the Caprese Salad they serve, and the Roma tomatoes are simply not available fresh in this region of the country.

Campari Tomatoes, WHO could get that wrong?!

This is just one of the many similar cases they have spotted recently, this sort of investigation is extremely time consuming and expensive for the Chef, He could be creating new dishes or improving old ones to get those much coveted Michelin stars!

This is definitively not good for business.

A Technology Breakthrough

Any sufficiently advanced technology is indistinguishable from magic. (Clarke’s 3rd law)

Scientist have come up with this fascinating new invention, it is a kind of big microwave, which you can send your existing recipe and with extremely an detailed instruction set, you can do describe anything that you can do in a normal kitchen. The outcome is a perfect rendition of the dish wrapped inside a Tupperware like container called an image.

You can also buy a rkt model which is very cool.

Now all the Restaurants have installed one of these machines and they get a copy of this Tupperware image, the cooks put the Tupperware image inside and can cook (run) it and get an exact replica of what the Chef wanted.

Containers!!!

Not only that! The machine clones the container and can serve as many copies of the dish as the restaurant needs!!!

It gets even better, the machine uses many of these Tupperware containers at once with the latest parts of the Lasagne (Ragu, Lasagne, Besciamella) to create a single dish, the cooks just need to ask the machine for a Lasagne! The Micro Recipe problem is solved!

Wrap up part 1

Phew!!! that was quite a journey, but we are not quite done yet. In the next part we will learn how to live/survive in the container age and it’s challenges!

Part two is available now