Erlang hot deployment

Source: Internet
Author: User

Refer to the rebar wiki for the following process.

The rebar version must be noted that the higher version has bugs for the following two commands:

rebar generate-appupsrebar generate-upgrade

Versions 2.2.0 are available after tests, but the clean and compile commands of this version do not support the-R parameter.

Example:
You can use the rebar-creator script to create a project. I use the latter, which is more convenient.
The project I created is tcp_server.

Modify apps. the version number of the vsn field in your app and SRC file is the same as that of the rel field in REL/reltool. config. Test to write 0.1
(Is it possible to be inconsistent? It is unclear, but the official demo is consistent; and it should be consistent as Version Management)

rebar compile;rebar compile;rebar generate -f;

Rename REL/tcp_server to tcp_server_0.1


Change the version number to 0.2 again.

Re-compile:

rebar clean;rebar compile;rebar generate -f;rebar generate-appups previous_release=tcp_server_0.1;rebar generate-upgrade previous_release=tcp_server_0.1;

 

Then, you can see a compressed tcp_server_0.2.tat.gz package in your relobject.
We will route this compressed package to tcp_server_0.1/release.

CD tcp_server_0.1./bin/tcp_server console enter the shellrelease_handler: which_releases () of Erlang ().


It should be 0.1.
Decompress the 0.2 package and install it.

erl> release_handler:unpack_release("tcp_server_0.2").erl> release_handler:install_release("0.2").erl> release_handler:make_permanent("0.2").erl> release_handler:which_releases().

 

Erlang hot deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.