2 ms·
I see an instance as sort of a compiled binary of your app and the environment it runs in. You can install your app, all its dependencies, get all the config fi
by Scarblac 11y ago
I see an instance as sort of a compiled binary of your app and the environment it runs in. You can install your app, all its dependencies, get all the config files correct, run tests on the created instance, and then you have a Docker instance and can start up any number of them in production.
If any of those steps fails in the middle of some script, you haven't put any server in some half way there state.
If a rollback is needed, you can switch to the previous Docker instance, and changed requirements won't trip you up.
We used to do it with zipped chroot environments and some startup/shutdown scripts, Docker is more or less that.
Of course you need to store data outside them, as otherwise you lose once you switch to a newer version of your instance, but that's easy enough.
All that said, still not really a fan of it.
- TheIronYuppie 11y agoDisclaimer: I work at Google on Kubernetes I'd love to hear more - anything in particular that doesn't feel like a fit?
- Scarblac 11y agoNothing specific, they do what they do quite well. I have a generic feeling that the rabbit hole is getting too deep though. In our case we run large servers with virtualisation software (I think they run on Windows, I never touch this layer). Then we have virtual Linux servers running on them. They have package managers that are also a way to solve this sort of problem. We run Docker instances on those servers. They are Linux again, so have their own package manager. Then we run Python (with virtualenv or Buildout) or Node (with npm), that again have their own package managers that try to provide isolated environments. And of course they run bytecode in the Python or Node... And that ridiculous stack is used to run some relatively mundane web app that can't even mutate its data directly, and is used to send some set of Javascript and HTML and JSON to the user's browser. Which is where the app actually runs... I wish we had some Web framework as nice to use as Django but compiling to static binaries that are immediately sort of an equivalent to a 12 factors app, and a kernel that was made for running them directly. Or so. But this is the internet, right? It literally evolves, just like nature -- we can only build on top of existing layers, not remove a few and start over.