Re:Ask HN: Has anyone migrated off containerized infrastruct...
by gnfargbl on Friday August 14, 2020 @06:24AM
(#24156096)
I think you might be falling into a cycle that I often find myself falling in to. It goes like this: Oh, there's a bug. But it's obviously caused by _this line here_, so I won't even bother testing it offline, I'll just fix it and run CI and then... oh no, wait, it was more complex than I thought, but I'm in the change-CI-test cycle now so I'll keep doing that. And then, all of a sudden it's taken me three hours or more to fix what was in reality quite a small bug.
The solution is to force yourself not to use the CI/container system at all during debugging, and instead to build the binary (or whatever) standalone. That's hard because you invariably aren't tooled up to run the component outside its deployment system so you have to do some extra tricks, but in the long tun it seems to be the way to go.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by murkt on Friday August 14, 2020 @09:39AM
(#24157775)
Over the years I've learned to do this very rarely. However, I'm not the lone wolf in the woods, I also have other developers working for me. I can talk to them however long I want and motivate them to debug locally to understand the problem, but in the end they have to gain some experience with their own pain. I would prefer that their experience gaining would be faster, so it would cost me less money :)
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by paloaltokid on Friday August 14, 2020 @03:06PM
(#24161970)
> I would prefer that their experience gaining would be faster, so it would cost me less money :)
Maybe your current strategy isn't working?
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by compsciphd on Thursday August 13, 2020 @08:29AM
(#24142661)
docker exec -it <container id>
kubectl exec -it pod -c container
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by murkt on Thursday August 13, 2020 @09:14AM
(#24142989)
Not sure what do you want to say with this command.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by compsciphd on Thursday August 13, 2020 @09:44AM
(#24143241)
you want to be able to "ssh in and make changes to figure out how to fix things". why doesn't that do that for you?
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by reportgunner on Thursday August 13, 2020 @11:59AM
(#24144758)
Sorry, but did you not forget the --rm option to remove the container once it dies ?
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by DuskStar on Thursday August 13, 2020 @12:07PM
(#24144862)
For both docker and k8s, that command is 'exec into already running container', not 'spin up a new container'.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by dave_sid on Thursday August 13, 2020 @01:12PM
(#24145651)
This is all getting quite heated! Please take it outside.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by dave_sid on Thursday August 13, 2020 @02:54PM
(#24146870)
This was a joke. Humour.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by imdsm on Friday August 14, 2020 @04:29AM
(#24155333)
Please contain yourself.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by AkshatM on Thursday August 13, 2020 @08:52PM
(#24151905)
I interpret it as a suggestion that you allow developers access to the running container in production to debug the issue
There are more sane ways to do this than through raw kubectl access, of course: see e.g. telepresence (https://www.telepresence.io/)
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by funcDropShadow on Friday August 14, 2020 @05:50AM
(#24155856)
By sane, you mean yet another piece of infrastructure that has to be installed, documented, packaged into containers, deployed and updated for a problem that did not exist without containers. For a very large organization (e.g. hundreds of devs) this make sense, but for a medium sized company (> billion EUR turnover per year outside of software business) this soon becomes just another piece of overhead.
Re:Ask HN: Has anyone migrated off containerized infrastruct...
by wwright on Friday August 14, 2020 @07:22AM
(#24156500)
This problem certainly exists without containers.
- How do you provide easy visibility into running applications?
- How do you prevent inspecting an application from affecting the behavior of an application?
Maybe I phrased this point badly. I haven't found myself to need a hot fix RIGHT NOW for a long time. What I had in mind was this: sometimes there is an issue that is very hard to reproduce locally. If a developer doesn't understand it from the get go and have to experiment a bit, it can be frustrating to commit, wait for deploy (even to stage environment), test what happens and repeat.
> Not sure what you mean with lingering containers. Do you launch yours through SSH manually?
Of course the application itself is run automatically, web server, workers, etc.
However, we often need to do some bespoke data analysis, so we often ssh into a server, type `make shell` to launch a REPL and type/paste some stuff into it.