How to deploy an upgrade (build with rebar3)

by by@REDACTED
Sun Feb 23 07:36:50 CET 2020


Hello Guilherme,

Thanks for the tip!

After some experiments (follow the instructions of rebar3_appup_plugin), I can deploy my application upgrade to my running system!

Although there are some other problems (on my running system, the established WebSocket connection (process) been killed after the upgrade), the whole thing works fine.

I will investigate more about why the running process been killed after the upgrade, I think the link below might be helpful:
https://github.com/lrascao/rebar3_appup_plugin/blob/develop/doc/UPGRADE_DOWNGRADE.md#soft-vs-brutal-purge <https://github.com/lrascao/rebar3_appup_plugin/blob/develop/doc/UPGRADE_DOWNGRADE.md#soft-vs-brutal-purge>

Kind Regards,
Yao

> 在 2020年2月23日,08:14,Guilherme Andrade <g@REDACTED> 写道:
> 
> Hello Yao,
> 
> `rebar3_appup_plugin` may help you:
> 
> https://github.com/lrascao/rebar3_appup_plugin <https://github.com/lrascao/rebar3_appup_plugin>
> 
> (I know this doesn't answer your actual question - I'm not knowledgeable enough - but it works very well for me and perhaps it will solve your problem, too.)
> 
> On Sat, 22 Feb 2020 at 12:27, by <by@REDACTED <mailto:by@REDACTED>> wrote:
> Hello,
> 
> I use rebar3 to build my Erlang applications.
> 
> For application deployment, I build a compressed archive and copy it to the target. The first release works, but how can I upgrade my application on the running system?
> 
> I found some information with this link: https://www.rebar3.org/docs/releases#section-deploying-an-upgrade <https://www.rebar3.org/docs/releases#section-deploying-an-upgrade>
> 
> But I got error when I try to unpack/install my new release:
> Unpack failed: release_package_not_found
> Installed versions:
> * 1.0.2	permanent
> 
> Say, I have a release (1.0.2) which is running, and there are some code changes, I build ($ rebar3 as prod tar) a new release (1.0.3). Is myrel-1.0.3.tar.gz sufficient for deploying the upgrade? I copied the myrel-1.0.3.tar.gz to the root directory of my application.
> 
> I think the problem is how to make my new release/version being listed with command: $ bin/myrel versions
> 
> Kind Regards,
> Yao
> 
> 
> -- 
> Guilherme

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


More information about the erlang-questions mailing list