uranther

uranther

I have been thinking about setting up continuous delivery and I wonder:

Does running Elixir/OTP within a Docker container put you at a major disadvantage?
Will the application be able to use all the CPU cores and in general benefit from OTP’s design?

Maybe @jeffweiss can shed some light on the topic for us? :smiley:

Showing Posts 25 to 16

ijunaidfarooq

ijunaidfarooq

I wonder if you can share your Dockfile and K8s setup with us? is that open source?

tristan

tristan

Rebar3 Core Team

Since this thread is still getting traffic I thought I’d add that it is no longer the case that you need anything special (like some distillery script that bitwalker mentions) for Erlang to stop gracefully with init:stop() when a SIGINT is sent to the process like Kubernetes does.

I think it was 20 that this got added.

And there is an issue of schedulers that I’d like to see solved. You can set the number of online schedulers while Erlang is running, but there isn’t, as far as I know, anything that will automatically update this if the underlying cpu resource allocated by like kubernetes is changed.

dazuma

dazuma

There are other options for state-preserving rolling deploys. At the last ElixirConf, I did a demo of a rolling deploy while preserving (i.e. migrating) a dynamic set of processes along with their state. It uses a distributed Supervisor and a CRDT—no disk or database persistence needed, and it works well enough for an interactive game application. In general, these are just technical problems for us to solve, and I think there are still creative solutions out there.

NobbZ

NobbZ

Yes, probably, but hot-code-reloading is state-aware, rolling deploys only if you persist your state on disk. Its like starting up a new machine and reconstructing necessary state from the environment and persistet data.

ijunaidfarooq

ijunaidfarooq

Then I think they have rolling deploys with no downtime?

jaimeiniesta

jaimeiniesta

Found it, if you disable the SSL option for the repo in config/prod.exs, it works fine.

I guess it’s a safe option as both the app and the database live within the Flynn cluster.

dropfen

dropfen

Not yet, I’ll try to test in the next days, when I have some more time.
My first naive tries ended with the same error.

jaimeiniesta

jaimeiniesta

Flynn is really great, I’m also following that blog post to deploy a Phoenix application, but I get an error when trying to migrate the database (for a new app):

$ flynn run mix ecto.migrate

14:30:03.227 [error] Postgrex.Protocol (#PID<0.210.0>) failed to connect: ** (Postgrex.Error) ssl not available
** (DBConnection.ConnectionError) connection not available because of disconnection
(db_connection) lib/db_connection.ex:718: DBConnection.checkout/2
(db_connection) lib/db_connection.ex:619: DBConnection.run/3
(db_connection) lib/db_connection.ex:921: DBConnection.run_meter/3
(db_connection) lib/db_connection.ex:463: DBConnection.prepare_execute/4
(ecto) lib/ecto/adapters/postgres/connection.ex:82: Ecto.Adapters.Postgres.Connection.execute/4
(ecto) lib/ecto/adapters/sql.ex:228: Ecto.Adapters.SQL.sql_call/6
(ecto) lib/ecto/adapters/sql.ex:178: Ecto.Adapters.SQL.query!/5
(ecto) lib/ecto/adapters/postgres.ex:69: Ecto.Adapters.Postgres.execute_ddl/3

Have you deployed a Phoenix app with Postgres in Flynn?

dropfen

dropfen

Found an easy to use flynn workflow.

http://nsomar.com/how-to-use-flynn-to-deploy-a-phenix-app/

It’s using heroku buildpacks.. which gives you the base to put your own logic into the build process..
I found it actually the most straightforward way to deploy an app.. so far.

And I really like the git control flow..

  1. commit your changes,
  2. merge it to master,
  3. git push flynn master.. and it will handle the rest for you.

As Bonus, it has some really nice dashboard, to check the logs and so on

imranismail

imranismail

I’m went the Kubernetes way as well as @bitwalker suggested. Using the endpoints API to connect them together. https://github.com/bitwalker/swarm/blob/master/lib/swarm/cluster/kubernetes.ex

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews