|
|
|
|
|
by StreamBright
2474 days ago
|
|
>> 90% of what people develop or run today should be in containers, and not because containers are great, but because of the DevOps patterns of IaC, immutability, reproducibility, homogeneous environments Sorry but no. Container is __a__ way of achieving a small part of what you are talking about but not the only way. Break it down: - IaC: how do you containerise a load balancer? Terraform gives you infrastructure as code without containers. - immutability: VMs, AMIs are immutable just like containers are (discounting the entropy that happens in every OS) - reproducibility: Same, VMs, AMI, Terraform, Ansible all give your that - homogeneous environments: Not sure what you mean by that, your Cisco or Juniper firewalls are not running in Docker so I am pretty sure you already have "heterogenous" environment if you meant that by what you wrote I absolutely disagree this approach that we need containers for the reasons you just mentioned. |
|
1) Terraform should be run in a container so that it will actually behave the way you expect, 2) containers are application environments built based on a Dockerfile, which makes it IaC.
> - immutability: VMs, AMIs are immutable just like containers are (discounting the entropy that happens in every OS)
True. But containers are easier and more portable, which is important to supporting the other aspects involved. Containers thus are a better general solution.
> - reproducibility: Same, VMs, AMI, Terraform, Ansible all give your that
Containers and VMs just... work. They're just collections of files. Very reproducible. Not 100% - you may need different guest drivers/kernels, different arguments to run your container in your particular system. But they're conceptually and operationally simple.
Terraform and Ansible are garbage fires of reproducibility and immutability. I could write a book on all the different ways these tools fail (most of it stemming from people trying to use them as interpreted programming languages, but also their designs are crap). There are whole frameworks built around Terraform and Ansible just to make sure they work right. They are overcomplicated, fragile bash scripts, and I'm quite frankly sick of using them. I think their entire existence is evidence of a huge gap in understanding how we should be operating systems today. [/rant]
> - homogeneous environments: Not sure what you mean by that [..] I am pretty sure you already have "heterogenous" environment
Those are opposites; homogeneous means "of uniform structure or composition throughout", heterogeneous means "consisting of dissimilar or diverse ingredients or constituents".
A homogeneous environment in a DevOps sense is when all environments have the same components and are operated the same way, and thus provide the closest results possible. This is incredibly important to prevent the classic "Well, it worked on my machine!" dev->production breakdown.
Homogeneous environments apply to lots of different things, but in the context of containers, they ensure that the environment the dev used to build the app is the same as what is in production. They also ensure that any scripts, tools, etc will use the same environment, if they are run in containers. I've wasted so much time in my career "correcting" heterogeneous environments in a bunch of different ways, whereas with containers the equivalent fix is "Please run the correct container version. Thanks"
The more systems you have, the more important this gets. At a certain point, the best choice is just to use baked VMs or containers for everything, everywhere, and containers are just so much easier, almost exclusively because Docker shoved so much extra useful functionality in. (I'll add that I do not necessarily like containers, but I do find them to be the most useful solution, because they solve the most problems in the most convenient ways)