Author: Ulf Wiger [email protected]
This application implements an OTP distributed application controller.
Currently, only local application control is supported, but one particular feature is that it allows applications to be started before another application.
The standard application controller respects dependencies specified in
an application's .app
file, where the applications
attribute lists
other applications that must be running before the given application can
be started.
In some cases, one may want to ensure that a certain application is started
before a third-party application, whose .app
file is already set.
For example:
- An application running before mnesia, which checks conditions and e.g. creates a database schema (this must be done before mnesia starts)
- Applications needed by
exometer_core
probes, which could then be declaratively defined and started automatically byexometer_core
.
The idea is to automate parts of the configuration, e.g. through a rebar3 plugin, but currently, all configuration needs to be done manually.
- Set the
app_ctrl
application environment variableapplications
. The option of interest for now isstart_before
:
{app_ctrl, [{applications,
[
{gproc, [{start_before, [exometer_core]}]}
]}
]}
- In order for the application control to work, permissions must also
Be set to
false
for the affected applications. Theapp_ctrl
application will set all permissions totrue
as soon as it is set up and has acquired control of the relevant applications.
{kernel, [{permissions,
[
{gproc, false},
{exometer_core, false}
]}
]}
$ rebar3 compile