Docker really makes it easy to create messes by bad or less experienced developers yet ultimately have something functional, for awhile. Setting up environments used to act as a filter to clear out these sort of messy systems. If you put together a system of distributed services, you were probably competent enough to make something that wasn't horrible and considered maintainability. Now, with a few days Googling, anyone can spin up a distributed system of services with every bad practice known to man as to how those services are initialized, modified (yes, I rarely see stateless containers), and interconnected.
With a sizable team of developers that aren't under time pressures incentivized to build tech debt and pass it along, Docker (or rather container systems, not necessarily Docker) have a lot of useful purposes. I rarely see it used this way in the wild, I instead see it as a way to build tech debt. I'll take the need to resolve a couple dependencies over that any-day of the week.
I would like to see a ‘foot-gun index’ where we rank technologies and determine how likely someone is to fucking things up if not careful.
Junior engineers can make a mess with anything, it’s a senior engineers job to prevent that
I've also seen it recommended to use Ansible + Packer to provision an image, then use Terraform to create machines from the image. Saves you some troubles with connecting to your cloud machines.
Docker works for most trivial cases but for complex systems it becomes a shit show very quickly which is hard to reason about when you need to, which is whenever it is inevitably broken.
My anecdata is that horsing around with Docker was still needed and when things went wrong, they went REALLY wrong.
As with all things, figure out what you need, pick the right tool for the job, and all that good stuff.
I write my web programs in Go and there's nothing to configure once a build is complete. I just get a binary and I can ship it / deploy it anywhere.
I never found any use for Docker.
You mean like docker?...
I agree with the k8s part though. Commiting your enviroment to git and reproducing it anywhere is great. Orchestrating thousands of that is horrible and adds too many extra layers.
Something I'd take docker is: deployment speed.
Baking images and deploying new ASG makes production deployments take around ~ 15 min.
Docker based solution could probably cut it down to 5 mins.
Also more inclined to use a simpler/hands off service like ECS Fargate than straight kubernetes.
Also seems like over half the jobs being currently posted require k8s skills, might be difficult to avoid it for much longer
>Docker based solution could probably cut it down to 5 mins.
this reminds me of when I was working on the Danish government electronic invoicing project.
The political driver of the project had made some statement along the line that a minute was going to be saved on every invoice sent (which I mean there would be millions and millions of minutes saved every month), and someone else made the observation in my hearing that he doubted that time saved would be monetizable. Which I took to mean that when small amounts of time are saved those are likely just swallowed by meaningless other tasks and not used effectively.
I doubt the 10 minutes saved per deploy by using Docker would be monetizable.
For our biggest app, Drupal, deployments are kind of hands on.
Dev(s) are waiting for the deployment, do some post deployment steps, check logs for any issues, make announcements, etc
and if we had to rollback, the easy solution is to find the previous deployment and run it again, speed would be probably be beneficial here
A) effort (aka 'man-hours'), or
B) duration (aka 'wall clock time')
?
launch vm: 1-2 min
config/deploy: 3-5 min (ansible)
create image: 2/3 min
launch new asg: 2-5 min
Containers greatly reduce most of these steps
This is one way to do it. (search Immutable Infrastructure)
For this application, traffic is quite stable so it doesn't come up often. But once or twice, we had some bug causing performance regressions.
They were not visible on the first day, but as usage grew over time the cluster started growing with the problem.
So it allowed the application to stay online (at an additional cost) until devs pick up the problem and have a solution ready, probably coming up in the following sprint only.
Config is inherited from the environment and cloud provider as the targets are Amazon Linux 2 based.
In addition to that, with cgroups and namespaces you get a lot of other benefits, which can be used with eg: systemd/etc but it's nice when one tool handles all of it.
My point is it is better to avoid the problem than employ a solution.
As other posters said, Docker largely exists to help with any situation where you don't have a single binary. These situations are still very common for many developers and devops engineers. And in those cases, Docker can be very helpful.
Yea. Totally agree.
This should be common sense. Unfortunately it's not.
> The key thing to do is to build on technology that is portable, compact and repeatable which means at the moment something entirely self-contained (Go, .Net Core, Java, Python with some caveats come to mind)
Is there really anything other than Go that can achieve this? .Net/Java/Python all require the environment to be setup a certain way. And you have the problem of managing versions.
Does python even let you produce a self-contained application?
The advantage of something like docker is it unlocks tools like k8s, ecs, azure container instances, DO app platform etc.
rollbacks = deploy the last version
Scale up = add some more instances and redeploy the current version (not an issue as our load is fairly consistent)
All of those tools, which I have used extensively, increase complexity tenfold. Just considering kubernetes resource allocation and CNI is an art which requires full time staff to manage. Fargate is the only reasonable abstraction I have seen so far on this front.
> Fargate is the only reasonable abstraction I have seen so far on this front.
This is the starting point (actually Azure [0] and DigitalOcean [1] are even simpler), not setting up an autoscaling group of ec2 instances and considering resource usage. If you build on top of any of those three platforms, you write a dockerfile, write a service file, and point DNS at a load balancer and you're done.
[0] https://docs.microsoft.com/en-gb/azure/container-instances/
A lot of bash commands are automated in Devops tools too.
Looking at Linode stackscripts or a DigitalOcean tutorials can be pretty surprising too.
This article and this comment discussion assumes a certain familiarity with computers and system administration, which, to ask a question like that, you must not have.
So a bash script is this thing that's very functional, flexible, legible, can be written quickly and easily, can be maintained and updated quickly and easily, and is even portable across platforms, and it gives you all that without a teetering fragile tower of library and framework dependencies that most other automation systems rely on. Every system already has bash or some equivalent Bourne shell for free.
Assembly has none of those qualities.
Are there any other mysteries we can clear up? I mean we all had to start somewhere and "there are no stupid questions" right?
> Are there any other mysteries we can clear up? I mean we all had to start somewhere and "there are no stupid questions" right?
I'm surprised at how big a jackass a single person can appear in such a concise response.
Every time a new technology shows up, there are lots of "Why not just use < insert old technology >?" The answer is obvious, and can be most highlighted by leaning harder into the absurdity of "Why not just use < insert old technology>?", which is, why does any technology exist beyond Assembly if all that's old is good enough?
But, given you can't behave like a grown up, I'd rather not continue this comment tree.
A lot of bash commands like sed automate editing config files that systems like ansible and docker rely on.
Since you haven’t really shared your experience with bash, assembly (or not), or what you prefer instead, it’s really hard to openly entertain viewpoints that aren’t your own when the other party isn’t demonstrating it As well.
I use bash, docker, Ansible or whatever else will do the job. I can orchestrate vms and also configure bare metal. I use public clouds, private clouds, hybrid clouds.
These could all be interesting things to mutually learn and talk about but maybe it’s more enjoyable for you to have others put in mental labour for you.
The one thing complex hosting experience gives you is not to discount any solution for fear of what others may think. It’s where the real world of scaling is.
Deciding on what’s best solely by what’s new, popular or social proof can leave a developer exposed where the rest of groupthink may be - often reinventing the wheels over and over in new languages to learn the fundamentals of why it will or will not work out in the end.
If you want to remark that the answer was disingeuous without acknowleding the same about your own, then you are in no position to be talking about jackasses and growing up.
I’m a better user of docker because I know a little bit of bash. It’s not one or the other like so many decisions folks with could be made by social proof.
Not sure why you’re being downvoted, I keep in mind anyone who advises on cloud usage might only have cloud experience to begin with.
It’s not lost on me that while many jr devs are spending a ton of time putting together and making their stack work… others can just build and ship code.
It's better to religiously build simplicity, repeatability and fast automation into everything you do without it. That has a much better ROI on a product build because you have to do all those things anyway to make docker and kubernetes effective.
The key thing to do is to build on technology that is portable, compact and repeatable which means at the moment something entirely self-contained (Go, .Net Core, Java, Python with some caveats come to mind)