Longstanding issues: structs & standalone Erlang

Ulf Wiger (AL/EAB) <>
Thu Feb 23 10:04:35 CET 2006


 
Mikael Karlsson wrote:
> 
> The problem with deployment on Erlang, as I see
> it, is that it is not possible to add new
> applications to releases, and that they all have
> to go into the erlang root library.

This is not true. You can provide several roots
to the systools script, and you can have your own
"releases" directory wherever you want.

For our products, we _never_ add applications 
under the OTP_ROOT in our products. We treat OTP 
as a 3rd party package, and take care not to mix 
our own stuff with that of OTP.

The 'builder' contrib puts boot scripts under the
priv/ directory of an application, by default 
(I'm working on a new version that will build 
whole systems as easily). Here's an extract from
a generated shell script for the 'rdbms'
application:

$ERL $SNAME -boot /home/etxuwig/work/blogorum/lib/rdbms-1.99/priv/rdbms
-config 
/home/etxuwig/work/blogorum/lib/rdbms-1.99/priv/sys -boot_var BLOGORUM
/home/etx
uwig/work/blogorum -boot_var ROOT
/vobs/mgwblade/tools/progs/Otp/OTP_LXA11930

Note the -boot_var entries.

In the corresponding boot script, you will
find:

         {path,["$ROOT/lib/mnesia-4.2.3/eb
in"]},
         {primLoad,[mnesia_tm,
                    mnesia_text,
                    mnesia_sup,

and 

         {path,["$BLOGORUM/lib/rdbms-1.99/ebin"]},
         {primLoad,[trigger_test,
                    re2ms,
                    rdbms_verify,
  
The -boot_var entries were initially intended to allow
for relocatable boot scripts (e.g. when doing cross-builds),
but can also (and are intended to) be used to manage multiple
roots.

/Ulf W



More information about the erlang-questions mailing list