[erlang-questions] Release upgrade of an app without a top supervisor

Roberto Ostinelli roberto@REDACTED
Tue Feb 16 16:28:57 CET 2016

If anyone else needs a solution for this, here is mine.
First, build your release upgrade package as you normally would. I use
rebar, so I issue:

$ rebar generate-appups previous_release=myapp-1.4.6

Modify your .appup files as needed, then generate the upgrade package:

$ rebar generate-upgrade previous_release=myapp-1.4.6

Then, open up the upgrade package, and look for the relup file
In your relup instructions, before the point_of_no_return instruction
ensure to load the setup app:


Just after the point_of_no_return, ensure to stop it:


Finally, after all the other instructions ensure to start it:


Now, on a live system, check which applications are live:

1> application:which_applications().
[{myapp,"My App.","1.4.6"},
 {exometer_core,"Code instrumentation and metrics collection package.",
 {setup,"Generic setup application for Erlang-based systems","1.4.6"},

Then proceed to the normal upgrade:

2> release_handler:unpack_release("myapp_1.5.0").
3> release_handler:install_release("1.5.0").
4> release_handler:make_permanent("1.5.0").

Check applications again:

5> application:which_applications().
[{setup,"Generic setup application for Erlang-based systems","1.5.0"},
 {myapp,"My app.","1.5.0"},
 {exometer_core,"Code instrumentation and metrics collection package.",

You can see that it upgraded successfully.

Hope this can help somebody else.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160216/da86fa34/attachment.htm>

More information about the erlang-questions mailing list