Table of Contents

DESCRIPTION

Erlang and Elixir releases are tarballs containing compiled code and any files from the erlang system required to run the application.

Running a release can be as simple as:

# appname is the release application name
$ mkdir -p /path/to/appname
$ cd /path/to/appname
$ tar zxf /path/to/appname.tar.gz
$ bin/appname foreground

Except releases are not self-contained:

For example, with the same architecture, compiling an Elixir release on Ubuntu 20.04 will run on another Ubuntu 20.04 (and probably later) system.

Running the release on an Ubuntu 16.04 system will fail due to library version incompatibilities.

Probably the easiest fix is to compile the release on a system with the same platform:

Another option is to include the system libraries in the release using Exodus.

COMMANDS

$ pip install --user exodus-bundler
# erlang
$ rebar3 as prod release --relname=${RELNAME} --relvsn=${RELVSN}

# elixir
$ MIX_ENV=prod mix do deps.get, deps.compile, release
# appname is the release application name
$ exodus --add . --tarball bin/appname --output /tmp/appname.tgz
$ mkdir -p /usr/local/lib/appname
$ tar --strip 1 -C /usr/local/lib/appname -zxf /tmp/appname.tgz
$ cd /usr/local/lib/appname
$ sudo chown root:root ./bundles/fe1305c76dd94418a58b068a75ffba0d7f32707808de4362767ee166eccbec83/tmp/appname/lib/epcap-1.1.0/priv/epcap
$ sudo chmod u+s ./bundles/fe1305c76dd94418a58b068a75ffba0d7f32707808de4362767ee166eccbec83/tmp/appname/lib/epcap-1.1.0/priv/epcap

(markdown)