bitwalker

bitwalker

Leader

Elixir Deployment Tools - General Discussion, Blog Posts, Wiki

General discussions and wiki for Elixir deployment tools - feel free to edit in any useful info.

Tools

Relx

The primary tool for building releases of Erlang applications. Can work with Elixir applications as well with some additional effort. Does not auto-generate appups for hot upgrades/downgrades. Natively supported in erlang.mk, rebar2, and rebar3.

Elixir Release Manager (exrm)

Now deprecated in favor of Distillery, this has been the predominant tool for building releases of Elixir applications. It is Mix-only, auto-generates hot upgrades/downgrades, and ultimately is an automation wrapper around Relx.

Distillery

The latest iteration of release tooling for Elixir applications, it is written entirely in Elixir, and is tightly integrated with Mix, allowing it to further simplify the process of building releases. It is a replacement for exrm, and while similar, it’s ergonomics are significantly better, is more extensible, and is considerably faster than exrm.

Edeliver

Based on Deliver, Edeliver builds on Distillery/Exrm/Relx’s release generation and offers much more complete automation of the entire deployment process, from building releases, generating upgrades, deploying to one or more hosts, and more.

Gatling

Similar to Edeliver. Supports Distillery.

Bootleg

Simple deployment and server automation for Elixir. Bootleg is a simple set of commands that attempt to simplify building and deploying elixir applications. The goal of the project is to provide an extensible framework that can support many different deploy scenarios with one common set of commands.

Blog Posts

Talks

Most Liked

bitwalker

bitwalker

Leader

@joe I can understand the sentiment, but I think the issue is that we’re simply at the stage where no tool is refined enough to solve everyone’s problem elegantly, so many different tools are being created; the resulting competition should produce a natural form of selection which will push the best tools to the top, eventually narrowing us down to just a few solid tools which solve the problem for two different classes of developers/teams, small-medium and large. It’s just too early to expect one tool to dominate and also solve everyone’s problems. I’m of the opinion that we’re unlikely to ever have one tool which works for everyone, but I do hope that we can narrow it down to just a few solid choices. It’s not impossible we could get to one tool, but it remains to be seen how things will shake out.

  1. They try to do the same thing, but all in different ways. Right now, my personal opinion is that bootleg has the best foundation, but I recall thinking similarly about gatling prior to bootleg showing up, so competition will need to sort them out. Edeliver seems to work for plenty of people, but I have also seen many issues raised on the Distillery tracker which seem to arise from it, so that has tainted my opinion a bit. It is also a very complex shell-based tool, which will be difficult to maintain, I think a primarily Elixir-based tool, with the bare minimum of shell required, is likely to be a better foundation to build on. That said, I very much want to be clear that Edeliver was the first tool which actually did a good job of automating build/deployment in Elixir for those not already using some kind of CI/CD pipeline, and I think the team deserves a lot of credit for that, and certainly some slack.
  2. I’m not sure if you maintain any open source projects yourself, but speaking from experience, if it’s just one or two devs maintaining a project, it can be extremely difficult to keep up with the volume of issues and PRs. In many cases, issues are poorly contextualized or described, information needs to be pulled from the person filing it, PRs are messy or poorly explained, or even just plain broken or buggy. That screenshot is a far cry from terrible. Issues or PRs with no comments of any kind is a bummer, but having been a solo maintainer of both exrm and distillery, I can relate to finding it difficult to make time when you have to do it all in your spare time. I always make the attempt to at least leave some initial comments, but I have certainly left issues lingering for long periods of time if they are low priority. Highlighting that the last commit was 28 days ago doesn’t tell us anything either, because there could be work occurring on local branches which hasn’t been upstreamed, and won’t be visible. Try to judge based on the merits of the project, and don’t forget many of these projects are things one or two people are maintaining in their spare time at home :wink:
  3. I agree that tooling needs to support simpler use cases, requiring a complex build setup isn’t practical for individual developers deploying stuff to Digital Ocean or something. That said, I think it’s not unreasonable for a tool to expect that the majority of teams will have this kind of pipeline, and optimize for it. I think most tools should try to provide a path for using a local Vagrant or Docker instance to act as the build/staging servers, expecting developers to be willing to install one of those seems like a fair expectation. One already has the basics needed via Distillery to stick to the simplest tools, e.g., rsync or scp + a simple shell script to automate the deployment if they are not willing to get their hands dirty to set up a basic build/deployment pipeline. The maintainers of such tools have to set some boundaries though, at least until they get enough contributors to support different use cases, otherwise it slows development to a crawl due to fear of breaking support for some cases they don’t use themselves.
  4. The “best” way of getting environment variables into your app is entirely based on your environment. That could be using REPLACE_OS_VARS=true with Distillery using strings like "${SOME_VAR}" in your config file, then extract and parse the value using Application.get_env/3 plus whatever code to post-process the value. You can also skip the first part, and just use System.get_env/1 for simple cases. If you need to configure dependencies via environment variables, then you will need to reach for a tool like Conform or something else, which can handle performing configuration prior to boot. This could even be implemented yourself as a script of some kind which is run in a pre_configure hook with Distillery. The bottom line is that it depends what kind of configuration you need to do, and what you need to configure. Phoenix 1.3 is taking the approach which is now generally recommended for libraries, which is providing an init callback which allows you to configure the application before it starts, in whatever way works best for you. Since that is a relatively new approach, there are plenty of libraries which don’t support this, but that will change. For dependencies which you need to configure before boot, but don’t provide some other mechanism, you can use included_applications, adding their top-level supervisor to your application’s supervisor, and configuring them in your application’s start/2 callback; this is not ideal, but allows you to perform the configuration step in Elixir, using whatever approach you want or need.

I appreciate the kind words about Distillery :slight_smile: . Since we’re on the topic, the reason I never tried to solve the problem these other tools are solving, is that I wanted to keep Distillery focused on being a solid foundational layer, so that it’s malleable enough to fit any use case, and let other tools build on it. Also, I’m just one guy, so I probably would fail miserably at maintaining all of that on my own :stuck_out_tongue:

gregvaughn

gregvaughn

I enjoyed this talk at EmpEx about edeliver https://www.youtube.com/watch?v=H686MDn4Lo8

Where Next?

Popular in Wikis Top

swelham
Introduction After some discussion with a few other members we thought it might be an idea to start a thread where we can post about libr...
New
axelson
Preamble This Wiki is intended to be a community-maintained (see the Contribution Guidelines if interested) resource of common “gotchas” ...
New
BartOtten
A wiki for Doom Emacs Doom is a configuration framework for GNU Emacs. It focuses on performance and customizability. It can be a founda...
New
ibgib
Popular Elixir Packages List of popular Atom.io Elixir Packages. These can be installed via atom’s package center or a command line with ...
New
anildigital
Here is list of plugins for different editors Sublime Text 3 — Elixir.tmbundle - GitHub - elixir-editors/elixir-tmbundle: A TextMate a...
New
shavit
To transcode the video there is FFMPEG. On Demand When a user uploads a video, the app renames and copy the file to a path, then call F...
New
blackode
This is a wiki - anyone at Trust Level 1 or higher can help keep it updated. Elixir Pocket Syntax Uncommon Logical stuff of Elixir modul...
New
Eiji
At start some definitions: HTTPS (is a protocol for secure communication over a computer network which is widely used on the Internet) -...
New
blackode
Hi and Hello Every Elixirian. After Learning the Elixir basics, I struck then. I have no idea of how to put my Elixir Knowledge in pract...
New
AstonJ
Wonder if we can compile a list of learning resources, blog posts, talks, threads etc to help those who are just learning about Contexts....
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement