[erlang-questions] Reltool anyone?

Ulf Wiger <>
Tue Aug 19 15:04:32 CEST 2014


On 19 Aug 2014, at 14:34, Fred Hebert <> wrote:

> I however have doubts on the validity of wanting to do that for *all*
> applications. What's the main objective there?

I have tended to do this ever since I wrote ‘builder’ many years ago:

Have a script that builds a proper boot script, then makes a corresponding ‘setup’ script with all applications as load-only.

The ‘setup’ utility [1] does this automatically. The purpose is to provide an environment for running installation code. The paths are set, and app files loaded, and special install hooks can be executed automatically.

From the README.md:

"If the option -install true is given, the setup_gen utility will generate an installation boot script, and install.config file, which can be used to install the system, using a command like:

erl -sys install -boot install

This boot script will run kernel, stdlib and sasl, then load all other applications, and finally run the setup application, which will find and execute any setup hooks. If the option -setup stop_when_done true is added to the command line, the setup application will automatically shut down all running nodes after running the setup hooks. Otherwise (default), it will hand over control to the shell rather than terminate the Erlang VM."

When installing via rebar/reltool, I have a {rel_apps, Rel, Apps} option in the rebar.config, which is used by a rebar plugin to expand a reltool.config.src file. This plugin also creates a <Rel>_setup release with all apps (except kernel, stdlib & setup) to load-only).

BR,
Ulf W

[1] https://github.com/uwiger/setup/

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com






More information about the erlang-questions mailing list