8 ms·
Wouldn't the point of running in Docker still be to guarantee version, environment, and config compatibility? Just because you run an Elixir app on your local m
by onezerozeroone 7y ago
Wouldn't the point of running in Docker still be to guarantee version, environment, and config compatibility? Just because you run an Elixir app on your local machine doesn't mean it will work worry-free on Prod. Without Docker, you might have a different version of BEAM installed (or none at all), etc.
- marci 7y agoIsn't that the purpose of tools like https://erlang.mk/guide/getting_started.html#_getting_started_with_otp_releases https://erlang.mk/guide/getting_started.html#_getting_starte... ? Edit: and for cross-system dev (e.g. debian to windows) -> https://erlang.mk/guide/cross_compiling.html https://erlang.mk/guide/cross_compiling.html
- walterstucco 7y agoCorrect, but you still need to compile the release on a similar system. For example if your dev machine is Debian it won't work if the deploy machine is Alpine (similarly Windows builds won't work on Linux or Mac).
- onezerozeroone 7y agoI think OTP Releases would still depend on the target host being configured correctly and having all dependencies installed that your application needs to run. Containers are all about consistency of the environment. For example, maybe your Elixir app wants to log out to something like Splunk or DataDog...if those agents aren't installed on the host, it doesn't matter what facilities BEAM provides. Or maybe your app depends on certain configs, libraries, or files being available at specific paths on the system. Things like that would be captured in the image your containers are running and guarantee consistency across machines and environments.
- kungfooguru 7y agoRight, they do, that is why containers are still useful to releases for deployment.
- marci 7y agoMy bad, I sould have specified, I was only addressing "Without Docker, you might have a different version of BEAM installed (or none at all)"
- onezerozeroone 7y agoAh, makes sense!
- lostjohnny 7y agoyou still need to compile your system on the same combination of OS/libc libc builds don't work on Alpine
- tidepod12 7y agoThis is a question that I see hotly debated a lot in Elixir circles. BEAM and the Elixir toolset do have a lot of tools that overlap with Docker, so there's a lot of people that advocate for "not bothering" with Docker, while there's other people that are familiar with Docker (and perhaps not as familiar with BEAM) that will tend to use Docker. They both have more or less the same capability to deliver the same functionality. IMO, in most use cases it makes sense to just use whichever you're more familiar with and will be more productive with. After all, that is the entire point of said tools...
- kungfooguru 7y agoThey really do not overlap at all. I don't understand why the comparison with docker and Kubernetes continues. Running BEAM on docker in kubernetes is great, a lot is added and operations smoothed by doing so.
- tidepod12 7y agoElixir Releases/Distillery definitely do overlap with Docker deployment techniques. The BEAM also has scaling capabilities that are tantamount to K8s horizontal scaling.
- kungfooguru 7y agoDeployment doesn't overlap. Erlang releases bundle up your code but you still need libraries like openssl, to have a nice bundle that can actually just run anywhere Docker is the way to go. And horizontal scaling between the two do not overlap either, not sure what you mean. Packing containers (processes) efficiently into a cluster of nodes is not something Erlang does. Edit: Erlang/OTP does offer fail over for what it calls "distributed applications" but based on a static set of nodes -- not horizontal scaling, anymore than other languages/frameworks do by letting you spawn new instances...
- tidepod12 7y ago>Deployment doesn't overlap. Erlang releases bundle up your code but you still need libraries like openssl, to have a nice bundle that can actually just run anywhere Docker is the way to go. And with Docker you still need libraries like, y'know Docker for your code to run. >Packing containers (processes) efficiently into a cluster of nodes is not something Erlang does. How much have you used BEAM? It definitely does do that. Scalability is one of Erlang/Elixir's primary benefits, and node clustering is exactly how it does that.