summaryrefslogtreecommitdiffstats
path: root/docs/en/erlang.mk/1/guide/releases/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/erlang.mk/1/guide/releases/index.html')
-rw-r--r--docs/en/erlang.mk/1/guide/releases/index.html59
1 files changed, 57 insertions, 2 deletions
diff --git a/docs/en/erlang.mk/1/guide/releases/index.html b/docs/en/erlang.mk/1/guide/releases/index.html
index bf102a3c..fc98819e 100644
--- a/docs/en/erlang.mk/1/guide/releases/index.html
+++ b/docs/en/erlang.mk/1/guide/releases/index.html
@@ -123,6 +123,9 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ make rel</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk always generates a tarball alongside the release,
+which can be directly uploaded to a server. The tarball is
+located at <code>$(RELX_OUTPUT_DIR)/&lt;name&gt;/&lt;name&gt;-&lt;vsn&gt;.tar.gz</code>.</p></div>
</div>
</div>
<div class="sect1">
@@ -142,6 +145,58 @@ release if they weren&#8217;t already. It starts the release in
use to check things as needed.</p></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_upgrading_a_release">Upgrading a release</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk provides a <code>relup</code> target for generating release
+upgrades. Release upgrades allow updating the code and the
+state of a running release without restarting it.</p></div>
+<div class="paragraph"><p>Once your changes are done, you need to update the version
+of the application(s) that will be updated. You also need
+to update the version of the release.</p></div>
+<div class="paragraph"><p>For each application that needs to be updated, an
+<a href="http://erlang.org/doc/man/appup.html">appup file</a>
+must be written. Refer to the Erlang/OTP documentation
+for more details.</p></div>
+<div class="paragraph"><p>For the purpose of this section, assume the initial release
+version was <code>1</code>, and the new version is <code>2</code>. The name of the
+release will be <code>example</code>.</p></div>
+<div class="paragraph"><p>Once all this is done, you can build the tarball for the
+release upgrade:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make relup</tt></pre></div></div>
+<div class="paragraph"><p>This will create an archive at the root directory of the
+release, <code>$RELX_OUTPUT_DIR/example/example-2.tar.gz</code>.</p></div>
+<div class="paragraph"><p>Move the archive to the correct location on the running
+node. From the release&#8217;s root directory:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ mkdir releases<span style="color: #990000">/</span><span style="color: #993399">2</span><span style="color: #990000">/</span>
+$ mv path/to/example-<span style="color: #993399">2</span><span style="color: #990000">.</span>tar<span style="color: #990000">.</span>gz releases<span style="color: #990000">/</span><span style="color: #993399">2</span><span style="color: #990000">/</span></tt></pre></div></div>
+<div class="paragraph"><p>Finally, upgrade the release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ bin/example_release upgrade <span style="color: #FF0000">"2/example_release"</span></tt></pre></div></div>
+<div class="paragraph"><p>Or on Windows:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ bin/example_release<span style="color: #990000">.</span>cmd upgrade <span style="color: #FF0000">"2/example_release"</span></tt></pre></div></div>
+<div class="paragraph"><p>Your release was upgraded!</p></div>
+</div>
+</div>
@@ -157,8 +212,8 @@ use to check things as needed.</p></div>
- <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/">
- Escripts
+ <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/">
+ Self-extracting releases
</a>
</nav>